The cd command is just like the DOS one, with extras. It does just what its acronym states, changes the working directory. You can use . and .., which respectively stand for the current and parent directories. Typing cd alone will take you back to your home directory. Typing cd - will take you back to the last directory you visited. And lastly, you can specify peter’s home directory by typing cd ~peter (~ on its own means your own home/ directory). Note that as a normal user, you cannot usually get into another user’s home/ directory (unless they explicitly authorized it or if this is the default configuration on the system), unless you are root, become root and practice:
# cd /usr/share/doc/HOWTO
# pwd
/usr/share/doc/HOWTO
# cd ../FAQ-Linux
# pwd
/usr/share/doc/FAQ-Linux
# cd ../../../lib
# pwd
/usr/lib
# cd ~peter
# pwd
/home/peter
# cd
# pwd
/root