25 Must-Know Mac Terminal Commands for Power Users
- Kalyan Bhattacharjee
- Mar 18
- 3 min read
Updated: Mar 21

How to Open Terminal on Mac
The Terminal is a powerful tool on macOS that allows users to interact with their system using command-line instructions.
Opening Terminal is simple and can be done in multiple ways:
Using Spotlight Search: Press Command (⌘) + Spacebar, type "Terminal", and hit Enter.
Through Finder: Open Finder, go to Applications > Utilities, and double-click Terminal.
Via Launchpad: Click Launchpad, type "Terminal" in the search bar, and select the app.
Using Siri: Activate Siri and say "Open Terminal" to launch it hands-free.
Introduction - Mac Terminal Commands
The Mac Terminal is a powerful tool that allows users to interact with macOS through text-based commands. Whether you're a developer, IT professional, or just someone looking to automate tasks, learning Mac Terminal commands can significantly enhance your workflow.
In this guide, we'll explore 25 essential Mac Terminal commands to help you navigate, manage files, configure settings, and more.
Navigating the File System
pwd – Print Working Directory
Displays the full path of your current directory.
ls – List Directory Contents
Lists all files and folders in the current directory. Use ls -la to show hidden files.
cd [directory] – Change Directory
Moves you to the specified directory. Example: cd Documents/
cd .. – Move Up One Directory
Moves you back to the parent directory.
mkdir [directory_name] – Create a New Folder
Creates a new directory in the current location.
rmdir [directory_name] – Remove an Empty Folder
Deletes an empty directory. Use rm -r [folder_name] to delete non-empty ones.
File Management
touch [file_name] – Create an Empty File
Creates a new file in the current directory.
cp [source] [destination] – Copy Files/Folders
Copies a file or directory to another location.
mv [source] [destination] – Move/Rename Files
Moves a file or renames it. Example: mv old.txt new.txt
rm [file] – Delete a File
Removes the specified file. Use rm -rf [folder] to delete a folder and its contents.
Viewing & Editing Files
cat [file] – View File Contents
Displays the contents of a file in the terminal.
nano [file] – Edit Files
Opens the Nano text editor to modify files.
open [file] – Open Files Using Default Apps
Opens a file with its default macOS application.
less [file] – View Large Files
Allows scrolling through large text files efficiently.
System Monitoring & Control
top – Show Active Processes
Displays real-time system resource usage.
ps aux – View Running Processes
Lists active processes along with CPU and memory usage.
kill [PID] – Terminate a Process
Kills a process by its Process ID (PID). Use ps aux | grep [app_name] to find PIDs.
sudo shutdown -h now – Shut Down the Mac
Turns off the system immediately.
sudo reboot – Restart the Mac
Restarts the Mac instantly.
Network & Connectivity
ping [website] – Test Internet Connectivity
Sends test packets to a website to check if it's online.
ifconfig – Show Network Configuration
Displays current network details like IP address and active interfaces.
curl [URL] – Fetch Web Content
Downloads a webpage or file from a specified URL.
scp [file] [user@host:path] – Securely Copy Files to a Server
Transfers files over SSH between local and remote systems.
Miscellaneous Commands
history – View Command History
Lists previously executed commands.
clear – Clear the Terminal
Clears all previous commands from the Terminal screen.

Conclusion
Mastering Mac Terminal commands can boost efficiency and provide greater control over macOS. Whether you're managing files, controlling processes, or troubleshooting network issues, these 25 essential commands will help you work smarter and faster.
💡 Pro Tip: Use man [command] in Terminal to get detailed documentation on any command!
how to open terminal on mac, cmd commands on mac, mac command prompt, command prompt mac, terminal in mac, mac terminal commands, terminal commands mac, mac ip address terminal command, commands in mac terminal, mac os terminal commands, how to close terminal on mac with command, how to cancel terminal command mac, how to cancel command in terminal mac, how to install openjdk 17 on mac via terminal command, fintech shield
Comments