Looking to begin your coding journey on a Mac? Get started in the Terminal.

Phong Lo
4 min readMar 7, 2021
Photo by Mia Baker on Unsplash

Many of you just bought your first MacBook or have owned a MacBook. Now you want to dive into coding — either on your own or by embarking on a journey through a coding bootcamp. Either way, you simply don’t know where to begin.

I was in the same scenario when I bought my first MacBook in December 2020 for my coding bootcamp: Flatiron. I had no clue what a Terminal was or even knew how to navigate a MacBook. I’ve always used Windows; therefore, learning how to navigate on a MacBook was new territory for me. I panicked. However, with a little guidance from Flatiron and help from Google, I felt less intimidated.

You’re probably asking yourself, what is a Terminal? Where do I find it on my Mac? How do I use it?

Let’s break this down one by one.

Photo by Goran Ivos on Unsplash

What is a Terminal?

A Terminal is a command line interface (CLI) that allows you to input commands for your computer to do something. You’re probably wondering what is a command line interface? Get your fingers on your keyboard and start Googling your answers! I kid you not, I Googled what a command line interface was. In a nutshell, here’s what I came up with: a command line interface is a text-based conversation with a computer and it allows the user to communicate with the computer by inputting commands, in order for the terminal to output the information you’re asking for. And if you still don’t understand what a CLI is, keep searching until you understand it the way it makes sense to you.

Where do I find it on my Mac?

If you were a beginner like me, click on the magnifying glass icon on the top right hand corner of your screen and it’ll prompt you to search what you’re looking for. An easier way to also accomplish the same task is to push Command-Space bar. Type in Terminal and viola! You have successfully found your Terminal!

There’s this unworldly reality that kicks in when I first open my Terminal. I don’t know how to explain it, but I feel like I’m going to make wonderful things when I open it. It’s a wonderful feeling every time I see it up on my screen. If you get the same feeling for some odd reason, drop a comment below. I guarantee I’m not the only one!

How do I use it?

Where do we begin in the Terminal? First, there are a few basic commands you will need to know. Let me cover a few below that were helpful for me and perhaps will be helpful for you:

  • whoami — command to identify your username.
  • pwd — stands for print working directory. Command to identify which current directory you’re in.
  • ls — list your directories.
  • cd — command that allows you to change directories.
  • cd . — works the same as pwd. Command that tells you which current directory you’re in.
  • cd .. — command that allows you to go back to your last directory you were in.
  • cd <type letter here> (press tab) — a workflow command that allows you to find the directory you’re looking for, rather than, typing in the whole directory name.
  • rm — removes a file.
  • rm -r— removes a directory.
  • ~ — takes you back to your home directory.
  • mkdir — makes a new directory.
  • touch — makes a new file.
  • take — a shortcut command that makes a new directory and takes you into that directory.
  • code . — to pull up your code editor (e.g. VS Code)

Test the above commands in your Terminal and see what it does. The more reps you get in, the more familiar you’ll understand what each command does. Seriously, get those reps in! There are so many more commands you can use. I highly suggest you look them up and let the magic happen!

For the curious future programmers — the commands I use most frequently in bootcamp is: ls, cd, mkdir, touch, take, and ~. I love shortcuts and if anyone knows of any shortcuts in the Terminal, let me know below. I love learning and sharing ideas!

--

--

Phong Lo
0 Followers

Full Stack Software Engineer Student at Flatiron