Hi Eddie,
In Terminal cd is used to change directory...
Moving around
When you’re in the Finder and you want to move to another folder, you find that folder and double-click it. From the command line, you use the cd (or change directory) command instead. So let’s say you’re in your Home folder and want to peek inside the Downloads folder. To do that, you’d type cd Downloads. (Remember to always type a space after any command that has an additional argument, such as the name of a directory in the previous example.) Once you’ve done that, ls will show you the contents of your Downloads folder.
Here are a couple of quick tricks for moving around in your Mac’s file system.
If you type cd and press the Return key—with no directory specified—you’ll go back to your Home folder. (You can also type cd ~ to go there.)
If you type cd /, you’ll go to the root level of your startup disk.
If you type cd .. (that’s two periods), you’ll go to the directory above the one you’re currently in. So if you’re in your home folder, and type cd .., you’ll go to your Mac’s /Users folder.
And if you type cd - (hyphen) you’ll go back to the directory you were in before the last time you issued the cd command.
That should be enough to get you started. Try playing around in Terminal, exploring your folders and files with just those two commands. In future articles, I’ll show you how you can apply the ls and cd commands in more depth, so you can be comfortable flitting around your file system from the command line.
Note: When you purchase something after clicking links in our articles, we may earn a small commission. Read our affiliate link policy for more details.
https://www.macworld.com/article/2042378/master-the-command-line-navigating-files-and-folders.html