it-tips#linux#shell#productivity
10 Linux Commands Every Fresher Should Know
The commands you'll type a hundred times a week. Master these ten and you'll look like a five-year veteran.
10 Must-Know Linux Commands
1. cd, pwd, ls — navigation
pwd # where am I?
cd /var/log # go here
ls -la # list everything, including hidden files
2. grep — find text
grep -R "TODO" src/ # search folder recursively
grep -i error app.log # case-insensitive
3. find — find files
find /var/log -name "*.log" -mtime -7 # log files modified in the last week
find . -type d -name "node_modules" # find all node_modules folders
4. less — read big files without loading them
less huge.log
# / to search, n for next, q to quit
5. tail -f — live-follow a log
tail -f /var/log/nginx/access.log
6. top / htop — see what's using resources
htop is friendlier; install if missing.
7. ps aux | grep <name> — find a process
ps aux | grep nginx
8. kill — stop a process
kill 1234 # nice signal
kill -9 1234 # force
9. curl — talk to any HTTP endpoint
curl -sS https://api.github.com/repos/kubernetes/kubernetes | head
curl -X POST -H "Content-Type: application/json" -d '{"x":1}' https://api.example.com/echo
10. ssh and scp — remote work
ssh you@server
scp file.tar.gz you@server:/tmp/
Bonus: !! and !$
sudo !! # re-run the previous command with sudo
mv file.txt !$ # last argument of previous command
Learn these ten commands well and 90% of everyday Linux work becomes muscle memory.
Keep reading
You may also like
it-tips
Git Cheat Sheet: Every Command You'll Actually Use
From `git init` to `git rebase -i` — the practical Git workflow you'll use daily, with what each command really does.
Read
it-tips
Linux Cheat Sheet Part 2: Text, Networking, Archives, Scripting
grep / sed / awk, ssh / curl / netstat, tar / zip, and just enough Bash to write your own scripts.
Read
it-tips
Linux Cheat Sheet Part 1: Files, Directories & Processes
The everyday Linux commands you'll type a hundred times a week — with what they do in plain English.
Read
Discussion (0)
No comments yet. Be the first to weigh in.