• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL

Chapter 20. Using Basic Unix Commands > Moving Around Directories

Moving Around Directories

When you first open the Terminal utility, you're placed within the working directory. This is typically the directory that you logged in as. If you are logged in as the System Administrator, that's your working directory. While this makes it easy to identify exactly where you are, you'll probably want to move into another directory. If you're the System Administrator, you'll have no problem moving anywhere you wish; however, if you don't have Administrator priority, UNIX won't let you look into or access directories that you don't have permission to use. Attempting to access a restricted directory produces the response Access Denied. Changing directories is as easy as using the cd (change directory) command. Change to the working directory you need, it'll make it easier to type UNIX commands.

Move Around Directories

Open the Applications folder, double-click the Utilities folder, and then double-click the Terminal icon.

Type cd /Users/user account (where user account is, type the name of the new working folder), and then press Return.

Type ls, and then press Return to view a list of the directories in the folder.

Type pwd, and then press Return to display the current working folder.

TIMESAVER To return to your home directory, it's not necessary to type cd /Users/home directory (where home directory is the name of your home working directory). Just type cd .., and then press Return. The cd .. (double dot) instructs UNIX to back you out of the current directory. If you dig a deeper path such as: cd /Users /bonnie/Library/ColorSync, just type cd … the three dots back you out of ColorSync, Library, and bonnie; placing you back into your home directory.

Click the Close button.



Not a subscriber?

Start A Free Trial

  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint