Skip to content

Instantly share code, notes, and snippets.

@willm
Last active June 11, 2020 07:28
Show Gist options
  • Save willm/b28a8f9ba192a9a3ef549da698f11894 to your computer and use it in GitHub Desktop.
Save willm/b28a8f9ba192a9a3ef549da698f11894 to your computer and use it in GitHub Desktop.
Linux cheat sheet

Users

Set home directory

usermod -m -d $path $user

Add to group

usermod -aG $group $user

Network

Which dns servers am I using

nmcli dev show | grep -i dns

Distro info

Which distro am I running

cat /etc/lsb-release or cat /etc/issue

Apt and dpkg

List files in installed package

dpkg-query -L $packageName

List installed packages

dpkg -l

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment