UNIX command-line literacy is foundational for DevOps and operations work, from inspecting logs and managing files to troubleshooting processes and automating recurring tasks. This revised guide turns the original command list into a practical reference you can use during daily terminal work.
Originally published on 2011-01-05; fully revised and updated.

Find commands quickly with built-in documentation
When you do not remember the exact command name, use man -k with a keyword. Then open the manual page for the command you want. GNU tools may also include additional info documentation.
man -k tape
man tar
man csh
info ls
history | tail -20
A safe workflow for using unfamiliar commands
flowchart TD
A[Need a command] --> B[Search with man -k keyword]
B --> C[Read man or info page]
C --> D[Run on test file or test path]
D --> E{Output expected}
E -- no --> F[Refine options and retry]
F --> C
E -- yes --> G[Automate with script cron or alias]
G --> H[Use in production task]
UNIX command groups at a glance
| Task area | Commands from the original guide | Typical use |
|---|---|---|
| Login and authentication | login, logout, passwd, kinit, kdestroy | Session access and credential handling |
| System information | date, history, man, info, who, whoami, top, uptime | Host state and user context |
| Files and directories | ls, cp, mv, rm, ln, chmod, find, cd, mkdir, rmdir, pwd | Everyday file lifecycle tasks |
| File display and comparison | cat, more, head, tail, grep, diff, cmp, comm, wc, file, strings, od | Inspect, search, and compare data |
| Disk and archives | df, du, gzip, gunzip, tar, dd | Capacity checks, compression, archiving |
| Execution control | jobs, ps, kill, nice, at, crontab, fg, bg, alias, limit | Foreground/background jobs and scheduling |
| Networking | ssh, scp, sftp, host, lynx, telnet, ftp | Remote access and transfers |
| Text and data processing | sed, awk, perl, sort, tr, cut, paste, fmt, fold | Stream editing and structured text handling |
| Editors and build tools | vi, emacs, xemacs, pico, gcc, g++, make, dbx, cflow | Editing, compiling, and builds |
| Printing and document tooling | lpr, lpq, lprm, enscript, tex, latex, dvips, xdvi | Print queues and document workflows |
For password changes with passwd, follow strong password guidance (original external reference): strong password practices.
C-shell control keys, symbols, and job control
The original article is C-shell oriented in several sections. If you use Bash or Zsh, behavior and key bindings may differ. Also see the linked reference for shell-special filename characters: special characters to avoid in filenames.
Terminal control characters (C-shell)
| Key | Effect |
|---|---|
| Ctrl+H (or Backspace) | Erase previous character |
| Ctrl+U | Erase current input line |
| Ctrl+D | End input for terminal-reading programs |
| Ctrl+S | Pause terminal output |
| Ctrl+Q | Resume terminal output |
| Ctrl+Z | Suspend current foreground job |
| Ctrl+C | Interrupt current foreground program |
| Ctrl+\ | Forceful quit of current foreground program |
Special symbols and I/O operators
| Symbol or command | Meaning |
|---|---|
| * | Wildcard for filename matching |
| ~user | User home-directory shorthand |
| $name | Variable substitution |
| \ | Escape next special character |
| ‘…’ | Single-quote literal string |
| “…” | Double-quote string with variable expansion |
| `…` | Command substitution (legacy syntax) |
| | | Pipe stdout to next command |
| > | Redirect stdout to file |
| < | Read stdin from file |
| >> | Append stdout to file |
| jobs, fg, bg, kill | Job listing, resume, background, terminate |
sleep 300 &
jobs
fg %1
grep 'ERROR' app.log | tee errors.log
sort app.log > sorted.log
wc -l < sorted.log
./rotate-logs.sh >> ops.log 2>&1Code language: HTML, XML (xml)
File, directory, and disk operations
| Command | Primary use | Example |
|---|---|---|
| ls | List files and metadata | ls -al |
| cp | Copy files | cp source.txt backup.txt |
| mv | Move or rename | mv old.log archive.log |
| rm | Delete files | rm -i old.log |
| ln | Create additional link name | ln app.log latest.log |
| chmod | Change permissions | chmod 640 secrets.txt |
| find | Search by criteria | find . -name ‘*.conf’ -type f |
| df / du | Filesystem free space and usage | df -h ; du -sh ./data |
| gzip / gunzip | Compress and decompress | gzip logs.txt |
| tar | Archive directories/files | tar -czf release.tgz ./release |
pwd
ls -al
mkdir -p archive/2026
cp app.log archive/2026/
mv archive/2026/app.log archive/2026/app.log.1
find archive -name '*.log*' -type f
du -sh archive
df -hCode language: JavaScript (javascript)
Display, compare, and inspect file contents
| Command | Best for | Notes |
|---|---|---|
| cat | Quick file output | Good for short files and pipelines |
| more | Paged terminal viewing | Useful on long text output |
| head / tail | Start or end of files | Common for log triage |
| grep | Pattern matching | Filter lines by regex/text |
| diff | Line-level text differences | Useful for config comparisons |
| cmp | Binary-level comparison | Reports whether files differ |
| comm | Common/unique lines | Compares sorted text files |
| wc | Counts lines/words/chars | Quick volume checks |
| file | Guess file type | Helpful before parsing unknown files |
| strings / od | Inspect binary content | Extract printable text or octal/hex views |
head -n 20 /var/log/syslog
tail -n 50 /var/log/syslog
grep -n 'ERROR' app.log
diff -u old.conf new.conf
wc -l app.log
file /bin/ls
strings /bin/ls | headCode language: JavaScript (javascript)
Networking and remote transfer commands
| Command | Security profile | Typical use |
|---|---|---|
| ssh | Encrypted | Remote shell and command execution |
| scp | Encrypted | Non-interactive file copy |
| sftp | Encrypted | Interactive file transfer session |
| telnet | Plaintext credentials | Legacy remote login; generally not recommended |
| ftp | Plaintext credentials | Legacy transfer method; generally not recommended |
| host | N/A | DNS lookup for host/IP mapping |
| lynx | N/A | Text-mode web browsing |
ssh devops@example-host
scp release.tgz devops@example-host:/tmp/
sftp devops@example-host
host example.comCode language: CSS (css)
Text processing, editors, and programming tools
| Area | Commands | Use case |
|---|---|---|
| Stream editing | sed | Batch substitutions and line transforms |
| Pattern processing | awk | Column-aware text processing |
| General scripting | perl | Powerful text and report extraction |
| Column utilities | cut, paste, tr, sort | Reshape delimiter-based data |
| Editors | vi, emacs, xemacs, pico | Interactive file editing in terminal/X |
| Compilers and builds | gcc, g++, make, dbx, cflow | Compile, debug, and rebuild source code |
| Shell interpreters | sh, csh, ksh | Run shell scripts in matching shell syntax |
cut -d',' -f1 users.csv | sort
awk '{print $1, $3}' metrics.txt
sed 's/ERROR/WARN/g' app.log > app.log.rewritten
gcc -o hello hello.c
makeCode language: JavaScript (javascript)
Legacy and environment-specific utilities from the original list
- Kerberos commands:
kinit,kdestroy - Email and bulletin tools:
mailx,msgs,uuencode,uudecode,rn - X Window clients:
xterm,xauth,xload,xman,xdvi,gv - TeX toolchain:
tex,latex,dvips,latex2html - Tape/archive operations:
mt,dd,tar,ltf - Scientific/programming libraries and tools listed:
lapack,dbm,xdr,netcdf,f77,f2c
Best practices and common pitfalls
- Use
man(andman -k) before running unfamiliar commands on production paths. - Prefer
ssh,scp, andsftpover plaintext protocols liketelnetandftp. - Be careful with destructive commands (
rm,mv,dd); test on sample data first. - Verify which shell you are in; C-shell behavior can differ significantly from Bash/Zsh.
- Use redirection and logging deliberately so command output is auditable (
>>,tee,2>&1). - Expect command availability to vary across UNIX/Linux environments, especially for legacy tools.
I’m Rajesh Kumar, a DevOps, SRE, DevSecOps, Cloud, and Platform Engineering expert passionate about sharing practical knowledge, real-world experiences, and industry best practices. I have worked at Cotocus and regularly write about technology, travel, investing, health, product reviews, and digital marketing through my various platforms.
I publish technical articles at DevOps School, travel stories at Holiday Landmark, stock market insights at Stocks Mantra, health and fitness guidance at My Medic Plus, product reviews at TrueReviewNow, and SEO and digital marketing strategies at Wizbrand.
Find Trusted Cardiac Hospitals
Compare heart hospitals by city and services — all in one place.
Explore Hospitals