To return 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. After executing this command, you can verify your current directory by using:
pwd
This will display the path of the directory you have returned to.
