explainx.ainewsletter3.4k
trendingπŸ”₯loopsskills
pricing
workshops β†—
explainx.ai

Learn to lead teams that combine humans and agents. Platform access, live workshops, bootcamps, and 50+ courses β€” plus skills, tools, and MCP to practice what you learn.

follow us

custom AI agents

[email protected]

get started

Join Β· $29/mo

learn

start for freepathwaysworkshopsbootcampscoursescertificationscertification testsexplainx universitycorporate trainingfacilitatorshackathonslearn skills & mcp

discover

skillstoolsagentsmcp serversdesignsllmsagiranks

content

releasesvisionmissionaboutcommunityteamcareersresourcespromptsgenerators hubgenerator SEO hubprompt templatesprompt guidesblogfor LLMsdemo

Sister Products

Infloq

Infloq

Influencer marketing

BgBlur

BgBlur

Privacy-first blur

Olly Social

Olly Social

Social AI copilot

Ceptory

Ceptory

Video intelligence

BgRemover

BgRemover

Background removal

newsletter Β· weekly

Get AI news, tools, and insights in your inbox.

contactsupportprivacytermsdata rightssubmission guidelines

Β© 2026 AISOLO Technologies Pvt Ltd

← Back to blog

explainx / blog

What is the Terminal? Complete Beginner Guide for Mac and Windows (2026)

Learn what the terminal is, how to open it on Mac and Windows, and master the core commands every developer uses daily. Real examples, exercises, and no assumed knowledge.

Jun 27, 2026Β·6 min readΒ·Yash Thakker
TerminalCommand LineBeginner GuideMacWindowsDeveloper Tools
What is the Terminal? Complete Beginner Guide for Mac and Windows (2026)

Most beginner tutorials assume you already know what the terminal is. This one doesn't. By the end you'll be able to navigate your file system, create project folders, run programs, and read error messages β€” all without touching your mouse.

Watch along as we open the terminal and run every command in this guide.

What is the terminal, and why do developers use it?

The terminal is a text-based interface to your computer. Instead of clicking icons and menus you type instructions and press Enter. The computer executes them immediately.

That sounds slower than clicking, but it isn't once you know the commands. A developer can:

  • Create 10 nested folders in one command instead of clicking "New Folder" 10 times
  • Install a library in 3 seconds with npm install instead of hunting through a GUI installer
  • Run the same sequence of steps every time with no mouse errors
  • Connect to a remote server that has no screen at all

Everything in modern development β€” installing Node.js, running Git, starting a Next.js app β€” happens through the terminal. There is no way around it.

How to open the terminal

macOS

Option 1 β€” Spotlight (fastest):

  1. Press Cmd + Space
  2. Type Terminal
  3. Press Enter

Option 2 β€” Finder: Go to Applications β†’ Utilities β†’ Terminal

You'll see a window with a prompt that looks something like this:

yash@MacBook-Pro ~ %

That % (or $ on older Macs) means the terminal is ready for a command.

Windows

Windows has three options. Here's what each one is:

ToolWhat it isRecommendation
Command Prompt (cmd.exe)Legacy shell, ships with WindowsOnly use if nothing else available
PowerShellModern shell, ships with WindowsGood, use if you don't want to install anything
Windows TerminalApp from Microsoft Store that hosts PowerShell, cmd, and more in tabsRecommended

Install Windows Terminal (free, takes 2 minutes):

  1. Open the Microsoft Store
  2. Search for "Windows Terminal"
  3. Click Install

Once open, Windows Terminal starts PowerShell by default. All commands in this guide will work in PowerShell unless marked otherwise.


The mental model: your terminal always has a location

Before any command makes sense, understand this: the terminal is always "inside" a folder on your computer. That current location is called the working directory. Every command you run acts relative to where you currently are.

Core navigation commands

See where you are β€” pwd / cd with no arguments

Mac/Linux:

pwd

Output:

/Users/yash/Documents

Windows PowerShell:

cd

Output:

C:\Users\yash\Documents

pwd stands for "print working directory." It answers the question: where am I right now?


List what's in a folder β€” ls / dir

Mac/Linux:

ls
ls -la    # show hidden files and file sizes too

Windows:

dir
ls        # PowerShell also accepts ls as an alias for dir

Output (Mac example):

Desktop    Documents    Downloads    Projects

Move into a folder β€” cd

cd Documents
cd Documents/Projects/my-app    # jump multiple levels at once
cd ..                           # go up one level to the parent folder
cd ../..                        # go up two levels
cd ~                            # jump to your home folder (Mac/Linux)
cd $HOME                        # same thing on Windows PowerShell

Create a folder β€” mkdir

mkdir my-project
mkdir -p my-project/src/components    # create nested folders in one go (Mac/Linux)

Windows PowerShell:

mkdir my-project
New-Item -ItemType Directory -Path "my-project\src\components" -Force

Create an empty file β€” touch / New-Item

Mac/Linux:

touch index.html
touch style.css script.js    # create multiple files at once

Windows PowerShell:

New-Item index.html

Or the old cmd-style trick that still works in PowerShell:

type nul > index.html

Delete a file or folder β€” rm / del

Mac/Linux:

rm old-file.txt
rm -r old-folder          # -r means recursive, needed to delete a folder

Windows PowerShell:

Remove-Item old-file.txt
Remove-Item old-folder -Recurse

Warning: rm on Mac/Linux does not move to Trash. The file is gone. Double-check before pressing Enter.


Copy a file β€” cp / Copy-Item

Mac/Linux:

cp source.txt destination.txt
cp -r source-folder/ destination-folder/    # copy a whole folder

Windows:

