Common commands

  • pwd — prints the current working directory.
  • cd — changes the current directory. We use .. to get to the parent level, and a specific folder name to get to a child level. For directories with spaces, we can wrap the address path in quotation marks to ensure it changes properly.
  • mkdir <DIR_NAME> — to create a new sub-directory in the current working directory.
  • chmod — which changes the access permissions of a given file/directory.
  • cp — copies files. See flags below.
    • -a /src/. /dest/ — recursively copies all contents of the src folder to the dest folder.

Absolute paths are the full paths starting from the root directory. Relative paths are relative to the current working directory.

To mount a drive:

sudo mount /dev/sda3 /mnt/drv3