@enjoys/context-engine 1.0.1 → 1.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,3812 @@
1
+ {
2
+ "name": "linux",
3
+ "description": "Comprehensive Linux system commands for Debian/Ubuntu and Fedora/RHEL distributions",
4
+ "category": "Operating System",
5
+ "platforms": ["linux"],
6
+ "shells": ["bash", "zsh", "fish", "sh"],
7
+ "commands": {
8
+ "system": [
9
+ {
10
+ "name": "uname",
11
+ "description": "Print system information (kernel, hostname, architecture)",
12
+ "subcommands": [],
13
+ "options": [
14
+ { "name": "-a", "description": "Print all system information" },
15
+ { "name": "-s", "description": "Print kernel name" },
16
+ { "name": "-n", "description": "Print network node hostname" },
17
+ { "name": "-r", "description": "Print kernel release" },
18
+ { "name": "-v", "description": "Print kernel version" },
19
+ { "name": "-m", "description": "Print machine hardware name (e.g. x86_64)" },
20
+ { "name": "-p", "description": "Print processor type" },
21
+ { "name": "-o", "description": "Print operating system" }
22
+ ],
23
+ "examples": [
24
+ { "command": "uname -a", "description": "Show all system info" },
25
+ { "command": "uname -r", "description": "Show kernel version" },
26
+ { "command": "uname -m", "description": "Show architecture (x86_64, aarch64)" }
27
+ ]
28
+ },
29
+ {
30
+ "name": "hostname",
31
+ "description": "Show or set the system hostname",
32
+ "subcommands": [],
33
+ "options": [
34
+ { "name": "-f", "description": "Display the FQDN (Fully Qualified Domain Name)" },
35
+ { "name": "-i", "description": "Display the IP address of the host" },
36
+ { "name": "-I", "description": "Display all IP addresses of the host" },
37
+ { "name": "-d", "description": "Display the DNS domain name" },
38
+ { "name": "-s", "description": "Display the short hostname" }
39
+ ],
40
+ "examples": [
41
+ { "command": "hostname", "description": "Show current hostname" },
42
+ { "command": "hostname -I", "description": "Show all IP addresses" },
43
+ { "command": "sudo hostname newname", "description": "Set hostname temporarily" }
44
+ ]
45
+ },
46
+ {
47
+ "name": "hostnamectl",
48
+ "description": "Control the system hostname and related settings (systemd)",
49
+ "subcommands": [
50
+ { "name": "status", "description": "Show current hostname and system info" },
51
+ { "name": "set-hostname", "description": "Set the system hostname", "args": [{ "name": "name", "description": "New hostname", "required": true }] },
52
+ { "name": "set-icon-name", "description": "Set the icon name for the host" },
53
+ { "name": "set-chassis", "description": "Set the chassis type (desktop, laptop, server, vm, container)" },
54
+ { "name": "set-deployment", "description": "Set deployment environment" },
55
+ { "name": "set-location", "description": "Set host location" }
56
+ ],
57
+ "options": [
58
+ { "name": "--static", "description": "Operate on static hostname" },
59
+ { "name": "--transient", "description": "Operate on transient hostname" },
60
+ { "name": "--pretty", "description": "Operate on pretty hostname" },
61
+ { "name": "--no-ask-password", "description": "Do not prompt for password" }
62
+ ],
63
+ "examples": [
64
+ { "command": "hostnamectl", "description": "Show hostname and OS details" },
65
+ { "command": "sudo hostnamectl set-hostname myserver", "description": "Set system hostname permanently" },
66
+ { "command": "hostnamectl set-chassis server", "description": "Set system chassis type" }
67
+ ]
68
+ },
69
+ {
70
+ "name": "uptime",
71
+ "description": "Show how long the system has been running, load averages",
72
+ "subcommands": [],
73
+ "options": [
74
+ { "name": "-p", "description": "Show uptime in pretty format" },
75
+ { "name": "-s", "description": "Show system up since (date/time)" }
76
+ ],
77
+ "examples": [
78
+ { "command": "uptime", "description": "Show uptime and load averages" },
79
+ { "command": "uptime -p", "description": "Show uptime in human-readable format" },
80
+ { "command": "uptime -s", "description": "Show when system was booted" }
81
+ ]
82
+ },
83
+ {
84
+ "name": "dmesg",
85
+ "description": "Print or control the kernel ring buffer (boot/hardware messages)",
86
+ "subcommands": [],
87
+ "options": [
88
+ { "name": "-H", "description": "Human-readable output with colors and timestamps" },
89
+ { "name": "-T", "description": "Show human-readable timestamps" },
90
+ { "name": "-w", "description": "Wait for new messages (follow mode)" },
91
+ { "name": "-l", "description": "Filter by log level (e.g. err,warn)", "takesValue": true },
92
+ { "name": "-f", "description": "Filter by facility (e.g. kern,daemon)", "takesValue": true },
93
+ { "name": "-c", "description": "Clear the ring buffer after printing" },
94
+ { "name": "--level", "description": "Restrict output to specified level", "takesValue": true },
95
+ { "name": "-n", "description": "Set console log level", "takesValue": true }
96
+ ],
97
+ "examples": [
98
+ { "command": "dmesg | tail -20", "description": "Show last 20 kernel messages" },
99
+ { "command": "dmesg -T", "description": "Show messages with human timestamps" },
100
+ { "command": "dmesg -Hw", "description": "Follow kernel messages in real-time" },
101
+ { "command": "dmesg -l err,warn", "description": "Show only errors and warnings" },
102
+ { "command": "dmesg | grep -i usb", "description": "Filter USB-related messages" }
103
+ ]
104
+ },
105
+ {
106
+ "name": "lsb_release",
107
+ "description": "Print distribution-specific information (Debian/Ubuntu)",
108
+ "subcommands": [],
109
+ "options": [
110
+ { "name": "-a", "description": "Display all available information" },
111
+ { "name": "-i", "description": "Display distributor ID" },
112
+ { "name": "-d", "description": "Display description" },
113
+ { "name": "-r", "description": "Display release number" },
114
+ { "name": "-c", "description": "Display codename" },
115
+ { "name": "-s", "description": "Short output (no field names)" }
116
+ ],
117
+ "examples": [
118
+ { "command": "lsb_release -a", "description": "Show all distro info" },
119
+ { "command": "lsb_release -cs", "description": "Show codename only (e.g. jammy, bookworm)" }
120
+ ]
121
+ },
122
+ {
123
+ "name": "date",
124
+ "description": "Display or set the system date and time",
125
+ "subcommands": [],
126
+ "options": [
127
+ { "name": "-u", "description": "Display time in UTC" },
128
+ { "name": "-d", "description": "Display time for a given date string", "takesValue": true },
129
+ { "name": "-s", "description": "Set system date/time", "takesValue": true },
130
+ { "name": "-I", "description": "Output in ISO 8601 format" },
131
+ { "name": "-R", "description": "Output in RFC 5322 format (email date)" },
132
+ { "name": "+FORMAT", "description": "Custom format (e.g. +%Y-%m-%d %H:%M:%S)" }
133
+ ],
134
+ "examples": [
135
+ { "command": "date", "description": "Show current date and time" },
136
+ { "command": "date -u", "description": "Show UTC time" },
137
+ { "command": "date +%Y-%m-%d", "description": "Show date as 2026-03-03" },
138
+ { "command": "date +%s", "description": "Show Unix timestamp (epoch seconds)" },
139
+ { "command": "date -d 'next friday'", "description": "Show next Friday's date" },
140
+ { "command": "date -d @1709424000", "description": "Convert epoch to date" },
141
+ { "command": "date -d '2 hours ago'", "description": "Show time 2 hours ago" }
142
+ ]
143
+ },
144
+ {
145
+ "name": "timedatectl",
146
+ "description": "Control the system clock and timezone settings (systemd)",
147
+ "subcommands": [
148
+ { "name": "status", "description": "Show current time and timezone settings" },
149
+ { "name": "set-time", "description": "Set system time", "args": [{ "name": "time", "description": "Time string (YYYY-MM-DD HH:MM:SS)", "required": true }] },
150
+ { "name": "set-timezone", "description": "Set the system timezone", "args": [{ "name": "timezone", "description": "Timezone (e.g. America/New_York)", "required": true }] },
151
+ { "name": "list-timezones", "description": "List all available timezones" },
152
+ { "name": "set-ntp", "description": "Enable or disable NTP synchronization", "args": [{ "name": "bool", "description": "true or false", "required": true }] },
153
+ { "name": "timesync-status", "description": "Show NTP synchronization status" }
154
+ ],
155
+ "options": [
156
+ { "name": "--no-pager", "description": "Do not pipe output into a pager" },
157
+ { "name": "--no-ask-password", "description": "Do not prompt for password" }
158
+ ],
159
+ "examples": [
160
+ { "command": "timedatectl", "description": "Show current time/timezone/NTP status" },
161
+ { "command": "timedatectl list-timezones", "description": "List all available timezones" },
162
+ { "command": "sudo timedatectl set-timezone Asia/Kolkata", "description": "Set timezone" },
163
+ { "command": "sudo timedatectl set-ntp true", "description": "Enable NTP sync" }
164
+ ]
165
+ },
166
+ {
167
+ "name": "cal",
168
+ "description": "Display a calendar",
169
+ "subcommands": [],
170
+ "options": [
171
+ { "name": "-3", "description": "Show previous, current, and next month" },
172
+ { "name": "-y", "description": "Show entire year" },
173
+ { "name": "-j", "description": "Show Julian dates (day of year)" },
174
+ { "name": "-m", "description": "Specify starting month", "takesValue": true }
175
+ ],
176
+ "examples": [
177
+ { "command": "cal", "description": "Show current month" },
178
+ { "command": "cal -3", "description": "Show 3 months" },
179
+ { "command": "cal 2026", "description": "Show calendar for 2026" },
180
+ { "command": "cal 12 2025", "description": "Show December 2025" }
181
+ ]
182
+ },
183
+ {
184
+ "name": "locale",
185
+ "description": "Display current locale settings or available locales",
186
+ "subcommands": [],
187
+ "options": [
188
+ { "name": "-a", "description": "List all available locales" },
189
+ { "name": "-m", "description": "List all available character maps" }
190
+ ],
191
+ "examples": [
192
+ { "command": "locale", "description": "Show current locale settings" },
193
+ { "command": "locale -a", "description": "List all installed locales" },
194
+ { "command": "locale -a | grep -i utf", "description": "Find UTF-8 locales" }
195
+ ]
196
+ },
197
+ {
198
+ "name": "localectl",
199
+ "description": "Control system locale and keyboard layout settings (systemd)",
200
+ "subcommands": [
201
+ { "name": "status", "description": "Show current locale and keyboard settings" },
202
+ { "name": "set-locale", "description": "Set system locale", "args": [{ "name": "locale", "description": "Locale assignment (e.g. LANG=en_US.UTF-8)", "required": true }] },
203
+ { "name": "list-locales", "description": "List available locales" },
204
+ { "name": "set-keymap", "description": "Set console keyboard mapping", "args": [{ "name": "map", "description": "Keymap name", "required": true }] },
205
+ { "name": "list-keymaps", "description": "List available keyboard mappings" },
206
+ { "name": "set-x11-keymap", "description": "Set X11 keyboard layout" }
207
+ ],
208
+ "examples": [
209
+ { "command": "localectl", "description": "Show current locale and keymap" },
210
+ { "command": "localectl list-locales", "description": "List all installed locales" },
211
+ { "command": "sudo localectl set-locale LANG=en_US.UTF-8", "description": "Set system locale" }
212
+ ]
213
+ },
214
+ {
215
+ "name": "env",
216
+ "description": "Print or modify the environment, run a command in modified environment",
217
+ "subcommands": [],
218
+ "options": [
219
+ { "name": "-i", "description": "Start with an empty environment" },
220
+ { "name": "-u", "description": "Remove variable from environment", "takesValue": true },
221
+ { "name": "-0", "description": "End each line with NUL instead of newline" }
222
+ ],
223
+ "examples": [
224
+ { "command": "env", "description": "Print all environment variables" },
225
+ { "command": "env | grep PATH", "description": "Show PATH variable" },
226
+ { "command": "env -i bash", "description": "Start bash with clean environment" },
227
+ { "command": "env VAR=value command", "description": "Run command with extra variable" }
228
+ ]
229
+ },
230
+ {
231
+ "name": "export",
232
+ "description": "Set or export environment variables for child processes",
233
+ "subcommands": [],
234
+ "options": [
235
+ { "name": "-n", "description": "Remove the export property from a variable" },
236
+ { "name": "-p", "description": "Display all exported variables" },
237
+ { "name": "-f", "description": "Export shell functions" }
238
+ ],
239
+ "examples": [
240
+ { "command": "export PATH=\"$PATH:/usr/local/bin\"", "description": "Append to PATH" },
241
+ { "command": "export EDITOR=vim", "description": "Set default editor" },
242
+ { "command": "export -p", "description": "List all exported variables" },
243
+ { "command": "export NODE_ENV=production", "description": "Set Node environment" }
244
+ ]
245
+ },
246
+ {
247
+ "name": "alias",
248
+ "description": "Create command shortcuts/aliases",
249
+ "subcommands": [],
250
+ "options": [
251
+ { "name": "-p", "description": "Print all defined aliases" }
252
+ ],
253
+ "examples": [
254
+ { "command": "alias", "description": "List all aliases" },
255
+ { "command": "alias ll='ls -alF'", "description": "Create ls alias" },
256
+ { "command": "alias gs='git status'", "description": "Create git status alias" },
257
+ { "command": "alias rm='rm -i'", "description": "Make rm interactive by default" }
258
+ ]
259
+ },
260
+ {
261
+ "name": "unalias",
262
+ "description": "Remove shell aliases",
263
+ "subcommands": [],
264
+ "options": [
265
+ { "name": "-a", "description": "Remove all aliases" }
266
+ ],
267
+ "examples": [
268
+ { "command": "unalias ll", "description": "Remove the ll alias" },
269
+ { "command": "unalias -a", "description": "Remove all aliases" }
270
+ ]
271
+ },
272
+ {
273
+ "name": "history",
274
+ "description": "Display or manipulate the command history list",
275
+ "subcommands": [],
276
+ "options": [
277
+ { "name": "-c", "description": "Clear the history list" },
278
+ { "name": "-d", "description": "Delete a specific history entry by offset", "takesValue": true },
279
+ { "name": "-w", "description": "Write current history to history file" },
280
+ { "name": "-r", "description": "Read history file and append to current list" },
281
+ { "name": "-a", "description": "Append new history lines to history file" }
282
+ ],
283
+ "examples": [
284
+ { "command": "history", "description": "Show full command history" },
285
+ { "command": "history 20", "description": "Show last 20 commands" },
286
+ { "command": "history | grep docker", "description": "Search history for docker commands" },
287
+ { "command": "history -c", "description": "Clear all history" },
288
+ { "command": "!!", "description": "Repeat last command" },
289
+ { "command": "!docker", "description": "Repeat last command starting with docker" }
290
+ ]
291
+ },
292
+ {
293
+ "name": "echo",
294
+ "description": "Display a line of text or variable value",
295
+ "subcommands": [],
296
+ "options": [
297
+ { "name": "-n", "description": "Do not output trailing newline" },
298
+ { "name": "-e", "description": "Enable interpretation of backslash escapes" },
299
+ { "name": "-E", "description": "Disable interpretation of backslash escapes (default)" }
300
+ ],
301
+ "examples": [
302
+ { "command": "echo \"Hello World\"", "description": "Print text" },
303
+ { "command": "echo $PATH", "description": "Print PATH variable" },
304
+ { "command": "echo -e \"Line1\\nLine2\"", "description": "Print with newline escape" },
305
+ { "command": "echo -n \"no newline\"", "description": "Print without trailing newline" },
306
+ { "command": "echo \"text\" >> file.txt", "description": "Append text to file" }
307
+ ]
308
+ },
309
+ {
310
+ "name": "printf",
311
+ "description": "Format and print data (more control than echo)",
312
+ "subcommands": [],
313
+ "options": [],
314
+ "examples": [
315
+ { "command": "printf '%s\\n' \"hello\"", "description": "Print with newline" },
316
+ { "command": "printf '%-20s %s\\n' \"Name\" \"Value\"", "description": "Formatted columns" },
317
+ { "command": "printf '%d\\n' 0xff", "description": "Convert hex to decimal" },
318
+ { "command": "printf '%x\\n' 255", "description": "Convert decimal to hex" }
319
+ ]
320
+ },
321
+ {
322
+ "name": "tee",
323
+ "description": "Read from stdin and write to both stdout and file(s)",
324
+ "subcommands": [],
325
+ "options": [
326
+ { "name": "-a", "description": "Append to files instead of overwriting" },
327
+ { "name": "-i", "description": "Ignore interrupt signals" }
328
+ ],
329
+ "examples": [
330
+ { "command": "echo 'text' | tee file.txt", "description": "Write to file and display" },
331
+ { "command": "echo 'text' | tee -a file.txt", "description": "Append to file and display" },
332
+ { "command": "command | tee output.log | grep error", "description": "Log and filter simultaneously" },
333
+ { "command": "echo 'line' | sudo tee /etc/config", "description": "Write to root-owned file" }
334
+ ]
335
+ },
336
+ {
337
+ "name": "xargs",
338
+ "description": "Build and execute commands from standard input",
339
+ "subcommands": [],
340
+ "options": [
341
+ { "name": "-I", "description": "Replace string placeholder (e.g. -I {})", "takesValue": true },
342
+ { "name": "-n", "description": "Max arguments per command line", "takesValue": true },
343
+ { "name": "-P", "description": "Max parallel processes", "takesValue": true },
344
+ { "name": "-0", "description": "Input items are NUL-separated (use with find -print0)" },
345
+ { "name": "-d", "description": "Input delimiter", "takesValue": true },
346
+ { "name": "-t", "description": "Print commands before executing" },
347
+ { "name": "-p", "description": "Prompt before executing each command" },
348
+ { "name": "--no-run-if-empty", "shorthand": "-r", "description": "Do not run if stdin is empty" }
349
+ ],
350
+ "examples": [
351
+ { "command": "find . -name '*.log' | xargs rm", "description": "Delete all .log files" },
352
+ { "command": "find . -name '*.log' -print0 | xargs -0 rm", "description": "Handle filenames with spaces" },
353
+ { "command": "cat urls.txt | xargs -n1 -P4 curl -O", "description": "Download URLs in parallel (4)" },
354
+ { "command": "echo 'a b c' | xargs -n1", "description": "One argument per line" },
355
+ { "command": "ls *.jpg | xargs -I {} cp {} /backup/", "description": "Copy files with placeholder" }
356
+ ]
357
+ },
358
+ {
359
+ "name": "watch",
360
+ "description": "Execute a program periodically, showing output fullscreen",
361
+ "subcommands": [],
362
+ "options": [
363
+ { "name": "-n", "description": "Interval in seconds (default 2)", "takesValue": true },
364
+ { "name": "-d", "description": "Highlight differences between updates" },
365
+ { "name": "-t", "description": "Turn off the header" },
366
+ { "name": "-g", "description": "Exit when the output changes" },
367
+ { "name": "-e", "description": "Freeze on command error" },
368
+ { "name": "-c", "description": "Interpret ANSI color sequences" }
369
+ ],
370
+ "examples": [
371
+ { "command": "watch -n 1 'kubectl get pods'", "description": "Watch pods every 1 second" },
372
+ { "command": "watch -d df -h", "description": "Monitor disk usage with diff highlighting" },
373
+ { "command": "watch -n 5 free -h", "description": "Monitor memory every 5 seconds" },
374
+ { "command": "watch -g 'ls -l file.txt'", "description": "Exit when file changes" }
375
+ ]
376
+ },
377
+ {
378
+ "name": "crontab",
379
+ "description": "Schedule recurring commands/jobs using cron",
380
+ "subcommands": [],
381
+ "options": [
382
+ { "name": "-e", "description": "Edit the current user's crontab" },
383
+ { "name": "-l", "description": "List the current user's crontab" },
384
+ { "name": "-r", "description": "Remove the current user's crontab" },
385
+ { "name": "-u", "description": "Specify user whose crontab to manage", "takesValue": true }
386
+ ],
387
+ "examples": [
388
+ { "command": "crontab -l", "description": "List scheduled cron jobs" },
389
+ { "command": "crontab -e", "description": "Edit cron jobs" },
390
+ { "command": "crontab -r", "description": "Remove all cron jobs" },
391
+ { "command": "# m h dom mon dow command", "description": "Crontab format" },
392
+ { "command": "0 2 * * * /path/to/backup.sh", "description": "Run backup daily at 2 AM" },
393
+ { "command": "*/5 * * * * /path/to/check.sh", "description": "Run every 5 minutes" }
394
+ ]
395
+ },
396
+ {
397
+ "name": "at",
398
+ "description": "Schedule a one-time command to run at a specific time",
399
+ "subcommands": [],
400
+ "options": [
401
+ { "name": "-l", "description": "List pending jobs (same as atq)" },
402
+ { "name": "-d", "description": "Delete a job by ID (same as atrm)", "takesValue": true },
403
+ { "name": "-f", "description": "Read commands from file", "takesValue": true },
404
+ { "name": "-m", "description": "Send mail when job completes" }
405
+ ],
406
+ "examples": [
407
+ { "command": "echo 'backup.sh' | at 2am", "description": "Schedule for 2 AM" },
408
+ { "command": "at now + 30 minutes < script.sh", "description": "Run in 30 minutes" },
409
+ { "command": "at -l", "description": "List pending jobs" },
410
+ { "command": "at -d 5", "description": "Remove job #5" }
411
+ ]
412
+ },
413
+ {
414
+ "name": "shutdown",
415
+ "description": "Halt, power off, or reboot the system",
416
+ "subcommands": [],
417
+ "options": [
418
+ { "name": "-h", "description": "Halt/power off the machine" },
419
+ { "name": "-r", "description": "Reboot the machine" },
420
+ { "name": "-c", "description": "Cancel a pending shutdown" },
421
+ { "name": "now", "description": "Execute immediately" },
422
+ { "name": "+N", "description": "Shutdown in N minutes" }
423
+ ],
424
+ "examples": [
425
+ { "command": "sudo shutdown -h now", "description": "Shutdown immediately" },
426
+ { "command": "sudo shutdown -r now", "description": "Reboot immediately" },
427
+ { "command": "sudo shutdown -h +30", "description": "Shutdown in 30 minutes" },
428
+ { "command": "sudo shutdown -c", "description": "Cancel pending shutdown" },
429
+ { "command": "sudo shutdown -r 02:00", "description": "Reboot at 2 AM" }
430
+ ]
431
+ },
432
+ {
433
+ "name": "reboot",
434
+ "description": "Reboot the system",
435
+ "subcommands": [],
436
+ "options": [
437
+ { "name": "-f", "description": "Force immediate reboot (skip shutdown scripts)" },
438
+ { "name": "--no-wall", "description": "Do not send wall message" }
439
+ ],
440
+ "examples": [
441
+ { "command": "sudo reboot", "description": "Reboot the system" },
442
+ { "command": "sudo reboot -f", "description": "Force immediate reboot" }
443
+ ]
444
+ },
445
+ {
446
+ "name": "poweroff",
447
+ "description": "Power off the system",
448
+ "subcommands": [],
449
+ "options": [
450
+ { "name": "-f", "description": "Force immediate poweroff" },
451
+ { "name": "--no-wall", "description": "Do not send wall message" }
452
+ ],
453
+ "examples": [
454
+ { "command": "sudo poweroff", "description": "Power off the system" }
455
+ ]
456
+ },
457
+ {
458
+ "name": "clear",
459
+ "description": "Clear the terminal screen",
460
+ "subcommands": [],
461
+ "options": [
462
+ { "name": "-x", "description": "Do not attempt to clear scrollback buffer" }
463
+ ],
464
+ "examples": [
465
+ { "command": "clear", "description": "Clear screen" }
466
+ ]
467
+ },
468
+ {
469
+ "name": "set",
470
+ "description": "Set or unset shell options and positional parameters",
471
+ "subcommands": [],
472
+ "options": [
473
+ { "name": "-e", "description": "Exit immediately on error" },
474
+ { "name": "-u", "description": "Treat unset variables as error" },
475
+ { "name": "-x", "description": "Print commands before execution (debug)" },
476
+ { "name": "-o pipefail", "description": "Return error if any pipe command fails" },
477
+ { "name": "-o noclobber", "description": "Prevent overwriting files with >" },
478
+ { "name": "-o vi", "description": "Use vi-style line editing" },
479
+ { "name": "-o emacs", "description": "Use emacs-style line editing" },
480
+ { "name": "+e", "description": "Disable exit on error" },
481
+ { "name": "+x", "description": "Disable command printing" }
482
+ ],
483
+ "examples": [
484
+ { "command": "set -euo pipefail", "description": "Strict mode for scripts" },
485
+ { "command": "set -x", "description": "Enable debug trace" },
486
+ { "command": "set +x", "description": "Disable debug trace" },
487
+ { "command": "set", "description": "Show all shell variables" }
488
+ ]
489
+ },
490
+ {
491
+ "name": "source",
492
+ "description": "Execute commands from a file in the current shell (also '.')",
493
+ "subcommands": [],
494
+ "options": [],
495
+ "examples": [
496
+ { "command": "source ~/.bashrc", "description": "Reload bash configuration" },
497
+ { "command": "source .env", "description": "Load environment variables from .env" },
498
+ { "command": ". ~/.profile", "description": "Source using dot notation" },
499
+ { "command": "source venv/bin/activate", "description": "Activate Python virtualenv" }
500
+ ]
501
+ },
502
+ {
503
+ "name": "arch",
504
+ "description": "Print machine architecture (equivalent to uname -m)",
505
+ "subcommands": [],
506
+ "options": [],
507
+ "examples": [
508
+ { "command": "arch", "description": "Show architecture (x86_64, aarch64, etc.)" }
509
+ ]
510
+ },
511
+ {
512
+ "name": "w",
513
+ "description": "Show who is logged in and what they are doing",
514
+ "subcommands": [],
515
+ "options": [
516
+ { "name": "-h", "description": "Do not print header" },
517
+ { "name": "-s", "description": "Short format" },
518
+ { "name": "-f", "description": "Toggle from field" }
519
+ ],
520
+ "examples": [
521
+ { "command": "w", "description": "Show logged-in users and their activity" }
522
+ ]
523
+ },
524
+ {
525
+ "name": "who",
526
+ "description": "Show who is logged in",
527
+ "subcommands": [],
528
+ "options": [
529
+ { "name": "-a", "description": "Show all information" },
530
+ { "name": "-b", "description": "Time of last system boot" },
531
+ { "name": "-H", "description": "Print column headers" },
532
+ { "name": "-q", "description": "Quick: names and count of logged-in users" }
533
+ ],
534
+ "examples": [
535
+ { "command": "who", "description": "Show logged-in users" },
536
+ { "command": "who -b", "description": "Show last boot time" },
537
+ { "command": "who am i", "description": "Show current user info" }
538
+ ]
539
+ },
540
+ {
541
+ "name": "whoami",
542
+ "description": "Print current effective username",
543
+ "subcommands": [],
544
+ "options": [],
545
+ "examples": [
546
+ { "command": "whoami", "description": "Show current username" }
547
+ ]
548
+ },
549
+ {
550
+ "name": "last",
551
+ "description": "Show listing of last logged-in users",
552
+ "subcommands": [],
553
+ "options": [
554
+ { "name": "-n", "description": "Number of lines to show", "takesValue": true },
555
+ { "name": "-a", "description": "Display hostname in last column" },
556
+ { "name": "-i", "description": "Display IP addresses instead of hostnames" },
557
+ { "name": "-x", "description": "Display shutdown/runlevel entries" },
558
+ { "name": "-F", "description": "Show full login/logout times" }
559
+ ],
560
+ "examples": [
561
+ { "command": "last", "description": "Show recent logins" },
562
+ { "command": "last -n 10", "description": "Show last 10 logins" },
563
+ { "command": "last reboot", "description": "Show reboot history" },
564
+ { "command": "last -x shutdown", "description": "Show shutdown history" }
565
+ ]
566
+ },
567
+ {
568
+ "name": "loginctl",
569
+ "description": "Control the systemd login manager",
570
+ "subcommands": [
571
+ { "name": "list-sessions", "description": "List current sessions" },
572
+ { "name": "session-status", "description": "Show session status", "args": [{ "name": "id", "description": "Session ID", "required": false }] },
573
+ { "name": "show-session", "description": "Show properties of a session" },
574
+ { "name": "list-users", "description": "List logged-in users" },
575
+ { "name": "user-status", "description": "Show user status" },
576
+ { "name": "terminate-session", "description": "Terminate a session", "args": [{ "name": "id", "description": "Session ID", "required": true }] },
577
+ { "name": "terminate-user", "description": "Terminate all sessions of a user", "args": [{ "name": "user", "description": "Username", "required": true }] },
578
+ { "name": "kill-session", "description": "Send signal to session processes" },
579
+ { "name": "lock-session", "description": "Lock a session" },
580
+ { "name": "unlock-session", "description": "Unlock a session" }
581
+ ],
582
+ "examples": [
583
+ { "command": "loginctl", "description": "List active sessions" },
584
+ { "command": "loginctl list-users", "description": "List logged-in users" },
585
+ { "command": "loginctl session-status", "description": "Show current session status" },
586
+ { "command": "loginctl terminate-session 5", "description": "Kill session 5" }
587
+ ]
588
+ },
589
+ {
590
+ "name": "sysctl",
591
+ "description": "Configure kernel parameters at runtime",
592
+ "subcommands": [],
593
+ "options": [
594
+ { "name": "-a", "description": "Display all parameters" },
595
+ { "name": "-w", "description": "Write/set parameter", "takesValue": true },
596
+ { "name": "-p", "description": "Load settings from file (default /etc/sysctl.conf)" },
597
+ { "name": "-n", "description": "Print values only (no names)" },
598
+ { "name": "--system", "description": "Load settings from all system config files" }
599
+ ],
600
+ "examples": [
601
+ { "command": "sysctl -a", "description": "List all kernel parameters" },
602
+ { "command": "sysctl vm.swappiness", "description": "Show swappiness value" },
603
+ { "command": "sudo sysctl -w vm.swappiness=10", "description": "Set swappiness to 10" },
604
+ { "command": "sudo sysctl -p", "description": "Reload sysctl.conf" },
605
+ { "command": "sysctl net.ipv4.ip_forward", "description": "Check IP forwarding" }
606
+ ]
607
+ }
608
+ ],
609
+
610
+ "file": [
611
+ {
612
+ "name": "touch",
613
+ "description": "Create empty files or update file timestamps",
614
+ "options": [
615
+ { "name": "-a", "description": "Change only access time" },
616
+ { "name": "-m", "description": "Change only modification time" },
617
+ { "name": "-d", "description": "Use specified date instead of current time", "takesValue": true },
618
+ { "name": "-r", "description": "Use reference file's timestamp", "takesValue": true },
619
+ { "name": "-t", "description": "Use [[CC]YY]MMDDhhmm[.ss] timestamp", "takesValue": true },
620
+ { "name": "-c", "description": "Do not create any files" }
621
+ ],
622
+ "examples": [
623
+ { "command": "touch newfile.txt", "description": "Create empty file" },
624
+ { "command": "touch -d '2025-01-01' file.txt", "description": "Set specific date" },
625
+ { "command": "touch -r source.txt dest.txt", "description": "Copy timestamp from another file" },
626
+ { "command": "touch file{1..10}.txt", "description": "Create 10 numbered files" }
627
+ ]
628
+ },
629
+ {
630
+ "name": "mkdir",
631
+ "description": "Create directories",
632
+ "options": [
633
+ { "name": "-p", "description": "Create parent directories as needed (no error if exists)" },
634
+ { "name": "-m", "description": "Set permission mode (like chmod)", "takesValue": true },
635
+ { "name": "-v", "description": "Verbose, print each created directory" }
636
+ ],
637
+ "examples": [
638
+ { "command": "mkdir mydir", "description": "Create a directory" },
639
+ { "command": "mkdir -p path/to/deep/dir", "description": "Create nested directories" },
640
+ { "command": "mkdir -m 755 secure_dir", "description": "Create with specific permissions" },
641
+ { "command": "mkdir -p src/{components,utils,hooks}", "description": "Create multiple dirs at once" }
642
+ ]
643
+ },
644
+ {
645
+ "name": "rmdir",
646
+ "description": "Remove empty directories",
647
+ "options": [
648
+ { "name": "-p", "description": "Remove parent directories if they become empty" },
649
+ { "name": "-v", "description": "Verbose output" },
650
+ { "name": "--ignore-fail-on-non-empty", "description": "Ignore errors for non-empty dirs" }
651
+ ],
652
+ "examples": [
653
+ { "command": "rmdir emptydir", "description": "Remove an empty directory" },
654
+ { "command": "rmdir -p a/b/c", "description": "Remove c, then b, then a if empty" }
655
+ ]
656
+ },
657
+ {
658
+ "name": "ln",
659
+ "description": "Create hard and symbolic (soft) links",
660
+ "options": [
661
+ { "name": "-s", "description": "Create symbolic (soft) link" },
662
+ { "name": "-f", "description": "Force: remove existing destination files" },
663
+ { "name": "-n", "description": "Do not dereference target if it is a symlink" },
664
+ { "name": "-v", "description": "Verbose output" },
665
+ { "name": "-r", "description": "Create relative symbolic link" },
666
+ { "name": "-t", "description": "Specify target directory", "takesValue": true }
667
+ ],
668
+ "examples": [
669
+ { "command": "ln -s /path/to/target linkname", "description": "Create symbolic link" },
670
+ { "command": "ln -sf /usr/bin/python3 /usr/bin/python", "description": "Force create/overwrite symlink" },
671
+ { "command": "ln file1 file2", "description": "Create hard link" },
672
+ { "command": "ln -sr ../config.yml config.yml", "description": "Create relative symlink" }
673
+ ]
674
+ },
675
+ {
676
+ "name": "stat",
677
+ "description": "Display detailed file or filesystem status",
678
+ "options": [
679
+ { "name": "-c", "description": "Use custom format string", "takesValue": true },
680
+ { "name": "-f", "description": "Display filesystem status instead of file" },
681
+ { "name": "-L", "description": "Follow symlinks" },
682
+ { "name": "-t", "description": "Print in terse form" }
683
+ ],
684
+ "examples": [
685
+ { "command": "stat file.txt", "description": "Show detailed file info" },
686
+ { "command": "stat -c '%s' file.txt", "description": "Show file size in bytes" },
687
+ { "command": "stat -c '%a %U %G' file.txt", "description": "Show permissions, owner, group" },
688
+ { "command": "stat -c '%y' file.txt", "description": "Show last modification time" },
689
+ { "command": "stat -f /", "description": "Show filesystem info for root partition" }
690
+ ]
691
+ },
692
+ {
693
+ "name": "file",
694
+ "description": "Determine file type",
695
+ "options": [
696
+ { "name": "-i", "description": "Output MIME type" },
697
+ { "name": "-b", "description": "Brief mode (no filename prefix)" },
698
+ { "name": "-z", "description": "Try to look inside compressed files" },
699
+ { "name": "-L", "description": "Follow symlinks" },
700
+ { "name": "-f", "description": "Read filenames from file", "takesValue": true }
701
+ ],
702
+ "examples": [
703
+ { "command": "file image.png", "description": "Detect file type" },
704
+ { "command": "file -i document.pdf", "description": "Show MIME type" },
705
+ { "command": "file -b *", "description": "Show types without filenames" },
706
+ { "command": "file /usr/bin/ls", "description": "Check if binary is ELF, script, etc." }
707
+ ]
708
+ },
709
+ {
710
+ "name": "head",
711
+ "description": "Output the first part of files",
712
+ "options": [
713
+ { "name": "-n", "description": "Number of lines to show (default 10)", "takesValue": true },
714
+ { "name": "-c", "description": "Number of bytes to show", "takesValue": true },
715
+ { "name": "-q", "description": "Never print headers for multiple files" },
716
+ { "name": "-v", "description": "Always print headers" }
717
+ ],
718
+ "examples": [
719
+ { "command": "head file.txt", "description": "Show first 10 lines" },
720
+ { "command": "head -n 20 file.txt", "description": "Show first 20 lines" },
721
+ { "command": "head -c 100 file.bin", "description": "Show first 100 bytes" },
722
+ { "command": "head -n -5 file.txt", "description": "Show all but last 5 lines" }
723
+ ]
724
+ },
725
+ {
726
+ "name": "tail",
727
+ "description": "Output the last part of files",
728
+ "options": [
729
+ { "name": "-n", "description": "Number of lines to show (default 10)", "takesValue": true },
730
+ { "name": "-c", "description": "Number of bytes to show", "takesValue": true },
731
+ { "name": "-f", "description": "Follow: output appended data as file grows" },
732
+ { "name": "-F", "description": "Follow with retry (handles log rotation)" },
733
+ { "name": "--pid", "description": "Terminate after process PID dies", "takesValue": true },
734
+ { "name": "-q", "description": "Never print headers" }
735
+ ],
736
+ "examples": [
737
+ { "command": "tail file.txt", "description": "Show last 10 lines" },
738
+ { "command": "tail -n 50 file.txt", "description": "Show last 50 lines" },
739
+ { "command": "tail -f /var/log/syslog", "description": "Follow log file in real-time" },
740
+ { "command": "tail -F /var/log/app.log", "description": "Follow with rotation handling" },
741
+ { "command": "tail -n +5 file.txt", "description": "Show from line 5 onwards" }
742
+ ]
743
+ },
744
+ {
745
+ "name": "wc",
746
+ "description": "Print newline, word, and byte counts for files",
747
+ "options": [
748
+ { "name": "-l", "description": "Print line count" },
749
+ { "name": "-w", "description": "Print word count" },
750
+ { "name": "-c", "description": "Print byte count" },
751
+ { "name": "-m", "description": "Print character count" },
752
+ { "name": "-L", "description": "Print length of longest line" }
753
+ ],
754
+ "examples": [
755
+ { "command": "wc file.txt", "description": "Show lines, words, bytes" },
756
+ { "command": "wc -l file.txt", "description": "Count lines only" },
757
+ { "command": "find . -name '*.go' | wc -l", "description": "Count Go files" },
758
+ { "command": "cat file.txt | wc -w", "description": "Count words via pipe" }
759
+ ]
760
+ },
761
+ {
762
+ "name": "sort",
763
+ "description": "Sort lines of text files",
764
+ "options": [
765
+ { "name": "-r", "description": "Reverse sort order" },
766
+ { "name": "-n", "description": "Numeric sort" },
767
+ { "name": "-h", "description": "Human-numeric sort (2K, 1G)" },
768
+ { "name": "-k", "description": "Sort by specific field/column", "takesValue": true },
769
+ { "name": "-t", "description": "Field separator", "takesValue": true },
770
+ { "name": "-u", "description": "Unique: output only first of equal lines" },
771
+ { "name": "-o", "description": "Write output to file", "takesValue": true },
772
+ { "name": "-f", "description": "Case-insensitive sort" },
773
+ { "name": "-V", "description": "Version sort (e.g. 1.9 < 1.10)" },
774
+ { "name": "-s", "description": "Stabilize sort (preserve input order of equal keys)" }
775
+ ],
776
+ "examples": [
777
+ { "command": "sort file.txt", "description": "Sort lines alphabetically" },
778
+ { "command": "sort -n numbers.txt", "description": "Sort numerically" },
779
+ { "command": "sort -rn file.txt", "description": "Sort numerically descending" },
780
+ { "command": "sort -t: -k3 -n /etc/passwd", "description": "Sort passwd by UID" },
781
+ { "command": "du -sh * | sort -h", "description": "Sort by human-readable size" },
782
+ { "command": "sort -u file.txt", "description": "Sort and remove duplicates" }
783
+ ]
784
+ },
785
+ {
786
+ "name": "uniq",
787
+ "description": "Report or omit repeated lines (input must be sorted)",
788
+ "options": [
789
+ { "name": "-c", "description": "Prefix lines with occurrence count" },
790
+ { "name": "-d", "description": "Only print duplicate lines" },
791
+ { "name": "-u", "description": "Only print unique lines" },
792
+ { "name": "-i", "description": "Ignore case when comparing" },
793
+ { "name": "-f", "description": "Skip N fields before comparing", "takesValue": true },
794
+ { "name": "-s", "description": "Skip N characters before comparing", "takesValue": true }
795
+ ],
796
+ "examples": [
797
+ { "command": "sort file.txt | uniq", "description": "Remove duplicate lines" },
798
+ { "command": "sort file.txt | uniq -c", "description": "Count occurrences" },
799
+ { "command": "sort file.txt | uniq -d", "description": "Show only duplicates" },
800
+ { "command": "sort file.txt | uniq -c | sort -rn | head", "description": "Top 10 most frequent lines" }
801
+ ]
802
+ },
803
+ {
804
+ "name": "cut",
805
+ "description": "Remove sections from each line of files",
806
+ "options": [
807
+ { "name": "-d", "description": "Field delimiter (default TAB)", "takesValue": true },
808
+ { "name": "-f", "description": "Select fields (e.g. 1,3 or 1-4)", "takesValue": true },
809
+ { "name": "-c", "description": "Select characters by position", "takesValue": true },
810
+ { "name": "-b", "description": "Select bytes by position", "takesValue": true },
811
+ { "name": "--complement", "description": "Complement the selection" },
812
+ { "name": "-s", "description": "Only print lines with delimiter" }
813
+ ],
814
+ "examples": [
815
+ { "command": "cut -d: -f1 /etc/passwd", "description": "Extract usernames" },
816
+ { "command": "cut -d, -f2,3 data.csv", "description": "Extract CSV columns 2 & 3" },
817
+ { "command": "cut -c1-10 file.txt", "description": "Extract first 10 characters" },
818
+ { "command": "echo $PATH | cut -d: -f1", "description": "Get first PATH entry" }
819
+ ]
820
+ },
821
+ {
822
+ "name": "tr",
823
+ "description": "Translate or delete characters",
824
+ "options": [
825
+ { "name": "-d", "description": "Delete characters in SET1" },
826
+ { "name": "-s", "description": "Squeeze repeated characters in SET1" },
827
+ { "name": "-c", "description": "Complement SET1 (use all chars NOT in SET1)" }
828
+ ],
829
+ "examples": [
830
+ { "command": "echo 'HELLO' | tr 'A-Z' 'a-z'", "description": "Convert to lowercase" },
831
+ { "command": "echo 'hello' | tr 'a-z' 'A-Z'", "description": "Convert to uppercase" },
832
+ { "command": "echo 'a:b:c' | tr ':' '\\n'", "description": "Replace colon with newline" },
833
+ { "command": "echo 'remove spaces' | tr -s ' '", "description": "Squeeze repeated spaces" },
834
+ { "command": "cat file | tr -d '\\r'", "description": "Remove carriage returns (dos2unix)" },
835
+ { "command": "cat file | tr -cd '[:alnum:]'", "description": "Keep only alphanumeric chars" }
836
+ ]
837
+ },
838
+ {
839
+ "name": "diff",
840
+ "description": "Compare files line by line",
841
+ "options": [
842
+ { "name": "-u", "description": "Unified format (most readable)" },
843
+ { "name": "-r", "description": "Recursively compare directories" },
844
+ { "name": "-q", "description": "Report only whether files differ" },
845
+ { "name": "-i", "description": "Ignore case" },
846
+ { "name": "-w", "description": "Ignore all whitespace" },
847
+ { "name": "-B", "description": "Ignore blank line changes" },
848
+ { "name": "--color", "description": "Colorize output" },
849
+ { "name": "-y", "description": "Side-by-side output" },
850
+ { "name": "-N", "description": "Treat absent files as empty" }
851
+ ],
852
+ "examples": [
853
+ { "command": "diff file1.txt file2.txt", "description": "Compare two files" },
854
+ { "command": "diff -u old.conf new.conf", "description": "Unified diff (patch format)" },
855
+ { "command": "diff -rq dir1/ dir2/", "description": "Compare directories" },
856
+ { "command": "diff -y file1 file2", "description": "Side-by-side comparison" },
857
+ { "command": "diff <(sort file1) <(sort file2)", "description": "Compare sorted versions" }
858
+ ]
859
+ },
860
+ {
861
+ "name": "patch",
862
+ "description": "Apply a diff/patch file to originals",
863
+ "options": [
864
+ { "name": "-p", "description": "Strip N leading path components", "takesValue": true },
865
+ { "name": "-R", "description": "Reverse patch (unapply)" },
866
+ { "name": "-b", "description": "Create backup of original files" },
867
+ { "name": "--dry-run", "description": "Print results without modifying files" },
868
+ { "name": "-d", "description": "Change to directory first", "takesValue": true }
869
+ ],
870
+ "examples": [
871
+ { "command": "patch < fix.patch", "description": "Apply a patch" },
872
+ { "command": "patch -p1 < fix.patch", "description": "Apply patch stripping 1 path component" },
873
+ { "command": "patch -R < fix.patch", "description": "Reverse/unapply a patch" },
874
+ { "command": "patch --dry-run < fix.patch", "description": "Test patch without applying" }
875
+ ]
876
+ },
877
+ {
878
+ "name": "basename",
879
+ "description": "Strip directory and suffix from filenames",
880
+ "options": [
881
+ { "name": "-s", "description": "Remove trailing suffix", "takesValue": true },
882
+ { "name": "-a", "description": "Support multiple arguments" }
883
+ ],
884
+ "examples": [
885
+ { "command": "basename /home/user/file.txt", "description": "Returns: file.txt" },
886
+ { "command": "basename /home/user/file.txt .txt", "description": "Returns: file" },
887
+ { "command": "basename -s .tar.gz archive.tar.gz", "description": "Returns: archive" }
888
+ ]
889
+ },
890
+ {
891
+ "name": "dirname",
892
+ "description": "Strip last component from filename (return directory part)",
893
+ "options": [],
894
+ "examples": [
895
+ { "command": "dirname /home/user/file.txt", "description": "Returns: /home/user" },
896
+ { "command": "dirname /etc/nginx/nginx.conf", "description": "Returns: /etc/nginx" }
897
+ ]
898
+ },
899
+ {
900
+ "name": "realpath",
901
+ "description": "Print the resolved absolute pathname (resolve symlinks)",
902
+ "options": [
903
+ { "name": "-e", "description": "All components must exist" },
904
+ { "name": "-m", "description": "No component needs to exist" },
905
+ { "name": "-s", "description": "Do not resolve symlinks" },
906
+ { "name": "--relative-to", "description": "Print path relative to DIR", "takesValue": true }
907
+ ],
908
+ "examples": [
909
+ { "command": "realpath .", "description": "Show absolute path of current directory" },
910
+ { "command": "realpath ~/file.txt", "description": "Resolve tilde and show full path" },
911
+ { "command": "realpath --relative-to=/home /etc/config", "description": "Get relative path" }
912
+ ]
913
+ },
914
+ {
915
+ "name": "readlink",
916
+ "description": "Print value of a symbolic link or canonical filename",
917
+ "options": [
918
+ { "name": "-f", "description": "Canonicalize: follow all symlinks recursively" },
919
+ { "name": "-e", "description": "Like -f but all components must exist" },
920
+ { "name": "-m", "description": "Like -f but no component needs to exist" },
921
+ { "name": "-n", "description": "Do not output trailing newline" }
922
+ ],
923
+ "examples": [
924
+ { "command": "readlink /usr/bin/python", "description": "Show where symlink points" },
925
+ { "command": "readlink -f /usr/bin/python", "description": "Full canonical path" }
926
+ ]
927
+ },
928
+ {
929
+ "name": "tree",
930
+ "description": "List directory contents in a tree-like format",
931
+ "options": [
932
+ { "name": "-L", "description": "Max depth level", "takesValue": true },
933
+ { "name": "-d", "description": "List directories only" },
934
+ { "name": "-a", "description": "Show hidden files" },
935
+ { "name": "-I", "description": "Exclude pattern (e.g. 'node_modules|.git')", "takesValue": true },
936
+ { "name": "-h", "description": "Show human-readable file sizes" },
937
+ { "name": "-f", "description": "Print full path prefix" },
938
+ { "name": "-p", "description": "Print file permissions" },
939
+ { "name": "-s", "description": "Print file sizes" },
940
+ { "name": "--du", "description": "Show cumulative directory sizes" },
941
+ { "name": "-J", "description": "JSON output" },
942
+ { "name": "-H", "description": "HTML output", "takesValue": true },
943
+ { "name": "--gitignore", "description": "Respect .gitignore rules" }
944
+ ],
945
+ "examples": [
946
+ { "command": "tree", "description": "Show directory tree" },
947
+ { "command": "tree -L 2", "description": "Show tree, max 2 levels deep" },
948
+ { "command": "tree -d", "description": "Show only directories" },
949
+ { "command": "tree -I 'node_modules|.git|dist'", "description": "Exclude patterns" },
950
+ { "command": "tree -ah", "description": "Show hidden files with sizes" },
951
+ { "command": "tree -L 3 --gitignore", "description": "Respect .gitignore" }
952
+ ]
953
+ },
954
+ {
955
+ "name": "install",
956
+ "description": "Copy files and set attributes (often used in Makefiles)",
957
+ "options": [
958
+ { "name": "-m", "description": "Set permission mode", "takesValue": true },
959
+ { "name": "-o", "description": "Set owner", "takesValue": true },
960
+ { "name": "-g", "description": "Set group", "takesValue": true },
961
+ { "name": "-d", "description": "Create directories (like mkdir -p)" },
962
+ { "name": "-D", "description": "Create leading directories for destination" },
963
+ { "name": "-v", "description": "Verbose" },
964
+ { "name": "-b", "description": "Create backup of existing destination" }
965
+ ],
966
+ "examples": [
967
+ { "command": "install -m 755 script.sh /usr/local/bin/", "description": "Install script with exec perms" },
968
+ { "command": "install -d /opt/myapp/bin", "description": "Create directory with proper perms" },
969
+ { "command": "install -o root -g root -m 644 config /etc/myapp.conf", "description": "Install config file" }
970
+ ]
971
+ },
972
+ {
973
+ "name": "dd",
974
+ "description": "Convert and copy a file (low-level disk/data copying)",
975
+ "options": [
976
+ { "name": "if=", "description": "Input file (source)" },
977
+ { "name": "of=", "description": "Output file (destination)" },
978
+ { "name": "bs=", "description": "Block size (e.g. 4M, 1G)" },
979
+ { "name": "count=", "description": "Number of blocks to copy" },
980
+ { "name": "skip=", "description": "Skip N blocks at input start" },
981
+ { "name": "seek=", "description": "Skip N blocks at output start" },
982
+ { "name": "status=progress", "description": "Show transfer progress" },
983
+ { "name": "conv=", "description": "Conversions: notrunc, sync, fsync, noerror" }
984
+ ],
985
+ "examples": [
986
+ { "command": "dd if=/dev/sda of=disk.img bs=4M status=progress", "description": "Clone disk to image" },
987
+ { "command": "dd if=ubuntu.iso of=/dev/sdb bs=4M status=progress conv=fsync", "description": "Write ISO to USB" },
988
+ { "command": "dd if=/dev/zero of=testfile bs=1M count=100", "description": "Create 100MB test file" },
989
+ { "command": "dd if=/dev/urandom of=random.bin bs=1M count=10", "description": "Generate random data" }
990
+ ]
991
+ },
992
+ {
993
+ "name": "split",
994
+ "description": "Split a file into fixed-size pieces",
995
+ "options": [
996
+ { "name": "-b", "description": "Split by size (e.g. 100M, 1G)", "takesValue": true },
997
+ { "name": "-l", "description": "Split by number of lines", "takesValue": true },
998
+ { "name": "-n", "description": "Split into N chunks", "takesValue": true },
999
+ { "name": "-d", "description": "Use numeric suffixes" },
1000
+ { "name": "--verbose", "description": "Print file names as created" }
1001
+ ],
1002
+ "examples": [
1003
+ { "command": "split -b 100M largefile.tar.gz part_", "description": "Split into 100MB chunks" },
1004
+ { "command": "split -l 1000 data.csv chunk_", "description": "Split every 1000 lines" },
1005
+ { "command": "split -n 5 -d file.txt piece_", "description": "Split into 5 numbered chunks" },
1006
+ { "command": "cat part_* > restored.tar.gz", "description": "Reassemble split files" }
1007
+ ]
1008
+ },
1009
+ {
1010
+ "name": "mktemp",
1011
+ "description": "Create a temporary file or directory safely",
1012
+ "options": [
1013
+ { "name": "-d", "description": "Create a directory instead of a file" },
1014
+ { "name": "-t", "description": "Use TEMPLATE relative to TMPDIR" },
1015
+ { "name": "-p", "description": "Use DIR as directory prefix", "takesValue": true },
1016
+ { "name": "-u", "description": "Do not create anything; merely print a name (unsafe)" },
1017
+ { "name": "--suffix", "description": "Append suffix to template", "takesValue": true }
1018
+ ],
1019
+ "examples": [
1020
+ { "command": "mktemp", "description": "Create temp file (e.g. /tmp/tmp.XXXXXXXXXX)" },
1021
+ { "command": "mktemp -d", "description": "Create temp directory" },
1022
+ { "command": "mktemp /tmp/myapp.XXXXXX", "description": "Create temp file with prefix" },
1023
+ { "command": "TMPFILE=$(mktemp) && echo $TMPFILE", "description": "Store temp path in variable" }
1024
+ ]
1025
+ },
1026
+ {
1027
+ "name": "shred",
1028
+ "description": "Securely overwrite a file to hide its contents, optionally delete",
1029
+ "options": [
1030
+ { "name": "-u", "description": "Deallocate and remove file after overwriting" },
1031
+ { "name": "-n", "description": "Number of overwrite passes (default 3)", "takesValue": true },
1032
+ { "name": "-z", "description": "Add a final overwrite with zeros to hide shredding" },
1033
+ { "name": "-v", "description": "Show progress" },
1034
+ { "name": "-f", "description": "Force permissions to allow writing" }
1035
+ ],
1036
+ "examples": [
1037
+ { "command": "shred -u secret.txt", "description": "Securely delete file" },
1038
+ { "command": "shred -vfz -n 5 file.txt", "description": "5 passes + zeros, verbose" },
1039
+ { "command": "shred -zu /tmp/sensitive_*", "description": "Shred and remove temp files" }
1040
+ ]
1041
+ },
1042
+ {
1043
+ "name": "strings",
1044
+ "description": "Print printable strings from binary files",
1045
+ "options": [
1046
+ { "name": "-n", "description": "Minimum string length (default 4)", "takesValue": true },
1047
+ { "name": "-a", "description": "Scan the whole file" },
1048
+ { "name": "-t", "description": "Print offset (d=decimal, o=octal, x=hex)", "takesValue": true },
1049
+ { "name": "-e", "description": "Encoding (s=7-bit, S=8-bit, b=16-bit BE, l=16-bit LE)" }
1050
+ ],
1051
+ "examples": [
1052
+ { "command": "strings /usr/bin/ls", "description": "Extract readable strings from binary" },
1053
+ { "command": "strings -n 10 binary.file", "description": "Show strings >= 10 chars" },
1054
+ { "command": "strings binary | grep -i password", "description": "Search for passwords in binary" }
1055
+ ]
1056
+ },
1057
+ {
1058
+ "name": "lsof",
1059
+ "description": "List open files and the processes using them",
1060
+ "options": [
1061
+ { "name": "-i", "description": "List network connections (optionally filter by port)", "takesValue": true },
1062
+ { "name": "-p", "description": "Show files opened by specific PID", "takesValue": true },
1063
+ { "name": "-u", "description": "Show files opened by user", "takesValue": true },
1064
+ { "name": "-c", "description": "Show files opened by command name", "takesValue": true },
1065
+ { "name": "+D", "description": "Recursively list open files in directory", "takesValue": true },
1066
+ { "name": "-t", "description": "Terse output (PIDs only)" },
1067
+ { "name": "-n", "description": "Do not resolve hostnames" },
1068
+ { "name": "-P", "description": "Do not resolve port numbers" }
1069
+ ],
1070
+ "examples": [
1071
+ { "command": "lsof -i :8080", "description": "Find what's using port 8080" },
1072
+ { "command": "lsof -i -P -n", "description": "List all network connections" },
1073
+ { "command": "lsof -p 1234", "description": "Files opened by PID 1234" },
1074
+ { "command": "lsof -u root", "description": "Files opened by root" },
1075
+ { "command": "lsof +D /var/log", "description": "Files open in /var/log" },
1076
+ { "command": "lsof -i TCP:80,443", "description": "Show TCP connections on port 80/443" },
1077
+ { "command": "kill -9 $(lsof -t -i :3000)", "description": "Kill process on port 3000" }
1078
+ ]
1079
+ },
1080
+ {
1081
+ "name": "column",
1082
+ "description": "Format text into columns/table layout",
1083
+ "options": [
1084
+ { "name": "-t", "description": "Create a table from input" },
1085
+ { "name": "-s", "description": "Specify column delimiter", "takesValue": true },
1086
+ { "name": "-o", "description": "Specify output separator", "takesValue": true },
1087
+ { "name": "-J", "description": "JSON output" },
1088
+ { "name": "-N", "description": "Specify column names", "takesValue": true }
1089
+ ],
1090
+ "examples": [
1091
+ { "command": "mount | column -t", "description": "Format mount output as table" },
1092
+ { "command": "cat data.csv | column -t -s,", "description": "Format CSV as table" },
1093
+ { "command": "echo -e 'a 1\\nb 2\\nc 3' | column -t", "description": "Align columns" }
1094
+ ]
1095
+ },
1096
+ {
1097
+ "name": "paste",
1098
+ "description": "Merge lines of files side by side",
1099
+ "options": [
1100
+ { "name": "-d", "description": "Use delimiter instead of tab", "takesValue": true },
1101
+ { "name": "-s", "description": "Paste one file at a time (serial)" }
1102
+ ],
1103
+ "examples": [
1104
+ { "command": "paste file1.txt file2.txt", "description": "Merge files side by side" },
1105
+ { "command": "paste -d, names.txt ages.txt", "description": "Merge with comma delimiter" },
1106
+ { "command": "paste -s -d+ numbers.txt | bc", "description": "Sum numbers in file" }
1107
+ ]
1108
+ },
1109
+ {
1110
+ "name": "nl",
1111
+ "description": "Number lines of files",
1112
+ "options": [
1113
+ { "name": "-b a", "description": "Number all lines (including blank)" },
1114
+ { "name": "-b t", "description": "Number non-empty lines only (default)" },
1115
+ { "name": "-n ln", "description": "Left-justified numbering" },
1116
+ { "name": "-n rn", "description": "Right-justified numbering" },
1117
+ { "name": "-n rz", "description": "Right-justified with leading zeros" },
1118
+ { "name": "-w", "description": "Number width", "takesValue": true },
1119
+ { "name": "-s", "description": "Separator after number", "takesValue": true }
1120
+ ],
1121
+ "examples": [
1122
+ { "command": "nl file.txt", "description": "Number non-blank lines" },
1123
+ { "command": "nl -ba file.txt", "description": "Number all lines including blank" },
1124
+ { "command": "nl -ba -n rz -w 4 file.txt", "description": "Zero-padded 4-digit numbers" }
1125
+ ]
1126
+ },
1127
+ {
1128
+ "name": "od",
1129
+ "description": "Dump files in octal/hex and other formats",
1130
+ "options": [
1131
+ { "name": "-A", "description": "Address radix: d=decimal, o=octal, x=hex, n=none", "takesValue": true },
1132
+ { "name": "-t", "description": "Output format type", "takesValue": true },
1133
+ { "name": "-x", "description": "Hexadecimal 2-byte units" },
1134
+ { "name": "-c", "description": "ASCII characters or escape sequences" },
1135
+ { "name": "-N", "description": "Only dump N bytes", "takesValue": true }
1136
+ ],
1137
+ "examples": [
1138
+ { "command": "od -x file.bin", "description": "Hex dump" },
1139
+ { "command": "od -c file.txt", "description": "Show ASCII/escape characters" },
1140
+ { "command": "od -A x -t x1z file.bin", "description": "Hex dump with ASCII sidebar" }
1141
+ ]
1142
+ },
1143
+ {
1144
+ "name": "xxd",
1145
+ "description": "Make a hexdump or do the reverse",
1146
+ "options": [
1147
+ { "name": "-r", "description": "Reverse: convert hex dump back to binary" },
1148
+ { "name": "-p", "description": "Plain hex dump (no line numbers)" },
1149
+ { "name": "-l", "description": "Length: dump only N bytes", "takesValue": true },
1150
+ { "name": "-s", "description": "Seek to offset", "takesValue": true },
1151
+ { "name": "-c", "description": "Columns per line", "takesValue": true },
1152
+ { "name": "-g", "description": "Group bytes (octets per group)", "takesValue": true }
1153
+ ],
1154
+ "examples": [
1155
+ { "command": "xxd file.bin", "description": "Hex dump with ASCII" },
1156
+ { "command": "xxd -p file.bin", "description": "Plain hex output" },
1157
+ { "command": "xxd -l 64 file.bin", "description": "Dump first 64 bytes" },
1158
+ { "command": "xxd -r hexdump.txt original.bin", "description": "Reverse hex to binary" }
1159
+ ]
1160
+ },
1161
+ {
1162
+ "name": "iconv",
1163
+ "description": "Convert text encoding between character sets",
1164
+ "options": [
1165
+ { "name": "-f", "description": "From encoding", "takesValue": true },
1166
+ { "name": "-t", "description": "To encoding", "takesValue": true },
1167
+ { "name": "-l", "description": "List all known encodings" },
1168
+ { "name": "-o", "description": "Output file", "takesValue": true },
1169
+ { "name": "-c", "description": "Silently discard inconvertible characters" }
1170
+ ],
1171
+ "examples": [
1172
+ { "command": "iconv -f ISO-8859-1 -t UTF-8 input.txt > output.txt", "description": "Latin-1 to UTF-8" },
1173
+ { "command": "iconv -l", "description": "List available encodings" },
1174
+ { "command": "iconv -f WINDOWS-1252 -t UTF-8 -c file.txt", "description": "Windows to UTF-8, skip bad chars" }
1175
+ ]
1176
+ }
1177
+ ],
1178
+
1179
+ "network": [
1180
+ {
1181
+ "name": "ip",
1182
+ "description": "Show/manipulate routing, devices, tunnels (modern replacement for ifconfig/route)",
1183
+ "subcommands": [
1184
+ { "name": "addr", "description": "Manage IP addresses on interfaces", "subcommands": [
1185
+ { "name": "show", "description": "Show addresses", "args": [{ "name": "dev", "description": "Device name (e.g. eth0)", "required": false }] },
1186
+ { "name": "add", "description": "Add IP address", "args": [{ "name": "address", "description": "IP/prefix (e.g. 192.168.1.10/24)", "required": true }] },
1187
+ { "name": "del", "description": "Remove IP address", "args": [{ "name": "address", "description": "IP/prefix to remove", "required": true }] },
1188
+ { "name": "flush", "description": "Flush addresses on device" }
1189
+ ]},
1190
+ { "name": "link", "description": "Manage network interfaces", "subcommands": [
1191
+ { "name": "show", "description": "Show interfaces" },
1192
+ { "name": "set", "description": "Change device attributes", "options": [
1193
+ { "name": "up", "description": "Bring interface up" },
1194
+ { "name": "down", "description": "Bring interface down" },
1195
+ { "name": "mtu", "description": "Set MTU", "takesValue": true },
1196
+ { "name": "name", "description": "Rename interface", "takesValue": true },
1197
+ { "name": "promisc on|off", "description": "Enable/disable promiscuous mode" }
1198
+ ]}
1199
+ ]},
1200
+ { "name": "route", "description": "Manage routing table", "subcommands": [
1201
+ { "name": "show", "description": "Show routing table" },
1202
+ { "name": "add", "description": "Add a route" },
1203
+ { "name": "del", "description": "Delete a route" },
1204
+ { "name": "get", "description": "Get route for destination", "args": [{ "name": "address", "description": "Destination IP", "required": true }] }
1205
+ ]},
1206
+ { "name": "neigh", "description": "Manage ARP/neighbor table", "subcommands": [
1207
+ { "name": "show", "description": "Show ARP cache" },
1208
+ { "name": "flush", "description": "Flush ARP entries" }
1209
+ ]},
1210
+ { "name": "netns", "description": "Manage network namespaces", "subcommands": [
1211
+ { "name": "list", "description": "List network namespaces" },
1212
+ { "name": "add", "description": "Create namespace" },
1213
+ { "name": "del", "description": "Delete namespace" },
1214
+ { "name": "exec", "description": "Execute command in namespace" }
1215
+ ]}
1216
+ ],
1217
+ "options": [
1218
+ { "name": "-4", "description": "IPv4 only" },
1219
+ { "name": "-6", "description": "IPv6 only" },
1220
+ { "name": "-s", "description": "Show statistics" },
1221
+ { "name": "-c", "description": "Color output" },
1222
+ { "name": "-br", "description": "Brief output" },
1223
+ { "name": "-j", "description": "JSON output" }
1224
+ ],
1225
+ "examples": [
1226
+ { "command": "ip addr show", "description": "Show all IP addresses" },
1227
+ { "command": "ip -br addr", "description": "Brief address listing" },
1228
+ { "command": "ip link show", "description": "Show all network interfaces" },
1229
+ { "command": "ip route show", "description": "Show routing table" },
1230
+ { "command": "ip route get 8.8.8.8", "description": "Show route to Google DNS" },
1231
+ { "command": "sudo ip addr add 192.168.1.100/24 dev eth0", "description": "Add IP to interface" },
1232
+ { "command": "sudo ip link set eth0 up", "description": "Bring interface up" },
1233
+ { "command": "sudo ip route add default via 192.168.1.1", "description": "Set default gateway" },
1234
+ { "command": "ip neigh show", "description": "Show ARP table" },
1235
+ { "command": "ip -s link show eth0", "description": "Show interface statistics" }
1236
+ ]
1237
+ },
1238
+ {
1239
+ "name": "ifconfig",
1240
+ "description": "Configure or display network interface parameters (legacy, use ip instead)",
1241
+ "options": [
1242
+ { "name": "-a", "description": "Show all interfaces including inactive ones" },
1243
+ { "name": "-s", "description": "Short listing" },
1244
+ { "name": "up", "description": "Activate interface" },
1245
+ { "name": "down", "description": "Deactivate interface" },
1246
+ { "name": "netmask", "description": "Set netmask", "takesValue": true },
1247
+ { "name": "broadcast", "description": "Set broadcast address", "takesValue": true },
1248
+ { "name": "mtu", "description": "Set MTU", "takesValue": true }
1249
+ ],
1250
+ "examples": [
1251
+ { "command": "ifconfig", "description": "Show active interfaces" },
1252
+ { "command": "ifconfig -a", "description": "Show all interfaces" },
1253
+ { "command": "ifconfig eth0", "description": "Show specific interface" },
1254
+ { "command": "sudo ifconfig eth0 192.168.1.10 netmask 255.255.255.0", "description": "Set static IP" },
1255
+ { "command": "sudo ifconfig eth0 down", "description": "Disable interface" }
1256
+ ]
1257
+ },
1258
+ {
1259
+ "name": "ping",
1260
+ "description": "Send ICMP echo request to test network connectivity",
1261
+ "options": [
1262
+ { "name": "-c", "description": "Number of packets to send", "takesValue": true },
1263
+ { "name": "-i", "description": "Interval between packets (seconds)", "takesValue": true },
1264
+ { "name": "-w", "description": "Timeout in seconds", "takesValue": true },
1265
+ { "name": "-W", "description": "Per-packet timeout in seconds", "takesValue": true },
1266
+ { "name": "-s", "description": "Packet size in bytes", "takesValue": true },
1267
+ { "name": "-t", "description": "Set TTL", "takesValue": true },
1268
+ { "name": "-q", "description": "Quiet output (only summary)" },
1269
+ { "name": "-f", "description": "Flood ping (requires root)" },
1270
+ { "name": "-4", "description": "Force IPv4" },
1271
+ { "name": "-6", "description": "Force IPv6" }
1272
+ ],
1273
+ "examples": [
1274
+ { "command": "ping google.com", "description": "Ping Google (continuous)" },
1275
+ { "command": "ping -c 4 8.8.8.8", "description": "Send 4 packets to Google DNS" },
1276
+ { "command": "ping -c 3 -i 0.5 host.com", "description": "3 pings, 0.5s interval" },
1277
+ { "command": "ping -w 10 192.168.1.1", "description": "Ping for max 10 seconds" },
1278
+ { "command": "ping6 ::1", "description": "Ping IPv6 localhost" }
1279
+ ]
1280
+ },
1281
+ {
1282
+ "name": "traceroute",
1283
+ "description": "Print the route packets take to a network host",
1284
+ "options": [
1285
+ { "name": "-n", "description": "Do not resolve hostnames" },
1286
+ { "name": "-m", "description": "Set max TTL/hops (default 30)", "takesValue": true },
1287
+ { "name": "-w", "description": "Wait time per probe (seconds)", "takesValue": true },
1288
+ { "name": "-q", "description": "Number of queries per hop", "takesValue": true },
1289
+ { "name": "-I", "description": "Use ICMP echo instead of UDP" },
1290
+ { "name": "-T", "description": "Use TCP SYN for probing" },
1291
+ { "name": "-p", "description": "Destination port", "takesValue": true },
1292
+ { "name": "-4", "description": "Force IPv4" },
1293
+ { "name": "-6", "description": "Force IPv6" }
1294
+ ],
1295
+ "examples": [
1296
+ { "command": "traceroute google.com", "description": "Trace route to Google" },
1297
+ { "command": "traceroute -n 8.8.8.8", "description": "Trace without DNS resolution" },
1298
+ { "command": "traceroute -I google.com", "description": "Trace using ICMP" },
1299
+ { "command": "traceroute -T -p 443 example.com", "description": "TCP trace to port 443" }
1300
+ ]
1301
+ },
1302
+ {
1303
+ "name": "mtr",
1304
+ "description": "Network diagnostic tool combining traceroute and ping",
1305
+ "options": [
1306
+ { "name": "-r", "description": "Report mode (non-interactive)" },
1307
+ { "name": "-c", "description": "Number of pings per hop", "takesValue": true },
1308
+ { "name": "-n", "description": "Do not resolve hostnames" },
1309
+ { "name": "-w", "description": "Wide report mode" },
1310
+ { "name": "-j", "description": "JSON output" },
1311
+ { "name": "-z", "description": "Show ASN for each hop" },
1312
+ { "name": "-T", "description": "Use TCP instead of ICMP" },
1313
+ { "name": "-P", "description": "TCP/UDP port", "takesValue": true },
1314
+ { "name": "-4", "description": "Force IPv4" },
1315
+ { "name": "-6", "description": "Force IPv6" }
1316
+ ],
1317
+ "examples": [
1318
+ { "command": "mtr google.com", "description": "Interactive trace to Google" },
1319
+ { "command": "mtr -rw -c 20 8.8.8.8", "description": "Report: 20 pings per hop" },
1320
+ { "command": "mtr -rnz google.com", "description": "Report with ASN info, no DNS" },
1321
+ { "command": "mtr -T -P 443 example.com", "description": "TCP trace on port 443" }
1322
+ ]
1323
+ },
1324
+ {
1325
+ "name": "dig",
1326
+ "description": "DNS lookup utility (query DNS servers)",
1327
+ "options": [
1328
+ { "name": "+short", "description": "Show only answer (brief output)" },
1329
+ { "name": "+trace", "description": "Trace delegation path from root" },
1330
+ { "name": "+noall +answer", "description": "Show only the answer section" },
1331
+ { "name": "+tcp", "description": "Use TCP instead of UDP" },
1332
+ { "name": "-x", "description": "Reverse DNS lookup" },
1333
+ { "name": "@server", "description": "Query specific DNS server" },
1334
+ { "name": "ANY", "description": "Query all record types" },
1335
+ { "name": "A", "description": "Query A record (IPv4)" },
1336
+ { "name": "AAAA", "description": "Query AAAA record (IPv6)" },
1337
+ { "name": "MX", "description": "Query MX (mail) records" },
1338
+ { "name": "NS", "description": "Query nameserver records" },
1339
+ { "name": "TXT", "description": "Query TXT records" },
1340
+ { "name": "CNAME", "description": "Query CNAME records" },
1341
+ { "name": "SOA", "description": "Query SOA record" },
1342
+ { "name": "SRV", "description": "Query SRV records" }
1343
+ ],
1344
+ "examples": [
1345
+ { "command": "dig example.com", "description": "Lookup A record" },
1346
+ { "command": "dig example.com +short", "description": "Show only IP address" },
1347
+ { "command": "dig @8.8.8.8 example.com", "description": "Query Google DNS" },
1348
+ { "command": "dig example.com MX", "description": "Lookup mail servers" },
1349
+ { "command": "dig example.com NS +short", "description": "Lookup nameservers" },
1350
+ { "command": "dig example.com TXT", "description": "Lookup TXT records (SPF, DKIM)" },
1351
+ { "command": "dig -x 8.8.8.8", "description": "Reverse DNS lookup" },
1352
+ { "command": "dig example.com +trace", "description": "Full DNS delegation trace" },
1353
+ { "command": "dig example.com ANY +noall +answer", "description": "All records, clean output" }
1354
+ ]
1355
+ },
1356
+ {
1357
+ "name": "nslookup",
1358
+ "description": "Query DNS nameservers interactively or non-interactively",
1359
+ "options": [
1360
+ { "name": "-type=", "description": "Record type (A, AAAA, MX, NS, TXT, SOA, PTR)" },
1361
+ { "name": "server", "description": "DNS server to query" }
1362
+ ],
1363
+ "examples": [
1364
+ { "command": "nslookup example.com", "description": "Lookup domain" },
1365
+ { "command": "nslookup -type=MX example.com", "description": "Lookup MX records" },
1366
+ { "command": "nslookup example.com 8.8.8.8", "description": "Use specific DNS server" },
1367
+ { "command": "nslookup -type=TXT example.com", "description": "Lookup TXT records" }
1368
+ ]
1369
+ },
1370
+ {
1371
+ "name": "host",
1372
+ "description": "Simple DNS lookup utility",
1373
+ "options": [
1374
+ { "name": "-t", "description": "Query type (A, AAAA, MX, TXT, NS, SOA)", "takesValue": true },
1375
+ { "name": "-a", "description": "Equivalent to -t ANY" },
1376
+ { "name": "-l", "description": "Zone transfer (AXFR)" },
1377
+ { "name": "-v", "description": "Verbose output" }
1378
+ ],
1379
+ "examples": [
1380
+ { "command": "host example.com", "description": "Simple lookup" },
1381
+ { "command": "host -t MX example.com", "description": "Mail server lookup" },
1382
+ { "command": "host 8.8.8.8", "description": "Reverse lookup" },
1383
+ { "command": "host -a example.com", "description": "All record types" }
1384
+ ]
1385
+ },
1386
+ {
1387
+ "name": "ss",
1388
+ "description": "Socket statistics (modern replacement for netstat)",
1389
+ "options": [
1390
+ { "name": "-t", "description": "Show TCP sockets" },
1391
+ { "name": "-u", "description": "Show UDP sockets" },
1392
+ { "name": "-l", "description": "Show listening sockets" },
1393
+ { "name": "-a", "description": "Show all sockets (listening + established)" },
1394
+ { "name": "-n", "description": "Do not resolve service names" },
1395
+ { "name": "-p", "description": "Show process using socket" },
1396
+ { "name": "-e", "description": "Show detailed socket information" },
1397
+ { "name": "-s", "description": "Print summary statistics" },
1398
+ { "name": "-4", "description": "IPv4 only" },
1399
+ { "name": "-6", "description": "IPv6 only" },
1400
+ { "name": "-o", "description": "Show timer information" }
1401
+ ],
1402
+ "examples": [
1403
+ { "command": "ss -tulnp", "description": "Show all listening TCP/UDP with PIDs" },
1404
+ { "command": "ss -s", "description": "Socket summary statistics" },
1405
+ { "command": "ss -t state established", "description": "Show established TCP connections" },
1406
+ { "command": "ss -tlnp sport eq :80", "description": "Show what's listening on port 80" },
1407
+ { "command": "ss -o state time-wait", "description": "Show TIME_WAIT sockets" },
1408
+ { "command": "ss dst 192.168.1.0/24", "description": "Connections to specific subnet" }
1409
+ ]
1410
+ },
1411
+ {
1412
+ "name": "netstat",
1413
+ "description": "Print network connections, routing tables, statistics (legacy, use ss)",
1414
+ "options": [
1415
+ { "name": "-t", "description": "Show TCP connections" },
1416
+ { "name": "-u", "description": "Show UDP connections" },
1417
+ { "name": "-l", "description": "Show listening sockets" },
1418
+ { "name": "-n", "description": "Show numerical addresses" },
1419
+ { "name": "-p", "description": "Show PID and program name" },
1420
+ { "name": "-a", "description": "Show all sockets" },
1421
+ { "name": "-r", "description": "Show routing table" },
1422
+ { "name": "-s", "description": "Show statistics per protocol" },
1423
+ { "name": "-i", "description": "Show network interfaces" },
1424
+ { "name": "-c", "description": "Continuous mode (update every second)" }
1425
+ ],
1426
+ "examples": [
1427
+ { "command": "netstat -tulnp", "description": "Show all listening ports with PIDs" },
1428
+ { "command": "netstat -an", "description": "Show all connections numerically" },
1429
+ { "command": "netstat -r", "description": "Show routing table" },
1430
+ { "command": "netstat -s", "description": "Show protocol statistics" },
1431
+ { "command": "netstat -i", "description": "Show interface table" }
1432
+ ]
1433
+ },
1434
+ {
1435
+ "name": "route",
1436
+ "description": "Show/manipulate the IP routing table (legacy, use ip route)",
1437
+ "options": [
1438
+ { "name": "-n", "description": "Show numerical addresses" },
1439
+ { "name": "add", "description": "Add a route" },
1440
+ { "name": "del", "description": "Delete a route" },
1441
+ { "name": "-net", "description": "The target is a network" },
1442
+ { "name": "-host", "description": "The target is a host" },
1443
+ { "name": "gw", "description": "Route packets via gateway", "takesValue": true },
1444
+ { "name": "dev", "description": "Force route via specific device", "takesValue": true }
1445
+ ],
1446
+ "examples": [
1447
+ { "command": "route -n", "description": "Show routing table numerically" },
1448
+ { "command": "sudo route add default gw 192.168.1.1", "description": "Add default gateway" },
1449
+ { "command": "sudo route add -net 10.0.0.0/8 gw 192.168.1.1", "description": "Add network route" },
1450
+ { "command": "sudo route del default", "description": "Delete default route" }
1451
+ ]
1452
+ },
1453
+ {
1454
+ "name": "arp",
1455
+ "description": "Manipulate the ARP cache",
1456
+ "options": [
1457
+ { "name": "-a", "description": "Show all ARP entries" },
1458
+ { "name": "-n", "description": "Show numerical addresses" },
1459
+ { "name": "-d", "description": "Delete an entry", "takesValue": true },
1460
+ { "name": "-s", "description": "Add a static entry", "takesValue": true }
1461
+ ],
1462
+ "examples": [
1463
+ { "command": "arp -a", "description": "Show ARP table" },
1464
+ { "command": "arp -an", "description": "Show ARP table numerically" },
1465
+ { "command": "sudo arp -d 192.168.1.1", "description": "Delete ARP entry" }
1466
+ ]
1467
+ },
1468
+ {
1469
+ "name": "nc",
1470
+ "description": "Netcat: read/write network connections (TCP/UDP Swiss army knife)",
1471
+ "options": [
1472
+ { "name": "-l", "description": "Listen mode" },
1473
+ { "name": "-p", "description": "Local port number", "takesValue": true },
1474
+ { "name": "-v", "description": "Verbose output" },
1475
+ { "name": "-z", "description": "Zero I/O mode (scan without sending data)" },
1476
+ { "name": "-w", "description": "Timeout for connections (seconds)", "takesValue": true },
1477
+ { "name": "-u", "description": "Use UDP instead of TCP" },
1478
+ { "name": "-k", "description": "Keep listening after disconnect" },
1479
+ { "name": "-n", "description": "Do not resolve hostnames" },
1480
+ { "name": "-e", "description": "Execute command on connection" }
1481
+ ],
1482
+ "examples": [
1483
+ { "command": "nc -zv host.com 80", "description": "Check if port 80 is open" },
1484
+ { "command": "nc -zv host.com 20-100", "description": "Scan port range 20-100" },
1485
+ { "command": "nc -l -p 8080", "description": "Listen on port 8080" },
1486
+ { "command": "echo 'hello' | nc host.com 1234", "description": "Send data to port" },
1487
+ { "command": "nc -l -p 9000 > received.file", "description": "Receive file on port 9000" },
1488
+ { "command": "nc host.com 9000 < send.file", "description": "Send file to port 9000" }
1489
+ ]
1490
+ },
1491
+ {
1492
+ "name": "whois",
1493
+ "description": "Query WHOIS information for a domain or IP",
1494
+ "options": [
1495
+ { "name": "-h", "description": "Specify WHOIS server", "takesValue": true }
1496
+ ],
1497
+ "examples": [
1498
+ { "command": "whois example.com", "description": "Lookup domain registration info" },
1499
+ { "command": "whois 8.8.8.8", "description": "Lookup IP ownership" }
1500
+ ]
1501
+ },
1502
+ {
1503
+ "name": "nmcli",
1504
+ "description": "NetworkManager command-line tool for managing connections",
1505
+ "subcommands": [
1506
+ { "name": "general", "description": "Show NetworkManager status", "subcommands": [
1507
+ { "name": "status", "description": "Show overall status" },
1508
+ { "name": "hostname", "description": "Get or set hostname" }
1509
+ ]},
1510
+ { "name": "connection", "description": "Manage network connections", "subcommands": [
1511
+ { "name": "show", "description": "List connections" },
1512
+ { "name": "up", "description": "Activate a connection", "args": [{ "name": "name", "description": "Connection name", "required": true }] },
1513
+ { "name": "down", "description": "Deactivate a connection", "args": [{ "name": "name", "description": "Connection name", "required": true }] },
1514
+ { "name": "add", "description": "Add a new connection" },
1515
+ { "name": "modify", "description": "Modify an existing connection" },
1516
+ { "name": "delete", "description": "Delete a connection" },
1517
+ { "name": "reload", "description": "Reload connection files from disk" }
1518
+ ]},
1519
+ { "name": "device", "description": "Manage network devices", "subcommands": [
1520
+ { "name": "status", "description": "Show device status" },
1521
+ { "name": "show", "description": "Show device details" },
1522
+ { "name": "wifi list", "description": "List available Wi-Fi networks" },
1523
+ { "name": "wifi connect", "description": "Connect to Wi-Fi network" },
1524
+ { "name": "disconnect", "description": "Disconnect a device" }
1525
+ ]},
1526
+ { "name": "networking", "description": "Enable/disable networking", "subcommands": [
1527
+ { "name": "on", "description": "Enable networking" },
1528
+ { "name": "off", "description": "Disable networking" }
1529
+ ]}
1530
+ ],
1531
+ "examples": [
1532
+ { "command": "nmcli", "description": "Show overall network status" },
1533
+ { "command": "nmcli device status", "description": "Show all devices" },
1534
+ { "command": "nmcli connection show", "description": "List all connections" },
1535
+ { "command": "nmcli device wifi list", "description": "Scan available Wi-Fi" },
1536
+ { "command": "nmcli device wifi connect MySSID password 'pass123'", "description": "Connect to WiFi" },
1537
+ { "command": "nmcli connection up 'Wired Connection 1'", "description": "Activate connection" },
1538
+ { "command": "nmcli connection add type ethernet con-name eth0 ifname eth0", "description": "Add wired connection" },
1539
+ { "command": "nmcli connection modify eth0 ipv4.addresses 192.168.1.10/24", "description": "Set static IP" }
1540
+ ]
1541
+ },
1542
+ {
1543
+ "name": "ethtool",
1544
+ "description": "Query and control network driver and hardware settings",
1545
+ "options": [
1546
+ { "name": "-i", "description": "Show driver information" },
1547
+ { "name": "-S", "description": "Show NIC-specific statistics" },
1548
+ { "name": "-s", "description": "Change settings (speed, duplex, autoneg)" },
1549
+ { "name": "-k", "description": "Show offload features" },
1550
+ { "name": "-K", "description": "Set offload features" },
1551
+ { "name": "-p", "description": "Blink NIC LED for identification", "takesValue": true }
1552
+ ],
1553
+ "examples": [
1554
+ { "command": "ethtool eth0", "description": "Show interface settings" },
1555
+ { "command": "ethtool -i eth0", "description": "Show driver info" },
1556
+ { "command": "ethtool -S eth0", "description": "Show interface statistics" },
1557
+ { "command": "sudo ethtool -s eth0 speed 1000 duplex full autoneg off", "description": "Set speed/duplex" }
1558
+ ]
1559
+ },
1560
+ {
1561
+ "name": "iperf3",
1562
+ "description": "Network bandwidth measurement tool",
1563
+ "options": [
1564
+ { "name": "-s", "description": "Run as server" },
1565
+ { "name": "-c", "description": "Run as client, connect to host", "takesValue": true },
1566
+ { "name": "-p", "description": "Port number (default 5201)", "takesValue": true },
1567
+ { "name": "-t", "description": "Time in seconds to transmit", "takesValue": true },
1568
+ { "name": "-P", "description": "Number of parallel streams", "takesValue": true },
1569
+ { "name": "-R", "description": "Reverse mode (server sends, client receives)" },
1570
+ { "name": "-u", "description": "Use UDP instead of TCP" },
1571
+ { "name": "-b", "description": "Target bandwidth (e.g. 100M)", "takesValue": true },
1572
+ { "name": "-J", "description": "JSON output" },
1573
+ { "name": "-i", "description": "Seconds between periodic reports", "takesValue": true }
1574
+ ],
1575
+ "examples": [
1576
+ { "command": "iperf3 -s", "description": "Start iperf server" },
1577
+ { "command": "iperf3 -c 192.168.1.100", "description": "Test bandwidth to server" },
1578
+ { "command": "iperf3 -c server -P 4 -t 30", "description": "4 streams for 30 seconds" },
1579
+ { "command": "iperf3 -c server -R", "description": "Test download speed" },
1580
+ { "command": "iperf3 -c server -u -b 100M", "description": "UDP test at 100Mbps" }
1581
+ ]
1582
+ },
1583
+ {
1584
+ "name": "socat",
1585
+ "description": "Multipurpose relay for bidirectional data transfer (advanced netcat)",
1586
+ "options": [
1587
+ { "name": "-v", "description": "Verbose: print data traffic" },
1588
+ { "name": "-d", "description": "Increase verbosity (use -d -d for more)" },
1589
+ { "name": "TCP-LISTEN:", "description": "Listen on TCP port" },
1590
+ { "name": "TCP:", "description": "Connect to TCP host:port" },
1591
+ { "name": "UDP:", "description": "Send/receive UDP" },
1592
+ { "name": "UNIX-LISTEN:", "description": "Listen on Unix socket" },
1593
+ { "name": "EXEC:", "description": "Execute program" },
1594
+ { "name": "STDIN", "description": "Use standard input" },
1595
+ { "name": "STDOUT", "description": "Use standard output" }
1596
+ ],
1597
+ "examples": [
1598
+ { "command": "socat TCP-LISTEN:8080,fork TCP:remote:80", "description": "TCP port forwarder" },
1599
+ { "command": "socat - TCP:host.com:80", "description": "Simple TCP client" },
1600
+ { "command": "socat TCP-LISTEN:8080,reuseaddr,fork EXEC:/bin/bash", "description": "Expose shell on port (dangerous)" },
1601
+ { "command": "socat UNIX-LISTEN:/tmp/sock,fork TCP:host:3306", "description": "Unix socket to TCP proxy" }
1602
+ ]
1603
+ },
1604
+ {
1605
+ "name": "resolvectl",
1606
+ "description": "Resolve hostnames, manage DNS settings (systemd-resolved)",
1607
+ "subcommands": [
1608
+ { "name": "status", "description": "Show resolver status for all interfaces" },
1609
+ { "name": "query", "description": "Resolve a hostname", "args": [{ "name": "hostname", "description": "Domain to resolve", "required": true }] },
1610
+ { "name": "statistics", "description": "Show resolver statistics" },
1611
+ { "name": "reset-statistics", "description": "Reset resolver statistics" },
1612
+ { "name": "flush-caches", "description": "Flush DNS caches" },
1613
+ { "name": "dns", "description": "Get/set DNS servers for interface" }
1614
+ ],
1615
+ "examples": [
1616
+ { "command": "resolvectl status", "description": "Show DNS config per interface" },
1617
+ { "command": "resolvectl query example.com", "description": "Resolve hostname" },
1618
+ { "command": "resolvectl flush-caches", "description": "Flush DNS cache" },
1619
+ { "command": "resolvectl statistics", "description": "Show cache hit rates" }
1620
+ ]
1621
+ }
1622
+ ],
1623
+
1624
+ "package": [
1625
+ {
1626
+ "name": "dpkg",
1627
+ "description": "Low-level Debian package manager (install/remove/query .deb files)",
1628
+ "subcommands": [],
1629
+ "options": [
1630
+ { "name": "-i", "description": "Install a .deb package", "takesValue": true },
1631
+ { "name": "-r", "description": "Remove a package (keep config)", "takesValue": true },
1632
+ { "name": "-P", "description": "Purge a package (remove config too)", "takesValue": true },
1633
+ { "name": "-l", "description": "List installed packages matching pattern" },
1634
+ { "name": "-L", "description": "List files installed by package", "takesValue": true },
1635
+ { "name": "-s", "description": "Show package status/info", "takesValue": true },
1636
+ { "name": "-S", "description": "Search for package owning a file", "takesValue": true },
1637
+ { "name": "--configure", "description": "Configure an unpacked package", "takesValue": true },
1638
+ { "name": "--unpack", "description": "Unpack package without configuring" },
1639
+ { "name": "-C", "description": "Check for broken packages" },
1640
+ { "name": "-c", "description": "List contents of .deb file", "takesValue": true },
1641
+ { "name": "-I", "description": "Show information about .deb file", "takesValue": true }
1642
+ ],
1643
+ "examples": [
1644
+ { "command": "sudo dpkg -i package.deb", "description": "Install a .deb file" },
1645
+ { "command": "dpkg -l", "description": "List all installed packages" },
1646
+ { "command": "dpkg -l | grep nginx", "description": "Check if nginx is installed" },
1647
+ { "command": "dpkg -L nginx", "description": "List files owned by nginx" },
1648
+ { "command": "dpkg -s nginx", "description": "Show nginx package info" },
1649
+ { "command": "dpkg -S /usr/bin/curl", "description": "Find which package owns curl" },
1650
+ { "command": "dpkg -c package.deb", "description": "List .deb contents before install" },
1651
+ { "command": "sudo dpkg --configure -a", "description": "Fix broken package configurations" }
1652
+ ]
1653
+ },
1654
+ {
1655
+ "name": "rpm",
1656
+ "description": "RPM Package Manager (Fedora/RHEL/CentOS low-level tool)",
1657
+ "subcommands": [],
1658
+ "options": [
1659
+ { "name": "-i", "description": "Install a package" },
1660
+ { "name": "-U", "description": "Upgrade package (install if not present)" },
1661
+ { "name": "-e", "description": "Erase/remove a package", "takesValue": true },
1662
+ { "name": "-q", "description": "Query mode" },
1663
+ { "name": "-qa", "description": "Query all installed packages" },
1664
+ { "name": "-qi", "description": "Query info about a package", "takesValue": true },
1665
+ { "name": "-ql", "description": "List files in a package", "takesValue": true },
1666
+ { "name": "-qf", "description": "Query which package owns a file", "takesValue": true },
1667
+ { "name": "-qR", "description": "List package dependencies", "takesValue": true },
1668
+ { "name": "-V", "description": "Verify installed package", "takesValue": true },
1669
+ { "name": "-qp", "description": "Query an RPM file (not installed)", "takesValue": true },
1670
+ { "name": "--import", "description": "Import GPG key" },
1671
+ { "name": "-v", "description": "Verbose" },
1672
+ { "name": "-h", "description": "Print hash marks for progress" }
1673
+ ],
1674
+ "examples": [
1675
+ { "command": "sudo rpm -ivh package.rpm", "description": "Install RPM with progress" },
1676
+ { "command": "sudo rpm -Uvh package.rpm", "description": "Upgrade RPM" },
1677
+ { "command": "rpm -qa", "description": "List all installed packages" },
1678
+ { "command": "rpm -qa | grep httpd", "description": "Check if httpd is installed" },
1679
+ { "command": "rpm -qi nginx", "description": "Show package info" },
1680
+ { "command": "rpm -ql nginx", "description": "List files in package" },
1681
+ { "command": "rpm -qf /usr/bin/curl", "description": "Find package owning file" },
1682
+ { "command": "rpm -qR nginx", "description": "Show dependencies" },
1683
+ { "command": "sudo rpm -e package_name", "description": "Remove a package" }
1684
+ ]
1685
+ },
1686
+ {
1687
+ "name": "snap",
1688
+ "description": "Install and manage snap packages (Ubuntu's universal packaging)",
1689
+ "subcommands": [
1690
+ { "name": "install", "description": "Install a snap", "args": [{ "name": "snap", "description": "Snap name", "required": true }], "options": [
1691
+ { "name": "--classic", "description": "Install with classic confinement" },
1692
+ { "name": "--channel", "description": "Install from specific channel (stable/beta/edge)", "takesValue": true },
1693
+ { "name": "--dangerous", "description": "Install unsigned snap" }
1694
+ ]},
1695
+ { "name": "remove", "description": "Remove a snap", "args": [{ "name": "snap", "description": "Snap name", "required": true }], "options": [
1696
+ { "name": "--purge", "description": "Remove all snap data too" }
1697
+ ]},
1698
+ { "name": "refresh", "description": "Update snaps", "args": [{ "name": "snap", "description": "Specific snap (optional)", "required": false }] },
1699
+ { "name": "list", "description": "List installed snaps" },
1700
+ { "name": "find", "description": "Search for snaps", "args": [{ "name": "query", "description": "Search term", "required": true }] },
1701
+ { "name": "info", "description": "Show snap details", "args": [{ "name": "snap", "description": "Snap name", "required": true }] },
1702
+ { "name": "connections", "description": "Show snap interface connections" },
1703
+ { "name": "services", "description": "List snap services" },
1704
+ { "name": "start", "description": "Start a snap service" },
1705
+ { "name": "stop", "description": "Stop a snap service" },
1706
+ { "name": "restart", "description": "Restart snap services" },
1707
+ { "name": "logs", "description": "View snap service logs" },
1708
+ { "name": "revert", "description": "Revert snap to previous version" },
1709
+ { "name": "disable", "description": "Disable a snap" },
1710
+ { "name": "enable", "description": "Enable a disabled snap" },
1711
+ { "name": "alias", "description": "Create an alias for a snap command" },
1712
+ { "name": "changes", "description": "Show recent snap changes/transactions" }
1713
+ ],
1714
+ "examples": [
1715
+ { "command": "snap install code --classic", "description": "Install VS Code" },
1716
+ { "command": "snap list", "description": "List installed snaps" },
1717
+ { "command": "snap find node", "description": "Search for Node.js snaps" },
1718
+ { "command": "snap info firefox", "description": "Show Firefox snap details" },
1719
+ { "command": "snap refresh", "description": "Update all snaps" },
1720
+ { "command": "snap remove --purge slack", "description": "Completely remove Slack" },
1721
+ { "command": "snap revert firefox", "description": "Revert to previous version" }
1722
+ ]
1723
+ },
1724
+ {
1725
+ "name": "flatpak",
1726
+ "description": "Install and manage Flatpak applications (sandboxed desktop apps)",
1727
+ "subcommands": [
1728
+ { "name": "install", "description": "Install an application", "args": [{ "name": "ref", "description": "Application ID or name", "required": true }], "options": [
1729
+ { "name": "--user", "description": "Install for current user only" },
1730
+ { "name": "-y", "description": "Non-interactive (assume yes)" }
1731
+ ]},
1732
+ { "name": "uninstall", "description": "Uninstall an application", "args": [{ "name": "ref", "description": "Application ID", "required": true }], "options": [
1733
+ { "name": "--unused", "description": "Remove unused runtimes" }
1734
+ ]},
1735
+ { "name": "update", "description": "Update installed applications" },
1736
+ { "name": "list", "description": "List installed applications", "options": [
1737
+ { "name": "--app", "description": "Show only apps (not runtimes)" },
1738
+ { "name": "--runtime", "description": "Show only runtimes" }
1739
+ ]},
1740
+ { "name": "search", "description": "Search for applications", "args": [{ "name": "query", "description": "Search term", "required": true }] },
1741
+ { "name": "info", "description": "Show application info" },
1742
+ { "name": "run", "description": "Run an installed application" },
1743
+ { "name": "remote-add", "description": "Add a remote repository" },
1744
+ { "name": "remote-list", "description": "List configured remotes" },
1745
+ { "name": "repair", "description": "Repair Flatpak installation" }
1746
+ ],
1747
+ "examples": [
1748
+ { "command": "flatpak install flathub com.spotify.Client", "description": "Install Spotify" },
1749
+ { "command": "flatpak list --app", "description": "List installed apps" },
1750
+ { "command": "flatpak search gimp", "description": "Search for GIMP" },
1751
+ { "command": "flatpak update", "description": "Update all apps" },
1752
+ { "command": "flatpak uninstall --unused", "description": "Remove unused runtimes" },
1753
+ { "command": "flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo", "description": "Add Flathub repo" }
1754
+ ]
1755
+ },
1756
+ {
1757
+ "name": "apk",
1758
+ "description": "Alpine Linux package manager",
1759
+ "subcommands": [
1760
+ { "name": "add", "description": "Install packages", "args": [{ "name": "packages", "description": "Package names", "required": true }], "options": [
1761
+ { "name": "--no-cache", "description": "Do not use local cache" },
1762
+ { "name": "--virtual", "description": "Create virtual package for easy removal", "takesValue": true }
1763
+ ]},
1764
+ { "name": "del", "description": "Remove packages", "args": [{ "name": "packages", "description": "Package names", "required": true }] },
1765
+ { "name": "update", "description": "Update repository indexes" },
1766
+ { "name": "upgrade", "description": "Upgrade installed packages" },
1767
+ { "name": "search", "description": "Search for packages", "args": [{ "name": "query", "description": "Search term", "required": true }] },
1768
+ { "name": "info", "description": "Show package info", "args": [{ "name": "package", "description": "Package name", "required": true }] },
1769
+ { "name": "list", "description": "List packages", "options": [
1770
+ { "name": "-I", "description": "List installed packages" },
1771
+ { "name": "-u", "description": "List upgradable packages" }
1772
+ ]},
1773
+ { "name": "cache", "description": "Manage local package cache", "subcommands": [
1774
+ { "name": "clean", "description": "Clean cache" },
1775
+ { "name": "download", "description": "Download packages to cache" }
1776
+ ]},
1777
+ { "name": "fix", "description": "Repair/reinstall packages" }
1778
+ ],
1779
+ "examples": [
1780
+ { "command": "apk add curl git", "description": "Install packages" },
1781
+ { "command": "apk add --no-cache python3", "description": "Install without caching (Docker)" },
1782
+ { "command": "apk update && apk upgrade", "description": "Update and upgrade all" },
1783
+ { "command": "apk search nginx", "description": "Search for nginx" },
1784
+ { "command": "apk info -a nginx", "description": "Detailed package info" },
1785
+ { "command": "apk del curl", "description": "Remove curl" },
1786
+ { "command": "apk add --virtual .build-deps gcc musl-dev", "description": "Add build deps as virtual package" }
1787
+ ]
1788
+ },
1789
+ {
1790
+ "name": "zypper",
1791
+ "description": "Package manager for openSUSE/SLES",
1792
+ "subcommands": [
1793
+ { "name": "install", "description": "Install packages", "args": [{ "name": "packages", "description": "Package names", "required": true }] },
1794
+ { "name": "remove", "description": "Remove packages", "args": [{ "name": "packages", "description": "Package names", "required": true }] },
1795
+ { "name": "update", "description": "Update packages" },
1796
+ { "name": "refresh", "description": "Refresh all repositories" },
1797
+ { "name": "search", "description": "Search for packages", "args": [{ "name": "query", "description": "Search term", "required": true }] },
1798
+ { "name": "info", "description": "Show package info" },
1799
+ { "name": "dist-upgrade", "description": "Distribution upgrade" },
1800
+ { "name": "repos", "description": "List configured repositories" },
1801
+ { "name": "addrepo", "description": "Add a repository" },
1802
+ { "name": "removerepo", "description": "Remove a repository" },
1803
+ { "name": "patch", "description": "Install patches" },
1804
+ { "name": "patches", "description": "List available patches" },
1805
+ { "name": "clean", "description": "Clean local caches" },
1806
+ { "name": "verify", "description": "Verify package dependencies" }
1807
+ ],
1808
+ "options": [
1809
+ { "name": "-n", "description": "Non-interactive (auto yes)" },
1810
+ { "name": "--no-confirm", "description": "Skip confirmation" }
1811
+ ],
1812
+ "examples": [
1813
+ { "command": "zypper install nginx", "description": "Install nginx" },
1814
+ { "command": "zypper search docker", "description": "Search for docker" },
1815
+ { "command": "zypper refresh", "description": "Refresh repos" },
1816
+ { "command": "zypper update", "description": "Update all packages" },
1817
+ { "command": "zypper dist-upgrade", "description": "Full distribution upgrade" },
1818
+ { "command": "zypper repos", "description": "List all repos" }
1819
+ ]
1820
+ },
1821
+ {
1822
+ "name": "apt-cache",
1823
+ "description": "Query the APT package cache (search, show, dependencies)",
1824
+ "subcommands": [
1825
+ { "name": "search", "description": "Search package descriptions", "args": [{ "name": "query", "description": "Search term or regex", "required": true }] },
1826
+ { "name": "show", "description": "Show package details", "args": [{ "name": "package", "description": "Package name", "required": true }] },
1827
+ { "name": "showpkg", "description": "Show package dependencies and reverse deps" },
1828
+ { "name": "depends", "description": "Show package dependencies", "args": [{ "name": "package", "description": "Package name", "required": true }] },
1829
+ { "name": "rdepends", "description": "Show reverse dependencies" },
1830
+ { "name": "policy", "description": "Show repository priority/versions", "args": [{ "name": "package", "description": "Package name", "required": false }] },
1831
+ { "name": "madison", "description": "Show available versions and sources" },
1832
+ { "name": "stats", "description": "Show cache statistics" },
1833
+ { "name": "pkgnames", "description": "List all package names in cache" }
1834
+ ],
1835
+ "examples": [
1836
+ { "command": "apt-cache search redis", "description": "Search for redis packages" },
1837
+ { "command": "apt-cache show nginx", "description": "Show nginx details" },
1838
+ { "command": "apt-cache depends nginx", "description": "Show nginx dependencies" },
1839
+ { "command": "apt-cache policy nginx", "description": "Show installed and candidate versions" },
1840
+ { "command": "apt-cache madison docker-ce", "description": "Show available versions" },
1841
+ { "command": "apt-cache stats", "description": "Show cache statistics" }
1842
+ ]
1843
+ },
1844
+ {
1845
+ "name": "apt-file",
1846
+ "description": "Search for files within Debian packages",
1847
+ "subcommands": [
1848
+ { "name": "update", "description": "Update the file contents cache" },
1849
+ { "name": "search", "description": "Search for file in packages", "args": [{ "name": "pattern", "description": "Filename or path pattern", "required": true }] },
1850
+ { "name": "list", "description": "List files in a package", "args": [{ "name": "package", "description": "Package name", "required": true }] },
1851
+ { "name": "show", "description": "Alias for list" }
1852
+ ],
1853
+ "examples": [
1854
+ { "command": "apt-file update", "description": "Update file cache (run first)" },
1855
+ { "command": "apt-file search libssl.so", "description": "Find package containing file" },
1856
+ { "command": "apt-file list nginx", "description": "List all files in nginx package" }
1857
+ ]
1858
+ },
1859
+ {
1860
+ "name": "update-alternatives",
1861
+ "description": "Manage symbolic links for default commands (Debian/Ubuntu)",
1862
+ "subcommands": [],
1863
+ "options": [
1864
+ { "name": "--install", "description": "Register an alternative" },
1865
+ { "name": "--remove", "description": "Remove an alternative" },
1866
+ { "name": "--config", "description": "Interactive selection of alternatives", "takesValue": true },
1867
+ { "name": "--list", "description": "List registered alternatives", "takesValue": true },
1868
+ { "name": "--display", "description": "Display details of alternatives", "takesValue": true },
1869
+ { "name": "--auto", "description": "Reset to automatic mode", "takesValue": true },
1870
+ { "name": "--set", "description": "Set alternative path explicitly" }
1871
+ ],
1872
+ "examples": [
1873
+ { "command": "sudo update-alternatives --config java", "description": "Select default Java version" },
1874
+ { "command": "sudo update-alternatives --config editor", "description": "Select default text editor" },
1875
+ { "command": "update-alternatives --list java", "description": "List installed Java alternatives" },
1876
+ { "command": "sudo update-alternatives --install /usr/bin/python python /usr/bin/python3.11 1", "description": "Register Python 3.11" },
1877
+ { "command": "update-alternatives --display python", "description": "Show Python alternatives" }
1878
+ ]
1879
+ }
1880
+ ],
1881
+
1882
+ "process": [
1883
+ {
1884
+ "name": "kill",
1885
+ "description": "Send a signal to a process (default: SIGTERM)",
1886
+ "options": [
1887
+ { "name": "-9", "description": "Send SIGKILL (force kill, cannot be caught)" },
1888
+ { "name": "-15", "description": "Send SIGTERM (graceful termination, default)" },
1889
+ { "name": "-1", "description": "Send SIGHUP (hangup / reload)" },
1890
+ { "name": "-2", "description": "Send SIGINT (interrupt, like Ctrl+C)" },
1891
+ { "name": "-STOP", "description": "Send SIGSTOP (pause process)" },
1892
+ { "name": "-CONT", "description": "Send SIGCONT (resume paused process)" },
1893
+ { "name": "-l", "description": "List all signal names" },
1894
+ { "name": "-s", "description": "Specify signal by name", "takesValue": true }
1895
+ ],
1896
+ "examples": [
1897
+ { "command": "kill 1234", "description": "Gracefully terminate PID 1234" },
1898
+ { "command": "kill -9 1234", "description": "Force kill PID 1234" },
1899
+ { "command": "kill -HUP 1234", "description": "Send reload signal to PID 1234" },
1900
+ { "command": "kill -l", "description": "List all available signals" },
1901
+ { "command": "kill -STOP 1234", "description": "Pause process" },
1902
+ { "command": "kill -CONT 1234", "description": "Resume paused process" },
1903
+ { "command": "kill -9 -1", "description": "Kill all processes you own" }
1904
+ ]
1905
+ },
1906
+ {
1907
+ "name": "killall",
1908
+ "description": "Kill processes by name",
1909
+ "options": [
1910
+ { "name": "-9", "description": "Send SIGKILL" },
1911
+ { "name": "-I", "description": "Case-insensitive name matching" },
1912
+ { "name": "-i", "description": "Ask for confirmation before killing" },
1913
+ { "name": "-u", "description": "Kill only processes owned by user", "takesValue": true },
1914
+ { "name": "-w", "description": "Wait for all killed processes to die" },
1915
+ { "name": "-v", "description": "Report if signal was sent successfully" },
1916
+ { "name": "-e", "description": "Require exact match (no truncation)" }
1917
+ ],
1918
+ "examples": [
1919
+ { "command": "killall firefox", "description": "Kill all Firefox processes" },
1920
+ { "command": "killall -9 node", "description": "Force kill all Node.js processes" },
1921
+ { "command": "killall -u john python3", "description": "Kill user john's Python procs" },
1922
+ { "command": "killall -i nginx", "description": "Kill nginx with confirmation" }
1923
+ ]
1924
+ },
1925
+ {
1926
+ "name": "pkill",
1927
+ "description": "Kill processes matching a pattern (by name, user, or other criteria)",
1928
+ "options": [
1929
+ { "name": "-9", "description": "Send SIGKILL" },
1930
+ { "name": "-f", "description": "Match against full command line (not just name)" },
1931
+ { "name": "-u", "description": "Match by effective user", "takesValue": true },
1932
+ { "name": "-U", "description": "Match by real user", "takesValue": true },
1933
+ { "name": "-t", "description": "Match by terminal", "takesValue": true },
1934
+ { "name": "-P", "description": "Match parent PID", "takesValue": true },
1935
+ { "name": "-n", "description": "Select the newest matching process" },
1936
+ { "name": "-o", "description": "Select the oldest matching process" },
1937
+ { "name": "-x", "description": "Require exact match" }
1938
+ ],
1939
+ "examples": [
1940
+ { "command": "pkill python", "description": "Kill all python processes" },
1941
+ { "command": "pkill -9 -f 'node server.js'", "description": "Force kill by full command" },
1942
+ { "command": "pkill -u www-data", "description": "Kill all procs of www-data user" },
1943
+ { "command": "pkill -n chrome", "description": "Kill newest Chrome process" }
1944
+ ]
1945
+ },
1946
+ {
1947
+ "name": "pgrep",
1948
+ "description": "List PIDs matching a pattern (like pkill but just lists)",
1949
+ "options": [
1950
+ { "name": "-l", "description": "List PID and process name" },
1951
+ { "name": "-a", "description": "List PID and full command line" },
1952
+ { "name": "-f", "description": "Match against full command line" },
1953
+ { "name": "-u", "description": "Match by effective user", "takesValue": true },
1954
+ { "name": "-c", "description": "Count matching processes" },
1955
+ { "name": "-n", "description": "Select newest match" },
1956
+ { "name": "-o", "description": "Select oldest match" },
1957
+ { "name": "-x", "description": "Require exact match" },
1958
+ { "name": "-d", "description": "Output delimiter", "takesValue": true }
1959
+ ],
1960
+ "examples": [
1961
+ { "command": "pgrep nginx", "description": "List nginx PIDs" },
1962
+ { "command": "pgrep -la python", "description": "List python PIDs with full command" },
1963
+ { "command": "pgrep -c sshd", "description": "Count sshd processes" },
1964
+ { "command": "pgrep -u root -a", "description": "List all root processes" },
1965
+ { "command": "pgrep -f 'node app.js'", "description": "Find by full command" }
1966
+ ]
1967
+ },
1968
+ {
1969
+ "name": "nice",
1970
+ "description": "Run a command with modified scheduling priority (-20 highest to 19 lowest)",
1971
+ "options": [
1972
+ { "name": "-n", "description": "Priority adjustment (-20 to 19, default 10)", "takesValue": true }
1973
+ ],
1974
+ "examples": [
1975
+ { "command": "nice -n 10 long_task.sh", "description": "Run with lower priority" },
1976
+ { "command": "nice -n -5 important_job", "description": "Run with higher priority (needs root)" },
1977
+ { "command": "nice -n 19 make -j$(nproc)", "description": "Compile at lowest priority" }
1978
+ ]
1979
+ },
1980
+ {
1981
+ "name": "renice",
1982
+ "description": "Alter priority of running processes",
1983
+ "options": [
1984
+ { "name": "-n", "description": "New priority value", "takesValue": true },
1985
+ { "name": "-p", "description": "Specify process ID", "takesValue": true },
1986
+ { "name": "-u", "description": "Specify user", "takesValue": true },
1987
+ { "name": "-g", "description": "Specify process group", "takesValue": true }
1988
+ ],
1989
+ "examples": [
1990
+ { "command": "renice -n 10 -p 1234", "description": "Lower priority of PID 1234" },
1991
+ { "command": "sudo renice -n -5 -p 1234", "description": "Raise priority of PID 1234" },
1992
+ { "command": "sudo renice -n 19 -u john", "description": "Lower all of john's procs" }
1993
+ ]
1994
+ },
1995
+ {
1996
+ "name": "nohup",
1997
+ "description": "Run a command immune to hangups (survives terminal close)",
1998
+ "options": [],
1999
+ "examples": [
2000
+ { "command": "nohup long_task.sh &", "description": "Run in background, survive logout" },
2001
+ { "command": "nohup python3 server.py > output.log 2>&1 &", "description": "Background with log redirect" },
2002
+ { "command": "nohup ./deploy.sh &", "description": "Deploy survives SSH disconnect" }
2003
+ ]
2004
+ },
2005
+ {
2006
+ "name": "bg",
2007
+ "description": "Resume a suspended job in the background",
2008
+ "options": [],
2009
+ "examples": [
2010
+ { "command": "bg", "description": "Resume most recent suspended job in background" },
2011
+ { "command": "bg %1", "description": "Resume job 1 in background" },
2012
+ { "command": "# Press Ctrl+Z to suspend, then bg to continue in background", "description": "Common workflow" }
2013
+ ]
2014
+ },
2015
+ {
2016
+ "name": "fg",
2017
+ "description": "Bring a background job to the foreground",
2018
+ "options": [],
2019
+ "examples": [
2020
+ { "command": "fg", "description": "Bring most recent background job to foreground" },
2021
+ { "command": "fg %1", "description": "Bring job 1 to foreground" },
2022
+ { "command": "fg %2", "description": "Bring job 2 to foreground" }
2023
+ ]
2024
+ },
2025
+ {
2026
+ "name": "jobs",
2027
+ "description": "List active jobs in the current shell session",
2028
+ "options": [
2029
+ { "name": "-l", "description": "Show PIDs as well" },
2030
+ { "name": "-p", "description": "Show PIDs only" },
2031
+ { "name": "-r", "description": "Show only running jobs" },
2032
+ { "name": "-s", "description": "Show only stopped jobs" }
2033
+ ],
2034
+ "examples": [
2035
+ { "command": "jobs", "description": "List background/suspended jobs" },
2036
+ { "command": "jobs -l", "description": "List jobs with PIDs" }
2037
+ ]
2038
+ },
2039
+ {
2040
+ "name": "disown",
2041
+ "description": "Remove jobs from the shell's job table (prevent HUP on exit)",
2042
+ "options": [
2043
+ { "name": "-h", "description": "Mark job to not receive SIGHUP" },
2044
+ { "name": "-a", "description": "Remove all jobs" },
2045
+ { "name": "-r", "description": "Remove only running jobs" }
2046
+ ],
2047
+ "examples": [
2048
+ { "command": "disown %1", "description": "Disown job 1" },
2049
+ { "command": "disown -h %1", "description": "Keep job but don't send HUP" },
2050
+ { "command": "long_task & disown", "description": "Start and immediately disown" }
2051
+ ]
2052
+ },
2053
+ {
2054
+ "name": "strace",
2055
+ "description": "Trace system calls and signals (debugging tool)",
2056
+ "options": [
2057
+ { "name": "-p", "description": "Attach to running process", "takesValue": true },
2058
+ { "name": "-f", "description": "Follow child processes (forks)" },
2059
+ { "name": "-e", "description": "Filter syscalls (e.g. trace=open,read,write)", "takesValue": true },
2060
+ { "name": "-o", "description": "Write output to file", "takesValue": true },
2061
+ { "name": "-c", "description": "Count time and calls per syscall (summary)" },
2062
+ { "name": "-t", "description": "Prefix each line with wall clock time" },
2063
+ { "name": "-T", "description": "Show time spent in each syscall" },
2064
+ { "name": "-s", "description": "Max string size to print (default 32)", "takesValue": true }
2065
+ ],
2066
+ "examples": [
2067
+ { "command": "strace ls", "description": "Trace all syscalls of ls" },
2068
+ { "command": "strace -p 1234", "description": "Attach to running process" },
2069
+ { "command": "strace -e trace=network curl google.com", "description": "Trace only network calls" },
2070
+ { "command": "strace -e trace=open,read,write cat file.txt", "description": "Trace file I/O" },
2071
+ { "command": "strace -c ls /tmp", "description": "Syscall statistics summary" },
2072
+ { "command": "strace -f -o trace.log ./app", "description": "Trace with children, log to file" }
2073
+ ]
2074
+ },
2075
+ {
2076
+ "name": "ltrace",
2077
+ "description": "Trace library calls made by a program",
2078
+ "options": [
2079
+ { "name": "-p", "description": "Attach to running process", "takesValue": true },
2080
+ { "name": "-e", "description": "Filter library functions", "takesValue": true },
2081
+ { "name": "-o", "description": "Output file", "takesValue": true },
2082
+ { "name": "-c", "description": "Count calls summary" },
2083
+ { "name": "-f", "description": "Follow children" },
2084
+ { "name": "-S", "description": "Show syscalls as well as library calls" }
2085
+ ],
2086
+ "examples": [
2087
+ { "command": "ltrace ls", "description": "Trace library calls of ls" },
2088
+ { "command": "ltrace -c ./myapp", "description": "Library call statistics" },
2089
+ { "command": "ltrace -e malloc+free ./app", "description": "Trace only malloc/free" }
2090
+ ]
2091
+ },
2092
+ {
2093
+ "name": "time",
2094
+ "description": "Measure command execution time (real, user, sys)",
2095
+ "options": [],
2096
+ "examples": [
2097
+ { "command": "time ls -R /", "description": "Measure time of recursive ls" },
2098
+ { "command": "time make -j$(nproc)", "description": "Measure build time" },
2099
+ { "command": "time sleep 2", "description": "Shows ~2s real, 0s user/sys" },
2100
+ { "command": "/usr/bin/time -v command", "description": "Verbose timing with memory stats (GNU time)" }
2101
+ ]
2102
+ },
2103
+ {
2104
+ "name": "timeout",
2105
+ "description": "Run a command with a time limit",
2106
+ "options": [
2107
+ { "name": "-s", "description": "Signal to send on timeout (default TERM)", "takesValue": true },
2108
+ { "name": "-k", "description": "Send KILL signal after duration if still running", "takesValue": true },
2109
+ { "name": "--foreground", "description": "Run command in foreground process group" },
2110
+ { "name": "--preserve-status", "description": "Exit with command's status even on timeout" }
2111
+ ],
2112
+ "examples": [
2113
+ { "command": "timeout 10 curl http://slow-server.com", "description": "Kill curl after 10 seconds" },
2114
+ { "command": "timeout 5m ./long_test.sh", "description": "Kill test after 5 minutes" },
2115
+ { "command": "timeout -k 5 30 ./task.sh", "description": "TERM after 30s, KILL after 35s" },
2116
+ { "command": "timeout 1h make", "description": "Abort build after 1 hour" }
2117
+ ]
2118
+ },
2119
+ {
2120
+ "name": "wait",
2121
+ "description": "Wait for background processes to finish",
2122
+ "options": [
2123
+ { "name": "-n", "description": "Wait for any one job to complete (bash 4.3+)" }
2124
+ ],
2125
+ "examples": [
2126
+ { "command": "wait", "description": "Wait for all background jobs" },
2127
+ { "command": "wait 1234", "description": "Wait for specific PID" },
2128
+ { "command": "wait %1", "description": "Wait for job 1" },
2129
+ { "command": "cmd1 & cmd2 & wait", "description": "Run parallel, wait for both" }
2130
+ ]
2131
+ },
2132
+ {
2133
+ "name": "pidof",
2134
+ "description": "Find the process ID of a running program by name",
2135
+ "options": [
2136
+ { "name": "-s", "description": "Single shot: return only one PID" },
2137
+ { "name": "-x", "description": "Also match with scripts" }
2138
+ ],
2139
+ "examples": [
2140
+ { "command": "pidof nginx", "description": "Get nginx PIDs" },
2141
+ { "command": "pidof -s sshd", "description": "Get single sshd PID" }
2142
+ ]
2143
+ },
2144
+ {
2145
+ "name": "pstree",
2146
+ "description": "Display a tree of processes",
2147
+ "options": [
2148
+ { "name": "-p", "description": "Show PIDs" },
2149
+ { "name": "-u", "description": "Show user transitions" },
2150
+ { "name": "-a", "description": "Show command line arguments" },
2151
+ { "name": "-h", "description": "Highlight current process" },
2152
+ { "name": "-l", "description": "Long lines (no truncation)" },
2153
+ { "name": "-n", "description": "Sort by PID" },
2154
+ { "name": "-s", "description": "Show parents of specified process" },
2155
+ { "name": "-T", "description": "Hide threads" }
2156
+ ],
2157
+ "examples": [
2158
+ { "command": "pstree", "description": "Show process tree" },
2159
+ { "command": "pstree -p", "description": "Show with PIDs" },
2160
+ { "command": "pstree -pa", "description": "Show with PIDs and arguments" },
2161
+ { "command": "pstree -p 1234", "description": "Show tree from PID 1234" },
2162
+ { "command": "pstree -u", "description": "Show user transitions" }
2163
+ ]
2164
+ },
2165
+ {
2166
+ "name": "fuser",
2167
+ "description": "Identify processes using files or sockets",
2168
+ "options": [
2169
+ { "name": "-v", "description": "Verbose output" },
2170
+ { "name": "-k", "description": "Kill processes using the file" },
2171
+ { "name": "-m", "description": "All processes using the named filesystem" },
2172
+ { "name": "-n", "description": "Select namespace (file, udp, tcp)", "takesValue": true },
2173
+ { "name": "-i", "description": "Ask before killing" },
2174
+ { "name": "-u", "description": "Show user of each process" }
2175
+ ],
2176
+ "examples": [
2177
+ { "command": "fuser -v /var/log/syslog", "description": "Who is using syslog" },
2178
+ { "command": "fuser -v -n tcp 80", "description": "Who is using TCP port 80" },
2179
+ { "command": "fuser -km /mnt/usb", "description": "Kill all procs using /mnt/usb" },
2180
+ { "command": "fuser -v .", "description": "Show processes using current directory" }
2181
+ ]
2182
+ },
2183
+ {
2184
+ "name": "free",
2185
+ "description": "Display amount of free and used memory in the system",
2186
+ "options": [
2187
+ { "name": "-h", "description": "Human-readable output (KB, MB, GB)" },
2188
+ { "name": "-b", "description": "Output in bytes" },
2189
+ { "name": "-m", "description": "Output in megabytes" },
2190
+ { "name": "-g", "description": "Output in gigabytes" },
2191
+ { "name": "-s", "description": "Repeat every N seconds", "takesValue": true },
2192
+ { "name": "-c", "description": "Repeat N times", "takesValue": true },
2193
+ { "name": "-t", "description": "Show total row" },
2194
+ { "name": "-w", "description": "Wide output (separate buffers/cache columns)" }
2195
+ ],
2196
+ "examples": [
2197
+ { "command": "free -h", "description": "Show memory in human-readable format" },
2198
+ { "command": "free -m", "description": "Show memory in megabytes" },
2199
+ { "command": "free -h -s 5", "description": "Refresh every 5 seconds" },
2200
+ { "command": "free -hw", "description": "Wide format, separate buffers and cache" }
2201
+ ]
2202
+ },
2203
+ {
2204
+ "name": "vmstat",
2205
+ "description": "Report virtual memory statistics (procs, memory, swap, I/O, CPU)",
2206
+ "options": [
2207
+ { "name": "-a", "description": "Show active/inactive memory" },
2208
+ { "name": "-d", "description": "Show disk statistics" },
2209
+ { "name": "-s", "description": "Show event counters" },
2210
+ { "name": "-S", "description": "Unit size (K, M)", "takesValue": true },
2211
+ { "name": "-w", "description": "Wide output" },
2212
+ { "name": "-t", "description": "Add timestamp" }
2213
+ ],
2214
+ "examples": [
2215
+ { "command": "vmstat", "description": "Show single snapshot" },
2216
+ { "command": "vmstat 1 10", "description": "Report every 1 second, 10 times" },
2217
+ { "command": "vmstat -SM 1", "description": "Report in MB every second" },
2218
+ { "command": "vmstat -d", "description": "Show disk I/O statistics" },
2219
+ { "command": "vmstat -s", "description": "Show memory event counters" }
2220
+ ]
2221
+ },
2222
+ {
2223
+ "name": "iostat",
2224
+ "description": "Report CPU and I/O statistics for devices and partitions",
2225
+ "options": [
2226
+ { "name": "-c", "description": "Show CPU stats only" },
2227
+ { "name": "-d", "description": "Show device stats only" },
2228
+ { "name": "-h", "description": "Human-readable output" },
2229
+ { "name": "-x", "description": "Extended statistics" },
2230
+ { "name": "-p", "description": "Show stats for specific device", "takesValue": true },
2231
+ { "name": "-k", "description": "Display in kilobytes" },
2232
+ { "name": "-m", "description": "Display in megabytes" }
2233
+ ],
2234
+ "examples": [
2235
+ { "command": "iostat", "description": "Show CPU and device I/O stats" },
2236
+ { "command": "iostat -xh 1", "description": "Extended stats, human-readable, every second" },
2237
+ { "command": "iostat -d -p sda 2 5", "description": "Device sda stats every 2s, 5 times" }
2238
+ ]
2239
+ }
2240
+ ],
2241
+
2242
+ "user": [
2243
+ {
2244
+ "name": "useradd",
2245
+ "description": "Create a new user account",
2246
+ "options": [
2247
+ { "name": "-m", "description": "Create home directory" },
2248
+ { "name": "-M", "description": "Do not create home directory" },
2249
+ { "name": "-d", "description": "Home directory path", "takesValue": true },
2250
+ { "name": "-s", "description": "Login shell", "takesValue": true },
2251
+ { "name": "-g", "description": "Primary group", "takesValue": true },
2252
+ { "name": "-G", "description": "Supplementary groups (comma-separated)", "takesValue": true },
2253
+ { "name": "-u", "description": "UID", "takesValue": true },
2254
+ { "name": "-c", "description": "Comment/GECOS (full name)", "takesValue": true },
2255
+ { "name": "-e", "description": "Account expiry date (YYYY-MM-DD)", "takesValue": true },
2256
+ { "name": "-r", "description": "Create a system account" },
2257
+ { "name": "-p", "description": "Encrypted password", "takesValue": true },
2258
+ { "name": "-k", "description": "Skeleton directory", "takesValue": true }
2259
+ ],
2260
+ "examples": [
2261
+ { "command": "sudo useradd -m -s /bin/bash john", "description": "Create user with home dir and bash" },
2262
+ { "command": "sudo useradd -m -G sudo,docker -s /bin/bash dev", "description": "Create user with groups" },
2263
+ { "command": "sudo useradd -r -s /usr/sbin/nologin appuser", "description": "Create system/service user" },
2264
+ { "command": "sudo useradd -m -c 'John Doe' -G sudo john", "description": "With display name and sudo" }
2265
+ ]
2266
+ },
2267
+ {
2268
+ "name": "userdel",
2269
+ "description": "Delete a user account",
2270
+ "options": [
2271
+ { "name": "-r", "description": "Remove home directory and mail spool" },
2272
+ { "name": "-f", "description": "Force removal even if user is logged in" }
2273
+ ],
2274
+ "examples": [
2275
+ { "command": "sudo userdel john", "description": "Delete user (keep home dir)" },
2276
+ { "command": "sudo userdel -r john", "description": "Delete user and home directory" },
2277
+ { "command": "sudo userdel -rf john", "description": "Force delete user and home" }
2278
+ ]
2279
+ },
2280
+ {
2281
+ "name": "usermod",
2282
+ "description": "Modify a user account",
2283
+ "options": [
2284
+ { "name": "-l", "description": "Change login name", "takesValue": true },
2285
+ { "name": "-d", "description": "Change home directory", "takesValue": true },
2286
+ { "name": "-m", "description": "Move home directory contents to new location" },
2287
+ { "name": "-s", "description": "Change login shell", "takesValue": true },
2288
+ { "name": "-g", "description": "Change primary group", "takesValue": true },
2289
+ { "name": "-G", "description": "Set supplementary groups (replaces all)", "takesValue": true },
2290
+ { "name": "-aG", "description": "Append to supplementary groups", "takesValue": true },
2291
+ { "name": "-L", "description": "Lock user account" },
2292
+ { "name": "-U", "description": "Unlock user account" },
2293
+ { "name": "-e", "description": "Set expiry date", "takesValue": true },
2294
+ { "name": "-c", "description": "Change comment/GECOS", "takesValue": true },
2295
+ { "name": "-u", "description": "Change UID", "takesValue": true }
2296
+ ],
2297
+ "examples": [
2298
+ { "command": "sudo usermod -aG docker john", "description": "Add john to docker group" },
2299
+ { "command": "sudo usermod -aG sudo john", "description": "Grant sudo access" },
2300
+ { "command": "sudo usermod -s /bin/zsh john", "description": "Change shell to zsh" },
2301
+ { "command": "sudo usermod -L john", "description": "Lock user account" },
2302
+ { "command": "sudo usermod -U john", "description": "Unlock user account" },
2303
+ { "command": "sudo usermod -d /new/home -m john", "description": "Move home directory" },
2304
+ { "command": "sudo usermod -l newname oldname", "description": "Rename user" }
2305
+ ]
2306
+ },
2307
+ {
2308
+ "name": "groupadd",
2309
+ "description": "Create a new group",
2310
+ "options": [
2311
+ { "name": "-g", "description": "Specify GID", "takesValue": true },
2312
+ { "name": "-r", "description": "Create a system group" },
2313
+ { "name": "-f", "description": "Exit successfully if group exists" }
2314
+ ],
2315
+ "examples": [
2316
+ { "command": "sudo groupadd developers", "description": "Create developers group" },
2317
+ { "command": "sudo groupadd -g 1500 mygroup", "description": "Create with specific GID" },
2318
+ { "command": "sudo groupadd -r appgroup", "description": "Create system group" }
2319
+ ]
2320
+ },
2321
+ {
2322
+ "name": "groupdel",
2323
+ "description": "Delete a group",
2324
+ "options": [
2325
+ { "name": "-f", "description": "Force delete even if it is a user's primary group" }
2326
+ ],
2327
+ "examples": [
2328
+ { "command": "sudo groupdel developers", "description": "Delete developers group" }
2329
+ ]
2330
+ },
2331
+ {
2332
+ "name": "groupmod",
2333
+ "description": "Modify a group",
2334
+ "options": [
2335
+ { "name": "-n", "description": "Rename the group", "takesValue": true },
2336
+ { "name": "-g", "description": "Change GID", "takesValue": true }
2337
+ ],
2338
+ "examples": [
2339
+ { "command": "sudo groupmod -n newname oldname", "description": "Rename group" },
2340
+ { "command": "sudo groupmod -g 2000 mygroup", "description": "Change GID" }
2341
+ ]
2342
+ },
2343
+ {
2344
+ "name": "passwd",
2345
+ "description": "Change user password",
2346
+ "options": [
2347
+ { "name": "-l", "description": "Lock user password" },
2348
+ { "name": "-u", "description": "Unlock user password" },
2349
+ { "name": "-d", "description": "Delete password (make it passwordless)" },
2350
+ { "name": "-e", "description": "Expire password (force change on next login)" },
2351
+ { "name": "-S", "description": "Show password status" },
2352
+ { "name": "-n", "description": "Minimum days between changes", "takesValue": true },
2353
+ { "name": "-x", "description": "Maximum days before expiry", "takesValue": true },
2354
+ { "name": "-w", "description": "Warning days before expiry", "takesValue": true }
2355
+ ],
2356
+ "examples": [
2357
+ { "command": "passwd", "description": "Change your own password" },
2358
+ { "command": "sudo passwd john", "description": "Change john's password (as root)" },
2359
+ { "command": "sudo passwd -l john", "description": "Lock john's account" },
2360
+ { "command": "sudo passwd -u john", "description": "Unlock john's account" },
2361
+ { "command": "sudo passwd -e john", "description": "Force password change on next login" },
2362
+ { "command": "passwd -S john", "description": "Show password status" }
2363
+ ]
2364
+ },
2365
+ {
2366
+ "name": "chage",
2367
+ "description": "Change user password aging and expiry information",
2368
+ "options": [
2369
+ { "name": "-l", "description": "List aging information for the user" },
2370
+ { "name": "-d", "description": "Set last password change date", "takesValue": true },
2371
+ { "name": "-E", "description": "Set account expiration date (YYYY-MM-DD)", "takesValue": true },
2372
+ { "name": "-m", "description": "Minimum days between password changes", "takesValue": true },
2373
+ { "name": "-M", "description": "Maximum days password is valid", "takesValue": true },
2374
+ { "name": "-W", "description": "Days of warning before password expires", "takesValue": true },
2375
+ { "name": "-I", "description": "Days of inactivity after expiry before lock", "takesValue": true }
2376
+ ],
2377
+ "examples": [
2378
+ { "command": "chage -l john", "description": "View john's password aging info" },
2379
+ { "command": "sudo chage -M 90 john", "description": "Set 90-day password expiry" },
2380
+ { "command": "sudo chage -E 2026-12-31 john", "description": "Set account expiry date" },
2381
+ { "command": "sudo chage -d 0 john", "description": "Force password change now" }
2382
+ ]
2383
+ },
2384
+ {
2385
+ "name": "id",
2386
+ "description": "Print real and effective user and group IDs",
2387
+ "options": [
2388
+ { "name": "-u", "description": "Show only effective UID" },
2389
+ { "name": "-g", "description": "Show only effective GID" },
2390
+ { "name": "-G", "description": "Show all group IDs" },
2391
+ { "name": "-n", "description": "Show names instead of numbers" }
2392
+ ],
2393
+ "examples": [
2394
+ { "command": "id", "description": "Show current user's UID, GID, groups" },
2395
+ { "command": "id john", "description": "Show john's UID, GID, groups" },
2396
+ { "command": "id -u", "description": "Show current UID" },
2397
+ { "command": "id -nG", "description": "Show group names only" }
2398
+ ]
2399
+ },
2400
+ {
2401
+ "name": "groups",
2402
+ "description": "Print group memberships for a user",
2403
+ "options": [],
2404
+ "examples": [
2405
+ { "command": "groups", "description": "Show current user's groups" },
2406
+ { "command": "groups john", "description": "Show john's groups" }
2407
+ ]
2408
+ },
2409
+ {
2410
+ "name": "su",
2411
+ "description": "Switch user or run command as another user",
2412
+ "options": [
2413
+ { "name": "-", "description": "Login shell (full environment switch)" },
2414
+ { "name": "-l", "description": "Same as - (login shell)" },
2415
+ { "name": "-c", "description": "Run a single command as the user", "takesValue": true },
2416
+ { "name": "-s", "description": "Specify shell to use", "takesValue": true }
2417
+ ],
2418
+ "examples": [
2419
+ { "command": "su -", "description": "Switch to root with login shell" },
2420
+ { "command": "su - john", "description": "Switch to john's account" },
2421
+ { "command": "su -c 'whoami' john", "description": "Run command as john" }
2422
+ ]
2423
+ },
2424
+ {
2425
+ "name": "visudo",
2426
+ "description": "Safely edit the sudoers file (with syntax checking)",
2427
+ "options": [
2428
+ { "name": "-f", "description": "Edit a specific file instead of /etc/sudoers", "takesValue": true },
2429
+ { "name": "-c", "description": "Check syntax only" },
2430
+ { "name": "-s", "description": "Strict mode" }
2431
+ ],
2432
+ "examples": [
2433
+ { "command": "sudo visudo", "description": "Edit /etc/sudoers safely" },
2434
+ { "command": "sudo visudo -f /etc/sudoers.d/myuser", "description": "Edit custom sudoers file" },
2435
+ { "command": "sudo visudo -c", "description": "Check sudoers syntax" }
2436
+ ]
2437
+ },
2438
+ {
2439
+ "name": "getent",
2440
+ "description": "Get entries from Name Service Switch (NSS) databases (passwd, group, hosts, etc.)",
2441
+ "options": [],
2442
+ "examples": [
2443
+ { "command": "getent passwd john", "description": "Get john's passwd entry" },
2444
+ { "command": "getent group docker", "description": "Get docker group entry (show members)" },
2445
+ { "command": "getent hosts example.com", "description": "Resolve hostname" },
2446
+ { "command": "getent passwd", "description": "List all users" },
2447
+ { "command": "getent services ssh", "description": "Get SSH service port" }
2448
+ ]
2449
+ },
2450
+ {
2451
+ "name": "chsh",
2452
+ "description": "Change user's login shell",
2453
+ "options": [
2454
+ { "name": "-s", "description": "Specify new shell", "takesValue": true },
2455
+ { "name": "-l", "description": "List available shells" }
2456
+ ],
2457
+ "examples": [
2458
+ { "command": "chsh -s /bin/zsh", "description": "Change your shell to zsh" },
2459
+ { "command": "sudo chsh -s /bin/bash john", "description": "Change john's shell to bash" },
2460
+ { "command": "chsh -l", "description": "List available shells" },
2461
+ { "command": "cat /etc/shells", "description": "Show valid login shells" }
2462
+ ]
2463
+ },
2464
+ {
2465
+ "name": "newgrp",
2466
+ "description": "Switch to a new group (change primary group for current session)",
2467
+ "options": [],
2468
+ "examples": [
2469
+ { "command": "newgrp docker", "description": "Switch primary group to docker" },
2470
+ { "command": "newgrp -", "description": "Reset to default group" }
2471
+ ]
2472
+ },
2473
+ {
2474
+ "name": "gpasswd",
2475
+ "description": "Administer /etc/group and /etc/gshadow",
2476
+ "options": [
2477
+ { "name": "-a", "description": "Add user to group", "takesValue": true },
2478
+ { "name": "-d", "description": "Remove user from group", "takesValue": true },
2479
+ { "name": "-A", "description": "Set list of group administrators", "takesValue": true },
2480
+ { "name": "-M", "description": "Set list of group members", "takesValue": true },
2481
+ { "name": "-r", "description": "Remove group password" }
2482
+ ],
2483
+ "examples": [
2484
+ { "command": "sudo gpasswd -a john docker", "description": "Add john to docker group" },
2485
+ { "command": "sudo gpasswd -d john docker", "description": "Remove john from docker group" },
2486
+ { "command": "sudo gpasswd -M john,jane developers", "description": "Set group members" }
2487
+ ]
2488
+ }
2489
+ ],
2490
+
2491
+ "disk": [
2492
+ {
2493
+ "name": "df",
2494
+ "description": "Report filesystem disk space usage",
2495
+ "options": [
2496
+ { "name": "-h", "description": "Human-readable sizes (KB, MB, GB)" },
2497
+ { "name": "-T", "description": "Show filesystem type" },
2498
+ { "name": "-i", "description": "Show inode information instead of blocks" },
2499
+ { "name": "-a", "description": "Include pseudo/dummy filesystems" },
2500
+ { "name": "-t", "description": "Limit to filesystem type", "takesValue": true },
2501
+ { "name": "-x", "description": "Exclude filesystem type", "takesValue": true },
2502
+ { "name": "--total", "description": "Show grand total" },
2503
+ { "name": "-l", "description": "Limit to local filesystems" }
2504
+ ],
2505
+ "examples": [
2506
+ { "command": "df -h", "description": "Show disk usage human-readable" },
2507
+ { "command": "df -hT", "description": "Show with filesystem types" },
2508
+ { "command": "df -h /", "description": "Show root partition usage" },
2509
+ { "command": "df -i", "description": "Show inode usage" },
2510
+ { "command": "df -h --total", "description": "Show total disk usage" },
2511
+ { "command": "df -hT -x tmpfs -x devtmpfs", "description": "Exclude virtual filesystems" }
2512
+ ]
2513
+ },
2514
+ {
2515
+ "name": "du",
2516
+ "description": "Estimate file/directory space usage",
2517
+ "options": [
2518
+ { "name": "-h", "description": "Human-readable sizes" },
2519
+ { "name": "-s", "description": "Show only total for each argument" },
2520
+ { "name": "-a", "description": "Show size for all files, not just directories" },
2521
+ { "name": "-c", "description": "Show grand total" },
2522
+ { "name": "-d", "description": "Max depth of directory tree", "takesValue": true },
2523
+ { "name": "--max-depth", "description": "Same as -d" },
2524
+ { "name": "-x", "description": "Stay on same filesystem (don't cross mount points)" },
2525
+ { "name": "--exclude", "description": "Exclude pattern", "takesValue": true },
2526
+ { "name": "--apparent-size", "description": "Show apparent size (not disk blocks)" },
2527
+ { "name": "-L", "description": "Follow symlinks" }
2528
+ ],
2529
+ "examples": [
2530
+ { "command": "du -sh *", "description": "Size of each item in current dir" },
2531
+ { "command": "du -sh /var/log", "description": "Total size of /var/log" },
2532
+ { "command": "du -sh * | sort -h", "description": "Sort by size" },
2533
+ { "command": "du -h -d 1 /", "description": "Top-level directory sizes" },
2534
+ { "command": "du -sh --exclude='*.log' /var", "description": "Exclude log files" },
2535
+ { "command": "du -sh * | sort -rh | head -10", "description": "Top 10 largest dirs" }
2536
+ ]
2537
+ },
2538
+ {
2539
+ "name": "ncdu",
2540
+ "description": "NCurses disk usage analyzer (interactive du)",
2541
+ "options": [
2542
+ { "name": "-x", "description": "Stay on same filesystem" },
2543
+ { "name": "-q", "description": "Quiet mode (no progress)" },
2544
+ { "name": "-r", "description": "Read-only mode (no delete)" },
2545
+ { "name": "-o", "description": "Export scan to file", "takesValue": true },
2546
+ { "name": "-f", "description": "Import scan from file", "takesValue": true },
2547
+ { "name": "-e", "description": "Enable extended information" },
2548
+ { "name": "--exclude", "description": "Exclude pattern", "takesValue": true }
2549
+ ],
2550
+ "examples": [
2551
+ { "command": "ncdu /", "description": "Analyze root filesystem" },
2552
+ { "command": "ncdu -x /", "description": "Analyze root (stay on device)" },
2553
+ { "command": "ncdu --exclude .git -x .", "description": "Analyze excluding .git" },
2554
+ { "command": "ncdu -o scan.json /home && ncdu -f scan.json", "description": "Export and view later" }
2555
+ ]
2556
+ },
2557
+ {
2558
+ "name": "mount",
2559
+ "description": "Mount a filesystem",
2560
+ "options": [
2561
+ { "name": "-t", "description": "Filesystem type (ext4, xfs, nfs, vfat, ntfs)", "takesValue": true },
2562
+ { "name": "-o", "description": "Mount options (ro, rw, noexec, nosuid, etc.)", "takesValue": true },
2563
+ { "name": "-a", "description": "Mount all filesystems in /etc/fstab" },
2564
+ { "name": "-r", "description": "Mount read-only" },
2565
+ { "name": "-w", "description": "Mount read-write" },
2566
+ { "name": "-L", "description": "Mount by label", "takesValue": true },
2567
+ { "name": "-U", "description": "Mount by UUID", "takesValue": true },
2568
+ { "name": "--bind", "description": "Bind mount (mount directory to another location)" },
2569
+ { "name": "-v", "description": "Verbose" }
2570
+ ],
2571
+ "examples": [
2572
+ { "command": "mount", "description": "Show all mounted filesystems" },
2573
+ { "command": "mount | column -t", "description": "Show mounts in table format" },
2574
+ { "command": "sudo mount /dev/sdb1 /mnt/usb", "description": "Mount USB drive" },
2575
+ { "command": "sudo mount -t nfs server:/share /mnt/nfs", "description": "Mount NFS share" },
2576
+ { "command": "sudo mount -o loop image.iso /mnt/iso", "description": "Mount ISO file" },
2577
+ { "command": "sudo mount -o remount,rw /", "description": "Remount root as read-write" },
2578
+ { "command": "sudo mount --bind /src /dst", "description": "Bind mount directory" },
2579
+ { "command": "sudo mount -a", "description": "Mount all from /etc/fstab" }
2580
+ ]
2581
+ },
2582
+ {
2583
+ "name": "umount",
2584
+ "description": "Unmount a filesystem",
2585
+ "options": [
2586
+ { "name": "-l", "description": "Lazy unmount (detach now, clean up later)" },
2587
+ { "name": "-f", "description": "Force unmount (NFS)" },
2588
+ { "name": "-R", "description": "Recursively unmount" },
2589
+ { "name": "-a", "description": "Unmount all" }
2590
+ ],
2591
+ "examples": [
2592
+ { "command": "sudo umount /mnt/usb", "description": "Unmount USB drive" },
2593
+ { "command": "sudo umount -l /mnt/stuck", "description": "Lazy unmount busy mountpoint" },
2594
+ { "command": "sudo umount /dev/sdb1", "description": "Unmount by device" }
2595
+ ]
2596
+ },
2597
+ {
2598
+ "name": "fdisk",
2599
+ "description": "Manipulate disk partition table (MBR/GPT)",
2600
+ "options": [
2601
+ { "name": "-l", "description": "List partition tables of all disks" },
2602
+ { "name": "-x", "description": "Extra functionality (expert)" },
2603
+ { "name": "-n", "description": "Create new partition" },
2604
+ { "name": "-d", "description": "Delete a partition" },
2605
+ { "name": "-t", "description": "Change partition type" },
2606
+ { "name": "-w", "description": "Write changes and exit" },
2607
+ { "name": "-s", "description": "Show partition size", "takesValue": true }
2608
+ ],
2609
+ "examples": [
2610
+ { "command": "sudo fdisk -l", "description": "List all disk partitions" },
2611
+ { "command": "sudo fdisk -l /dev/sda", "description": "Show sda partitions" },
2612
+ { "command": "sudo fdisk /dev/sdb", "description": "Interactive partition editing" }
2613
+ ]
2614
+ },
2615
+ {
2616
+ "name": "parted",
2617
+ "description": "GNU partition manipulation (supports GPT, > 2TB disks)",
2618
+ "subcommands": [
2619
+ { "name": "print", "description": "Print partition table" },
2620
+ { "name": "mklabel", "description": "Create partition table (gpt, msdos)" },
2621
+ { "name": "mkpart", "description": "Create a partition" },
2622
+ { "name": "rm", "description": "Remove a partition" },
2623
+ { "name": "resizepart", "description": "Resize a partition" },
2624
+ { "name": "set", "description": "Set partition flag (boot, lvm, raid)" },
2625
+ { "name": "align-check", "description": "Check partition alignment" }
2626
+ ],
2627
+ "options": [
2628
+ { "name": "-l", "description": "List partitions on all devices" },
2629
+ { "name": "-s", "description": "Script mode (no prompts)" }
2630
+ ],
2631
+ "examples": [
2632
+ { "command": "sudo parted -l", "description": "List all disk partitions" },
2633
+ { "command": "sudo parted /dev/sda print", "description": "Show sda partition table" },
2634
+ { "command": "sudo parted /dev/sdb mklabel gpt", "description": "Create GPT label" },
2635
+ { "command": "sudo parted /dev/sdb mkpart primary ext4 0% 100%", "description": "Create ext4 partition" }
2636
+ ]
2637
+ },
2638
+ {
2639
+ "name": "lsblk",
2640
+ "description": "List information about block devices (disks, partitions, LVM)",
2641
+ "options": [
2642
+ { "name": "-f", "description": "Show filesystem info (type, label, UUID, mount)" },
2643
+ { "name": "-a", "description": "Show all devices (including empty)" },
2644
+ { "name": "-p", "description": "Show full device paths" },
2645
+ { "name": "-o", "description": "Specify output columns", "takesValue": true },
2646
+ { "name": "-J", "description": "JSON output" },
2647
+ { "name": "-t", "description": "Show topology information" },
2648
+ { "name": "-d", "description": "Do not show partitions (disks only)" },
2649
+ { "name": "-n", "description": "No header" }
2650
+ ],
2651
+ "examples": [
2652
+ { "command": "lsblk", "description": "Show block device tree" },
2653
+ { "command": "lsblk -f", "description": "Show filesystems, labels, UUIDs" },
2654
+ { "command": "lsblk -o NAME,SIZE,TYPE,MOUNTPOINT,FSTYPE", "description": "Custom columns" },
2655
+ { "command": "lsblk -d", "description": "Show only disks (no partitions)" },
2656
+ { "command": "lsblk -J", "description": "JSON output" }
2657
+ ]
2658
+ },
2659
+ {
2660
+ "name": "blkid",
2661
+ "description": "Locate/print block device attributes (UUID, TYPE, LABEL)",
2662
+ "options": [
2663
+ { "name": "-o", "description": "Output format (full, value, device, list)", "takesValue": true },
2664
+ { "name": "-s", "description": "Show only specified tag (UUID, TYPE, LABEL)", "takesValue": true },
2665
+ { "name": "-L", "description": "Find device by label", "takesValue": true },
2666
+ { "name": "-U", "description": "Find device by UUID", "takesValue": true }
2667
+ ],
2668
+ "examples": [
2669
+ { "command": "sudo blkid", "description": "Show all block device IDs" },
2670
+ { "command": "sudo blkid /dev/sda1", "description": "Show sda1 UUID and type" },
2671
+ { "command": "blkid -s UUID -o value /dev/sda1", "description": "Get only UUID" },
2672
+ { "command": "blkid -L DATA", "description": "Find device with label DATA" }
2673
+ ]
2674
+ },
2675
+ {
2676
+ "name": "mkfs",
2677
+ "description": "Build a filesystem on a device/partition",
2678
+ "subcommands": [
2679
+ { "name": "mkfs.ext4", "description": "Create ext4 filesystem" },
2680
+ { "name": "mkfs.xfs", "description": "Create XFS filesystem" },
2681
+ { "name": "mkfs.btrfs", "description": "Create Btrfs filesystem" },
2682
+ { "name": "mkfs.vfat", "description": "Create FAT32 filesystem" },
2683
+ { "name": "mkfs.ntfs", "description": "Create NTFS filesystem" },
2684
+ { "name": "mkfs.exfat", "description": "Create exFAT filesystem" }
2685
+ ],
2686
+ "options": [
2687
+ { "name": "-t", "description": "Filesystem type", "takesValue": true },
2688
+ { "name": "-L", "description": "Set volume label", "takesValue": true },
2689
+ { "name": "-n", "description": "Dry run" },
2690
+ { "name": "-V", "description": "Verbose" }
2691
+ ],
2692
+ "examples": [
2693
+ { "command": "sudo mkfs.ext4 /dev/sdb1", "description": "Format as ext4" },
2694
+ { "command": "sudo mkfs.ext4 -L DATA /dev/sdb1", "description": "ext4 with label" },
2695
+ { "command": "sudo mkfs.xfs /dev/sdb1", "description": "Format as XFS" },
2696
+ { "command": "sudo mkfs.vfat -F 32 /dev/sdb1", "description": "Format as FAT32" },
2697
+ { "command": "sudo mkfs -t ext4 /dev/sdb1", "description": "Alternative syntax" }
2698
+ ]
2699
+ },
2700
+ {
2701
+ "name": "fsck",
2702
+ "description": "Check and repair a Linux filesystem (unmount first!)",
2703
+ "options": [
2704
+ { "name": "-t", "description": "Filesystem type", "takesValue": true },
2705
+ { "name": "-a", "description": "Automatically repair (no questions)" },
2706
+ { "name": "-y", "description": "Answer yes to all questions" },
2707
+ { "name": "-n", "description": "No changes (dry run)" },
2708
+ { "name": "-f", "description": "Force check even if clean" },
2709
+ { "name": "-C", "description": "Show progress bar" },
2710
+ { "name": "-V", "description": "Verbose" }
2711
+ ],
2712
+ "examples": [
2713
+ { "command": "sudo fsck /dev/sdb1", "description": "Check filesystem" },
2714
+ { "command": "sudo fsck -y /dev/sdb1", "description": "Auto-repair filesystem" },
2715
+ { "command": "sudo fsck.ext4 -f /dev/sda1", "description": "Force check ext4" },
2716
+ { "command": "sudo fsck -n /dev/sdb1", "description": "Dry run (no changes)" }
2717
+ ]
2718
+ },
2719
+ {
2720
+ "name": "tune2fs",
2721
+ "description": "Adjust tunable filesystem parameters on ext2/ext3/ext4",
2722
+ "options": [
2723
+ { "name": "-l", "description": "List superblock contents" },
2724
+ { "name": "-c", "description": "Set max mount count before check", "takesValue": true },
2725
+ { "name": "-i", "description": "Set interval between checks", "takesValue": true },
2726
+ { "name": "-L", "description": "Set volume label", "takesValue": true },
2727
+ { "name": "-m", "description": "Set reserved blocks percentage", "takesValue": true },
2728
+ { "name": "-o", "description": "Set default mount options", "takesValue": true },
2729
+ { "name": "-O", "description": "Set filesystem features", "takesValue": true },
2730
+ { "name": "-j", "description": "Add journal (convert ext2 to ext3)" }
2731
+ ],
2732
+ "examples": [
2733
+ { "command": "sudo tune2fs -l /dev/sda1", "description": "Show filesystem info" },
2734
+ { "command": "sudo tune2fs -L backup /dev/sdb1", "description": "Set label to 'backup'" },
2735
+ { "command": "sudo tune2fs -m 1 /dev/sda1", "description": "Reserve 1% for root" },
2736
+ { "command": "sudo tune2fs -c 30 /dev/sda1", "description": "Check every 30 mounts" }
2737
+ ]
2738
+ },
2739
+ {
2740
+ "name": "resize2fs",
2741
+ "description": "Resize ext2/ext3/ext4 filesystems",
2742
+ "options": [
2743
+ { "name": "-p", "description": "Show progress" },
2744
+ { "name": "-f", "description": "Force resize" },
2745
+ { "name": "-M", "description": "Shrink to minimum size" }
2746
+ ],
2747
+ "examples": [
2748
+ { "command": "sudo resize2fs /dev/sda1", "description": "Expand to fill partition" },
2749
+ { "command": "sudo resize2fs /dev/sda1 50G", "description": "Resize to 50GB" },
2750
+ { "command": "sudo resize2fs -M /dev/sda1", "description": "Shrink to minimum" }
2751
+ ]
2752
+ },
2753
+ {
2754
+ "name": "mkswap",
2755
+ "description": "Set up a Linux swap area on device or file",
2756
+ "options": [
2757
+ { "name": "-L", "description": "Set swap label", "takesValue": true },
2758
+ { "name": "-f", "description": "Force, even if partition has data" }
2759
+ ],
2760
+ "examples": [
2761
+ { "command": "sudo mkswap /dev/sdb2", "description": "Create swap on partition" },
2762
+ { "command": "sudo dd if=/dev/zero of=/swapfile bs=1M count=2048 && sudo mkswap /swapfile", "description": "Create 2GB swap file" }
2763
+ ]
2764
+ },
2765
+ {
2766
+ "name": "swapon",
2767
+ "description": "Enable swap space",
2768
+ "options": [
2769
+ { "name": "-a", "description": "Enable all swaps from /etc/fstab" },
2770
+ { "name": "-s", "description": "Show swap summary" },
2771
+ { "name": "--show", "description": "Show swap devices in table format" },
2772
+ { "name": "-p", "description": "Set priority", "takesValue": true }
2773
+ ],
2774
+ "examples": [
2775
+ { "command": "sudo swapon /swapfile", "description": "Enable swap file" },
2776
+ { "command": "swapon --show", "description": "Show active swap" },
2777
+ { "command": "free -h", "description": "Check swap usage" }
2778
+ ]
2779
+ },
2780
+ {
2781
+ "name": "swapoff",
2782
+ "description": "Disable swap space",
2783
+ "options": [
2784
+ { "name": "-a", "description": "Disable all swap" }
2785
+ ],
2786
+ "examples": [
2787
+ { "command": "sudo swapoff /swapfile", "description": "Disable swap file" },
2788
+ { "command": "sudo swapoff -a", "description": "Disable all swap" }
2789
+ ]
2790
+ },
2791
+ {
2792
+ "name": "smartctl",
2793
+ "description": "Control and monitor S.M.A.R.T. on hard drives (disk health)",
2794
+ "options": [
2795
+ { "name": "-a", "description": "Print all SMART info" },
2796
+ { "name": "-i", "description": "Print drive identity" },
2797
+ { "name": "-H", "description": "Check drive health status" },
2798
+ { "name": "-t", "description": "Run self-test (short, long, conveyance)", "takesValue": true },
2799
+ { "name": "-l", "description": "Show log (error, selftest)", "takesValue": true },
2800
+ { "name": "-A", "description": "Print SMART attributes" },
2801
+ { "name": "-d", "description": "Device type", "takesValue": true }
2802
+ ],
2803
+ "examples": [
2804
+ { "command": "sudo smartctl -a /dev/sda", "description": "Full SMART report" },
2805
+ { "command": "sudo smartctl -H /dev/sda", "description": "Quick health check" },
2806
+ { "command": "sudo smartctl -t short /dev/sda", "description": "Run short self-test" },
2807
+ { "command": "sudo smartctl -l selftest /dev/sda", "description": "Show self-test log" }
2808
+ ]
2809
+ },
2810
+ {
2811
+ "name": "hdparm",
2812
+ "description": "Get/set SATA/IDE device parameters",
2813
+ "options": [
2814
+ { "name": "-i", "description": "Display drive identification info" },
2815
+ { "name": "-I", "description": "Detailed drive info (from drive)" },
2816
+ { "name": "-t", "description": "Perform device read timings (benchmark)" },
2817
+ { "name": "-T", "description": "Perform cache read timings" },
2818
+ { "name": "-g", "description": "Display drive geometry" },
2819
+ { "name": "-W", "description": "Get/set write-caching (0/1)", "takesValue": true }
2820
+ ],
2821
+ "examples": [
2822
+ { "command": "sudo hdparm -Tt /dev/sda", "description": "Disk benchmark (cached + buffered)" },
2823
+ { "command": "sudo hdparm -i /dev/sda", "description": "Show drive identification" },
2824
+ { "command": "sudo hdparm -I /dev/sda", "description": "Detailed drive info" }
2825
+ ]
2826
+ },
2827
+ {
2828
+ "name": "iotop",
2829
+ "description": "Interactive I/O monitor (like top for disk activity)",
2830
+ "options": [
2831
+ { "name": "-o", "description": "Show only processes doing I/O" },
2832
+ { "name": "-b", "description": "Batch mode (for scripts)" },
2833
+ { "name": "-n", "description": "Number of iterations", "takesValue": true },
2834
+ { "name": "-d", "description": "Delay between updates", "takesValue": true },
2835
+ { "name": "-p", "description": "Monitor specific PIDs", "takesValue": true },
2836
+ { "name": "-u", "description": "Monitor specific user", "takesValue": true },
2837
+ { "name": "-a", "description": "Show accumulated I/O" }
2838
+ ],
2839
+ "examples": [
2840
+ { "command": "sudo iotop", "description": "Interactive I/O monitor" },
2841
+ { "command": "sudo iotop -o", "description": "Show only active I/O" },
2842
+ { "command": "sudo iotop -b -n 5", "description": "5 iterations in batch mode" },
2843
+ { "command": "sudo iotop -ao", "description": "Accumulated I/O, active only" }
2844
+ ]
2845
+ }
2846
+ ],
2847
+
2848
+ "firewall": [
2849
+ {
2850
+ "name": "firewall-cmd",
2851
+ "description": "FirewallD command-line client (Fedora/RHEL/CentOS default firewall)",
2852
+ "subcommands": [],
2853
+ "options": [
2854
+ { "name": "--state", "description": "Check firewalld running state" },
2855
+ { "name": "--reload", "description": "Reload firewall rules" },
2856
+ { "name": "--complete-reload", "description": "Complete reload (drop all connections)" },
2857
+ { "name": "--permanent", "description": "Make change persistent (survives reboot)" },
2858
+ { "name": "--zone", "description": "Specify zone (public, trusted, home, etc.)", "takesValue": true },
2859
+ { "name": "--get-zones", "description": "List available zones" },
2860
+ { "name": "--get-default-zone", "description": "Show default zone" },
2861
+ { "name": "--set-default-zone", "description": "Set default zone", "takesValue": true },
2862
+ { "name": "--get-active-zones", "description": "Show active zones and interfaces" },
2863
+ { "name": "--list-all", "description": "List all rules in zone" },
2864
+ { "name": "--list-all-zones", "description": "List rules for all zones" },
2865
+ { "name": "--add-service", "description": "Allow a service (http, https, ssh)", "takesValue": true },
2866
+ { "name": "--remove-service", "description": "Remove a service", "takesValue": true },
2867
+ { "name": "--list-services", "description": "List allowed services" },
2868
+ { "name": "--add-port", "description": "Open a port (e.g. 8080/tcp)", "takesValue": true },
2869
+ { "name": "--remove-port", "description": "Close a port", "takesValue": true },
2870
+ { "name": "--list-ports", "description": "List open ports" },
2871
+ { "name": "--add-rich-rule", "description": "Add rich rule for complex filtering", "takesValue": true },
2872
+ { "name": "--remove-rich-rule", "description": "Remove a rich rule", "takesValue": true },
2873
+ { "name": "--add-source", "description": "Add source IP/subnet to zone", "takesValue": true },
2874
+ { "name": "--add-forward-port", "description": "Add port forwarding rule", "takesValue": true },
2875
+ { "name": "--add-masquerade", "description": "Enable masquerading (NAT)" },
2876
+ { "name": "--query-masquerade", "description": "Check if masquerading is enabled" }
2877
+ ],
2878
+ "examples": [
2879
+ { "command": "sudo firewall-cmd --state", "description": "Check if firewalld is running" },
2880
+ { "command": "sudo firewall-cmd --list-all", "description": "Show all rules in default zone" },
2881
+ { "command": "sudo firewall-cmd --get-active-zones", "description": "Show active zones" },
2882
+ { "command": "sudo firewall-cmd --permanent --add-service=http", "description": "Allow HTTP permanently" },
2883
+ { "command": "sudo firewall-cmd --permanent --add-service=https", "description": "Allow HTTPS permanently" },
2884
+ { "command": "sudo firewall-cmd --permanent --add-port=8080/tcp", "description": "Open port 8080" },
2885
+ { "command": "sudo firewall-cmd --reload", "description": "Apply permanent changes" },
2886
+ { "command": "sudo firewall-cmd --permanent --add-rich-rule='rule family=ipv4 source address=10.0.0.0/8 accept'", "description": "Rich rule: allow subnet" },
2887
+ { "command": "sudo firewall-cmd --permanent --add-forward-port=port=80:proto=tcp:toport=8080", "description": "Port forward 80->8080" },
2888
+ { "command": "sudo firewall-cmd --list-all-zones", "description": "Show all zone configs" }
2889
+ ]
2890
+ },
2891
+ {
2892
+ "name": "fail2ban-client",
2893
+ "description": "Control fail2ban server (intrusion prevention, ban IPs after failed logins)",
2894
+ "subcommands": [
2895
+ { "name": "status", "description": "Show fail2ban status", "args": [{ "name": "jail", "description": "Jail name (e.g. sshd)", "required": false }] },
2896
+ { "name": "start", "description": "Start fail2ban" },
2897
+ { "name": "stop", "description": "Stop fail2ban" },
2898
+ { "name": "restart", "description": "Restart fail2ban" },
2899
+ { "name": "reload", "description": "Reload configuration" },
2900
+ { "name": "set", "description": "Set jail options", "subcommands": [
2901
+ { "name": "banip", "description": "Manually ban an IP" },
2902
+ { "name": "unbanip", "description": "Unban an IP" },
2903
+ { "name": "bantime", "description": "Set ban duration" },
2904
+ { "name": "maxretry", "description": "Set max retries" }
2905
+ ]},
2906
+ { "name": "get", "description": "Get jail options" },
2907
+ { "name": "banned", "description": "Show all banned IPs" }
2908
+ ],
2909
+ "examples": [
2910
+ { "command": "sudo fail2ban-client status", "description": "Show overall status and jails" },
2911
+ { "command": "sudo fail2ban-client status sshd", "description": "Show SSH jail status and banned IPs" },
2912
+ { "command": "sudo fail2ban-client set sshd banip 1.2.3.4", "description": "Manually ban IP" },
2913
+ { "command": "sudo fail2ban-client set sshd unbanip 1.2.3.4", "description": "Unban IP" },
2914
+ { "command": "sudo fail2ban-client restart", "description": "Restart fail2ban" },
2915
+ { "command": "sudo fail2ban-client banned", "description": "List all banned IPs" }
2916
+ ]
2917
+ },
2918
+ {
2919
+ "name": "sestatus",
2920
+ "description": "Display SELinux status (Fedora/RHEL/CentOS)",
2921
+ "options": [
2922
+ { "name": "-v", "description": "Verbose: show file/process/port contexts" },
2923
+ { "name": "-b", "description": "Show boolean values" }
2924
+ ],
2925
+ "examples": [
2926
+ { "command": "sestatus", "description": "Show SELinux status and mode" },
2927
+ { "command": "sestatus -v", "description": "Verbose SELinux status" },
2928
+ { "command": "sestatus -b", "description": "Show SELinux booleans" }
2929
+ ]
2930
+ },
2931
+ {
2932
+ "name": "setenforce",
2933
+ "description": "Set SELinux mode (enforcing/permissive) temporarily",
2934
+ "options": [],
2935
+ "examples": [
2936
+ { "command": "sudo setenforce 0", "description": "Set SELinux to permissive" },
2937
+ { "command": "sudo setenforce 1", "description": "Set SELinux to enforcing" }
2938
+ ]
2939
+ },
2940
+ {
2941
+ "name": "getenforce",
2942
+ "description": "Show current SELinux mode",
2943
+ "options": [],
2944
+ "examples": [
2945
+ { "command": "getenforce", "description": "Returns: Enforcing, Permissive, or Disabled" }
2946
+ ]
2947
+ },
2948
+ {
2949
+ "name": "setsebool",
2950
+ "description": "Set SELinux boolean values",
2951
+ "options": [
2952
+ { "name": "-P", "description": "Make change persistent across reboots" }
2953
+ ],
2954
+ "examples": [
2955
+ { "command": "sudo setsebool -P httpd_can_network_connect on", "description": "Allow HTTPD network access" },
2956
+ { "command": "sudo setsebool -P httpd_can_sendmail on", "description": "Allow HTTPD to send mail" },
2957
+ { "command": "getsebool -a | grep httpd", "description": "List all httpd booleans" }
2958
+ ]
2959
+ },
2960
+ {
2961
+ "name": "aa-status",
2962
+ "description": "Show AppArmor status (Ubuntu/Debian)",
2963
+ "options": [],
2964
+ "examples": [
2965
+ { "command": "sudo aa-status", "description": "Show AppArmor profiles and their mode" }
2966
+ ]
2967
+ },
2968
+ {
2969
+ "name": "aa-enforce",
2970
+ "description": "Set an AppArmor profile to enforce mode",
2971
+ "options": [],
2972
+ "examples": [
2973
+ { "command": "sudo aa-enforce /etc/apparmor.d/usr.sbin.mysqld", "description": "Enforce MySQL profile" }
2974
+ ]
2975
+ },
2976
+ {
2977
+ "name": "aa-complain",
2978
+ "description": "Set an AppArmor profile to complain (log-only) mode",
2979
+ "options": [],
2980
+ "examples": [
2981
+ { "command": "sudo aa-complain /etc/apparmor.d/usr.sbin.mysqld", "description": "Set MySQL to complain mode" }
2982
+ ]
2983
+ }
2984
+ ],
2985
+ "misc": [
2986
+ {
2987
+ "name": "modprobe",
2988
+ "description": "Add or remove kernel modules",
2989
+ "options": [
2990
+ { "name": "-r", "description": "Remove module" },
2991
+ { "name": "-v", "description": "Verbose" },
2992
+ { "name": "-n", "description": "Dry run" },
2993
+ { "name": "--show-depends", "description": "Show module dependencies" }
2994
+ ],
2995
+ "examples": [
2996
+ { "command": "sudo modprobe vboxdrv", "description": "Load VirtualBox driver module" },
2997
+ { "command": "sudo modprobe -r snd_hda_intel", "description": "Remove sound driver module" },
2998
+ { "command": "modprobe --show-depends ext4", "description": "Show ext4 dependencies" }
2999
+ ]
3000
+ },
3001
+ {
3002
+ "name": "lsmod",
3003
+ "description": "Show the status of loaded kernel modules",
3004
+ "options": [],
3005
+ "examples": [
3006
+ { "command": "lsmod", "description": "List all loaded modules" },
3007
+ { "command": "lsmod | grep nvidia", "description": "Check if nvidia module is loaded" },
3008
+ { "command": "lsmod | wc -l", "description": "Count loaded modules" }
3009
+ ]
3010
+ },
3011
+ {
3012
+ "name": "insmod",
3013
+ "description": "Insert a module into the Linux kernel (low-level)",
3014
+ "options": [],
3015
+ "examples": [
3016
+ { "command": "sudo insmod /lib/modules/$(uname -r)/kernel/drivers/net/tun.ko", "description": "Insert TUN module" }
3017
+ ]
3018
+ },
3019
+ {
3020
+ "name": "rmmod",
3021
+ "description": "Remove a module from the Linux kernel (low-level)",
3022
+ "options": [
3023
+ { "name": "-f", "description": "Force removal" },
3024
+ { "name": "-v", "description": "Verbose" }
3025
+ ],
3026
+ "examples": [
3027
+ { "command": "sudo rmmod snd_hda_intel", "description": "Remove sound module" }
3028
+ ]
3029
+ },
3030
+ {
3031
+ "name": "depmod",
3032
+ "description": "Generate modules.dep and map files for kernel modules",
3033
+ "options": [
3034
+ { "name": "-a", "description": "Probe all modules" },
3035
+ { "name": "-n", "description": "Dry run, output to stdout" }
3036
+ ],
3037
+ "examples": [
3038
+ { "command": "sudo depmod -a", "description": "Regenerate module dependency list" },
3039
+ { "command": "depmod -n | grep ext4", "description": "Show ext4 dependencies (dry run)" }
3040
+ ]
3041
+ },
3042
+ {
3043
+ "name": "md5sum",
3044
+ "description": "Compute and check MD5 message digest",
3045
+ "options": [
3046
+ { "name": "-c", "description": "Read checksums from file and verify" },
3047
+ { "name": "--quiet", "description": "Only print failures" }
3048
+ ],
3049
+ "examples": [
3050
+ { "command": "md5sum file.iso", "description": "Get MD5 hash of file" },
3051
+ { "command": "md5sum -c checksums.md5", "description": "Verify checksums" },
3052
+ { "command": "echo -n 'hello' | md5sum", "description": "Hash a string" }
3053
+ ]
3054
+ },
3055
+ {
3056
+ "name": "sha256sum",
3057
+ "description": "Compute and check SHA-256 message digest",
3058
+ "options": [
3059
+ { "name": "-c", "description": "Read checksums from file and verify" },
3060
+ { "name": "--quiet", "description": "Only print failures" }
3061
+ ],
3062
+ "examples": [
3063
+ { "command": "sha256sum file.iso", "description": "Get SHA-256 hash" },
3064
+ { "command": "sha256sum -c SHA256SUMS", "description": "Verify checksums file" },
3065
+ { "command": "echo -n 'hello' | sha256sum", "description": "Hash a string" }
3066
+ ]
3067
+ },
3068
+ {
3069
+ "name": "sha1sum",
3070
+ "description": "Compute and check SHA-1 message digest",
3071
+ "options": [
3072
+ { "name": "-c", "description": "Verify checksums from file" }
3073
+ ],
3074
+ "examples": [
3075
+ { "command": "sha1sum file.tar.gz", "description": "Get SHA-1 hash" }
3076
+ ]
3077
+ },
3078
+ {
3079
+ "name": "base64",
3080
+ "description": "Base64 encode/decode data",
3081
+ "options": [
3082
+ { "name": "-d", "description": "Decode" },
3083
+ { "name": "-w", "description": "Wrap lines after N columns (0=no wrap)", "takesValue": true }
3084
+ ],
3085
+ "examples": [
3086
+ { "command": "echo 'hello' | base64", "description": "Encode string" },
3087
+ { "command": "echo 'aGVsbG8K' | base64 -d", "description": "Decode string" },
3088
+ { "command": "base64 -w 0 file.bin > encoded.txt", "description": "Encode file with no line wrapping" }
3089
+ ]
3090
+ },
3091
+ {
3092
+ "name": "gpg",
3093
+ "description": "GNU Privacy Guard - encrypt, sign, verify files",
3094
+ "options": [
3095
+ { "name": "-c", "description": "Symmetric encryption with passphrase" },
3096
+ { "name": "-d", "description": "Decrypt" },
3097
+ { "name": "--decrypt", "description": "Decrypt file" },
3098
+ { "name": "-e", "description": "Encrypt" },
3099
+ { "name": "-r", "description": "Recipient for encryption", "takesValue": true },
3100
+ { "name": "-s", "description": "Sign" },
3101
+ { "name": "--verify", "description": "Verify a signature" },
3102
+ { "name": "--gen-key", "description": "Generate a new key pair" },
3103
+ { "name": "--list-keys", "description": "List public keys" },
3104
+ { "name": "--list-secret-keys", "description": "List secret keys" },
3105
+ { "name": "--export", "description": "Export public key" },
3106
+ { "name": "--import", "description": "Import a key" },
3107
+ { "name": "--armor", "description": "ASCII armor output" },
3108
+ { "name": "--output", "description": "Output file", "takesValue": true },
3109
+ { "name": "--keyserver", "description": "Keyserver to use", "takesValue": true }
3110
+ ],
3111
+ "examples": [
3112
+ { "command": "gpg -c secret.txt", "description": "Encrypt with passphrase" },
3113
+ { "command": "gpg -d secret.txt.gpg", "description": "Decrypt file" },
3114
+ { "command": "gpg -e -r user@email.com file.txt", "description": "Encrypt for recipient" },
3115
+ { "command": "gpg --gen-key", "description": "Generate new key pair" },
3116
+ { "command": "gpg --list-keys", "description": "List all public keys" },
3117
+ { "command": "gpg --armor --export user@email.com > pubkey.asc", "description": "Export public key" },
3118
+ { "command": "gpg --verify file.sig file.txt", "description": "Verify detached signature" }
3119
+ ]
3120
+ },
3121
+ {
3122
+ "name": "chroot",
3123
+ "description": "Run command or interactive shell with special root directory",
3124
+ "options": [
3125
+ { "name": "--userspec", "description": "Run as user:group", "takesValue": true }
3126
+ ],
3127
+ "examples": [
3128
+ { "command": "sudo chroot /mnt/newroot /bin/bash", "description": "Enter chroot environment" },
3129
+ { "command": "sudo chroot /mnt/rescue", "description": "Chroot into rescue system" }
3130
+ ]
3131
+ },
3132
+ {
3133
+ "name": "nsenter",
3134
+ "description": "Run program with namespaces of another process",
3135
+ "options": [
3136
+ { "name": "-t", "description": "Target PID", "takesValue": true },
3137
+ { "name": "-m", "description": "Enter mount namespace" },
3138
+ { "name": "-u", "description": "Enter UTS namespace" },
3139
+ { "name": "-i", "description": "Enter IPC namespace" },
3140
+ { "name": "-n", "description": "Enter network namespace" },
3141
+ { "name": "-p", "description": "Enter PID namespace" }
3142
+ ],
3143
+ "examples": [
3144
+ { "command": "sudo nsenter -t 1234 -m -u -i -n -p -- /bin/bash", "description": "Enter all namespaces of PID 1234" },
3145
+ { "command": "sudo nsenter -t $(docker inspect -f '{{.State.Pid}}' mycontainer) -n ip addr", "description": "Enter container network namespace" }
3146
+ ]
3147
+ },
3148
+ {
3149
+ "name": "unshare",
3150
+ "description": "Run program in new namespaces",
3151
+ "options": [
3152
+ { "name": "--mount", "description": "Create new mount namespace" },
3153
+ { "name": "--uts", "description": "Create new UTS namespace" },
3154
+ { "name": "--ipc", "description": "Create new IPC namespace" },
3155
+ { "name": "--net", "description": "Create new network namespace" },
3156
+ { "name": "--pid", "description": "Create new PID namespace" },
3157
+ { "name": "--user", "description": "Create new user namespace" },
3158
+ { "name": "--map-root-user", "description": "Map current user to root in new namespace" },
3159
+ { "name": "-r", "description": "Map current user to root" },
3160
+ { "name": "--fork", "description": "Fork before running" }
3161
+ ],
3162
+ "examples": [
3163
+ { "command": "unshare --net ip addr", "description": "Run in isolated network namespace" },
3164
+ { "command": "unshare --user --map-root-user bash", "description": "Get fake root in user namespace" },
3165
+ { "command": "unshare --pid --fork --mount-proc bash", "description": "New PID namespace with own /proc" }
3166
+ ]
3167
+ },
3168
+ {
3169
+ "name": "logger",
3170
+ "description": "Make entries in the system log (syslog)",
3171
+ "options": [
3172
+ { "name": "-p", "description": "Priority (facility.level)", "takesValue": true },
3173
+ { "name": "-t", "description": "Tag/identifier", "takesValue": true },
3174
+ { "name": "-s", "description": "Also log to stderr" },
3175
+ { "name": "-f", "description": "Log contents of file", "takesValue": true }
3176
+ ],
3177
+ "examples": [
3178
+ { "command": "logger 'Backup completed successfully'", "description": "Log a message" },
3179
+ { "command": "logger -t myapp -p local0.info 'Started'", "description": "Log with tag and priority" },
3180
+ { "command": "logger -s 'Error occurred'", "description": "Log to syslog and stderr" }
3181
+ ]
3182
+ },
3183
+ {
3184
+ "name": "cpio",
3185
+ "description": "Copy files to and from archives",
3186
+ "options": [
3187
+ { "name": "-o", "description": "Create archive (copy-out mode)" },
3188
+ { "name": "-i", "description": "Extract archive (copy-in mode)" },
3189
+ { "name": "-p", "description": "Pass-through (copy files to directory)" },
3190
+ { "name": "-d", "description": "Create directories as needed" },
3191
+ { "name": "-v", "description": "Verbose" },
3192
+ { "name": "-t", "description": "List contents" },
3193
+ { "name": "--format", "description": "Archive format (newc, crc, etc.)", "takesValue": true }
3194
+ ],
3195
+ "examples": [
3196
+ { "command": "find . -name '*.conf' | cpio -ov > configs.cpio", "description": "Archive config files" },
3197
+ { "command": "cpio -idv < archive.cpio", "description": "Extract archive" },
3198
+ { "command": "cpio -t < archive.cpio", "description": "List archive contents" },
3199
+ { "command": "find . -depth | cpio -pdv /backup/", "description": "Copy directory tree" }
3200
+ ]
3201
+ },
3202
+ {
3203
+ "name": "fmt",
3204
+ "description": "Simple optimal text formatter (reformat paragraphs)",
3205
+ "options": [
3206
+ { "name": "-w", "description": "Maximum line width", "takesValue": true },
3207
+ { "name": "-s", "description": "Split long lines only, no refilling" },
3208
+ { "name": "-u", "description": "Uniform spacing (one space between words)" }
3209
+ ],
3210
+ "examples": [
3211
+ { "command": "fmt -w 72 article.txt", "description": "Reformat to 72 columns" },
3212
+ { "command": "fmt -s long_lines.txt", "description": "Split long lines without joining short ones" }
3213
+ ]
3214
+ },
3215
+ {
3216
+ "name": "fold",
3217
+ "description": "Wrap each input line to fit in specified width",
3218
+ "options": [
3219
+ { "name": "-w", "description": "Width in columns", "takesValue": true },
3220
+ { "name": "-s", "description": "Break at spaces" },
3221
+ { "name": "-b", "description": "Count bytes instead of columns" }
3222
+ ],
3223
+ "examples": [
3224
+ { "command": "fold -w 80 -s longfile.txt", "description": "Wrap at 80 cols, break at spaces" },
3225
+ { "command": "echo $PATH | fold -s -w 60", "description": "Wrap PATH for readability" }
3226
+ ]
3227
+ },
3228
+ {
3229
+ "name": "expand",
3230
+ "description": "Convert tabs to spaces",
3231
+ "options": [
3232
+ { "name": "-t", "description": "Tab stop positions", "takesValue": true },
3233
+ { "name": "--initial", "description": "Only convert leading tabs" }
3234
+ ],
3235
+ "examples": [
3236
+ { "command": "expand -t 4 file.txt", "description": "Convert tabs to 4 spaces" },
3237
+ { "command": "expand --initial file.txt", "description": "Only expand leading tabs" }
3238
+ ]
3239
+ },
3240
+ {
3241
+ "name": "unexpand",
3242
+ "description": "Convert spaces to tabs",
3243
+ "options": [
3244
+ { "name": "-t", "description": "Tab stop positions", "takesValue": true },
3245
+ { "name": "-a", "description": "Convert all spaces, not just leading" }
3246
+ ],
3247
+ "examples": [
3248
+ { "command": "unexpand -t 4 file.txt", "description": "Convert 4-space indents to tabs" },
3249
+ { "command": "unexpand --first-only file.txt", "description": "Only convert leading spaces" }
3250
+ ]
3251
+ },
3252
+ {
3253
+ "name": "wall",
3254
+ "description": "Write a message to all logged-in users",
3255
+ "options": [
3256
+ { "name": "-n", "description": "Suppress banner" }
3257
+ ],
3258
+ "examples": [
3259
+ { "command": "wall 'System going down in 10 minutes'", "description": "Broadcast message" },
3260
+ { "command": "echo 'Maintenance at 3 AM' | wall", "description": "Pipe message to wall" }
3261
+ ]
3262
+ },
3263
+ {
3264
+ "name": "write",
3265
+ "description": "Send a message to another user's terminal",
3266
+ "options": [],
3267
+ "examples": [
3268
+ { "command": "write john pts/1", "description": "Send message to john on pts/1" }
3269
+ ]
3270
+ },
3271
+ {
3272
+ "name": "mesg",
3273
+ "description": "Control write access to your terminal",
3274
+ "options": [],
3275
+ "examples": [
3276
+ { "command": "mesg n", "description": "Disable messages from other users" },
3277
+ { "command": "mesg y", "description": "Enable messages from other users" },
3278
+ { "command": "mesg", "description": "Show current message status" }
3279
+ ]
3280
+ },
3281
+ {
3282
+ "name": "test",
3283
+ "description": "Evaluate conditional expressions (also [ ])",
3284
+ "options": [
3285
+ { "name": "-f", "description": "True if file exists and is regular" },
3286
+ { "name": "-d", "description": "True if file exists and is directory" },
3287
+ { "name": "-e", "description": "True if file exists" },
3288
+ { "name": "-r", "description": "True if file is readable" },
3289
+ { "name": "-w", "description": "True if file is writable" },
3290
+ { "name": "-x", "description": "True if file is executable" },
3291
+ { "name": "-s", "description": "True if file exists and is non-empty" },
3292
+ { "name": "-z", "description": "True if string is empty" },
3293
+ { "name": "-n", "description": "True if string is non-empty" },
3294
+ { "name": "-eq", "description": "Integer equal" },
3295
+ { "name": "-ne", "description": "Integer not equal" },
3296
+ { "name": "-gt", "description": "Integer greater than" },
3297
+ { "name": "-lt", "description": "Integer less than" },
3298
+ { "name": "-ge", "description": "Integer greater or equal" },
3299
+ { "name": "-le", "description": "Integer less or equal" }
3300
+ ],
3301
+ "examples": [
3302
+ { "command": "test -f /etc/passwd && echo exists", "description": "Check if file exists" },
3303
+ { "command": "[ -d /tmp ] && echo 'is directory'", "description": "Check if directory exists" },
3304
+ { "command": "test $a -eq $b && echo equal", "description": "Compare integers" },
3305
+ { "command": "[ -z \"$VAR\" ] && echo 'empty'", "description": "Check if variable is empty" }
3306
+ ]
3307
+ },
3308
+ {
3309
+ "name": "expr",
3310
+ "description": "Evaluate expressions (arithmetic, string, comparison)",
3311
+ "options": [],
3312
+ "examples": [
3313
+ { "command": "expr 5 + 3", "description": "Add numbers" },
3314
+ { "command": "expr 10 \\* 5", "description": "Multiply (escape the *)" },
3315
+ { "command": "expr length 'hello world'", "description": "Get string length" },
3316
+ { "command": "expr substr 'hello' 1 3", "description": "Substring extraction" }
3317
+ ]
3318
+ },
3319
+ {
3320
+ "name": "bc",
3321
+ "description": "Arbitrary precision calculator language",
3322
+ "options": [
3323
+ { "name": "-l", "description": "Use math library (enables decimals, trig, etc.)" },
3324
+ { "name": "-q", "description": "Quiet mode (no welcome banner)" }
3325
+ ],
3326
+ "examples": [
3327
+ { "command": "echo '3.14 * 2.5' | bc -l", "description": "Floating point math" },
3328
+ { "command": "echo 'scale=10; 1/3' | bc", "description": "Division with precision" },
3329
+ { "command": "echo 'obase=16; 255' | bc", "description": "Convert to hex" },
3330
+ { "command": "echo 'ibase=2; 11010' | bc", "description": "Convert from binary" },
3331
+ { "command": "echo 'sqrt(144)' | bc -l", "description": "Square root" }
3332
+ ]
3333
+ },
3334
+ {
3335
+ "name": "seq",
3336
+ "description": "Print a sequence of numbers",
3337
+ "options": [
3338
+ { "name": "-s", "description": "Separator string", "takesValue": true },
3339
+ { "name": "-w", "description": "Equal width (zero-padded)" },
3340
+ { "name": "-f", "description": "Format string (printf-style)", "takesValue": true }
3341
+ ],
3342
+ "examples": [
3343
+ { "command": "seq 1 10", "description": "Print 1 through 10" },
3344
+ { "command": "seq 0 2 20", "description": "Even numbers 0 to 20" },
3345
+ { "command": "seq -w 01 100", "description": "Zero-padded sequence" },
3346
+ { "command": "seq -s ', ' 1 5", "description": "Comma-separated: 1, 2, 3, 4, 5" }
3347
+ ]
3348
+ },
3349
+ {
3350
+ "name": "xdg-open",
3351
+ "description": "Open a file or URL with the default application (desktop)",
3352
+ "options": [],
3353
+ "examples": [
3354
+ { "command": "xdg-open https://example.com", "description": "Open URL in default browser" },
3355
+ { "command": "xdg-open document.pdf", "description": "Open PDF with default viewer" },
3356
+ { "command": "xdg-open .", "description": "Open current directory in file manager" }
3357
+ ]
3358
+ },
3359
+ {
3360
+ "name": "systemd-analyze",
3361
+ "description": "Analyze systemd boot-up performance",
3362
+ "options": [],
3363
+ "subcommands": [
3364
+ { "name": "blame", "description": "Show time taken by each service to start" },
3365
+ { "name": "critical-chain", "description": "Show critical chain of boot" },
3366
+ { "name": "plot", "description": "Generate SVG boot chart" },
3367
+ { "name": "dot", "description": "Generate dependency graph in dot format" },
3368
+ { "name": "verify", "description": "Verify unit files" },
3369
+ { "name": "security", "description": "Analyze security of service units" }
3370
+ ],
3371
+ "examples": [
3372
+ { "command": "systemd-analyze", "description": "Show total boot time" },
3373
+ { "command": "systemd-analyze blame", "description": "Show per-service boot times" },
3374
+ { "command": "systemd-analyze critical-chain", "description": "Show critical chain" },
3375
+ { "command": "systemd-analyze plot > boot.svg", "description": "Generate boot chart" },
3376
+ { "command": "systemd-analyze security nginx.service", "description": "Check service security" }
3377
+ ]
3378
+ },
3379
+ {
3380
+ "name": "coredumpctl",
3381
+ "description": "Manage stored core dumps (systemd-coredump)",
3382
+ "subcommands": [
3383
+ { "name": "list", "description": "List available core dumps" },
3384
+ { "name": "info", "description": "Show info about a core dump" },
3385
+ { "name": "dump", "description": "Save core dump to file" },
3386
+ { "name": "debug", "description": "Launch debugger on a core dump" }
3387
+ ],
3388
+ "examples": [
3389
+ { "command": "coredumpctl list", "description": "List all core dumps" },
3390
+ { "command": "coredumpctl info", "description": "Info about last core dump" },
3391
+ { "command": "coredumpctl debug", "description": "Debug last crash with gdb" }
3392
+ ]
3393
+ },
3394
+ {
3395
+ "name": "busctl",
3396
+ "description": "Introspect D-Bus (systemd bus)",
3397
+ "subcommands": [
3398
+ { "name": "list", "description": "List bus names" },
3399
+ { "name": "tree", "description": "Show object tree of service" },
3400
+ { "name": "introspect", "description": "Introspect object" },
3401
+ { "name": "monitor", "description": "Monitor bus messages" },
3402
+ { "name": "call", "description": "Call a method" }
3403
+ ],
3404
+ "examples": [
3405
+ { "command": "busctl list", "description": "List D-Bus services" },
3406
+ { "command": "busctl tree org.freedesktop.systemd1", "description": "Show systemd object tree" },
3407
+ { "command": "busctl monitor", "description": "Monitor all D-Bus messages" }
3408
+ ]
3409
+ },
3410
+ {
3411
+ "name": "networkctl",
3412
+ "description": "Query/control systemd-networkd",
3413
+ "subcommands": [
3414
+ { "name": "list", "description": "List links" },
3415
+ { "name": "status", "description": "Show network status" },
3416
+ { "name": "up", "description": "Bring interface up" },
3417
+ { "name": "down", "description": "Bring interface down" },
3418
+ { "name": "lldp", "description": "Show LLDP neighbors" }
3419
+ ],
3420
+ "examples": [
3421
+ { "command": "networkctl list", "description": "List network interfaces" },
3422
+ { "command": "networkctl status eth0", "description": "Show interface details" },
3423
+ { "command": "networkctl status", "description": "Show overall network status" }
3424
+ ]
3425
+ },
3426
+ {
3427
+ "name": "lscpu",
3428
+ "description": "Display information about CPU architecture",
3429
+ "options": [
3430
+ { "name": "-e", "description": "Extended output (table)" },
3431
+ { "name": "-J", "description": "JSON output" },
3432
+ { "name": "-p", "description": "Parseable output" }
3433
+ ],
3434
+ "examples": [
3435
+ { "command": "lscpu", "description": "Show CPU info" },
3436
+ { "command": "lscpu -J", "description": "CPU info as JSON" },
3437
+ { "command": "lscpu | grep 'Model name'", "description": "Get CPU model" }
3438
+ ]
3439
+ },
3440
+ {
3441
+ "name": "lsmem",
3442
+ "description": "List available memory ranges and their online status",
3443
+ "options": [
3444
+ { "name": "-J", "description": "JSON output" },
3445
+ { "name": "--summary", "description": "Only print summary" }
3446
+ ],
3447
+ "examples": [
3448
+ { "command": "lsmem", "description": "Show memory ranges" },
3449
+ { "command": "lsmem --summary", "description": "Show memory summary" }
3450
+ ]
3451
+ },
3452
+ {
3453
+ "name": "lspci",
3454
+ "description": "List all PCI devices",
3455
+ "options": [
3456
+ { "name": "-v", "description": "Verbose" },
3457
+ { "name": "-vv", "description": "Very verbose" },
3458
+ { "name": "-k", "description": "Show kernel drivers handling each device" },
3459
+ { "name": "-nn", "description": "Show numeric and text vendor/device IDs" },
3460
+ { "name": "-t", "description": "Tree view" },
3461
+ { "name": "-s", "description": "Show specific slot", "takesValue": true }
3462
+ ],
3463
+ "examples": [
3464
+ { "command": "lspci", "description": "List all PCI devices" },
3465
+ { "command": "lspci -k", "description": "Show kernel driver for each device" },
3466
+ { "command": "lspci | grep -i vga", "description": "Show GPU" },
3467
+ { "command": "lspci -vnn -s 00:02.0", "description": "Detailed info for specific device" }
3468
+ ]
3469
+ },
3470
+ {
3471
+ "name": "lsusb",
3472
+ "description": "List USB devices",
3473
+ "options": [
3474
+ { "name": "-v", "description": "Verbose" },
3475
+ { "name": "-t", "description": "Tree view" },
3476
+ { "name": "-s", "description": "Show specific bus/device", "takesValue": true },
3477
+ { "name": "-d", "description": "Show specific vendor:product", "takesValue": true }
3478
+ ],
3479
+ "examples": [
3480
+ { "command": "lsusb", "description": "List all USB devices" },
3481
+ { "command": "lsusb -t", "description": "Show USB device tree" },
3482
+ { "command": "lsusb -v -s 001:002", "description": "Verbose info for specific device" }
3483
+ ]
3484
+ },
3485
+ {
3486
+ "name": "dmidecode",
3487
+ "description": "DMI/SMBIOS table decoder (hardware info from BIOS)",
3488
+ "options": [
3489
+ { "name": "-t", "description": "Type (bios, system, baseboard, chassis, processor, memory, cache, connector, slot)", "takesValue": true },
3490
+ { "name": "-s", "description": "Show specific keyword string", "takesValue": true }
3491
+ ],
3492
+ "examples": [
3493
+ { "command": "sudo dmidecode -t memory", "description": "Show RAM details" },
3494
+ { "command": "sudo dmidecode -t bios", "description": "Show BIOS info" },
3495
+ { "command": "sudo dmidecode -t system", "description": "Show system/motherboard info" },
3496
+ { "command": "sudo dmidecode -s system-product-name", "description": "Get product name" },
3497
+ { "command": "sudo dmidecode -t processor", "description": "Show processor info" }
3498
+ ]
3499
+ },
3500
+ {
3501
+ "name": "hwinfo",
3502
+ "description": "Probe for hardware (SUSE/general, install with package manager)",
3503
+ "options": [
3504
+ { "name": "--short", "description": "Short listing" },
3505
+ { "name": "--cpu", "description": "CPU info" },
3506
+ { "name": "--disk", "description": "Disk info" },
3507
+ { "name": "--memory", "description": "Memory info" },
3508
+ { "name": "--network", "description": "Network info" },
3509
+ { "name": "--gfxcard", "description": "Graphics card info" },
3510
+ { "name": "--sound", "description": "Sound card info" }
3511
+ ],
3512
+ "examples": [
3513
+ { "command": "sudo hwinfo --short", "description": "Brief hardware summary" },
3514
+ { "command": "sudo hwinfo --disk", "description": "Detailed disk info" },
3515
+ { "command": "sudo hwinfo --network --short", "description": "Network hardware summary" }
3516
+ ]
3517
+ },
3518
+ {
3519
+ "name": "lsns",
3520
+ "description": "List Linux namespaces",
3521
+ "options": [
3522
+ { "name": "-t", "description": "Filter by type (mnt, net, pid, user, uts, ipc, cgroup)", "takesValue": true },
3523
+ { "name": "-J", "description": "JSON output" }
3524
+ ],
3525
+ "examples": [
3526
+ { "command": "lsns", "description": "List all namespaces" },
3527
+ { "command": "lsns -t net", "description": "List network namespaces" },
3528
+ { "command": "lsns -J", "description": "JSON format output" }
3529
+ ]
3530
+ },
3531
+ {
3532
+ "name": "lsipc",
3533
+ "description": "Show information on IPC facilities (shared memory, semaphores, message queues)",
3534
+ "options": [
3535
+ { "name": "-m", "description": "Shared memory" },
3536
+ { "name": "-s", "description": "Semaphores" },
3537
+ { "name": "-q", "description": "Message queues" },
3538
+ { "name": "-J", "description": "JSON output" }
3539
+ ],
3540
+ "examples": [
3541
+ { "command": "lsipc", "description": "Show all IPC resources" },
3542
+ { "command": "lsipc -m", "description": "Show shared memory segments" }
3543
+ ]
3544
+ },
3545
+ {
3546
+ "name": "ipcs",
3547
+ "description": "Show info on IPC facilities",
3548
+ "options": [
3549
+ { "name": "-m", "description": "Shared memory" },
3550
+ { "name": "-s", "description": "Semaphores" },
3551
+ { "name": "-q", "description": "Message queues" },
3552
+ { "name": "-a", "description": "All" }
3553
+ ],
3554
+ "examples": [
3555
+ { "command": "ipcs -a", "description": "Show all IPC resources" }
3556
+ ]
3557
+ },
3558
+ {
3559
+ "name": "ipcrm",
3560
+ "description": "Remove IPC resources",
3561
+ "options": [
3562
+ { "name": "-m", "description": "Remove shared memory by shmid", "takesValue": true },
3563
+ { "name": "-s", "description": "Remove semaphore by semid", "takesValue": true },
3564
+ { "name": "-q", "description": "Remove message queue by msqid", "takesValue": true }
3565
+ ],
3566
+ "examples": [
3567
+ { "command": "ipcrm -m 12345", "description": "Remove shared memory segment" }
3568
+ ]
3569
+ },
3570
+ {
3571
+ "name": "taskset",
3572
+ "description": "Set or retrieve a process's CPU affinity",
3573
+ "options": [
3574
+ { "name": "-p", "description": "Operate on existing process", "takesValue": true },
3575
+ { "name": "-c", "description": "Use CPU list format" }
3576
+ ],
3577
+ "examples": [
3578
+ { "command": "taskset -c 0,1 ./myapp", "description": "Run on CPUs 0 and 1 only" },
3579
+ { "command": "taskset -p 1234", "description": "Show CPU affinity of PID 1234" },
3580
+ { "command": "taskset -cp 0-3 1234", "description": "Set PID 1234 to CPUs 0-3" }
3581
+ ]
3582
+ },
3583
+ {
3584
+ "name": "chrt",
3585
+ "description": "Manipulate real-time scheduling attributes of a process",
3586
+ "options": [
3587
+ { "name": "-f", "description": "FIFO scheduling" },
3588
+ { "name": "-r", "description": "Round-robin scheduling" },
3589
+ { "name": "-o", "description": "Normal scheduling" },
3590
+ { "name": "-p", "description": "Operate on existing PID", "takesValue": true },
3591
+ { "name": "-m", "description": "Show min/max priorities" }
3592
+ ],
3593
+ "examples": [
3594
+ { "command": "chrt -m", "description": "Show priority ranges" },
3595
+ { "command": "sudo chrt -f 99 ./realtime_app", "description": "Run with FIFO priority 99" },
3596
+ { "command": "chrt -p 1234", "description": "Show scheduling of PID 1234" }
3597
+ ]
3598
+ },
3599
+ {
3600
+ "name": "ionice",
3601
+ "description": "Set or get I/O scheduling class and priority",
3602
+ "options": [
3603
+ { "name": "-c", "description": "Class (1=realtime,2=best-effort,3=idle)", "takesValue": true },
3604
+ { "name": "-n", "description": "Priority (0-7, lower is higher)", "takesValue": true },
3605
+ { "name": "-p", "description": "Process ID", "takesValue": true }
3606
+ ],
3607
+ "examples": [
3608
+ { "command": "ionice -c 3 cp bigfile /backup/", "description": "Copy with idle I/O priority" },
3609
+ { "command": "ionice -c 2 -n 0 dd if=/dev/sda of=/dev/sdb", "description": "Best-effort high priority" },
3610
+ { "command": "ionice -p 1234", "description": "Show I/O class of PID 1234" }
3611
+ ]
3612
+ },
3613
+ {
3614
+ "name": "numfmt",
3615
+ "description": "Convert numbers from/to human-readable strings",
3616
+ "options": [
3617
+ { "name": "--to", "description": "Output format (iec, si, iec-i, auto)", "takesValue": true },
3618
+ { "name": "--from", "description": "Input format (iec, si, iec-i, auto)", "takesValue": true },
3619
+ { "name": "--suffix", "description": "Append suffix", "takesValue": true },
3620
+ { "name": "--field", "description": "Convert specific field", "takesValue": true }
3621
+ ],
3622
+ "examples": [
3623
+ { "command": "numfmt --to=iec 1048576", "description": "Convert to 1.0M" },
3624
+ { "command": "numfmt --from=iec 1G", "description": "Convert 1G to bytes" },
3625
+ { "command": "df | numfmt --field 2,3,4 --to=iec --header", "description": "Human-readable df output" }
3626
+ ]
3627
+ },
3628
+ {
3629
+ "name": "rev",
3630
+ "description": "Reverse lines characterwise",
3631
+ "options": [],
3632
+ "examples": [
3633
+ { "command": "echo 'hello' | rev", "description": "Output: olleh" },
3634
+ { "command": "rev file.txt", "description": "Reverse each line in file" }
3635
+ ]
3636
+ },
3637
+ {
3638
+ "name": "tac",
3639
+ "description": "Concatenate and print files in reverse (reverse of cat)",
3640
+ "options": [
3641
+ { "name": "-s", "description": "Separator string", "takesValue": true }
3642
+ ],
3643
+ "examples": [
3644
+ { "command": "tac file.txt", "description": "Print file bottom to top" },
3645
+ { "command": "tac access.log | head -20", "description": "Last 20 lines in reverse order" }
3646
+ ]
3647
+ },
3648
+ {
3649
+ "name": "yes",
3650
+ "description": "Output a string repeatedly until killed",
3651
+ "options": [],
3652
+ "examples": [
3653
+ { "command": "yes | rm -i *.tmp", "description": "Auto-answer yes to all prompts" },
3654
+ { "command": "yes n | command", "description": "Auto-answer no" },
3655
+ { "command": "yes 'text' | head -100", "description": "Generate 100 lines of text" }
3656
+ ]
3657
+ },
3658
+ {
3659
+ "name": "rename",
3660
+ "description": "Rename files using perl regex (prename) or simple patterns",
3661
+ "options": [
3662
+ { "name": "-n", "description": "Dry run (show what would happen)" },
3663
+ { "name": "-v", "description": "Verbose" },
3664
+ { "name": "-f", "description": "Force overwrite" }
3665
+ ],
3666
+ "examples": [
3667
+ { "command": "rename 's/.txt/.md/' *.txt", "description": "Change .txt to .md" },
3668
+ { "command": "rename 's/IMG_/photo_/' *.jpg", "description": "Rename photo prefix" },
3669
+ { "command": "rename -n 'y/A-Z/a-z/' *", "description": "Dry run: lowercase filenames" }
3670
+ ]
3671
+ },
3672
+ {
3673
+ "name": "updatedb",
3674
+ "description": "Update the file name database used by locate",
3675
+ "options": [
3676
+ { "name": "--prunepaths", "description": "Paths to skip", "takesValue": true }
3677
+ ],
3678
+ "examples": [
3679
+ { "command": "sudo updatedb", "description": "Update locate database" }
3680
+ ]
3681
+ },
3682
+ {
3683
+ "name": "locate",
3684
+ "description": "Find files by name (uses pre-built database from updatedb)",
3685
+ "options": [
3686
+ { "name": "-i", "description": "Case insensitive" },
3687
+ { "name": "-n", "description": "Limit results", "takesValue": true },
3688
+ { "name": "-r", "description": "Search by regex", "takesValue": true },
3689
+ { "name": "--existing", "description": "Only show existing files" }
3690
+ ],
3691
+ "examples": [
3692
+ { "command": "locate nginx.conf", "description": "Find nginx config files" },
3693
+ { "command": "locate -i readme", "description": "Case-insensitive search" },
3694
+ { "command": "locate -n 10 '*.log'", "description": "First 10 log files" }
3695
+ ]
3696
+ },
3697
+ {
3698
+ "name": "whatis",
3699
+ "description": "Display one-line manual page descriptions",
3700
+ "options": [],
3701
+ "examples": [
3702
+ { "command": "whatis ls", "description": "Short description of ls" },
3703
+ { "command": "whatis -w 'git*'", "description": "All git-related commands" }
3704
+ ]
3705
+ },
3706
+ {
3707
+ "name": "apropos",
3708
+ "description": "Search manual page names and descriptions",
3709
+ "options": [],
3710
+ "examples": [
3711
+ { "command": "apropos network", "description": "Find commands related to network" },
3712
+ { "command": "apropos partition", "description": "Find partition-related commands" }
3713
+ ]
3714
+ },
3715
+ {
3716
+ "name": "man",
3717
+ "description": "Display manual pages",
3718
+ "options": [
3719
+ { "name": "-k", "description": "Search by keyword (same as apropos)" },
3720
+ { "name": "-f", "description": "Whatis (short description)" }
3721
+ ],
3722
+ "examples": [
3723
+ { "command": "man ls", "description": "Show manual for ls" },
3724
+ { "command": "man 5 crontab", "description": "Show section 5 (file format) for crontab" },
3725
+ { "command": "man -k compress", "description": "Search for compression-related pages" }
3726
+ ]
3727
+ },
3728
+ {
3729
+ "name": "info",
3730
+ "description": "Read Info documents (GNU hypertext system)",
3731
+ "options": [],
3732
+ "examples": [
3733
+ { "command": "info coreutils", "description": "Browse coreutils documentation" },
3734
+ { "command": "info grep", "description": "Read grep info page" }
3735
+ ]
3736
+ },
3737
+ {
3738
+ "name": "help",
3739
+ "description": "Display help for shell builtins",
3740
+ "options": [],
3741
+ "examples": [
3742
+ { "command": "help cd", "description": "Help for cd builtin" },
3743
+ { "command": "help test", "description": "Help for test/[ builtin" }
3744
+ ]
3745
+ },
3746
+ {
3747
+ "name": "type",
3748
+ "description": "Show how a command name would be interpreted",
3749
+ "options": [
3750
+ { "name": "-a", "description": "Show all matches" },
3751
+ { "name": "-t", "description": "Show type only (alias, builtin, file, function, keyword)" }
3752
+ ],
3753
+ "examples": [
3754
+ { "command": "type ls", "description": "Is ls an alias, builtin, or file?" },
3755
+ { "command": "type -a python", "description": "Show all python executables" }
3756
+ ]
3757
+ },
3758
+ {
3759
+ "name": "which",
3760
+ "description": "Show full path of shell commands",
3761
+ "options": [
3762
+ { "name": "-a", "description": "Show all matches in PATH" }
3763
+ ],
3764
+ "examples": [
3765
+ { "command": "which python3", "description": "Find python3 path" },
3766
+ { "command": "which -a node", "description": "All node executables in PATH" }
3767
+ ]
3768
+ },
3769
+ {
3770
+ "name": "whereis",
3771
+ "description": "Locate binary, source, and manual page files for a command",
3772
+ "options": [
3773
+ { "name": "-b", "description": "Only binaries" },
3774
+ { "name": "-m", "description": "Only manuals" },
3775
+ { "name": "-s", "description": "Only sources" }
3776
+ ],
3777
+ "examples": [
3778
+ { "command": "whereis nginx", "description": "Find nginx binary, config, and man page" },
3779
+ { "command": "whereis -b python3", "description": "Find python3 binary only" }
3780
+ ]
3781
+ },
3782
+ {
3783
+ "name": "printenv",
3784
+ "description": "Print all or specific environment variables",
3785
+ "options": [],
3786
+ "examples": [
3787
+ { "command": "printenv", "description": "Print all environment variables" },
3788
+ { "command": "printenv HOME", "description": "Print value of HOME" },
3789
+ { "command": "printenv PATH", "description": "Print value of PATH" }
3790
+ ]
3791
+ },
3792
+ {
3793
+ "name": "ulimit",
3794
+ "description": "Get or set user resource limits",
3795
+ "options": [
3796
+ { "name": "-a", "description": "Show all limits" },
3797
+ { "name": "-n", "description": "Max open file descriptors" },
3798
+ { "name": "-u", "description": "Max user processes" },
3799
+ { "name": "-s", "description": "Max stack size" },
3800
+ { "name": "-v", "description": "Max virtual memory" },
3801
+ { "name": "-S", "description": "Soft limit" },
3802
+ { "name": "-H", "description": "Hard limit" }
3803
+ ],
3804
+ "examples": [
3805
+ { "command": "ulimit -a", "description": "Show all limits" },
3806
+ { "command": "ulimit -n 65536", "description": "Set max open files to 65536" },
3807
+ { "command": "ulimit -u 4096", "description": "Set max user processes" }
3808
+ ]
3809
+ }
3810
+ ]
3811
+ }
3812
+ }