Using Terminal / Command Prompt may look super intimidating at first, but a terminal window is just a text version of using point and click tools. Think of it this way, everytime you create a new folder, it's running terminal commands in the background. Using terminal directly means we are ditching point and click tools and becoming power users of our own system.
macOS Go to Applications > Utilities > Terminal or use Spotlight search to open Terminal.
R together, and type
Both tools are terminals, except they have different names but serve the same purpose. Let's learn some basic commands.
CD stands for
Change Directory. By default when you open a new terminal window, it opens in the root of user. To get to desktop, in your terminal type (case sensitive):
An alternative way to open Desktop folder in Windows is to type
cd in terminal followed by a space and then dragging a folder in the terminal and removing the folder name before pressing enter.
To confirm the fact that you're now in the Desktop folder, in your terminal type:
This will show you a list f all available files and folders inside the directory you're in!
To go up a level in the folder hierarchy, you use:
This will change your directory to the folder that your current folder was in. So if you're in
Desktop > Git folder, using
cd.. will change your directory to
MKDIR stands for
Make Directory. This is used to make new folders at your current path. While still in Desktop, let's make a new folder called
git. Make sure it's all small case so it's easier to type.
Now in your desktop, a new folder called
git has appeared!
CLEAR / CLS
The terminal window can get super messy very quick! To clear our current window:
This clears up text from the terminal window and starts with a fresh looking screen.
We will be exploring more commands in Terminal / Command Prompt in the coming chaptersChatper 3: Introduction to GitHub