A Simple Guide to Learn Terminal Commands

A super-simple guide to using the Mac Terminal.

Imagine your Mac has a secret “text-only” mode where you can control everything by typing magic words. That’s the Terminal! It’s like being a wizard who talks directly to the computer.

Step 1: How to Open Terminal

  1. Press the spacebar + ⌘ (Command key) together → this opens Spotlight.
  2. Type “Terminal” and press Enter.
    Boom! A black (or white) window appears. You’re now a hacker (the good kind 😎).

Step 2: Your First Words to the Computer

Just type something and press Enter.

Try this right now:

whoami

It will say your username! Cool, right?

Try this:

date

It shows today’s date and time.

Step 3: Moving Around Folders (Like in Finder, but with typing)

Your Mac has folders inside folders, just like on your Desktop.

Important places:

  • Your home folder (where all your stuff lives) → written as ~ (tilde)
  • Desktop → ~/Desktop
  • Downloads → ~/Downloads

The Most Important Commands (with kid-friendly explanations)

CommandWhat to typeWhat it doesExample
lslsLists everything in the folder (like opening a folder in Finder)ls → shows your files
ls -lLists with extra details (size, date)
ls -laShows hidden files too (secret files!)
cdcd DesktopChange directory = go into a foldercd Desktop → now you’re on Desktop
cd ..Go back one folder (like pressing the back arrow in Finder)
cd ~Go straight home (your user folder)
cd /Go to the very top (root of the Mac)
pwdpwd“Print Working Directory” → tells you exactly where you are right now
clearclearClears the screen (makes it clean again)
openopen .Opens the current folder in Finder (super useful!)
open filename.txtOpens that file with the normal app
mkdirmkdir GamesMake a new folder called “Games”
touchtouch diary.txtCreates a new empty file called diary.txt
rmrm badfile.txtDeletes a file FOREVER (be careful!)
rmdirrmdir EmptyFolderDeletes an empty folder
mvmv oldname.txt newname.txtRename a file
mv file.txt Desktop/Move a file to Desktop
cpcp file.txt file-copy.txtCopy a file

Super Useful Keyboard Shortcuts (these work in Terminal!)

KeysWhat it does
↑ (Up arrow)Shows the last command you typed (keep pressing to go further back)
↓ (Down arrow)Goes forward in your command history
← → (Left/Right arrows)Move the cursor left/right
Ctrl + AJump to beginning of the line
Ctrl + EJump to end of the line
Ctrl + UDelete everything you typed on this line (oops fixer!)
Ctrl + LSame as typing clear
TabAuto-completes folder/file names (magic!)
Ctrl + CStops whatever is running (emergency stop button)

Mini Challenges! Try these one by one:

  1. Open Terminal
  2. Type pwd → where are you?
  3. Type cd Desktop
  4. Type ls → what do you see?
  5. Type mkdir CoolStuff
  6. Type touch mygame.py (or .txt if you want)
  7. Type open . → Finder opens your Desktop!
  8. Type cd CoolStuff
  9. Type pwd → you’re inside CoolStuff now!
  10. Type cd .. → go back
  11. Type rm -r CoolStuff (deletes the folder you just made – only if it’s empty or has stuff you made)

(The -r means “recursive” – it deletes folders that have things inside. Be careful!)

Golden Rules (Super Important!)

  1. Never type rm -rf / → this deletes your entire Mac (don’t even joke about it).
  2. If you’re not sure, ask a parent or teacher first.
  3. Terminal is powerful – treat it like a lightsaber, not a toy sword.

You just became a Terminal wizard! 🎉
Every time you use these commands, you get faster and cooler. Real programmers and hackers use these every day.

Now go explore! Type ls, cd around, and have fun! 🐱‍💻

Leave a Comment

Scroll to Top