Every developer eventually has to use the terminal, and it’s often the most intimidating part of learning to code — a blinking cursor with no obvious instructions. This guide explains what a terminal actually is and the handful of commands that cover most of what a beginner needs.
If you’ve followed our guide on setting up your first coding environment, you’ve already opened a terminal briefly to run a file. This guide slows down and covers the terminal properly: what it actually is, why developers rely on it, and the small set of commands that will cover the overwhelming majority of what you need as a beginner.
The terminal has a reputation for being intimidating, and it’s easy to see why — unlike clicking around a familiar desktop interface, you’re faced with a blank prompt and expected to already know what to type. That reputation is worse than the reality: a handful of commands, learned once and practiced a little, will serve you well for a very long time in your development journey.
What the Terminal Actually Is
According to MDN’s command line crash course, the terminal is a text interface for executing text-based programs — you type a command, press Enter, and the program runs, rather than clicking icons and menus the way you would in a typical desktop application.
“Terminal” and “command line” are used interchangeably in casual conversation, and for a beginner’s purposes, that’s a reasonable simplification. The important thing to understand is that it’s simply another way of telling your computer what to do — text instead of clicks — and that a large number of development tools either require it or work more efficiently through it.
Why Developers Rely on the Terminal
It’s worth understanding why this text-based approach persists, rather than accepting it as an arbitrary tradition. Many essential developer tools, cloud platforms, and package managers only run via the command line, with no graphical alternative at all — this isn’t a stylistic choice, it’s often the only interface these tools offer.
There’s also a genuine efficiency argument. A task that might take several clicks through nested menus in a graphical file manager can often be done with a single typed command, and that efficiency compounds significantly once you’re doing the same task repeatedly across a project.
Opening a Terminal on Your System
Where to find a terminal depends on your operating system:
- macOS — open the Terminal app, found in Applications → Utilities, or search for “Terminal” using Spotlight.
- Linux — most distributions include a built-in terminal, often reachable with a keyboard shortcut like Ctrl+Alt+T.
- Windows — the built-in Command Prompt works for basic tasks, but many developers prefer installing PowerShell or Windows Subsystem for Linux (WSL) for closer compatibility with macOS and Linux commands.
If you’re using VS Code, you can also open a terminal directly inside the editor with Ctrl+` (backtick), which is the most convenient option for day-to-day coding work, since you don’t need to switch to a separate application.
The Handful of Commands You Actually Need
As freeCodeCamp’s beginner guide to the command line explains, a small set of commands cover the overwhelming majority of everyday terminal usage — navigating folders, creating and viewing files, and running programs.
- pwd — prints your current location (“print working directory”).
- ls — lists the files and folders in your current location.
- cd foldername — changes directory, moving you into a specific folder.
- cd .. — moves up one level, out of the current folder.
- mkdir foldername — creates a new folder.
- touch filename — creates a new, empty file (on macOS and Linux).
- clear — clears the terminal screen of previous output, without affecting anything else.
According to W3Schools’ introduction to Bash (the shell used by default on most Linux and macOS systems), these commands can also be combined into saved script files with a .sh extension, letting you automate a sequence of commands you’d otherwise need to type manually each time.
A Simple Practice Sequence
Try running through this sequence in your terminal to get comfortable with the basics:
pwd
mkdir practice-folder
cd practice-folder
touch test.txt
ls
cd ..This creates a new folder, moves into it, creates an empty file inside, lists the folder’s contents to confirm the file exists, then moves back up to where you started. Running through a sequence like this a few times builds real muscle memory faster than reading about each command in isolation.
A Few More Commands Worth Knowing
Beyond the essentials above, a few more commands come up often enough to be worth learning early:
- cp source destination — copies a file from one location to another.
- mv source destination — moves a file (also used to rename files, by “moving” them to a new name in the same folder).
- rm filename — deletes a file permanently. There’s no recycle bin here, so use this one carefully.
- cat filename — prints a file’s contents directly in the terminal, useful for quickly checking a short file without opening it in an editor.
You’ll notice a pattern across most of these commands: a verb (what to do) followed by one or more arguments (what to do it to). Once that pattern clicks, learning an unfamiliar command usually just means figuring out what its arguments are, rather than learning an entirely new way of thinking.
Running Python and JavaScript Files From the Terminal
If you’ve worked through our guides on installing Python, running a script is one of the terminal’s most common everyday uses: navigate to your project folder with cd, then run python3 filename.py (or python filename.py on Windows) to execute it.
JavaScript files running in a browser don’t need the terminal the same way, but once you start working with Node.js — JavaScript running outside the browser — the same basic pattern applies: navigate to the right folder, then run the file with a command like node filename.js.
Small Habits That Make the Terminal Faster
A few small shortcuts save real time once they become habit. Pressing the up arrow cycles back through previously run commands, so you rarely need to retype something you just ran with a small change. Most terminals also support tab completion — start typing a file or folder name and press Tab, and the terminal will attempt to auto-complete it, which both saves typing and helps catch typos before they cause a “no such file or directory” error.
It’s also worth getting comfortable reading the prompt itself. Most terminal prompts show your current folder location before the cursor, which means you can often tell where you are without needing to run pwd every time — a small detail, but one that becomes second nature quickly.
Common Questions Beginners Ask About the Terminal
Do I need to memorize every terminal command? No. The handful listed above cover most day-to-day usage for a beginner. Looking up less common commands as you need them is completely normal, even for experienced developers.
What if I run a command and nothing seems to happen? Many commands (like cd or mkdir) succeed silently — no output means it worked. Following a command with ls or pwd is a reliable way to confirm the change actually took effect.
Is it risky to experiment in the terminal? Deleting files with rm is genuinely permanent and worth being careful with, but commands like the ones covered in this guide — navigating, listing, creating simple files and folders — are low-risk to practice freely, and mistakes are easy to undo by simply deleting a test file or folder you created.
Quick-Reference Terminal Basics Guide
- The terminal — a text interface for running commands instead of clicking through menus.
- pwd, ls, cd — the core commands for figuring out and changing where you are.
- mkdir, touch — creating folders and empty files.
- Available in every editor — VS Code and most modern editors include a built-in terminal panel.
- Silent success is normal — many commands don’t print anything when they succeed.
- Be careful with rm — deletion via the terminal is permanent, unlike a desktop recycle bin.
Conclusion
The terminal’s intimidating reputation fades quickly once you’ve run the same handful of commands a few dozen times. Navigating with cd, checking your surroundings with ls and pwd, and creating simple files and folders covers the vast majority of what a beginner actually needs, well before more advanced terminal usage becomes relevant to your day-to-day work.
The best way to build comfort here is simply using it regularly — even for small tasks you could do through a graphical interface, practicing the terminal equivalent builds the habit faster than reading about it alone, and pays off quickly once it stops feeling unfamiliar.
In the next guide in this series, we’ll cover Git and GitHub — the version control tools that let you save snapshots of your code and collaborate with others, both of which rely heavily on the exact same terminal skills covered in detail throughout this guide.
Explore More Tools & Setup Guides →

Alex Carter is a senior software developer with years of hands-on experience building real-world applications. After watching countless beginners give up on programming simply because most tutorials assumed too much prior knowledge, Alex started Vandutz Academy to do things differently — breaking every concept down into clear, judgment-free, step-by-step lessons. When not writing, Alex is probably debugging someone else’s code (or their own).