Skip to content

Latest commit

 

History

History
25 lines (18 loc) · 723 Bytes

go-to-the-previous-directory.mdx

File metadata and controls

25 lines (18 loc) · 723 Bytes
category cover created tags title
Tip
/assets/tips/go-to-the-previous-directory.png
2021-10-17
'Command Line'
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