Skip to main content

Creating Tasksel Custom Tasks in Ubuntu 16.04

By July 14, 2016September 12th, 2022No Comments

How to Create Your Own Tasksel Custom Tasks

logo-ubuntu_st_no®-black_orange-hex-140x140In any Debian based Linux system such as Ubuntu 16.04 you can install groups of software using the command tasksel. It then does not take a lot of thought until you are wishing to create your own tasksel custom tasks. This will allow you to deploy software more readily in software groups. So in the blog we are going to show you how you can install your groups of software that your define by creating tasksel custom tasks. These are created in simple text files with a .desc extension. So editors to the ready and off we go.

When running the command tasksel it will search from *.desc files in the directory /usr/share/tasksel/descs/ . In Ubuntu you have two files here a debian file and a ubuntu file. Each of these files contain tasks and we can add to these files or create our own files. It is probably best that we create our own .desc files to prevent them being overwritten by any software update from Ubuntu. In the demonstration video the accompanies this blog we create a file call mytask.desc, as an example.

Task: my-utils
Relevance: 2
Description: Common Utilities
 Install commonly required system utilities
Packages: list
Section: user

The file is analyzed in the following list:

  • Task: This is the task title and is used from the command line and tasksel
  • Relevance: A single digit from 1-9 that specifies how how up the menu it should appear where 1 is high and 9 is low
  • Description: This must appear over two lines as a short description on the first line followed by a longer description on subsequent lines. These additional lines should be indented.
  • Key: required software that is need to be installed to make this selection available. Here we leave it blank as we do  not need an software for the tools that we add
  • Packages: We use the command list to specify a list of packages to install. the list of packages will show indented on the following lines. We are installing two packages here, tree and nmap
  • Section: In Ubuntu software can be server or user based. we set this to be user tools.

We can now make the selection from the tasksel menu to install our group which will show as Common Utilities. Alternatively we may use the following command to install and remove the package group:

sudo tasksel install my-utils
sudo tasksel remove my-utils

The following video steps you through the process: