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.

On macOS Go to Applications > Utilities > Terminal or use Spotlight search to open Terminal. On Windows, press Command and R together, and type cmd.

Both tools are terminals, except they have different names but serve the same purpose. Let's learn some basic commands.

CD

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):

macOS: cd Desktop
Windows: cd C:\Users\(username)\Desktop

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:

macOS: ls
Windows: dir

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:

macOS: cd ..
Windows: cd ..

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 Desktop.

MKDIR

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.

macOS: mkdir git
Windows: mkdir git

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:

macOS: clear
Windows: cls

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 chapters

Chatper 3: Introduction to GitHub