Ravindra BagaleCourses & study guides मराठी Track your progress

Linux Commands A-Z Index: 180+ Commands with Links to Why, What and How

This page is the master index of the Linux Commands A-Z reference. It lists 183 commands, from alias to zip, with a one-line meaning and a link to the section that explains why you need it, what it is and how to use it, with step-by-step examples. Commands already explained in depth in earlier chapters link straight to those sections. The rest are published in eight A-Z parts. Use the letter bar to jump.

What you'll learn in this chapter

  • Find any Linux command in seconds by letter
  • Know what each command does in one line
  • Jump to its full why, what and how section
  • Pick the right command for a job using the task map
  • Find commands you do not know with apropos, man -k and type
  • Plan your learning across the eight A-Z parts

1. An everyday example: the index at the back of a textbook

Why do we need this?

When Sai studies for his engineering exam at Fergusson College, he never reads the whole book to find "Ohm's law". He turns to the index at the back, finds O, and goes straight to page 214.

What is it?

This page is that index for Linux. Each letter is a heading, each row is a command, and the Where column is the page number: a link to the exact section.

How to do it (step by step)

How to use the indexKnow the jobPick the letterRead the one-linerOpen the linkRun the examplesDo the tasks
If you do not know the name, start with the task map below.

2. The eight A-Z parts

Why do we need this?

A single page with 183 full commands would be too slow and too long to study.

What is it?

The commands are split into eight parts of about 20 to 24 each. 13 commands already had full sections in earlier chapters and are linked, not repeated.

PartRangeStatus
Part 1alias to chownPublished
Part 2chronyc to duPublished
Part 3echo to hostPublished
Part 4hostname to lvcreatePublished
Part 5man to readPublished
Part 6reboot to statPublished
Part 7strace to unameComing next
Part 8uniq to zipComing next

How to do it (step by step)

  1. Count how many commands your system has.
compgen -c | sort -u | wc -l

Output:

2143

What it means: Thousands exist, but about 180 cover almost all daily admin work.

  1. Check where a command comes from.
type -a ls; rpm -qf /usr/bin/ls

Output:

