Install missing commands on Linux distributions

On some lean systems, mostly in Docker containers, some important commands are not readily available. The table below shows the command to install them.

To get the name of the Linux distribution execute

cat /etc/os-release

To find the package that contains the command, install apt-file

sudo apt-get install apt-file

Update the file package mapping database

sudo apt-file update

Search for the command at the end of the path

apt-file search --regexp '/MY_COMMAND$'

Select the package that contains the command in the standard path (/usr/bin/)

To get more information on the package

apt-cache show MY_PACKAGE

Application install commands

ApplicationRHEL, CentOSUbuntu, Debian
free, kill, pkill,
pgrep, pmap,
ps, pwdx, skill,
slabtop, snice,
sysctl, tload,
top, uptime,
vmstat, w, watch
apt-get install procps
telnetyum install telnet -yapt-get install telnet

Leave a comment

Your email address will not be published. Required fields are marked *