Linux commands reference — search 70 shell commands by task

Type a task or a command name and the table narrows 70 everyday Linux commands to the ones that match, each with a one-line purpose and an example you can adapt.

Live demo · real result from this tool
Showing70 of 70 commands

Table

CommandPurposeExampleTopic
lsList directory contents.ls -lahFiles
cdChange directory.cd ~/projectsFiles
pwdPrint the current directory.pwdFiles
cpCopy files or directories.cp -r src/ backup/Files
mvMove or rename.mv old.txt new.txtFiles
rmRemove files (no recycle bin).rm -i *.logFiles
mkdirCreate directories.mkdir -p a/b/cFiles
rmdirRemove empty directories.rmdir empty/Files
touchCreate a file or update its timestamp.touch notes.txtFiles
lnCreate links.ln -s /opt/app/bin/app /usr/local/bin/appFiles
findSearch for files by name, size, time…find . -name '*.js' -mtime -7Files
duDisk usage of files and folders.du -sh * | sort -hFiles
dfFree space on mounted filesystems.df -hSystem
statDetailed file metadata.stat file.txtFiles
chmodChange permissions.chmod 755 deploy.shPermissions
chownChange owner and group.sudo chown -R www-data:www-data /var/wwwPermissions
sudoRun a command as another user (usually root).sudo apt updatePermissions
umaskDefault permission mask for new files.umask 022Permissions
catPrint files.cat a.txt b.txtText
lessPage through a file.less +F app.logText
headFirst lines of a file.head -n 20 file.csvText
tailLast lines; -f follows a growing file.tail -f /var/log/syslogText
grepSearch text with patterns.grep -rn 'TODO' src/Text
sedStream editor: find and replace.sed -i 's/foo/bar/g' file.txtText
awkColumn-based text processing.awk -F, '{print $2}' data.csvText
cutExtract columns.cut -d: -f1 /etc/passwdText
sortSort lines.sort -t, -k2 -n data.csvText
uniqCollapse adjacent duplicate lines.sort access.log | uniq -cText
wcCount lines, words and bytes.wc -l *.txtText
trTranslate or delete characters.tr 'a-z' 'A-Z' < in.txtText
diffCompare files line by line.diff -u old.conf new.confText
xargsBuild commands from input.find . -name '*.tmp' | xargs rmText
teeWrite to a file and to stdout.make 2>&1 | tee build.logText
jqQuery and transform JSON.curl -s api/users | jq '.[].name'Text
psList processes.ps aux | grep nodeProcesses
topLive process monitor (htop is friendlier).topProcesses
killSend a signal to a process.kill -TERM 1234Processes
pkillSignal processes by name.pkill -f 'node server.js'Processes
nohupKeep a command running after logout.nohup ./job.sh &Processes
jobs / fg / bgManage shell background jobs.fg %1Processes
systemctlControl systemd services.sudo systemctl restart nginxProcesses
journalctlRead systemd logs.journalctl -u nginx --since todayProcesses
crontabSchedule recurring jobs.crontab -eProcesses
lsofList open files and ports.sudo lsof -i :3000Processes
ipShow and configure network interfaces.ip addr showNetwork
ssShow sockets and listening ports.ss -tulpnNetwork
pingCheck reachability.ping -c 4 example.comNetwork
curlTransfer data with URLs.curl -I https://example.comNetwork
wgetDownload files.wget -c https://example.com/file.isoNetwork
digDNS lookup.dig +short example.com MXNetwork
tracerouteShow the route packets take.traceroute example.comNetwork
sshSecure remote shell.ssh -i ~/.ssh/id_ed25519 user@hostNetwork
scpCopy files over SSH.scp file.txt user@host:/tmp/Network
rsyncEfficient file sync, local or over SSH.rsync -avz --delete src/ user@host:/srv/app/Network
ssh-keygenCreate SSH keys.ssh-keygen -t ed25519 -C 'you@example.com'Network
ncNetcat: raw TCP/UDP connections.nc -zv host 443Network
tarCreate or extract archives.tar -czf backup.tar.gz dir/ ; tar -xzf backup.tar.gzArchives
zip / unzipZIP archives.zip -r site.zip public/Archives
gzip / gunzipCompress single files.gzip -9 big.logArchives
unameKernel and system information.uname -aSystem
freeMemory usage.free -hSystem
uptimeTime since boot and load average.uptimeSystem
whoami / idCurrent user and groups.idSystem
env / exportShow or set environment variables.export NODE_ENV=productionSystem
historyPrevious shell commands.history | grep dockerSystem
which / typeWhere a command comes from.which python3System
manRead a command's manual.man rsyncSystem
aptDebian/Ubuntu package manager.sudo apt install nginxPackages
dnfFedora/RHEL package manager.sudo dnf install gitPackages
useradd / passwdCreate users and set passwords.sudo useradd -m deploySystem

