macOS: How to use the macOS terminal

Join the AI Workshop to learn more about AI and how it can be applied to web development. Next cohort February 1st, 2026

The AI-first Web Development BOOTCAMP cohort starts February 24th, 2026. 10 weeks of intensive training and hands-on projects.


You can search Terminal in Spotlight, or go to the Applications folder, open the Utilities subfolder, and look for the Terminal app.

When you open it, you’ll get this screen - or something really similar:

The bash-3.2 indicates the type of shell, and its version. New term here - shell. What is a shell? A shell is a program that allows us to interact with the operating system and its applications.

Note: current macOS since Catalina uses zsh. Nothing else changes related to this tutorial

There are different kinds of shells: Bash is one of the most popular. Some people use Fish (like me), some use Z Shell, some use other ones.

The shell is basically the program that allows us to enter our commands.

File system commands

We can start by entering the ls command, and when we press enter the shell shows us the files contained in the current folder.

The shell normally starts from your home folder, which on a Mac is in /Users/yourname. How do we know in which folder we currently are? You can get it using the pwd command:

You can change the current folder using cd:

If you just type cd, the shell will get back to your home folder.

You can create a new folder using mkdir:

Running commands

In the shell you have access to all the programs and files installed on your computer. A lot of stuff.

One task you might be required to do, especially when programming in Node and JavaScript, is to use npm.

npm is not a command that’s available out of the box, you need to install it from https://www.npmjs.com/get-npm, but when you get it, you can access it from the command line.

Once you do so, you can go into any empty folder and run npm init to initialize a Node.js project.

Once you are ready you can start any Node.js program by running node filename.js.

There’s a lot more to it!

This post can get you started quickly to do the job, and you can explore more advanced features and capabilities of the shell later.

Lessons in this unit:

0: Introduction
1: ▶︎ How to use the macOS terminal
2: Productivity gains of using a Mac and an iOS device
3: A way to set up automations in macOS easily
4: How to hide a file or folder in macOS Finder
5: How to install a local SSL certificate in macOS
6: Reverting a file to a previous version, on a Mac
7: Take screenshots as JPG on macOS
8: Convert an image or resize it using macOS Shortcuts
9: Concatenating videos on macOS
10: Fix files creation date in macOS
11: Freeing space on a Mac
12: How to add an “Open in Terminal” icon in macOS Finder
13: How to add an “Open in VS Code” icon in macOS Finder
14: How to find the bundle ID of a Mac app
15: How to Fix the "Your CLT does not support macOS 11" error in macOS
16: How to play a sound from the macOS command line
17: How to remove the shadow from window screenshots in macOS
18: Removing all Homebrew stuff
19: Run a Node.js script from your macOS menu bar