How to go back to previous directory?

QuestionsQuestions8 SkillsProBasic Files OperationsAug, 30 2025
0202

To go back to the previous directory in Linux, you can use the cd command with a dash (-). Here’s how to do it:

cd -

This command will take you back to the directory you were in before your last cd command.

You can verify your current directory after using this command by running:

pwd

This will show you the path of the directory you are currently in.

0 Comments

no data
Be the first to share your comment!