Linux Commands Quick Reference

My running collection of Debian/Linux commands that I don’t use often and usually have to look up. Dumping them here for quick reference, in no particular order.

check debian version

lsb_release -a

list installed packages – with a side of grep

sudo apt list --installed | grep something

find public ip from cmd line

apt install dnsutils
dig +short myip.opendns.com @resolver1.opendns.com

evaluate math expressions on the command line

echo "$[10 * 1024*1024*1024]"

get info about system hardware

cat /proc/cpuinfo

summarize size of dirs and sub-dirs

du -cksh /* | sort -h