You need to use tasksel command. It is a software installation application that is an integral part of the Debian installer and works under Ubuntu Linux too. It groups some packages by tasks and offers the user an easy way to install the packages for that task. It provides the same functionality as using conventional meta-packages.
How do I use tasksel?
tasksel has been included as part of the base installation under both Debian and Ubuntu Linux (since Ubuntu Edgy). tasksel shows all available tasks and allows to user to select ones to install. Simply type tasksel as root user at a shell prompt:
$ sudo tasksel
You will see software selection menu as follows as per your distro version:
Select required group by pressing space bar followed by OK button.
How do I list available groups from a command prompt?
The option –list-tasks list on screen the tasks (packages) that would be displayed in the tasksel TUI (text user interface). You can use it as follows:
$ tasksel --list-tasks
u serverBasic Ubuntu server u dns-serverDNS server u edubuntu-serverEdubuntu server i lamp-serverLAMP server u mail-serverMail server i openssh-serverOpenSSH server u postgresql-serverPostgreSQL database i print-serverPrint server i samba-serverSamba file server u tomcat-serverTomcat Java server u virt-hostVirtual Machine host u ubuntustudio-graphics2D/3D creation and editing suite u ubuntustudio-audioAudio creation and editing suite u edubuntu-desktop-kdeEdubuntu KDE desktop u edubuntu-desktop-addonEdubuntu desktop u kubuntu-desktopKubuntu desktop u ubuntustudio-audio-pluginsLADSPA and DSSI audio plugins u mythbuntu-desktopMythbuntu additional roles u mythbuntu-frontendMythbuntu frontend u mythbuntu-backend-masterMythbuntu master backend u mythbuntu-backend-slaveMythbuntu slave backend u mobile-midUbuntu MID edition u ubuntustudio-desktopUbuntu Studio desktop (must install) i ubuntu-desktopUbuntu desktop u mobile-mobileUbuntu mobile u ubuntustudio-videoVideo creation and editing suite u xubuntu-desktopXubuntu desktop u edubuntu-liveEdubuntu live CD u kubuntu-kde4-liveKubuntu live CD u kubuntu-liveKubuntu live CD u kubuntu-dvd-liveKubuntu live DVD u mythbuntu-liveMythbuntu live CD u ubuntu-liveUbuntu live CD u ubuntu-dvd-liveUbuntu live DVD u xubuntu-liveXubuntu live CD
The –task-desc task option displays the extended description of the given task:
$ tasksel --task-desc virt-host
Packages necessary to host virtual machines
How do I install package group (tasks) from a command line?
Reading package lists... Done Building dependency tree Reading state information... Done Note, selecting 'python2.7-minimal' for task 'dns-server' Note, selecting 'libirs141' for task 'dns-server' Note, selecting 'python2.7' for task 'dns-server' Note, selecting 'bind9utils' for task 'dns-server' Note, selecting 'python' for task 'dns-server' Note, selecting 'libpython-stdlib' for task 'dns-server' Note, selecting 'bind9' for task 'dns-server' Note, selecting 'libpython2.7-minimal' for task 'dns-server' Note, selecting 'libpython2.7-stdlib' for task 'dns-server' Note, selecting 'python-minimal' for task 'dns-server' Note, selecting 'bind9-doc' for task 'dns-server' libpython-stdlib is already the newest version (2.7.11-1). libpython-stdlib set to manually installed. python is already the newest version (2.7.11-1). python set to manually installed. python-minimal is already the newest version (2.7.11-1). python-minimal set to manually installed. libpython2.7-minimal is already the newest version (2.7.12-1~16.04). libpython2.7-minimal set to manually installed. libpython2.7-stdlib is already the newest version (2.7.12-1~16.04). libpython2.7-stdlib set to manually installed. python2.7 is already the newest version (2.7.12-1~16.04). python2.7 set to manually installed. python2.7-minimal is already the newest version (2.7.12-1~16.04). python2.7-minimal set to manually installed. The following NEW packages will be installed: bind9 bind9-doc bind9utils libirs141 0 upgraded, 4 newly installed, 0 to remove and 0 not upgraded. Need to get 788 kB of archives. After this operation, 4,520 kB of additional disk space will be used. Do you want to continue? [Y/n]
And yes, you CANOT forgot the caret (^) symbol. You need to put ^ at the end of package name; otherwise it will give an error which read as follows:
E: Couldn't find package lamp-server
Read tasksel man page for more info: