It's simple to return to the previous directory in Terminal Mac. You may use cd to go to the directory by entering the cd directory name in the window of the Terminal. But while returning to the previous directory, you must type cd - and hit return in the Terminal window.