Basic Linux Commands - wAlber47/Tech-Journal GitHub Wiki

Basics

  • pwd - shows what directory you are currently in.
  • cd - is used to change the directory in which the user is currently in.
    • cd .. goes up one path.
    • cd . references your current directory.
  • ls - shows a list of the given path or the current directory.
    • -l uses a long listing format.
    • -a shows all, does not ignore some items.
  • > can be used to redirect the output of a command to a file.
  • >> can be used to append the output to the end of a certain file.
  • mkdir - creates a new directory
  • rmdir - removes a directory
    • rm -r will also remove a directory and everything inside of it
  • cp - copies a file to a specific location
  • cat - reads a file to the command line
  • touch - creates a blank file
  • man - shows instructions on how to use a command