Linux: Navigate Directory
cd dirPath
- Change directory
cd
-
Go to
$HOME
dir cd ..
- Go up one dir
pwd
- Show the current dir
pushd
-
save the current dir by pushing it to a stack.
(use
popd
to go back.) popd
-
goto the dir in stack. (last dir
pushd
)
Many of these command's argument can be either a file name (relative to current directory), or a full path, e.g. ls /usr/local/bin