Most people don’t use the pushd and popd commands. But these commands can be really useful if you work a lot at the command line. There are many times when you wish to go into a directory that is deeply nested, only to realise that you have to get back to the directory that you were previously working in.This is where the pushd and the popd commands come in handy. You can push the current directory onto a stack using the pushd command. Then you can switch to any directory you wish. If you wish to get back to the directory that you had earlier pushed onto the stack all you have to do is use the popd command.We are going to make our lives even easier by creating aliases kinda like a shorcut for the pushd and popd commands. If you use bash which is very common, follow these steps everything in bold is to be typed at the terminal – cd /home/adminReplace admin with your user name. The purpose of this command is to switch to the home directory. gedit .bashrcThis will open the .bashrc file in a text editor. Type the following lines at the end of the file – alias +=’pushd .’ alias _=’popd’Now click on the save button and exit gedit. You are done! Hence forth to push a directory on the stack simply type + on the command line. If you wish to get back to the directory you pushed onto the stack simply type _ on the command line followed by a carriage return enterNote – If you push more than one directory on the stack then it gets popped in a LIFO manner i.e Last In First Out