Home > Articles > Operating Systems, Server > Linux/UNIX/Open Source

  • Print
  • + Share This
This chapter is from the book

Moving Around the Filesystem

Commands for navigating in the filesystem include the following.

  • pwd: The pwd command allows you to know the directory in which you're located (pwd stands for "print working directory"). For example, pwd in the desktop directory will show ~/Desktop. Note that the GNOME terminal also displays this information in the title bar of its window, as shown in Figure A-1.
  • cd: The cd command allows you to change directories. When you open a terminal, you will be in your home directory. To move around the filesystem, use cd.
    • Use cd ~/Desktop to navigate to your desktop directory.
    • Use cd / to navigate into the root directory.
    • Use cd to navigate to your home directory.
    • Use cd .. to navigate up one directory level.
    • Use cd - to navigate to the previous directory (or back).
    • If you want to go directly to a specific, known directory location at once, use cd /directory/otherdirectory. For example, cd /var/www will take you directly to the /www subdirectory of /var.
  • + Share This
  • 🔖 Save To Your Account