cd
FilesBeginner In simulator In real LinuxChange the current directory
Name: cd = change directory
You can practise it right away in the simulator, and use it in real Linux mode too.
Description
cd is a shell builtin that changes the working directory. It has to be built in, because a child process cannot change its parent shell's directory.
Without an argument it goes to $HOME; cd - returns to the previous directory. The shell updates the PWD and OLDPWD variables as it goes.
Syntax
cd [DIR]Common options
| ~ | Home directory (plain cd goes there too) |
| .. | Parent directory |
| - | Previous directory |
| -P | Go to the physical directory (symbolic links resolved) |
| -L | Follow the path as written, symbolic links included (the default) |