Find the Best Cosmetic Hospitals

Explore trusted cosmetic hospitals and make a confident choice for your transformation.

“Invest in yourself — your confidence is always worth it.”

Explore Cosmetic Hospitals

Start your journey today — compare options in one place.

Common UNIX Commands and Utilities: Practical Reference for DevOps and Sysadmin Work

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.

unix commands and utilities

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 areaCommands from the original guideTypical use
Login and authenticationlogin, logout, passwd, kinit, kdestroySession access and credential handling
System informationdate, history, man, info, who, whoami, top, uptimeHost state and user context
Files and directoriesls, cp, mv, rm, ln, chmod, find, cd, mkdir, rmdir, pwdEveryday file lifecycle tasks
File display and comparisoncat, more, head, tail, grep, diff, cmp, comm, wc, file, strings, odInspect, search, and compare data
Disk and archivesdf, du, gzip, gunzip, tar, ddCapacity checks, compression, archiving
Execution controljobs, ps, kill, nice, at, crontab, fg, bg, alias, limitForeground/background jobs and scheduling
Networkingssh, scp, sftp, host, lynx, telnet, ftpRemote access and transfers
Text and data processingsed, awk, perl, sort, tr, cut, paste, fmt, foldStream editing and structured text handling
Editors and build toolsvi, emacs, xemacs, pico, gcc, g++, make, dbx, cflowEditing, compiling, and builds
Printing and document toolinglpr, lpq, lprm, enscript, tex, latex, dvips, xdviPrint 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)

KeyEffect
Ctrl+H (or Backspace)Erase previous character
Ctrl+UErase current input line
Ctrl+DEnd input for terminal-reading programs
Ctrl+SPause terminal output
Ctrl+QResume terminal output
Ctrl+ZSuspend current foreground job
Ctrl+CInterrupt current foreground program
Ctrl+\Forceful quit of current foreground program

Special symbols and I/O operators

Symbol or commandMeaning
*Wildcard for filename matching
~userUser home-directory shorthand
$nameVariable 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, killJob 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

CommandPrimary useExample
lsList files and metadatals -al
cpCopy filescp source.txt backup.txt
mvMove or renamemv old.log archive.log
rmDelete filesrm -i old.log
lnCreate additional link nameln app.log latest.log
chmodChange permissionschmod 640 secrets.txt
findSearch by criteriafind . -name ‘*.conf’ -type f
df / duFilesystem free space and usagedf -h ; du -sh ./data
gzip / gunzipCompress and decompressgzip logs.txt
tarArchive directories/filestar -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

CommandBest forNotes
catQuick file outputGood for short files and pipelines
morePaged terminal viewingUseful on long text output
head / tailStart or end of filesCommon for log triage
grepPattern matchingFilter lines by regex/text
diffLine-level text differencesUseful for config comparisons
cmpBinary-level comparisonReports whether files differ
commCommon/unique linesCompares sorted text files
wcCounts lines/words/charsQuick volume checks
fileGuess file typeHelpful before parsing unknown files
strings / odInspect binary contentExtract 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

CommandSecurity profileTypical use
sshEncryptedRemote shell and command execution
scpEncryptedNon-interactive file copy
sftpEncryptedInteractive file transfer session
telnetPlaintext credentialsLegacy remote login; generally not recommended
ftpPlaintext credentialsLegacy transfer method; generally not recommended
hostN/ADNS lookup for host/IP mapping
lynxN/AText-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

AreaCommandsUse case
Stream editingsedBatch substitutions and line transforms
Pattern processingawkColumn-aware text processing
General scriptingperlPowerful text and report extraction
Column utilitiescut, paste, tr, sortReshape delimiter-based data
Editorsvi, emacs, xemacs, picoInteractive file editing in terminal/X
Compilers and buildsgcc, g++, make, dbx, cflowCompile, debug, and rebuild source code
Shell interpreterssh, csh, kshRun 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 (and man -k) before running unfamiliar commands on production paths.
  • Prefer ssh, scp, and sftp over plaintext protocols like telnet and ftp.
  • 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.

Find Trusted Cardiac Hospitals

Compare heart hospitals by city and services — all in one place.

Explore Hospitals
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.

Related Posts

How to Configure HTTP/HTTPS Proxy on Linux and Windows (CLI, GUI, Registry, and APT)

Set up proxy access correctly on Windows and Linux for command-line tools, package managers, and system-level use. This guide covers quick commands, persistent configuration, and common troubleshooting steps.

Read More

Linux pmap Command Guide: Inspect Process Memory Maps with Practical Examples

Learn how to use the Linux pmap command to inspect per-process memory mappings, compare output modes, and troubleshoot high memory usage quickly. This updated guide includes workflow steps, command examples, and interpretation tips.

Read More

iostat Command Guide for Linux: 20 Practical Examples for CPU and Disk I/O Troubleshooting

Learn how to use iostat to monitor CPU and storage performance on Linux systems. This revised guide covers installation, 20 practical commands, metric interpretation, and a troubleshooting workflow.

Read More

xargs in Linux: Practical Commands, Safe Patterns, and Pipeline Workflows

This guide explains how to use xargs effectively in Linux/Unix shells, from basic stdin handling to safe file operations and parallel execution. You’ll learn practical command patterns, portability caveats, and safer alternatives.

Read More

Linux mount and umount Commands: Practical Examples, /etc/fstab, and Safe Unmounting

Learn how to mount and unmount filesystems reliably on Linux, from one-off commands to persistent /etc/fstab entries. This guide covers common filesystem types, command comparisons, and safe troubleshooting steps.

Read More

How to Use gsh to Run Linux Commands Across Multiple Servers

gsh (Group Shell) lets you execute one command across many Linux hosts from a single terminal. This guide explains host grouping with /etc/ghosts, core options, and practical command patterns.

Read More
Subscribe
Notify of
guest
1 Comment
Newest
Oldest Most Voted
1
0
Would love your thoughts, please comment.x
()
x