If you started out using an RPM-based distro before advancements like “yum” or “apt-rpm”, you’re loving the magic of “apt-get” on Ubuntu and Debian. But when it comes to installing large sets of software, which may have either dozens (if not hundreds) of packages, or those that require a good deal of integration, sometimes “apt-get” can feel like the old
rpm -i guessing game. Fortunately, there’s a “tasksel” – think of it as “apt-get for apt-get”.
While tasksel is used in the Ubuntu installer (the text-mode server installer, at least), it isn’t installed by default. It can be installed from the Software Centre, or with the following:
The best way to get a feel for tasksel is to just run it with no arguments.
It’s a command-line program, but even in the terminal you’ll be presented with a graphical list of avaialble tasks to install (if you’ve ever installed in text-mode, such as from the server CD, the following screen will look familiar):
Using this screen, you can use the “Tab” key to jump through the options (hit space if you land on one you want to install), then when the “OK” button is highlighted, hit the space bar. Alternately, you can include which task you’d like to install on the command line. The following command will display the aforementioned list of tasks that can be installed, but in text format:
An “i” in the first column indicates that it is installed, while a “u” indicates that a task has not been installed through tasksel.
To install one of the listed tasks, you can use the following command:
This will download, install, and configure the necessary packages for you to make everything work seamlessly.
Tasksel vs. Apt-Get
You may ask yourself why you’d want to use tasksel versus the traditional apt-get command to install software, especially when there’s an equivalent meta-package. It’s easiest to think of it like this:
- On one hand, apt-get installs software as individual packages, even if those packages require others. In other words, it will install each package and respect dependencies, but otherwise assume all of them are separate.
- In contrast, tasksel assumes you’re trying to install software towards a singular end-goal, such as a web server. It will take all the steps necessary to achieve that goal, including installing software as well as doing other configuration once the install is done. Getting a web server running is a good example… you might need to install apache, mysql, php, and a number of modules and add-on’s for each in order to get a proper LAMP stack running. Or you could just issue the following command:
Here are some other useful tasks available from tasksel:
- Installed Ubuntu, but want to try out the latest KDE Software Collection? Just use this:
- Have a computer you’d like to hook up to your home theater PC? It’s as easy as:
- Need a GUI for your server, but don’t want to waste precious resources on something like KDE or Unity?
While it offers a much more limited selection of software to install, if the feature you want is available, the tasksel command is the best way to get it up and running with a minimum of effort.
Our latest tutorials delivered straight to your inbox