Low Orbit Flux Logo 2 F

Linux Command - cd

cd - change directory, shell built in command



cd dir1         # change directory ( relative path )
cd /var/log     # change directory ( absolute path )
cd .            # current dir
cd ..           # parent dir
cd ../..        # up two dirs
cd ../tmp       # relative path example

More:



cd     # change to  home dir
cd ~   # change to home dir
cd -   # change to last dir

Environtment vars:



echo $PWD
echo $OLDPWD
echo $HOME