Moving around the Filesystem


Commands for moving around the file system include the following:

  • pwd: The pwd command will allow 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. See the example presented in Figure A-1.

  • cd: The cd command will allow you to change directories. When you open a terminal you will be in your home directory. To move around the file system you will use cd. For example, cd ~/Desktop will move you to your desktop directory.

    • 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), use cd -

    • To navigate through multiple levels of directory at once, use cd / var/www for example, which will take you directly to the /www subdirectory of /var/.



The Official Ubuntu Book
The Official Ubuntu Book
ISBN: 0132435942
EAN: 2147483647
Year: 2006
Pages: 133

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net