The pushd command saves the current working directory in memory so it can be returned to at any time, optionally changing to a new directory.

The popd command returns to the path at the top of the directory stack.

The cd - command takes you back to the previous directory you were in.

Related Articles