7 Terminal Commands You Keep Googling (Explained Once and For All)
Stop searching Stack Overflow for the same commands. Here's what they actually do and how to remember them.
You’ve Googled “how to find files in terminal” at least five times this year. Maybe ten. No judgment—we all have commands that just won’t stick.
The problem isn’t your memory. It’s that most explanations show you what to type without explaining why it works. Once you understand the logic, the syntax clicks.
Here are seven commands you’ll actually remember after reading this.
1. Find Files by Name
The command:
find . -name "*.js"
What it means:
find— search for files.— starting from the current directory-name "*.js"— where the name matches this pattern
Why it sticks: You’re literally saying “find, starting here, things named like this.”
Variations you’ll use:
find . -name "*.js" -type f # files only (not directories)
find /home -name "config*" # start from specific path
find . -iname "readme*" # case-insensitive
2. Search Inside Files
The command:
grep "TODO" *.js
What it means:
grep— search for text patterns"TODO"— the text to find*.js— in these files
Why it sticks: Grep = “grab” lines containing your search term.
Variations you’ll use:
grep -r "TODO" . # recursive (all subdirectories)
grep -i "error" log.txt # case-insensitive
grep -n "function" app.js # show line numbers
grep -l "API_KEY" *.env # just show filenames that match
3. Check Disk Space
The command:
df -h
What it means:
df— disk free (show disk usage)-h— human-readable (GB instead of bytes)
Why it sticks: “Disk free, human-readable.”
Related command:
du -sh * # how much space each folder uses
du -sh * | sort -h # sorted by size
4. Watch a Log File Live
The command:
tail -f app.log
What it means:
tail— show the end of a file-f— follow (keep watching for new lines)
Why it sticks: You’re “tailing” the file and “following” new additions.
Variations:
tail -n 50 app.log # last 50 lines
tail -f app.log | grep "ERROR" # live filter for errors
5. Kill a Process
The command:
ps aux | grep node
kill 12345
What it means:
ps aux— list all processes| grep node— filter to just Node processeskill 12345— stop process with that ID
Why it sticks: “Process status, all users, extra info” → find ID → kill it.
Nuclear option:
kill -9 12345 # force kill (when regular kill doesn't work)
pkill node # kill all processes named "node"
6. Check What’s Using a Port
The command:
lsof -i :3000
What it means:
lsof— list open files (in Unix, network connections are “files”)-i :3000— filter to port 3000
Why it sticks: “List open files on port 3000.”
Variations:
lsof -i :3000 -t # just show the process ID
kill $(lsof -i :3000 -t) # kill whatever's using port 3000
7. Download a File
The command:
curl -O https://example.com/file.zip
What it means:
curl— transfer data from a URL-O— save with the original filename
Why it sticks: Curl “curls” in data from the web. -O = Output to file.
Variations:
curl -o myfile.zip https://... # save with custom name
curl -L https://... # follow redirects
wget https://... # alternative (simpler for downloads)
The Memory Trick
Commands follow patterns:
- Flags with letters usually mean something:
-h(human),-r(recursive),-i(case-insensitive),-n(numbers),-f(follow/force) - Uppercase flags often write output:
-O(output file) - Dots matter:
.means “here”,..means “parent directory”
Once you see these patterns, new commands get easier to guess.
Want 101 commands explained like this? Command Line Confidence covers everything from basic navigation to shell scripting—one concept per page, each with examples you can run immediately.
Want more tips like this?
Our book covers 101 essential commands—one per page, each with examples you can run immediately.
Check out Command Line Confidence