September 12, 2025 · Rajin Khan
So, what is the Command Line?
The Command Line Interface (CLI) is a way to interact with your computer by typing commands instead of using a mouse. It allows you to move through files & folders quickly, run powerful tools, automate repetitive tasks, and just control your system like a pro.
Or put simply, the CLI lets you talk directly to your computer, no clicking around, no waiting on apps. It’s faster, more powerful, and more direct.
If you’ve ever watched shows like Mr. Robot, or movies like The Matrix, you’ve probably seen characters flying through black terminals full of green text. That’s the CLI, and trust me, using it IRL is even cooler.
But where is the CLI on your computer? 🤔 Let’s find out!
Where to Find the Command Line:
💻 macOS (Terminal)
- Press Cmd + Space to open Spotlight Search.
- Type “Terminal” and press Enter.
And that’s it! Now you have a command line where you can start typing commands.
I’m using an application called iTerm. Your Terminal Application may look different, but that’s alright! We’ll customize it soon!
🖥️ Windows (CMD, PowerShell, or WSL)
Windows has multiple command-line options:
-
Command Prompt (CMD) – The built-in Windows CLI.
Press Win + R, type “cmd”, and press Enter. -
PowerShell – A more advanced CLI with extra features.
Right-click the Start Menu → Select Windows PowerShell. -
Windows Subsystem for Linux (WSL) -
This lets you use a real Linux shell on Windows. Install it with:wsl --install
I would highly recommend you install WSL. Many basic CLI commands mentioned here (and in most guides online) may/may not work in CMD and PowerShell, but WSL offers a unified environment that emulates Unix based shells (like on Linux and Mac).
Images from programminghistorian, Lifewire, and The Stack, respectively.
⚠️ Keep in mind, some Commands don’t work on Windows.
Why?
macOS and Linux use a Unix-based shell (like Bash or Zsh), while Windows uses CMD or PowerShell, which work differently.
For example:
In macOS/Linux, list files with:
ls
In Windows CMD, you must use:
dir
A reference list for the most common terminal commands across different platforms:
Task | macOS/Linux (Bash/Zsh) | Windows (CMD) | Windows (PowerShell) |
---|---|---|---|
List files | ls | dir | Get-ChildItem |
Change directory | cd folder | cd folder | cd folder |
Remove a file | rm file.txt | del file.txt | Remove-Item file.txt |
As you’ll see, macOS and Linux seem to have a unified shell environment (UNIX-based), which is generally the accepted standard in the developer community. It is recommended that you install WSL (Windows Subsystem for Linux) to get the same environment.
Link: Installing WSL on Windows
Now that that’s out of the way, why should you really use the CLI?
🏎️ The CLI Makes You Faster
Clicking through folders takes time. Instead, just type:
cd ~/Documents
ls -la
See for yourself:
Your hands stay on the keyboard. Your workflow becomes lightning fast. This is one of the main reasons so many programmers prefer the CLI. Speed and precision.
⛓️💥 It Unlocks Powerful Tools
Some of the best tools (that you may not even be aware of) only work in the CLI:
brew
– The ultimate package manager. (What’s a package manager?)
grep
– Find text inside files.btop
– Monitor your computer’s performance.wget
– Download files from the internet.git
– Manage your codebase and code versions.df -h
/du -sh
– Check disk usage and monitor storage space.
Need to check how much space is left on your hard drive? Just type:
df -h
Or, monitor your current download and upload speeds:
networkquality -v
You can monitor your entire system from just one window:
A beautiful system monitoring tool called btop, running in the terminal.
💡 Tip: If a process seems to keep running forever, press Ctrl+C at any point to quit the running program/process.
🧑🏻💻 SSH – Remote Control Like a Pro
One of the coolest things the CLI lets you do is SSH. That stands for Secure Shell, and it allows you to connect to another computer (like a remote server, or even your PC) from anywhere in the world.
For example, you can log into your website’s server with:
ssh yourname@yourdomain.com (or your IP address)
From there, you can run commands on that computer as if you were sitting in front of it.
SSH is used for:
- Hosting websites
- Managing cloud servers (like AWS, DigitalOcean)
- Secure file transfers
- Remote development (VS Code is really useful for this)
It’s like teleporting into another machine, and it’s a huge part of being a real power user.
A clip of me using SSH to remotely login to my home-server (a MacBook Pro) and view files and run commands from that machine’s terminal remotely.
(Wanna know how SSH works? I’ll post a blogpost and a full guide, soon!)
💫 It Makes Actions Instant
Want to rename 100 files at once? Instead of clicking manually:
rename 's/old/new/' *.txt
CLI gives you batch power — change, move, delete, or organize hundreds of files in seconds.
Okay, but how do we install these tools?
🍺 Installing CLI Tools with Homebrew
On macOS, the best way to install CLI tools is Homebrew.
To Install Homebrew:
Open the Terminal and run:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
Follow additional on-screen instructions to complete installation, it’s super easy.
🪟 What about Windows?
On Windows, the best way to install CLI tools is Scoop or Chocolatey.
Install Scoop (Recommended):
Open PowerShell as Administrator and run:
Set-ExecutionPolicy RemoteSigned -Scope CurrentUser
iwr -useb get.scoop.sh | iex
Follow any additional on-screen instructions to complete the installation.
Install Chocolatey (Alternative):
Open PowerShell as Administrator and run:
Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1'))
As always, just follow any additional on-screen instructions to complete the installation.
Now, install some essential tools (using brew, or any other package manager):
brew install git
brew install btop # (or 'htop' if you want a simpler interface)
brew install tmux
brew install wget
I’d really recommend asking ChatGPT, or any LLM about your needs, there’s probably going to be a cool CLI tool for anything you can think of (whether it be converting files, downloading YouTube videos, or VPNs.).
🧑🏻🏫 Essential CLI Commands
Here’s a cheat sheet to get started:
Command | What It Does |
---|---|
pwd | Shows current folder |
ls -lah | Lists all files (including hidden ones) |
cd <folder> | Opens a folder |
mkdir <folder> | Creates a new folder |
rm -rf <folder> | Deletes a folder (Be careful with this one!) |
cp <file> <destination> | Copies a file |
mv <file> <destination> | Moves a file |
cat <file> | Views file content |
grep "text" <file> | Searches for text inside a file |
find . -name "*.txt" | Finds files by name |
chmod +x <file> | Makes a file executable |
nano <file> | Opens a text editor |
htop | Monitors system performance |
df -h | Shows storage usage |
ssh user@host | Connect to remote computer |
git status | Checks Git changes |
brew install <package> | Installs software |
brew install --cask <package> | Installs any app you want (Spotify, Messenger, etc.) |
A cheat sheet for UNIX CLI commands
A cheat sheet for Windows PowerShell commands
🎬 Final Thoughts
The CLI isn’t just for developers—it’s for anyone who wants to work faster and smarter. Start small, experiment, and soon you’ll wonder how you ever lived without it!
From Mr. Robot style hacking to real-life productivity boosts, the command line truly gives you superpowers and is both the first and final step in becoming a true power user.
💬 What’s the first CLI command you learned? Drop it in the comments!