How to move up a directory with Terminal in OS X

DrANoel picture DrANoel · Jul 16, 2010 · Viewed 374.4k times · Source

When I launch a new Terminal window, it starts me in 'Macintosh HD/Users/MyName'. How can I back out of my user directory, back up to the top level?

Answer

davidcelis picture davidcelis · Jul 16, 2010

cd .. will back the directory up by one. If you want to reach a folder in the parent directory, you can do something like cd ../foldername. You can use the ".." trick as many times as you want to back up through multiple parent directories. For example, cd ../../Applications would take you to Macintosh HD/Applications