Copy-Item source.txt destination.txt
Copy-Item source-folder -Destination destination-folder -Recurse

Move or rename a file β€” mv / Move-Item

Mac/Linux:

mv old-name.txt new-name.txt     # rename
mv file.txt Documents/           # move to a different folder

Windows:

Move-Item old-name.txt new-name.txt
Move-Item file.txt Documents\

Clear the screen β€” clear / cls

Mac/Linux:

clear

Windows:

cls

Or press Ctrl + L on both platforms.


Two time-saving shortcuts

Tab completion

Start typing a folder or file name and press Tab. The terminal auto-completes it.

cd Doc[TAB]    # completes to: cd Documents

If there are multiple matches, press Tab twice to see them all. Use tab completion constantly β€” it prevents typos in paths.

Command history

Press the Up arrow key to scroll through previous commands. Press it repeatedly to go further back. Press Down to come forward. When you find the command you want, press Enter.


Running a script or program

Once you've installed a programming language or tool, you run it from the terminal.

Run a Python script:

python3 my_script.py

Run a Node.js file:

node app.js

Run a shell script:

bash setup.sh

The pattern is always: program filename. The terminal finds the program, hands it the file, and shows the output.


Reading error messages

Error messages look scary but they always tell you exactly what's wrong.

ErrorWhat it meansFix
command not found: nodeThe program isn't installed, or the terminal can't find itInstall the program; restart the terminal
No such file or directoryThe path you typed doesn't existCheck spelling; run ls to see what's actually there
Permission deniedYou don't have rights to run or edit this fileOn Mac/Linux, prefix with sudo (only if you know why)
Is a directoryYou used a file command on a folderAdd the -r flag, or switch to the folder-appropriate command
ENOENTNode.js version of "No such file or directory"Same fix β€” check your path

When you see an error, read the last line first. It's usually the clearest statement of what went wrong.


Shell, terminal, bash, zsh, PowerShell β€” what's the difference?

These words get mixed up constantly. Here's the short version:

TermWhat it is
TerminalThe app/window where you type (Terminal.app on Mac, Windows Terminal on Windows)
ShellThe program running inside the terminal that interprets your commands
bashA shell. Was macOS default until 2019. Still default on most Linux servers
zshA shell. macOS default since Catalina (2019). Mostly the same as bash for everyday use
PowerShellMicrosoft's modern shell for Windows. Different syntax from bash/zsh
cmd.exeWindows legacy shell. Avoid it for new work

The terminal is the window. The shell is the engine inside it.


Hands-on exercise: build a project folder structure

Do this now. Open your terminal and run these commands exactly. By the end you'll have a real folder structure and you'll have used every command in this guide.

# 1. Go to your home folder
cd ~

# 2. Create a projects folder if you don't have one
mkdir projects

# 3. Enter it
cd projects

# 4. Create a new project folder
mkdir my-first-site

# 5. Enter the project
cd my-first-site

# 6. Create the folder structure
mkdir src
mkdir src/css
mkdir src/js
mkdir public

# 7. Create the main files
touch index.html
touch src/css/style.css
touch src/js/app.js

# 8. Confirm it all exists
ls -R

Expected output:

index.html  public  src

./public:

./src:
css  js

./src/css:
style.css

./src/js:
app.js

Now rename the project:

cd ..                              # go up to projects/
mv my-first-site portfolio-site    # rename the folder
cd portfolio-site                  # go back in
ls                                 # confirm everything is still there

You just built and renamed a project using nothing but the terminal.

Weekly digest3.4k readers

Catch up on AI

Curated AI updates on agents, skills, and MCP β€” delivered to your inbox. Unsubscribe anytime.

Mac vs Windows command reference

TaskMac / LinuxWindows PowerShell
Where am I?pwdcd
List filesls or ls -ladir or ls
Change foldercd foldernamecd foldername
Go up one levelcd ..cd ..
Create foldermkdir namemkdir name
Create filetouch file.txtNew-Item file.txt
Delete filerm file.txtRemove-Item file.txt
Delete folderrm -r folderRemove-Item folder -Recurse
Copy filecp a.txt b.txtCopy-Item a.txt b.txt
Move/renamemv old newMove-Item old new
Clear screenclear or Ctrl+Lcls or Ctrl+L

What to learn next

The terminal is the foundation. Once you're comfortable here, everything else builds on top:

  • Git β€” version control you run entirely from the terminal. See the Git beginner guide.
  • Node.js β€” JavaScript on your computer, installed and run through the terminal. See the Node.js beginner guide.
  • Next.js β€” React framework you create and run with terminal commands. See the Next.js beginner guide.
  • Python β€” same pattern: install it, run scripts with python3 filename.py. See the Python beginner guide.

The terminal feels awkward for about a week. After that it feels faster than any GUI you've ever used.

Weekly digest3.4k readers

Catch up on AI

Curated AI updates on agents, skills, and MCP β€” delivered to your inbox. Unsubscribe anytime.

Related posts

Jun 27, 2026

Python Basics: How to Install Python and Write Your First Script (2026 Guide)

Install Python, run your first script, understand variables and functions, and set up a virtual environment β€” the complete beginner Python setup guide for 2026 with real commands and exercises.

Jun 27, 2026

What is Cursor? How to Build Your First HTML Project with AI (2026 Guide)

Cursor explained from scratch: how to install it, how the AI works, and how to build a real HTML page from a plain-English description. Your first AI-assisted project in under 30 minutes.

Jun 27, 2026

What is Docker? How to Build Your First Docker Image (Beginner Guide 2026)

Docker demystified: what an image is, what a container is, how a Dockerfile works, and how to build and run your first container in under 20 minutes.