70 rows — scroll inside the table, or download the CSV.

Processed on your device — nothing is uploaded.

How to use the Linux commands reference

  1. Type in Filter: a command name (tar), or a word about the job (log, permissions, listening). Every word you type must appear somewhere in the row.
  2. Pick a Topic to narrow further: Files, Permissions, Text, Processes, Network, Archives, System or Packages. Leave it on All topics to search everything.
  3. Read the Example column and copy the one closest to what you need. Change paths, hosts and process IDs before running it.
  4. The counter shows how many rows match, for example “Showing: 8 of 70 commands”.

What it does and when to use it

This is a quick lookup for the commands you use often but do not type every day. It helps when you remember the task (“follow a growing log”, “who is using port 3000”) but not the command or the flag. The 70 rows cover files (13), text processing (16), networking (12), processes and services (10), system information (10), permissions (4), archives (3) and package managers (2).

Examples are real-world rather than bare syntax, such as du -sh * | sort -h to find what fills a folder.

For Git there is a separate Git cheatsheet. To work out a permission number such as 755, use the chmod calculator, and to check a schedule before you save it with crontab -e, paste it into the cron expression parser.

How it works

The command list ships with the page and loads the first time you use the tool. Filtering runs in your browser: the text is split into words, and a row is kept only if every word appears (case-insensitive) in its command, purpose, example or topic. The topic menu then removes rows from other topics. Nothing is sent to a server, and the tool never runs a command; it only shows text.

Worked examples

Searching port:

Showing: 3 of 70 commands
lsof | List open files and ports. | sudo lsof -i :3000 | Processes
ss | Show sockets and listening ports. | ss -tulpn | Network
env / export | Show or set environment variables. | export NODE_ENV=production | System

The third row shows the substring rule at work: “port” sits inside “export”.

Topic Archives with an empty filter returns three rows, tar, zip / unzip and gzip / gunzip. The tar example creates and then extracts an archive: tar -czf backup.tar.gz dir/ ; tar -xzf backup.tar.gz.

Searching space returns a single row: df | Free space on mounted filesystems. | df -h | System.

Limits and tips

  • Read before you paste. Examples such as rm -i *.log, sed -i 's/foo/bar/g' file.txt and rsync --delete change or remove files. The tool does not check whether a command is safe on your system.
  • Distribution differences. apt is for Debian and Ubuntu, dnf for Fedora and RHEL. Other systems (Alpine’s apk, Arch’s pacman) are not listed.
  • Some tools need installing. jq, rsync, dig and traceroute are often missing from minimal images.
  • One example per command. For every option, run man rsync (or the command you need).

Frequently asked questions

Why does searching "disk" not show df?
The filter matches the words written in each row, and df is described as "Free space on mounted filesystems". Search "space" for df, or "disk" for du. When a search comes back empty, try a different word for the same job.
Why does "port" also return export?
The filter is a plain substring match, so "port" is found inside "export". Add a second word ("port listening") or pick a Topic to cut the list down.
Will these commands work on macOS?
Most file and text commands (ls, grep, find, tar) work on macOS too, but some flags differ, because macOS ships BSD versions. systemctl, journalctl, apt, dnf, ss and free are Linux-only. Check man on your own machine before running anything destructive.
Can I download the table?
Yes. The table can be saved as linux-commands.csv, and the download keeps whatever filter and topic you have applied.

Written by the ToolsRift team · Last updated

Pages are drafted with AI assistance and checked by automated tests. How we write and check pages.

Was this tool useful?

Report a problem

Start typing to search every tool.

↑ ↓ to moveEnter to openEsc to close