Last Updated: February 25, 2016
·
594
· sheerun

Go back any number of directories in shell.

If you're using zsh, make sure you have enabled setopt auto_pushd (in oh-my-zsh, which I'm fan of, this is the default).

Now you can popd to go back in browsing history.

You can also use dirs -v to show all stacked directories.

If you're using bash, you can probably alias cd to pushd.