- Determining the full path of a command
- Determine what the command is
useradd --create-home tomk
# if there are any ssh keys to attach to the user
# paste them in seperate lines in .ssh/authorized_keys (under user home dir)
- Add an existing user to an existing group
usermod -a -G group_name user_name
- Determining the package that installed a specific file (Debian)
dpkg -S /path/to/file
#or, directly on a command like so
dpkg -S `which command`
- List files installed by a specific package (Debian)
dpkg-query -L <package-name>
- List files a .deb file will install (Debian)
dpkg-deb -c <package-name.deb>
chmod
numbers representation:
--x
-w-
-wx
r--
r-x
rw-
rwx
- Show all the sudo permissions of a user
jq -C . data.json | less -R