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.
