Installing additional software via the APT package manager

Background

By default, each TurnKey appliance is carefully built from the ground up with the minimum components needed to serve its role with maximum efficiency and security.

Users that need software that isn't installed by default can easily install it through APT, the Advanced Packaging Tool, which can be accessed through the web interface (Webmin) or through the command line interface (recommended).

Remember, a TurnKey Linux appliance is Debian under the hood. TurnKey Linux just gives you a better starting point, so it's ok to customize an appliance to fit your needs. You can use Debian documentation to help.

Before you start

Make you sure your appliance has Internet access. It needs to be able to access APT's online package repositories.

Installing packages via the command line

Log into the command line. You can do that via an SSH client, or from your browser using the AJAX web shell: https://appliance.ip:12320/

Updating the APT database

If this is your first installing software via APT you'll need to update it's database of available packages first.

apt-get update

\Installing a package

apt-get install name-of-package

Searching for packages

Show a list of package names + short descriptions:

apt-cache search keyword1 keyword2 ...

Show full description of a package:

apt-cache show packagename

For example, let's say we want to do some network exploration:

apt-cache search map network | less

# let's find out more about this nmap tool
apt-cache show nmap

# let's install it
apt-get install nmap

Installing packages via the web management interface (Webmin)

Log into Webmin: https://appliance.ip:12321/

Go to System -> Software Packages

Updating the APT database

If this is your first installing software via APT you'll need to update it's database of available packages first. Scroll to the bottom of the screen and click "Update Now".

Installing a package

You can ask APT to install a package by selecting the "Package from APT" radio button in the "Install a new package" section and entering the name of the package, then clicking "Install".

Searching for packages

If you don't know the exact name of the package you want, can search through for it by clicking the "Search APT" button. That will open a pop-up window in which you can search for keywords (e.g., editor) and get a list of packages that have that keyword in their name or description.

Commonly required extra packages

  • build-essential: compiler build chain. You need this if you are going to be building software from source.
  • vim: a full version of the Vim text editor.
    By default all appliances come with vim-tiny (a subset of Vim, a modal text editor preferred by experts) and nano (a simple non-modal text editor).

Browse or search the Debian package repository

Browse the full list of packages available in Debian stable (generally the basis of the current TurnKey version) here:

https://packages.debian.org/stable/

Or search for packages using the search feature here:

https://www.debian.org/distrib/packages#search_packages

Input your keyword(s) and select whether to search package name only, or descriptions as well. Select the distro (generally 'stable' for the current TKL version) and click search (next to keyword).

If you are looking for a script provided by a package which you don't know the name of, try the 'Search the contents of packages' search further down the page.

Gotchas when following external tutorials

There are a huge amount of relevant (and sometimes not so relevant) tutorials and/or instructions on how to install and/or configure additional software online (just google!). If you keep in mind that TurnKey is Debian under the hood theey can be an invaluable source of ideas and a useful resource. However you may come across some gotchas!

sudo

Some instructions may use the sudo command prior to many commands (e.g. apt-get and many others). Essentially sudo allows you to run commands as if you were the root user (when you're not). As TurnKey defaults to using the root account it is generally not required. However it can be installed if required - using apt! :)

aptitude

Some Debian instructions/tutorials available online may use an alternate commandline tool called 'aptitude'. TurnKye does not include aptitude by default. Generally you can substitute 'apt-get' for 'aptitude' without issue, although aptitude does have some alternative (and additional) advanced commands. For general usage apt-get should be fine, however if you desire you can install aptitude with apt! :)