Monday, April 20, 2015

Day 17: The Linux Command Line Ch14 Notes


Chapter 14 - Package Management

All the question will be related to debian-style Linux (I use Raspbian OS here).


Question 1
What is debian-style low-level packaging tool?

Question 2
What is debian-style high-level packaging tool?

Question 3
How to find a particular package using package name?

Question 4
How to verify details of vsftpd server?

Question 5
How to install vsftpd server?

Question 6
How to remove a package from a system?

Question 7
How update packages using one line?

Question 8
How to list installed packages?

Question 9
How to determine that vim editor is installed on the system?

Question 10 (not included in the TLCL book)
How to check the list of installed files using the name of the package?

Question 11 (not included in the TLCL book)
How to determine which package installed a specific file (for instance /etc/host.conf)?



Answers

Question 1
What is debian-style low-level packaging tool?

dpkg

Question 2
What is debian-style high-level packaging tool?

apt-get or aptitude

Question 3
How to find a particular package using package name?

$ sudo apt-get update
$ sudo apt-cache search search_string

Example:
$ sudo apt-cache search vsftpd

Question 4
How to verify details of vsftpd server?

$ sudo apt-cache show vsftpd

Question 5
How to install vsftpd server?

$ sudo apt-get udpate
$ sudo apt-get install vsftpd

Question 6
How to remove a package from a system?

$ sudo apt-get remove package_name

Question 7
How update packages using one line?

$ sudo apt-get update; sudo apt-get upgrade

Question 8
How to list installed packages?

$ dpkg-query -l

or

$ dpkg --get-selections

Question 9
How to determine that vim editor is installed on the system?

$ dpkg --status vim

Question 10 (not included in the TLCL book)
How to check the list of installed files using the name of the package?

$ dpgk -L

Question 11 (not included in the TLCL book)
How to determine which package installed a specific file (for instance /etc/host.conf)?


$ dpkg -S /etc/hosts.conf