In terminal, how can I define a key to go to the previous directory which I was in when changing directory with the cd command?For example, I'm in /opt/soft/bin and I cd into /etc/squid3 and I want to get back to the first directory.
How to go to the previous working directory in terminal?
shell;cd command
You can usecd -or you could use cd $OLDPWD