Go to the previous directory

We probably know that the `cd` command can be used to go to the given directory:
$ cd /path/to/directory
If you work with the terminal more often, then you might need to switch back and forth between different directories. If you see that typing the full path in the `cd` command is not convenient, then you can replace the full path with `-`.
The following command will bring you to the previous working directory:
$ cd -

See also