Linux Command Dictionary

CLI Cheatsheet

Linux Command Dictionary

Find common Linux commands faster with keyword and category filters.

Human-verified, ready-to-run examplesFilter by category or keyword to narrow results
Command Library18 results

Remove the leading $/# when running commands locally.

Find Commands

Tip: Combine category + keyword (e.g., network ping) for precise matches.

Remove the leading $/# when running commands locally.
Command Library

Ready-to-copy snippets with brief usage notes.

18 resultsAll
Files & Directories

ls -lah /var/log

List files in human-readable format with details.

Example
$ ls -lah /var/log
#list#dir#目录
Files & Directories

find /var/log -type f -name "*.log"

Recursively find files by name pattern.

Example
$ find /var/log -type f -name "*.log"
#search#查找
Files & Directories

grep -rin "error" /var/log

Search keyword in file contents with line numbers.

Example
$ grep -rin "error" /var/log
#content#匹配
Archive/Compress

tar -czf logs.tar.gz /var/log/nginx

Archive and compress a directory into tar.gz.

Example
$ tar -czf logs.tar.gz /var/log/nginx
#compress#打包
Archive/Compress

unzip archive.zip -d output/

Extract a zip file to a target folder.

Example
$ unzip archive.zip -d output/
#zip#解压
Permissions

chmod +x run.sh

Change file mode, add execute permission.

Example
$ chmod +x run.sh
#权限#execute
Permissions

sudo chown -R www-data:www-data /var/www/app

Recursively change file owner and group.

Example
$ sudo chown -R www-data:www-data /var/www/app
#owner#权限
Processes & Services

sudo systemctl status nginx

Check status of a systemd service.

Example
$ sudo systemctl status nginx
#service#服务
Processes & Services

sudo journalctl -u nginx -n 50

View recent logs for a specific service.

Example
$ sudo journalctl -u nginx -n 50
#logs#日志
Processes & Services

ps aux | grep nginx

List processes and filter by keyword.

Example
$ ps aux | grep nginx
#进程#process
Processes & Services

kill -9 $(pgrep nginx)

Force kill processes matching the keyword.

Example
$ kill -9 $(pgrep nginx)
#signal#终止
Disk & Resources

df -h

Show disk usage by filesystem (human-readable).

Example
$ df -h
#disk#空间
Disk & Resources

du -sh *

Summarize size of items in the current directory.

Example
$ du -sh *
#size#目录大小
Network

ping -c 4 example.com

Test network connectivity and latency.

Example
$ ping -c 4 example.com
#latency#网络
Network

curl -I https://example.com

Fetch only HTTP response headers to check availability.

Example
$ curl -I https://example.com
#http#测试
Network

scp ./file.txt user@server:/home/user/

Securely copy files to a remote host over SSH.

Example
$ scp ./file.txt user@server:/home/user/
#copy#文件传输
Network

ssh user@server

Log in to a remote host via SSH.

Example
$ ssh user@server
#远程#登录
System & Users

sudo useradd -m deploy && sudo passwd deploy

Create a new user and set password; -m creates the home directory.

Example
$ sudo useradd -m deploy && sudo passwd deploy
#user#账号
About This Tool

A focused Linux command dictionary with human-verified examples. Filter by category or keyword, skim the description, and copy the snippet without extra prompts.

Examples include a leading $/# for readability—feel free to remove it when executing.

How to use

  1. Pick a category or type a keyword (command/function/description) to filter.
  2. Use Copy to grab the ready-to-run example (prompt prefix optional).
  3. Each result lists tags so you can quickly spot the scenario you need.
Linux Command Dictionary - Quick Search & Copy