Skip to content

Latest commit

 

History

History
68 lines (49 loc) · 996 Bytes

Linux in General.md

File metadata and controls

68 lines (49 loc) · 996 Bytes

Linux in General

  • Determining the full path of a command
which command
  • Determine what the command is
type command
  • Create a user
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:
  1. --x
  2. -w-
  3. -wx
  4. r--
  5. r-x
  6. rw-
  7. rwx
  • Show all the sudo permissions of a user
sudo -l
  • Using less with color:
jq -C . data.json | less -R