LWM-Linux/02 - Basic System Operations/Filesystem Navigation.md

666 B

  1. Print Working Directory (pwd): Use pwd to display your current location in the filesystem. It shows the absolute path from the root directory (e.g., /home/user). Absolute paths are crucial for scripts.

  2. Change Directory (cd):

    • To move up one level (e.g., from /home/user/docs to /home/user), use cd ...
    • To go directly to a specific directory (e.g., /home/user/music), provide the absolute path: cd /home/user/music.
    • To return home from any location, use cd ~.