Using pushd/popd
Most linux-users know $OLDPWD. It's an environment variable to get the recently used directory. Sometimes it would be nice to remember more visited directories. In such cases pushd and popd would be a good choice..
Most common shells do have a directory stack. By looking in the man-page of bash I found the following description of the DIRSTACK: