Command-line CheatSheet

  • ls -> Print a directory’s contents
    • -l -> Print the contents as a list
    • -a -> Display every file and directory
  • cat -> Print a file’s contents
  • cd -> Move to a different directory
  • pwd -> Prints the directory you’re currently in
  • echo -> Print character strings and variables
  • whoami -> Print your username
  • echo $USER Print your username
  • groups -> Print the groups you are part of
  • echo $UID -> Print your user’s unique numeric ID