ls is aliased to `ls --color=auto'
ls is /usr/bin/ls
coreutils-8.32-35.el9.x86_64

What it means: ls is an alias for a program from the coreutils package.

3. Task map: which command for which job

Why do we need this?

Most of the time you know the job, not the command name.

What is it?

This map groups commands by the job they do. Each one is in the A-Z list below.

JobCommands
Files and foldersls cd cp mv rm mkdir find stat ln
Read and filter textcat less head tail grep sed awk cut sort uniq wc tr
Users and permissionsuseradd passwd chage chmod chown chgrp sudo id
Processes and servicesps top kill nice systemctl journalctl
Disk and storagedf du lsblk blkid mount fdisk lvcreate
Networkip ss ping dig curl wget nc traceroute
Packagesapt dnf rpm
Archive and compresstar gzip bzip2 xz zip
Schedulecrontab at systemctl list-timers

How to do it (step by step)

  1. Find a command by a keyword.
apropos -s 1,8 "disk usage"

Output:

df (1)  - report file system space usage
du (1)  - estimate file space usage

What it means: Now look up df or du below.

4. Linux Commands A-Z list

Why do we need this?

One list, every command, one click to the details.

What is it?

Rows marked Coming next will become links when that part is published.

How to do it (step by step)

Jump to a letter: A B C D E F G H I J K L M N P R S T U V W X Y Z

A

CommandWhat it doesWhere
aliasMake a short name for a long commandA-Z Part 1
aproposSearch man pages by keywordA-Z Part 1
aptInstall packages on Debian and UbuntuA-Z Part 1
atRun a command once at a later timeA-Z Part 1
awkWork with columns, sums and reports in textA-Z Part 1

B

CommandWhat it doesWhere
base64Encode or decode data as base64 textA-Z Part 1
basenameGet the file name from a pathA-Z Part 1
bcCalculator with decimalsA-Z Part 1
bgResume a stopped job in the backgroundA-Z Part 1
blkidShow UUID and type of disks and partitionsA-Z Part 1
bunzip2Uncompress .bz2 filesA-Z Part 1
bzip2Compress files with bzip2A-Z Part 1

C

CommandWhat it doesWhere
calShow a calendarA-Z Part 1
catPrint and join filesA-Z Part 1
cdChange the current folderFull section (earlier chapter)
chageSet password ageing rulesA-Z Part 1
chattrSet special file attributes like immutableA-Z Part 1
chgrpChange the group of a fileA-Z Part 1
chmodChange file permissionsFull section (earlier chapter)
chownChange file owner and groupFull section (earlier chapter)
chronycCheck and control time syncA-Z Part 2
chrootRun a shell inside another root folderA-Z Part 2
cksumPrint a CRC checksum and sizeA-Z Part 2
clearClear the terminal screenA-Z Part 2
cmpCompare two files byte by byteA-Z Part 2
columnFormat text into neat columnsA-Z Part 2
commCompare two sorted files line by lineA-Z Part 2
cpCopy files and foldersFull section (earlier chapter)
crontabSchedule repeating jobsA-Z Part 2
curlTalk to web servers and APIsA-Z Part 2
cutCut columns or characters from linesA-Z Part 2

D

CommandWhat it doesWhere
dateShow or format date and timeA-Z Part 2
ddCopy raw data block by blockA-Z Part 2
dfShow free disk space per filesystemA-Z Part 2
diffShow differences between filesA-Z Part 2
digQuery DNS recordsA-Z Part 2
dirnameGet the folder part of a pathA-Z Part 2
dmesgRead kernel messagesA-Z Part 2
dnfInstall packages on RHEL, Fedora, Amazon LinuxA-Z Part 2
duShow how much space folders useA-Z Part 2

E

CommandWhat it doesWhere
echoPrint textA-Z Part 3
envShow or set environment for a commandA-Z Part 3
exitLeave a shell with a status codeA-Z Part 3
exportMake a variable visible to child programsA-Z Part 3
exprSimple maths and string checksA-Z Part 3

F

CommandWhat it doesWhere
fdiskCreate and list disk partitionsA-Z Part 3
fgBring a job to the foregroundA-Z Part 3
fileDetect what kind of file it isA-Z Part 3
findSearch files by name, size, timeA-Z Part 3
firewall-cmdManage firewalld rulesA-Z Part 3
freeShow memory and swap useA-Z Part 3
fsckCheck and repair a filesystemA-Z Part 3
fuserShow which process uses a file or portA-Z Part 3

G

CommandWhat it doesWhere
getentLook up users, groups, hostsA-Z Part 3
getfaclShow ACL permissionsA-Z Part 3
grepSearch text for patternsA-Z Part 3
groupaddCreate a groupA-Z Part 3
groupsShow groups of a userA-Z Part 3
gunzipUncompress .gz filesA-Z Part 3
gzipCompress files with gzipA-Z Part 3

H

CommandWhat it doesWhere
haltStop the systemA-Z Part 3
headShow the first linesA-Z Part 3
historyShow past commandsA-Z Part 3
hostSimple DNS lookupA-Z Part 3
hostnameShow or set the host nameA-Z Part 4
hostnamectlManage host name with systemdA-Z Part 4
htopInteractive process viewerA-Z Part 4

I

CommandWhat it doesWhere
idShow user and group idsA-Z Part 4
ifconfigOld tool to show network interfacesA-Z Part 4
iostatShow disk I/O statsA-Z Part 4
ipShow and set addresses and routesA-Z Part 4
iptablesLow-level firewall rulesA-Z Part 4

J

CommandWhat it doesWhere
jobsList shell jobsA-Z Part 4
journalctlRead systemd logsA-Z Part 4
jqRead and filter JSONA-Z Part 4

K

CommandWhat it doesWhere
killSend a signal to a processA-Z Part 4
killallSignal processes by nameA-Z Part 4

L

CommandWhat it doesWhere
lastShow login historyA-Z Part 4
lessPage through a fileA-Z Part 4
lnCreate hard and soft linksA-Z Part 4
locateFind files fast from a databaseA-Z Part 4
loggerWrite a message to the system logA-Z Part 4
logrotateRotate and compress logsA-Z Part 4
lsList filesA-Z Part 4
lsblkList block devicesA-Z Part 4
lscpuShow CPU detailsA-Z Part 4
lsofList open filesA-Z Part 4
lvcreateCreate an LVM logical volumeA-Z Part 4

M

CommandWhat it doesWhere
manRead the manualA-Z Part 5
md5sumMD5 checksumA-Z Part 5
mkdirCreate foldersFull section (earlier chapter)
mkfsCreate a filesystemA-Z Part 5
mktempCreate a safe temp file or folderA-Z Part 5
moreSimple pagerA-Z Part 5
mountAttach a filesystemA-Z Part 5
mvMove or renameFull section (earlier chapter)

N

CommandWhat it doesWhere
ncOpen raw TCP or UDP connectionsA-Z Part 5
netstatOld tool for sockets and routesA-Z Part 5
niceStart a command with lower priorityA-Z Part 5
nmcliControl NetworkManagerA-Z Part 5
nohupKeep a command running after logoutA-Z Part 5
nslookupSimple DNS queryA-Z Part 5

P

CommandWhat it doesWhere
passwdChange a passwordA-Z Part 5
pasteJoin lines side by sideA-Z Part 5
pgrepFind process ids by nameA-Z Part 5
pingTest if a host answersA-Z Part 5
pkillSignal processes by name or patternA-Z Part 5
printfPrint formatted textA-Z Part 5
psList processesA-Z Part 5
pvcreatePrepare a disk for LVMA-Z Part 5
pwdPrint the current folderA-Z Part 5

R

CommandWhat it doesWhere
readRead input into variablesA-Z Part 5
rebootRestart the systemA-Z Part 6
reniceChange priority of a running processA-Z Part 6
restoreconRestore SELinux labelsA-Z Part 6
rmDelete filesFull section (earlier chapter)
rmdirDelete empty foldersFull section (earlier chapter)
rpmQuery and install RPM packagesA-Z Part 6
rsyncFast sync of files and foldersA-Z Part 6

S

CommandWhat it doesWhere
scpCopy files over SSHFull section (earlier chapter)
screenKeep terminal sessions aliveA-Z Part 6
sedFind and replace in text streamsA-Z Part 6
semanagePersistent SELinux settingsA-Z Part 6
seqPrint number sequencesA-Z Part 6
setfaclSet ACL permissionsA-Z Part 6
sestatusShow SELinux statusA-Z Part 6
sha256sumSHA-256 checksumA-Z Part 6
shutdownPower off or reboot safelyA-Z Part 6
sleepWait for some timeA-Z Part 6
sortSort linesA-Z Part 6
sourceRun a file in the current shellA-Z Part 6
splitSplit a big file into partsA-Z Part 6
ssShow sockets and listening portsA-Z Part 6
sshLog in to a remote serverA-Z Part 6
ssh-keygenCreate SSH keysA-Z Part 6
statShow file details and timesA-Z Part 6
straceTrace system callsA-Z Part 7 (coming next)
suSwitch userA-Z Part 7 (coming next)
sudoRun a command as another userA-Z Part 7 (coming next)
swaponEnable and show swapA-Z Part 7 (coming next)
sysctlRead and set kernel settingsA-Z Part 7 (coming next)
systemctlManage servicesA-Z Part 7 (coming next)

T

CommandWhat it doesWhere
tailShow the last lines or follow a logA-Z Part 7 (coming next)
tarPack files into an archiveA-Z Part 7 (coming next)
teeWrite output to screen and fileA-Z Part 7 (coming next)
testCheck files and valuesA-Z Part 7 (coming next)
timeMeasure how long a command takesA-Z Part 7 (coming next)
timedatectlManage time and time zoneA-Z Part 7 (coming next)
tmuxSplit and keep terminal sessionsA-Z Part 7 (coming next)
topLive view of processesA-Z Part 7 (coming next)
touchCreate empty files or update timesFull section (earlier chapter)
trTranslate or delete charactersA-Z Part 7 (coming next)
tracerouteShow the network path to a hostA-Z Part 7 (coming next)
treeShow folders as a treeA-Z Part 7 (coming next)
truncateShrink or grow a file to a sizeA-Z Part 7 (coming next)
typeShow how a command name is resolvedA-Z Part 7 (coming next)

U

CommandWhat it doesWhere
ulimitShow and set user limitsA-Z Part 7 (coming next)
umaskDefault permission maskA-Z Part 7 (coming next)
umountDetach a filesystemA-Z Part 7 (coming next)
unameShow kernel and system infoA-Z Part 7 (coming next)
uniqRemove or count repeated linesA-Z Part 8 (coming next)
unzipExtract zip filesFull section (earlier chapter)
uptimeShow uptime and loadA-Z Part 8 (coming next)
useraddCreate a userA-Z Part 8 (coming next)
userdelDelete a userA-Z Part 8 (coming next)
usermodChange a userA-Z Part 8 (coming next)

V

CommandWhat it doesWhere
vgcreateCreate an LVM volume groupA-Z Part 8 (coming next)
vimEdit files in the terminalA-Z Part 8 (coming next)
vmstatMemory, CPU and I/O summaryA-Z Part 8 (coming next)

W

CommandWhat it doesWhere
wWho is logged in and what they doA-Z Part 8 (coming next)
watchRun a command again and againA-Z Part 8 (coming next)
wcCount lines, words, bytesA-Z Part 8 (coming next)
wgetDownload filesFull section (earlier chapter)
whereisFind binary, source and man pageA-Z Part 8 (coming next)
whichShow the path of a commandA-Z Part 8 (coming next)
whoShow logged-in usersA-Z Part 8 (coming next)
whoamiPrint your user nameA-Z Part 8 (coming next)

X

CommandWhat it doesWhere
xargsBuild commands from inputA-Z Part 8 (coming next)
xzCompress files with xzA-Z Part 8 (coming next)

Y

CommandWhat it doesWhere
yesPrint a line again and againA-Z Part 8 (coming next)
yumOld package tool on RHEL and CentOSA-Z Part 8 (coming next)

Z

CommandWhat it doesWhere
zcatRead .gz files without unpackingA-Z Part 8 (coming next)
zipCreate zip filesFull section (earlier chapter)

5. Real examples from many industries

Why do we need this?

The same Linux skill shows up in every kind of company. Seeing it in many places helps you remember it.

What is it?

Each row is a made-up team. It shows who uses this and how.

How to do it (step by step)

Team and cityHow they use itCommand
Asha, fresher, HinjewadiUses the index to revise before interviewsapropos network
Vikram, bank ops, PuneShares #cmd links in runbooksman -k cron
Farah, hospital IT, ErandwaneLooks up rarely used commands like chagetype -a chage
Deepak, SaaS, BanerFinds which package gives a missing commanddnf provides */bin/dig
Prachi, college lab, GaneshkhindGives students the letter list as homeworkcompgen -c | grep ^ch
Rohan, cloud, Viman NagarChecks if a name is alias or binarytype ll

6. Common errors and how to fix them

Why do we need this?

Everyone hits these errors. Knowing the cause saves hours.

What is it?

Read the exact message first. Then match it to a row below.

How to do it (step by step)

Error you seeWhy it happensHow to fix
bash: dig: command not foundPackage not installedFind and install it.
dnf provides */bin/dig
No manual entry for chronycman page package missingInstall man pages.
dnf install -y man-pages man-db
nothing appropriate.mandb not builtBuild it.
mandb
ls: unrecognized option '--colour=always' (on macOS)BSD tools differ from GNUUse GNU coreutils or check man.
man ls
sudo: crontab: command not foundsudo uses a secure PATHUse the full path.
sudo /usr/bin/crontab -l
-bash: ll: command not foundll is an alias, not a programDefine it.
alias ll='ls -l'
Permission denied when running ./toolNo execute bitAdd it.
chmod +x tool
command not found after installShell cached the old PATH lookupClear the hash.
hash -r
which: no xyz in (/usr/bin:...)Not in PATHCheck PATH or use full path.
echo $PATH

7. Troubleshooting step by step

Why do we need this?

When you cannot find or run a command, check in this order.

What is it?

Go top to bottom. Stop at the first step that shows the problem.

How to do it (step by step)

  1. Is it a builtin, alias or file?
type -a name
  1. Is it in PATH?
command -v name || echo missing
  1. Which package provides it?
dnf provides */bin/name
  1. Is a man page there?
man -w name
  1. Search by keyword.
apropos keyword
  1. Clear the shell cache.
hash -r

8. Lab 1: Build your own command list

Why do we need this?

List all commands on your system, keep those in this index and see which you have not used yet.

What is it?

A full hands-on lab. Run every step on a test Linux machine (an EC2 instance, a VM, or WSL).

How to do it (step by step)

  1. All commands.
compgen -c | sort -u > all.txt; wc -l < all.txt

Output:

2143
  1. Your history.
history | awk '{print $2}' | sort -u > used.txt; wc -l < used.txt

Output:

61
  1. Save the A-Z list (copy the names from the table).
nano az.txt
  1. Commands in A-Z you have never used.
comm -23 <(sort az.txt) used.txt | head

Output:

apropos
at
bc
  1. Which of them are installed?
for c in $(comm -23 <(sort az.txt) used.txt); do command -v $c >/dev/null && echo $c; done | head -3

Output:

apropos
at
bc
  1. Pick five and open their sections.

9. Lab 2: Find the right tool for five jobs

Why do we need this?

Use only apropos, man -k and this index to find the command for five jobs.

What is it?

A full hands-on lab. Run every step on a test Linux machine (an EC2 instance, a VM, or WSL).

How to do it (step by step)

  1. Change a password expiry.
apropos -s 1,8 "password expiry"

Output:

chage (1) - change user password expiry information
  1. Compare two sorted files.
apropos "compare two sorted"

Output:

comm (1) - compare two sorted files line by line
  1. Show kernel messages.
apropos -s 1 kernel | grep -i ring

Output:

dmesg (1) - print or control the kernel ring buffer
  1. Find block device UUIDs.
apropos -s 8 "block device attributes"

Output:

blkid (8) - locate/print block device attributes
  1. Encode to base64.
apropos base64 | head -1

Output:

base64 (1) - base64 encode/decode data and print to standard output

Ravindra Bagale's Tip

Bookmark this page. When you meet a command at work, find it here, open its section, and run one example on a test machine that same day. One command a day is 180 commands in six months.

10. Frequently asked questions

Q. Is this every Linux command?

No. Linux has thousands. This is the 183 most useful for admin, DevOps and cloud jobs.

Q. Why do some rows say Coming next?

That part is not published yet. The row becomes a link when it is.

Q. Where are grep, sed and awk?

awk is in Part 1 with a deep dive. grep is in Part 3 and sed in Part 6, both as deep dives.

Q. Do commands work the same on Ubuntu and RHEL?

Mostly. Package tools differ (apt vs dnf) and a few options differ.

Q. Does it work on macOS?

Many commands exist but use BSD options. Check man on the Mac.

Q. How should I study?

One part per week, every example run by hand, then the tasks.

Q. Can I link one command?

Yes. Every section has an anchor like #cmd-awk.

Q. Is there a quiz?

Yes, at the end of every part including this one.

11. Interview questions and answers

Beginner level

Q. How do you find a command whose name you forgot?

apropos keyword or man -k keyword.

Q. What does type do?

Tells if a name is an alias, builtin, function or file.

Q. How do you see a command's options quickly?

command --help.

Q. What are man sections 1 and 8?

1 user commands, 8 admin commands.

Mid level level

Q. Command not found but the package is installed. Why?

Not in PATH, sudo secure_path, or hash cache. Check command -v and hash -r.

Q. How do you find which package owns a file?

rpm -qf or dpkg -S; dnf provides for missing ones.

Q. builtin vs external command?

Builtins run inside the shell (cd, alias); external ones are files in PATH.

Q. Why might ls behave differently on two servers?

Aliases, GNU vs BSD, or version differences.

Senior level

Q. How would you standardise tools across 500 servers?

A base package list in config management, version pinning, and a check job that compares command -v output.

Q. Which 10 commands would you teach a new on-call engineer first?

df, du, free, top, ps, ss, journalctl, systemctl, curl, dig.

Q. How do you check a command is safe before running it from a blog?

Read man, run with --help or a dry run, test in a VM, never pipe curl to sudo bash.

Try at home

  1. Pick one letter a day and read every one-liner under it.
  2. Run type -a on ten commands from the list and note which are aliases or builtins.
  3. Use apropos to find three commands not in this list and read their man pages.

Practice Tasks

About this scenario

Maple Leaf Books is a bookselling business in Toronto. Emily Tremblay looks after its IT and cloud work. They count money in CAD and run their AWS resources in the ca-central-1 Region. In the tasks below you do real jobs for them using what this lesson teaches. All names, account IDs, IP addresses and numbers are made up for practice.

0 / 21

Easy Admin commands by keyword

Why: BIZ wants staff to find the right Linux command fast.

What to do: Search only manual section 8 for the keyword partition.

How:
  1. Find the Linux command that does this job.
  2. Add the options (like -r or -h) the task needs.
  3. Add the file names, folders or users in the right order.
  4. Use sudo if the job changes system files or users. Click Check answer.

Easy man k

Why: BIZ wants staff to find the right Linux command fast.

What to do: Use man with k to search for the word timezone.

How:
  1. Find the Linux command that does this job.
  2. Add the options (like -r or -h) the task needs.
  3. Add the file names, folders or users in the right order.
  4. Use sudo if the job changes system files or users. Click Check answer.

Easy What is it

Why: BIZ wants staff to find the right Linux command fast.

What to do: Show every match for the name pwd, builtin and file.

How:
  1. Find the Linux command that does this job.
  2. Add the options (like -r or -h) the task needs.
  3. Add the file names, folders or users in the right order.
  4. Use sudo if the job changes system files or users. Click Check answer.

Easy Path of a command

Why: BIZ wants staff to find the right Linux command fast.

What to do: Print how the shell would run tar, in the short portable way.

How:
  1. Find the Linux command that does this job.
  2. Add the options (like -r or -h) the task needs.
  3. Add the file names, folders or users in the right order.
  4. Use sudo if the job changes system files or users. Click Check answer.

Easy Forget one cached path

Why: BIZ wants staff to find the right Linux command fast.

What to do: Make bash forget the remembered location of tar only.

How:
  1. Find the Linux command that does this job.
  2. Add the options (like -r or -h) the task needs.
  3. Add the file names, folders or users in the right order.
  4. Use sudo if the job changes system files or users. Click Check answer.

Easy Builtin help

Why: BIZ wants staff to find the right Linux command fast.

What to do: Show short help for the builtin read with only the usage line.

How:
  1. Find the Linux command that does this job.
  2. Add the options (like -r or -h) the task needs.
  3. Add the file names, folders or users in the right order.
  4. Use sudo if the job changes system files or users. Click Check answer.

Easy Tool version

Why: BIZ wants staff to find the right Linux command fast.

What to do: Print the version of GNU tar.

How:
  1. Find the Linux command that does this job.
  2. Add the options (like -r or -h) the task needs.
  3. Add the file names, folders or users in the right order.
  4. Use sudo if the job changes system files or users. Click Check answer.

Easy Where are files

Why: BIZ wants staff to find the right Linux command fast.

What to do: Show binary, source and manual locations for the date command.

How:
  1. Find the Linux command that does this job.
  2. Add the options (like -r or -h) the task needs.
  3. Add the file names, folders or users in the right order.
  4. Use sudo if the job changes system files or users. Click Check answer.

Easy One line meaning

Why: BIZ wants staff to find the right Linux command fast.

What to do: Print the one-line manual description of cksum.

How:
  1. Find the Linux command that does this job.
  2. Add the options (like -r or -h) the task needs.
  3. Add the file names, folders or users in the right order.
  4. Use sudo if the job changes system files or users. Click Check answer.

Easy List aliases

Why: BIZ wants staff to find the right Linux command fast.

What to do: Print all aliases in a form you can reuse.

How:
  1. Find the Linux command that does this job.
  2. Add the options (like -r or -h) the task needs.
  3. Add the file names, folders or users in the right order.
  4. Use sudo if the job changes system files or users. Click Check answer.

Easy PATH

Why: BIZ wants staff to find the right Linux command fast.

What to do: Print your PATH with each folder on its own line.

How:
  1. Find the Linux command that does this job.
  2. Add the options (like -r or -h) the task needs.
  3. Add the file names, folders or users in the right order.
  4. Use sudo if the job changes system files or users. Click Check answer.

Medium Where is the man file

Why: BIZ wants staff to find the right Linux command fast.

What to do: Print the path of the manual file for crontab section 5.

How:
  1. Find the Linux command that does this job.
  2. Add the options (like -r or -h) the task needs.
  3. Add the file names, folders or users in the right order.
  4. Use sudo if the job changes system files or users. Click Check answer.

Medium File format manual

Why: BIZ wants staff to find the right Linux command fast.

What to do: Open the section 5 manual page for passwd.

How:
  1. Find the Linux command that does this job.
  2. Add the options (like -r or -h) the task needs.
  3. Add the file names, folders or users in the right order.
  4. Use sudo if the job changes system files or users. Click Check answer.

Medium Count ch commands

Why: BIZ wants staff to find the right Linux command fast.

What to do: Count how many command names bash knows that start with ch.

How:
  1. Find the Linux command that does this job.
  2. Add the options (like -r or -h) the task needs.
  3. Add the file names, folders or users in the right order.
  4. Use sudo if the job changes system files or users. Click Check answer.

Medium Owner package

Why: BIZ wants staff to find the right Linux command fast.

What to do: Find which installed RPM package owns /usr/bin/awk.

How:
  1. Find the Linux command that does this job.
  2. Add the options (like -r or -h) the task needs.
  3. Add the file names, folders or users in the right order.
  4. Use sudo if the job changes system files or users. Click Check answer.

Medium Owner on Debian

Why: BIZ wants staff to find the right Linux command fast.

What to do: Find which Debian package owns /usr/bin/bc.

How:
  1. Find the Linux command that does this job.
  2. Add the options (like -r or -h) the task needs.
  3. Add the file names, folders or users in the right order.
  4. Use sudo if the job changes system files or users. Click Check answer.

Medium Package for a missing tool

Why: BIZ wants staff to find the right Linux command fast.

What to do: Ask dnf which package provides any path ending in bin/chronyc.

How:
  1. Find the Linux command that does this job.
  2. Add the options (like -r or -h) the task needs.
  3. Add the file names, folders or users in the right order.
  4. Use sudo if the job changes system files or users. Click Check answer.

Medium Builtins list

Why: BIZ wants staff to find the right Linux command fast.

What to do: List all bash builtin names.

How:
  1. Find the Linux command that does this job.
  2. Add the options (like -r or -h) the task needs.
  3. Add the file names, folders or users in the right order.
  4. Use sudo if the job changes system files or users. Click Check answer.

Medium Info manual

Why: BIZ wants staff to find the right Linux command fast.

What to do: Open the GNU info manual for coreutils at the node for date.

How:
  1. Find the Linux command that does this job.
  2. Add the options (like -r or -h) the task needs.
  3. Add the file names, folders or users in the right order.
  4. Use sudo if the job changes system files or users. Click Check answer.

Hard Rebuild man index

Why: BIZ wants staff to find the right Linux command fast.

What to do: Rebuild the manual index quietly as root.

How:
  1. Find the Linux command that does this job.
  2. Add the options (like -r or -h) the task needs.
  3. Add the file names, folders or users in the right order.
  4. Use sudo if the job changes system files or users. Click Check answer.

Hard Regex search

Why: BIZ wants staff to find the right Linux command fast.

What to do: Use apropos with a regular expression to find names starting with lv.

How:
  1. Find the Linux command that does this job.
  2. Add the options (like -r or -h) the task needs.
  3. Add the file names, folders or users in the right order.
  4. Use sudo if the job changes system files or users. Click Check answer.

In short

  1. 183 commands from alias to zip.
  2. Eight parts with full why, what and how.
  3. Covered commands link to earlier chapters.
  4. Use apropos when you know only the job.
  5. type -a and command -v tell you what runs.
  6. Every section has a #cmd anchor.

Revision, comparison and interview cards

Revise this lesson in a few minutes. Save the cards on your phone or download them as PNG files. The QR code on each card opens this lesson.

Learn any command. Ask why you need it. Read the short help. Read the manual. Try it in /tmp.
Revision card: Learn any command · Download PNG · Open card page
Find the right command. Search by keyword. One-line meaning. Where is it? Which package?
Revision card: Find the right command · Download PNG · Open card page
type vs which. Shell view of a name. / PATH file search.
Comparison: type vs which · Download PNG · Open card page
--help vs man. Short usage text. / Full manual page.
Comparison: --help vs man · Download PNG · Open card page
How do you learn a new command?. Short help first. Then the man page. Test safely in /tmp.
Interview card: How do you learn a new command? · Download PNG · Open card page
Builtin vs external command?. Builtin lives in the shell. External is a file in PATH. Check it.
Interview card: Builtin vs external command? · Download PNG · Open card page
Why did my alias vanish?. Alias lives in one shell. Save it in ~/.bashrc. Reload.
Interview card: Why did my alias vanish? · Download PNG · Open card page
Command not found?. Not installed or not in PATH. Check PATH. Find the package.
Interview card: Command not found? · Download PNG · Open card page

More cards: Ravi Sir's Cards.