666 B
666 B
-
Print Working Directory (pwd): Use
pwdto 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. -
Change Directory (cd):
- To move up one level (e.g., from
/home/user/docsto/home/user), usecd ... - 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 ~.
- To move up one level (e.g., from