FreeUnix.davidleemans.be

WordPress site for Linux and other computernerds

Page 2 of 18

Apt-get tips and tricks

 

Some tricks when using apt (apt-get) on a Debian system.

 

1. nslookup is missing on Debian 10

 

If you ever wanted to use nslookup on a Debian 10 server and you’re getting an “nslookup: command not found” result, then use apt-get to install the dnsutils package.

apt-get install dnsutils

 

2. ifconfig is missing on Debian 10

 

Likewise, if you ever wanted to use good’ol ifconfig on a Debian 10 server and you’re getting an “ifconfig: command not found” result, then use apt-get to install the net-tools package.

apt-get install net-tools

 

3. Search for installed packages

 

If you wanted to figure out which package version(s) of a specific software are installed, then use apt to search for the related package(s).
Example: if you want to find out what version of mariadb is installed, use this:

apt list --installed | grep mariadb 

Omitting the grep command in the previous example, will list all packages installed on your system:

apt list --installed 

 

4. Search for available packages

 

If you wanted to known which package version(s) of a specific software are available for installation, then use apt-cache to search for package(s). The apt-cache search command will return all packages that have the specified name in the package name or description
Example: if you want to find out what version of tomcat is available, use this:

apt-cache search tomcat 

 

Enjoy 🙂
 

« Older posts Newer posts »