File Management Commands
These are the bread and butter of terminal work. ls -la lists files with permissions and hidden files. cd navigates directories (cd - returns to the previous directory). cp -r copies recursively, mv renames or moves, and rm -rf deletes (use with extreme caution). mkdir -p creates nested directories in one command.
find. -name "*.tsx" -type f finds files by name. du -sh * shows disk usage per directory. df -h displays available disk space. These commands become muscle memory within weeks.
Text Processing: grep, sed, awk
grep -rn "TODO" src/ recursively searches for patterns with line numbers. grep -i is case-insensitive. Pipe output through grep to filter: ps aux | grep node. For in-place text replacement, sed -i 's/old/new/g' file.txt is invaluable. awk handles column-based processing: awk '{print $1, $3}' access.log extracts specific fields.
Combine these with pipes for powerful one-liners: cat server.log | grep ERROR | awk '{print $4}' | sort | uniq -c | sort -rn gives you a ranked list of error sources.
Networking Commands
curl -X GET https://api.example.com makes HTTP requests from the terminal — essential for API testing. wget downloads files. ping checks connectivity. netstat -tlnp (or ss -tlnp) shows open ports. nslookup and dig query DNS records. ssh user@host connects to remote servers — pair with SSH keys for passwordless auth.
Process Management
ps aux lists all running processes. top (or htop for a better UI) shows real-time resource usage. kill -9 PID force-kills a process. jobs, bg, fg manage background processes. nohup command & runs a process that survives terminal closure. lsof -i:3000 shows what's using a specific port — invaluable when a dev server won't start.
File Permissions and Ownership
chmod 755 script.sh makes a file executable. chmod -R 644 public/ recursively sets read permissions. chown user:group file changes ownership. Understanding the octal system (4=read, 2=write, 1=execute) is crucial for security and deployment.
Git from the Terminal
While GUI tools exist, terminal Git is faster: git log --oneline --graph visualizes branch history. git stash saves work in progress. git rebase -i HEAD~5 squashes commits. git bisect binary-searches for the commit that introduced a bug. Master these for efficient branching workflows.
Productivity Tricks
!! repeats the last command (sudo!! reruns as root). Ctrl+R reverse-searches command history. alias creates shortcuts: alias gs='git status'. xargs converts stdin to arguments: find. -name "*.log" | xargs rm. Shell scripting automates repetitive sequences — even a 5-line bash script saves hours over a month.
Conclusion
The terminal isn't intimidating once you build fluency with 20-30 core commands. Start with file management and grep, then expand into networking and process control. Use the CoderFile editor for code, but let the terminal handle everything around it. The efficiency gains compound daily.