BytesOfProgress

Wiki


Learn to navigate your filesystem

Changing Directories

cd = change directory

  $ cd directory

  $ cd /path/to/directory/

Changing back to locations "upwards"

  To go back one folder, e.g. go from /var/www to /var:
  $ cd ..

  To go back to your home folder or root folder:
  $ cd


Listing files

ls = list

  $ ls

  $ ls /path/to/specific/directory

There are also some options to the "ls" command, to show more details like hidden files or file permissions. For example:

  $ ls -a

  $ ls -l


Where am I? Print working directory

pwd = print working directory

This will show you the path to the directory you are currently working in.


$ pwd
    


Creating Files

We can create files by typing "touch "file" in the shell. Example to create "file.txt":


$ touch file.txt
    



back