Linux 'cd' Command
The cd command in Linux is used to change the current working directory. Below are some common options and their descriptions:
| Option | Description |
|---|---|
cd [directory] |
Changes the current directory to the specified directory. |
cd .. |
Moves up one directory level (to the parent directory). |
cd ~ |
Changes to the home directory of the current user. |
cd - |
Switches to the previous working directory. |
cd / |
Changes to the root directory. |
Use the pwd command to check your current working directory after using cd.