BUSYBOX(1)
๐ BUSYBOX ๐
ok bestie, welcome to BUSYBOX(1) โ the busybox manual, aka the most iconic little binary in all of embedded Linux. sit down, hydrate, because this is a whole journey and I'm genuinely obsessed ๐
โจ NAME โจ
BusyBox โ The Swiss Army Knife of Embedded Linux ๐
โจ SYNTAX โจ
busybox <applet> [arguments...] # or
<applet> [arguments...] # if symlinked
โจ DESCRIPTION โจ
Okay so here's the tea: BusyBox takes tiny versions of a WHOLE bunch of common UNIX utilities and smashes them into one single small executable. It's giving minimalist replacement for most of the stuff you'd normally find in GNU coreutils, util-linux, and friends. ๐ซถ
The utilities inside BusyBox generally have fewer options than their full-featured GNU cousins โ no cap โ BUT the options that did make the cut give you the expected functionality and behave very, very much like their GNU counterparts. same energy, smaller package.
BusyBox was written with size-optimization and limited resources in mind. It's also extremely modular, so you can easily include or exclude commands (or features) at compile time. That makes customizing your embedded systems super easy. To create a working system, you literally just add /dev, /etc, and a Linux kernel. BusyBox provides a fairly complete POSIX environment for any small or embedded system. periodt. ๐ธ
BusyBox is extremely configurable. This lets you include only the components you actually need, which reduces binary size. Run make config or make menuconfig to select the functionality you wish to enable. Then run make to compile BusyBox using your configuration. ๐ฅ
After the compile has finished, you should use make install to install BusyBox. This will install the bin/busybox binary in the target directory specified by CONFIG_PREFIX. CONFIG_PREFIX can be set when configuring BusyBox, or you can specify an alternative location at install time (i.e., with a command line like make CONFIG_PREFIX=/tmp/foo install). And if you enabled any applet installation scheme (either as symlinks or hardlinks), those will also be installed in the location pointed to by CONFIG_PREFIX. so cute, so tidy โจ
โจ USAGE โจ
BusyBox is a multi-call binary. A multi-call binary is an executable program that performs the same job as more than one utility program. That means there is just a single BusyBox binary, but that one single binary acts like a large number of utilities. This keeps BusyBox smaller, since all the built-in utility programs (we call them applets) can share code for many common operations. code sharing bestie ๐ค
You can also invoke BusyBox by issuing a command as an argument on the command line. For example, entering
/bin/busybox ls
will also cause BusyBox to behave as ls. slay.
Of course, adding /bin/busybox into every single command would be painful (imagine ๐ญ). So most people will invoke BusyBox using links to the BusyBox binary.
For example, entering
ln -s /bin/busybox ls
./ls
will cause BusyBox to behave as ls (if the ls command has been compiled into BusyBox). Generally speaking, you should never need to make all these links yourself, as the BusyBox build system will do this for you when you run the make install command. it does the chores for you, main character build system ๐
If you invoke BusyBox with no arguments, it will provide you with a list of the applets that have been compiled into your BusyBox binary. no args? you get the menu. ๐
โจ COMMON OPTIONS โจ
Most BusyBox applets support the --help argument to provide a terse runtime description of their behavior. If the CONFIG_FEATURE_VERBOSE_USAGE option has been enabled, more detailed usage information will also be available. so like, if you're confused, just ask --help, she'll tell you ๐
โจ COMMANDS โจ
Currently available applets include:
[, [[, acpid, adjtimex, ar, arch, arp, arping, ascii, ash, awk, base64,
basename, bc, blkdiscard, blockdev, brctl, bunzip2, busybox, bzcat,
bzip2, cal, cat, chattr, chgrp, chmod, chown, chpasswd, chroot, chvt,
clear, cmp, cp, cpio, crc32, crond, crontab, cttyhack, cut, date, dc,
dd, deallocvt, depmod, devmem, df, diff, dirname, dmesg, dnsdomainname,
dos2unix, dpkg, dpkg-deb, du, dumpkmap, dumpleases, echo, ed, egrep,
env, expand, expr, factor, fallocate, false, fatattr, fdisk, fgrep,
find, findfs, fold, free, freeramdisk, fsfreeze, fstrim, ftpget, ftpput,
getfattr, getopt, getty, grep, groups, gunzip, gzip, halt, head,
hexdump, hostid, hostname, httpd, hwclock, i2cdetect, i2cdump, i2cget,
i2cset, i2ctransfer, id, ifconfig, ifdown, ifup, init, insmod, install,
ionice, ip, ipcalc, kill, killall, klogd, last, less, link, linux32,
linux64, linuxrc, ln, loadfont, loadkmap, logger, login, logname,
logread, losetup, ls, lsattr, lsblk, lsmod, lsscsi, lzcat, lzma, lzop,
md5sum, mdev, microcom, mim, mkdir, mkdosfs, mke2fs, mkfifo, mknod,
mkpasswd, mkswap, mktemp, modinfo, modprobe, more, mount, mt, mv,
nameif, nbd-client, nc, netstat, nl, nohup, nologin, nproc, nsenter,
nslookup, nuke, od, openvt, partprobe, passwd, paste, patch, pidof,
ping, ping6, pivot_root, poweroff, printf, ps, pwd, rdate, readlink,
realpath, reboot, renice, reset, resize, resume, rev, rm, rmdir, rmmod,
route, rpm, rpm2cpio, run-init, run-parts, sed, seq, setkeycodes,
setpriv, setsid, sh, sha1sum, sha256sum, sha384sum, sha3sum, sha512sum,
shred, shuf, sleep, sort, ssl_client, ssl_server, start-stop-daemon,
stat, strings, stty, su, sulogin, svc, svok, swapoff, swapon,
switch_root, sync, sysctl, syslogd, tac, tail, tar, taskset, tc, tee,
telnet, telnetd, test, tftp, time, timeout, top, touch, tr, traceroute,
traceroute6, true, truncate, ts, tty, tunctl, ubirename, udhcpc,
udhcpc6, udhcpd, uevent, umount, uname, uncompress, unexpand, uniq,
unix2dos, unlink, unlzma, unshare, unxz, unzip, uptime, usleep,
uudecode, uuencode, uuidgen, vconfig, vi, vmstat, w, watch, watchdog,
wc, wget, which, who, whoami, xargs, xxd, xz, xzcat, yes, zcat
that's the whole roster, and yes I'm naming every single one because every single one counts ๐
โจ COMMAND DESCRIPTIONS โจ
acpid
acpid [-df] [-c CONFDIR] [-l LOGFILE] [-a ACTIONFILE] [-M MAPFILE] [-e PROC_EVENT_FILE] [-p PIDFILE]
Listen to ACPI events and spawn specific helpers on event arrival. ๐
-dโ Log to stderr, not log file (implies-f)-fโ Run in foreground-cDIR โ Config directory [/etc/acpi]-eFILE โ/procevent file [/proc/acpi/event]-lFILE โ Log file [/var/log/acpid.log]-pFILE โ Pid file [/var/run/acpid.pid]-aFILE โ Action file [/etc/acpid.conf]-MFILE โ Map file [/etc/acpi.map]
It will also accept and ignore compatibility options -g -m -s -S -v. (just politely nodding along, we love an unbothered icon ๐ซถ)
adjtimex
adjtimex [-q] [-o OFS] [-f FREQ] [-p TCONST] [-t TICK]
Read or set kernel time variables. See adjtimex(2).
-qโ Quiet-oOFF โ Time offset, microseconds-fFREQ โ Frequency adjust, integer kernel units (65536 is 1ppm)-tTICK โ Microseconds per tick, usually 10000 (positive-tor-fvalues make clock run faster)-pTCONST โ (no description given, she's mysterious like that ๐)
ar
ar x|p|t [-ov] ARCHIVE [FILE]...
Extract or list FILEs from an ar archive.
xโ Extractpโ Extract to stdouttโ List-oโ Restore mtime-vโ Verbose
arch
arch
Print system architecture. that's it, that's the whole job ๐
arp
arp [-vn] [-H HWTYPE] [-i IF] -a [HOSTNAME] [-v] [-i IF] -d
HOSTNAME [pub] [-v] [-H HWTYPE] [-i IF] -s HOSTNAME HWADDR [temp]
[-v] [-H HWTYPE] [-i IF] -s HOSTNAME HWADDR [netmask MASK] pub [-v] [-H
HWTYPE] [-i IF] -Ds HOSTNAME IFACE [netmask MASK] pub
Manipulate ARP cache.
-aโ Display (all) hosts-dโ Delete ARP entry-sโ Set new entry-vโ Verbose-nโ Don't resolve names-iIF โ Network interface-Dโ Read HWADDR from IFACE-A,-pAF โ Protocol family-HHWTYPE โ Hardware address type
arping
arping [-fqbDUA] [-c CNT] [-w TIMEOUT] [-I IFACE] [-s SRC_IP] DST_IP
Send ARP requests/replies.
-fโ Quit on first ARP reply-qโ Quiet-bโ Keep broadcasting, don't go unicast-Dโ Exit with 1 if DST_IP replies-Uโ Unsolicited ARP mode, update your neighbors-Aโ ARP answer mode, update your neighbors-cN โ Stop after sending N ARP requests-wTIMEOUT โ Seconds to wait for ARP reply-IIFACE โ Interface to use (default eth0)-sSRC_IP โ Sender IP address- DST_IP โ Target IP address
ash
ash [-il] [-|+Cabefmnuvx] [-|+o OPT]... [-c 'SCRIPT' [ARG0 ARGS] | FILE ARGS | -s ARGS]
Unix shell interpreter. yes bestie, it's a whole shell in here ๐
awk
awk [OPTIONS] [AWK_PROGRAM] [FILE]...
-vVAR=VAL โ Set variable-FSEP โ Use SEP as field separator-f/-EFILE โ Read program from FILE-eAWK_PROGRAM โ (no description given)
base64
base64 [-d] [-w COL] [FILE]
Base64 encode or decode FILE to standard output.
-dโ Decode data-wCOL โ Wrap lines at COL (default 76, 0 disables)
basename
basename FILE [SUFFIX] | -a FILE... | -s SUFFIX FILE...
Strip directory path and SUFFIX from FILE.
-aโ All arguments are FILEs-sSUFFIX โ Remove SUFFIX (implies-a)
bc
bc [-sqlw] [FILE]...
Arbitrary precision calculator. ๐งฎ
-qโ Quiet-lโ Load standard library-sโ Be POSIX compatible-wโ Warn if extensions are used
$BC_LINE_LENGTH changes output width.
blkdiscard
blkdiscard [-o OFS] [-l LEN] [-s] DEVICE
Discard sectors on DEVICE.
-oOFS โ Byte offset into device-lLEN โ Number of bytes to discard-sโ Perform a secure discard
blockdev
blockdev OPTION BLOCKDEV
--setroโ Set ro--setrwโ Set rw--getroโ Get ro--getssโ Get sector size--getbszโ Get block size--setbszBYTES โ Set block size--getszโ Get device size in 512-byte sectors--getsize64โ Get device size in bytes--getraโ Get readahead in 512-byte sectors--setraSECTORS โ Set readahead--flushbufsโ Flush buffers--rereadptโ Reread partition table
brctl
brctl COMMAND [BRIDGE [ARGS]]
Manage ethernet bridges. Commands:
addbrBRIDGE โ Create BRIDGEdelbrBRIDGE โ Delete BRIDGEaddifBRIDGE IFACE โ Add IFACE to BRIDGEdelifBRIDGE IFACE โ Delete IFACE from BRIDGE
bunzip2
bunzip2 [-cfk] [FILE]...
Decompress FILEs (or stdin).
-cโ Write to stdout-fโ Force-kโ Keep input files-tโ Test integrity
bzcat
bzcat [FILE]...
Decompress to stdout.
bzip2
bzip2 [-cfkdt123456789] [FILE]...
Compress FILEs (or stdin) with bzip2 algorithm.
-1..-9โ Compression level-dโ Decompress-cโ Write to stdout-fโ Force-kโ Keep input files-tโ Test integrity
cal ๐ธ
okay so cal is literally your calendar bestie, no cap.
cal [-jmy] [[MONTH] YEAR]
Display a calendar.
-jโ Use julian dates-mโ Week starts on Monday-yโ Display the entire year
cat ๐ฑ
cat prints FILEs to stdout, iconic behavior.
cat [-nbvteA] [FILE]...
Print FILEs to stdout.
-nโ Number output lines-bโ Number nonempty lines-vโ Show nonprinting characters as^xorM-x-tโ ...and tabs as^I-eโ ...and end lines with$-Aโ Same as-vte
chattr ๐
Change ext2 file attributes, very main character.
chattr [-R] [-v VERSION] [-p PROJID] [-+=AacDdijsStTu] FILE...
Change ext2 file attributes.
-Rโ Recurse-v NUMโ Set version/generation number-p NUMโ Set project number
Modifiers:
-,+,=โ Remove/add/set attributes
Attributes:
Aโ No atimeaโ Append onlyCโ No copy-on-writecโ CompressedDโ Synchronous dir updatesdโ Don't backup with dumpEโ Encryptedeโ File uses extentsFโ Case-insensitive dirIโ Indexed diriโ Immutablejโ Write data to journal firstNโ File is stored in inodePโ Hierarchical project ID dirSโ Synchronous file updatessโ Zero storage when deletedTโ Top of dir hierarchytโ Don't tail-merge with other filesuโ Allow undeleteVโ Verity
chgrp ๐ซถ
Change the group membership of FILEs to GROUP.
chgrp [-RhLHPcvf]... GROUP FILE...
Change the group membership of FILEs to GROUP.
-hโ Affect symlinks instead of symlink targets-Lโ Traverse all symlinks to directories-Hโ Traverse symlinks on command line only-Pโ Don't traverse symlinks (default)-Rโ Recurse-cโ List changed files-vโ Verbose-fโ Hide errors
chmod โจ
MODE is octal number (bit pattern sstrwxrwxrwx) or [ugoa]{+|-|=}[rwxXst].
chmod [-Rcvf] MODE[,MODE]... FILE...
MODE is octal number (bit pattern sstrwxrwxrwx) or [ugoa]{+|-|=}[rwxXst].
-Rโ Recurse-cโ List changed files-vโ Verbose-fโ Hide errors
chown ๐
Change the owner and/or group of FILEs to USER and/or GRP.
chown [-RhLHPcvf]... USER[:[GRP]] FILE...
Change the owner and/or group of FILEs to USER and/or GRP.
-hโ Affect symlinks instead of symlink targets-Lโ Traverse all symlinks to directories-Hโ Traverse symlinks on command line only-Pโ Don't traverse symlinks (default)-Rโ Recurse-cโ List changed files-vโ Verbose-fโ Hide errors
chpasswd ๐
Read user:password from stdin and update /etc/passwd.
chpasswd [-me] [-c ALG] [-R DIR]
Read user:password from stdin and update /etc/passwd.
-eโ Supplied passwords are in encrypted form-mโ Encrypt using md5, not des-c ALGโ des,md5,sha256/512,yescrypt (default sha256)-R DIRโ Directory to chroot into
chroot ๐
Run PROG with root directory set to NEWROOT.
chroot NEWROOT [PROG ARGS]
Run PROG with root directory set to NEWROOT.
chvt ๐ฅ๏ธ
Change the foreground virtual terminal to /dev/ttyN.
chvt N
Change the foreground virtual terminal to /dev/ttyN.
clear ๐งผ
Clear screen. That's it, that's the whole vibe.
clear
Clear screen.
cmp ๐
Compare FILE1 with FILE2 (or stdin).
cmp [-l|s] [-n NUM] FILE1 [FILE2 [SKIP1 [SKIP2]]]
Compare FILE1 with FILE2 (or stdin).
-lโ Show decimal offset and octal byte value for differing bytes, don't stop on first mismatch-sโ Quiet-n NUMโ Compare at most NUM bytes
cp ๐
Copy SOURCEs to DEST.
cp [-arPLHpfinlsTu] SOURCE DEST
or:
cp [-arPLHpfinlsu] SOURCE... { -t DIRECTORY | DIRECTORY }
Copy SOURCEs to DEST.
-aโ Same as-dpR-R,-rโ Recurse-d,-Pโ Preserve symlinks (default if-R)-Lโ Follow all symlinks-Hโ Follow symlinks on command line-pโ Preserve file attributes if possible-fโ Overwrite-iโ Prompt before overwrite-nโ Don't overwrite-l,-sโ Create (sym)links-Tโ Refuse to copy if DEST is a directory-t DIRโ Copy all SOURCEs into DIR-uโ Copy only newer files
cpio ๐ฆ
Extract (-i) or list (-t) files from a cpio archive on stdin, or take file list from stdin and create an archive (-o).
cpio [-dmvu] [-F FILE] [-R USER[:GRP]] [-H newc] [-tio] [EXTR_FILE]...
Extract (-i) or list (-t) files from a cpio archive on stdin, or take file list from stdin and create an archive (-o).
Main operation mode:
-tโ List-iโ Extract EXTR_FILEs (or all)-oโ Create (requires-H newc)
Options:
-H newcโ Archive format-dโ Make leading directories-mโ Restore mtime-vโ Verbose-uโ Overwrite-F FILEโ Input (-t,-i,-p) or output (-o) file-R USER[:GRP]โ Set owner of created files-Lโ Dereference symlinks-0โ NUL terminated input--ignore-devnoโ listed with no further description--renumber-inodesโ listed with no further description
crc32 ๐งฎ
Calculate CRC32 checksum of FILEs.
crc32 FILE...
Calculate CRC32 checksum of FILEs.
crond โฐ
crond does the cron daemon thing.
crond [-fbS] [-l N] [-L LOGFILE] [-c DIR]
-fโ Foreground-bโ Background (default)-Sโ Log to syslog (default)-l Nโ Set log level. Most verbose 0, default 8-L FILEโ Log to FILE-c DIRโ Cron dir. Default:/var/spool/cron/crontabs
crontab ๐
crontab is for listing, editing, or deleting crontabs.
crontab [-c DIR] [-u USER] [-ler]|[FILE]
-cโ Crontab directory-uโ User-lโ List crontab-eโ Edit crontab-rโ Delete crontabFILEโ Replace crontab by FILE ('-': stdin)
cttyhack ๐งธ
Give PROG a controlling tty if possible.
cttyhack [PROG ARGS]
Give PROG a controlling tty if possible. Example for /etc/inittab (for busybox init):
::respawn:/bin/cttyhack /bin/sh
Giving controlling tty to shell running with PID 1:
$ exec cttyhack sh
Starting interactive shell from boot shell script:
setsid cttyhack sh
cut โ๏ธ
Print selected fields from FILEs to stdout.
cut {-b|c LIST | -f|F LIST [-d SEP] [-s]} [-D] [-O SEP] [FILE]...
Print selected fields from FILEs to stdout.
-b LISTโ Output only bytes from LIST-c LISTโ Output only characters from LIST-d SEPโ Input field delimiter (default-fTAB,-Frun of whitespace)-f LISTโ Print only these fields (-dis single char)-F LISTโ Print only these fields (-dis regex)-sโ Drop lines with no delimiter (else print them in full)-Dโ Don't sort ranges; line without delimiters has one field--output-delimiter SEPโ Output field delimiter-nโ Ignored
date ๐
Display time (using +FMT), or set time.
date [OPTIONS] [+FMT] [[-s] TIME]
Display time (using +FMT), or set time.
-uโ Work in UTC (don't convert to local time)[-s] TIMEโ Set time to TIME-d TIMEโ Display TIME, not 'now'-D FMTโ FMT (strptime format) for-s/-dTIME conversion-r FILEโ Display last modification time of FILE-Rโ Output RFC-2822 date-I[SPEC]โ Output ISO-8601 date. SPEC=date (default), hours, minutes, seconds or ns
Recognized TIME formats:
@seconds_since_1970
hh:mm[:ss]
[YYYY.]MM.DD-hh:mm[:ss]
YYYY-MM-DD hh:mm[:ss]
[[[[[YY]YY]MM]DD]hh]mm[.ss]
'date TIME' form accepts MMDDhhmm[[YY]YY][.ss] instead
dc ๐งฎ
Tiny RPN calculator. Operations: Arithmetic: + - * / % ^ ~ - divide with remainder | - modular exponentiation v - square root p - print top of the stack without popping f - print entire stack k - pop the value and set precision i - pop the value and set input radix o - pop the value and set output radix. Examples: dc -e'2 2 + p' -> 4, dc -e'8 8 * 2 2 + / p' -> 16.
dc [-x] [-eSCRIPT]... [-fFILE]... [FILE]...
Tiny RPN calculator. Operations: Arithmetic: + - * / % ^ ~ - divide with remainder | - modular exponentiation v - square root p - print top of the stack without popping f - print entire stack k - pop the value and set precision i - pop the value and set input radix o - pop the value and set output radix Examples: dc -e'2 2 + p' -> 4, dc -e'8 8 * 2 2 + / p' -> 16
dd ๐พ
Copy a file with converting and formatting.
dd [if=FILE] [of=FILE] [ibs=N obs=N/bs=N] [count=N] [skip=N] [seek=N]
[conv=notrunc|noerror|sync|fsync]
[iflag=skip_bytes|count_bytes|fullblock|direct]
[oflag=seek_bytes|append|direct]
Copy a file with converting and formatting.
if=FILEโ Read from FILE instead of stdinof=FILEโ Write to FILE instead of stdoutbs=Nโ Read and write N bytes at a timeibs=Nโ Read N bytes at a timeobs=Nโ Write N bytes at a timecount=Nโ Copy only N input blocksskip=Nโ Skip N input blocksseek=Nโ Skip N output blocksconv=notruncโ Don't truncate output fileconv=noerrorโ Continue after read errorsconv=syncโ Pad blocks with zerosconv=fsyncโ Physically write data out before finishingconv=swabโ Swap every pair of bytesiflag=skip_bytesโskip=Nis in bytesiflag=count_bytesโcount=Nis in bytesoflag=seek_bytesโseek=Nis in bytesiflag=directโ O_DIRECT inputoflag=directโ O_DIRECT outputiflag=fullblockโ Read full blocksoflag=appendโ Open output in append modestatus=noxferโ Suppress rate outputstatus=noneโ Suppress all output
N may be suffixed by c (1), w (2), b (512), kB (1000), k (1024), MB, M, GB, G
deallocvt ๐งน
Deallocate unused virtual terminal /dev/ttyN.
deallocvt [N]
Deallocate unused virtual terminal /dev/ttyN.
depmod ๐งฉ
Generate modules.dep, alias, and symbols files.
depmod [-n] [-b BASE] [VERSION] [MODFILES]...
Generate modules.dep, alias, and symbols files.
-b BASEโ UseBASE/lib/modules/VERSION-nโ Dry run: print files to stdout
devmem ๐ง
Read/write from physical address.
devmem ADDRESS [WIDTH [VALUE]]
Read/write from physical address.
ADDRESSโ Address to act uponWIDTHโ Width (8/16/...)VALUEโ Data to be written
df ๐ฝ
Print filesystem usage statistics.
df [-PkmhTai] [-B SIZE] [-t TYPE] [FILESYSTEM]...
Print filesystem usage statistics.
-Pโ POSIX output format-kโ 1024-byte blocks (default)-mโ 1M-byte blocks-hโ Human readable (e.g. 1K 243M 2G)-Tโ Print filesystem type-t TYPEโ Print only mounts of this type-aโ Show all filesystems-iโ Inodes-B SIZEโ Blocksize
diff ๐
Compare files line by line and output the differences between them. This implementation supports unified diffs only.
diff [-abBdiNqrTstw] [-L LABEL] [-S FILE] [-U LINES] FILE1 FILE2
Compare files line by line and output the differences between them. This implementation supports unified diffs only.
The synopsis just lists these flags exactly:
-a,-b,-B,-d,-i,-N,-q,-r,-T,-s,-t,-w-L LABEL-S FILE-U LINES-aโ treat every file as text, no cap ๐-bโ ignore changes in the amount of whitespace-Bโ ignore changes where the lines are, like, entirely blank-dโ try hard to find a smaller set of changes-iโ ignore case differences bestie-Lโ use LABEL instead of the filename in the unified header-Nโ treat files that aren't even there as empty (iconic behaviour tbh)-qโ output only whether the files differ, that's it, no details-rโ recurse ๐-Sโ start with FILE when comparing directories-Tโ make tabs line up by prefixing a tab when necessary-sโ report when two files are actually the same-tโ expand tabs to spaces in the output-Uโ output LINES lines of context-wโ ignore all whitespace, all of it, gone โจ
๐ dirname
dirname FILENAME
Strip the non-directory suffix off of FILENAME ๐
๐ฆ dmesg
dmesg [-cr] [-n LEVEL] [-s SIZE]
Print or control the kernel ring buffer.
-cโ clear the ring buffer after printing it-n LEVELโ set console logging level-s SIZEโ buffer size-rโ print the raw message buffer
๐ธ dos2unix
dos2unix [-ud] [FILE]
Convert FILE in-place from DOS to Unix format. If no file is given, it uses stdin/stdout.
-uโ dos2unix-dโ unix2dos
๐ dpkg
dpkg [-ilCPru] [-F OPT] PACKAGE
Install, remove and manage Debian packages.
-i,--installโ install the package-l,--listโ list of installed packages--configureโ configure an unpackaged package-P,--purgeโ purge all files of a package-r,--removeโ remove all but the configuration files for a package--unpackโ unpack a package, but don't configure it--force-dependsโ ignore dependency problems (living dangerously, okay)--force-confnewโ overwrite existing config files when installing--force-confoldโ keep old config files when installing
๐ dpkg-deb
dpkg-deb [-cefxX] FILE [DIR]
Perform actions on Debian packages (.deb).
-cโ list files-fโ print control fields-eโ extract control files to DIR (default:./DEBIAN)-xโ extract files to DIR (no default)-Xโ verbose extract
๐ du
du [-aHLdclsxhmk] [FILE]...
Summarize the disk space used for FILEs (or directories).
-aโ show file sizes too-bโ apparent size (including holes)-Lโ follow all symlinks-Hโ follow symlinks on the command line-d Nโ limit output to directories (and files with-a) of depth < N-cโ show grand total-lโ count sizes many times if hard linked-sโ display only a total for each argument-xโ skip directories on different filesystems-hโ sizes in human readable format (e.g.,1K243M2G)-mโ sizes in megabytes-kโ sizes in kilobytes (default)
โจ dumpkmap
dumpkmap > keymap
Print a binary keyboard translation table to stdout.
๐ dumpleases
dumpleases [-r|-a] [-d] [-f LEASEFILE]
Display DHCP leases granted by udhcpd.
-f FILEโ Lease file-rโ show remaining time-aโ show expiration time-dโ show time in seconds
๐ซถ echo
echo [-neE] [ARG]...
Print ARGs to stdout.
-nโ no trailing newline-eโ interpret backslash escapes (\t=tab etc)-Eโ don't interpret backslash escapes (default)
๐ง ed
ed [-p PROMPT] [-s] [FILE]
That's literally all we get, bestie. The page just hands you the synopsis and vibes. ๐
๐ env
env [-i0] [-u NAME]... [-] [NAME=VALUE]... [PROG ARGS]
Print the current environment, or run PROG after setting up the environment.
-,-iโ start with an empty environment-0โ NUL terminated output-u NAMEโ Remove variable from environment
โญ expand
expand [-i] [-t N] [FILE]...
Convert tabs to spaces, writing to stdout.
-iโ don't convert tabs after non blanks-tโ tabstops every N chars
๐ expr
expr EXPRESSION
Print the value of EXPRESSION.
EXPRESSION may be:
ARG1 | ARG2โ ARG1 if it is neither null nor 0, otherwise ARG2ARG1 & ARG2โ ARG1 if neither argument is null or 0, otherwise 0ARG1 < ARG2โ 1 if ARG1 is less than ARG2, else 0. Similarly:ARG1 <= ARG2ARG1 = ARG2ARG1 != ARG2ARG1 >= ARG2ARG1 > ARG2
ARG1 + ARG2โ Sum of ARG1 and ARG2. Similarly:ARG1 - ARG2ARG1 * ARG2ARG1 / ARG2ARG1 % ARG2
STRING : REGEXPโ Anchored pattern match of REGEXP in STRINGmatch STRING REGEXPโ Same asSTRING : REGEXPsubstr STRING POS LENโ Substring of STRING, POS counts from 1index STRING CHARSโ Index in STRING where any CHARS is found, or 0length STRINGโ Length of STRINGquote TOKENโ Interpret TOKEN as a string, even if it is a keyword likematchor an operator like/(EXPRESSION)โ Value of EXPRESSION
Beware that many operators need to be escaped or quoted for shells. Comparisons are arithmetic if both ARGs are numbers, else lexicographical. Pattern matches return the string matched between\(and\)or null; if\(and\)are not used, they return the number of characters matched or 0. ๐ญ
๐ธ factor
factor [NUMBER]...
Print prime factors.
๐ fallocate
fallocate [-o OFS] -l LEN FILE
Preallocate space for FILE.
-o OFSโ Offset of range-l LENโ Length of range
๐ฆ fatattr
fatattr [-+rhsvda] FILE...
Change file attributes on FAT filesystem.
-โ Clear attributes+โ Set attributesrโ Read onlyhโ Hiddensโ Systemvโ Volume labeldโ Directoryaโ Archive
๐ฅ fdisk
fdisk [-ul] [-C CYLINDERS] [-H HEADS] [-S SECTORS] [-b SSZ] [-t
PARTTYPE] DISK
Change partition table.
-uโ Start and End are in sectors (instead of cylinders)-lโ Show partition table for each DISK, then exit-b 2048โ (for certain MO disks) use 2048-byte sectors-T PARTTYPEโ Force'dos'partition if'gpt'also present-C CYLINDERSโ Set number of cylinders/heads/sectors-H HEADSโ Typically 255-S SECTORSโ Typically 63
๐ find
find [-HL] [PATH]... [OPTIONS] [ACTIONS]
Search for files and perform actions on them. The first failed action stops processing of the current file. Defaults: PATH is the current directory, action is '-print'.
-L,-followโ Follow symlinks-Hโ ...on command line only-xdevโ Don't descend directories on other filesystems-maxdepth Nโ Descend at most N levels.-maxdepth 0applies actions to command line arguments only-mindepth Nโ Don't act on first N levels-depthโ Act on directory after traversing it
๐ Actions:
( ACTIONS )โ Group actions for-o/-a! ACTโ Invert ACT's success/failureACT1 [-a] ACT2โ If ACT1 fails, stop, else do ACT2ACT1 -o ACT2โ If ACT1 succeeds, stop, else do ACT2- Note:
-ahas higher priority than-o
- Note:
-name PATTERNโ Match file name (w/o directory name) to PATTERN-iname PATTERNโ Case insensitive-name-path PATTERNโ Match path to PATTERN-ipath PATTERNโ Case insensitive-path-regex PATTERNโ Match path to regex PATTERN-type Xโ File type is X (one of:f,d,l,b,c,s,p)-executableโ File is executable-perm MASKโ At least one mask bit (+MASK), all bits (-MASK), or exactly MASK bits are set in file's mode-mtime DAYSโ mtime is greater than (+N), less than (-N), or exactly N days in the past-atime DAYSโ atime+N/-N/Ndays in the past-ctime DAYSโ ctime+N/-N/Ndays in the past-mmin MINSโ mtime is greater than (+N), less than (-N), or exactly N minutes in the past-amin MINSโ atime+N/-N/Nminutes in the past-cmin MINSโ ctime+N/-N/Nminutes in the past-newer FILEโ mtime is more recent than FILE's-inum Nโ File has inode number N-samefile FILEโ File is same as FILE-user NAME/IDโ File is owned by given user-group NAME/IDโ File is owned by given group-size N[bck]โ File size is N (c:bytes,k:kbytes,b:512 bytes (def.)).+/-N: file size is bigger/smaller than N-links Nโ Number of links is greater than (+N), less than (-N), or exactly N-emptyโ Match empty file/directory-pruneโ If current file is directory, don't descend into it
If none of the following actions is specified, -print is assumed.
-printโ Print file name-print0โ Print file name, NUL terminated-exec CMD ARG ;โ Run CMD with all instances of{}replaced by file name. Fails if CMD exits with nonzero-exec CMD ARG +โ Run CMD with{}replaced by list of file names-ok CMD ARG ;โ Prompt and run CMD with{}replaced-quitโ Exit
๐ซถ findfs
findfs LABEL=label | UUID=uuid
Find filesystem device based on label or UUID.
๐ fold
fold [-bs] [-w WIDTH] [FILE]...
Wrap input lines in FILEs (or stdin), writing to stdout.
-bโ Count bytes rather than columns-sโ Break at spaces-wโ Use WIDTH columns instead of 80
โญ free
free [-bkmgh]
Display free and used memory.
๐ freeramdisk
freeramdisk DEVICE
Free all memory used by the specified ramdisk.
๐ง fsfreeze
fsfreeze --[un]freeze MOUNTPOINT
Flush and halt writes to MOUNTPOINT.
๐ fstrim
fstrim [OPTIONS] MOUNTPOINT
-o OFFSETโ Offset in bytes to discard from-l LENโ Bytes to discard-m MINโ Minimum extent length-vโ Print number of discarded bytes
๐ ftpget
ftpget [OPTIONS] HOST [LOCAL_FILE] REMOTE_FILE
Download a file via FTP.
-cโ Continue previous transfer-vโ Verbose-u USERโ Username-p PASSโ Password-P PORT
โจ ftpput
ftpput [OPTIONS] HOST [REMOTE_FILE] LOCAL_FILE
Upload a file to a FTP server.
-vโ Verbose, baby. It yaps about what's happening ๐ฌ-u USERโ the Username you're logging in as-p PASSโ the Password (yes, on the command line, iykyk ๐ฌ)-P PORTโ which PORT to hit
๐ธ getfattr ๐ธ
getfattr [-h] {-d|-n ATTR} FILE...
Grab those extended attributes, bestie โจ
-hโ do not follow symlinks, we stay in our lane-dโ dump every attribute, no crumbs left-n ATTRโ get just the one attribute,ATTR, and that's it ๐
๐ getopt ๐
getopt [OPTIONS] [--] OPTSTRING PARAMS
The option-parsing icon ๐
-aโ let long options start with a single-(chaotic, but ok)-l LOPT[,...]โ the long options to recognize-n PROGNAMEโ what name gets blamed when errors are reported-o OPTSTRINGโ the short options to recognize-qโ no error messages when it hits something unrecognized ๐คซ-Qโ no normal output at all-s SHELLโ set the shell quoting conventions-Tโ version test, exits with4-uโ don't quote the output
Example, fr fr:
O=`getopt -l bb: -- ab:c:: "$@"` || exit 1 eval set -- "$O" while true;
do case "$1" in -a) echo A; shift;; -b|--bb) echo
"B:'$2'"; shift 2;; -c) case "$2" in "") echo C; shift
2;; *) echo "C:'$2'"; shift 2;; esac;;
--) shift; break;; *) echo Error; exit 1;; esac done
๐ฆ getty ๐ฆ
getty [OPTIONS] BAUD_RATE[,BAUD_RATE]... TTY [TERMTYPE]
Opens the TTY, asks for a login name, then runs /bin/login. The original main character of terminal logins ๐
-hโ turn on hardware RTS/CTS flow control-Lโ set CLOCAL (aka ignore the Carrier Detect state, we're unbothered)-mโ snag the baud rate from the modem's CONNECT status message-nโ don't prompt for a login name at all-wโ wait for CR or LF before sending/etc/issue-iโ don't display/etc/issue-f ISSUE_FILEโ showISSUE_FILEinstead of/etc/issue-l LOGINโ invokeLOGINinstead of/bin/login-t SECโ terminate afterSECif no login name was read ๐ญ-I INITSTRโ sendINITSTRbefore literally anything else-H HOSTโ logHOSTinto the utmp file as the hostname
ABAUD_RATEof0leaves it unchanged. Zero = hands off, ok? ๐
๐ grep ๐
grep [-HhnlLoqvsrRiwFEz] [-m N] [-A|B|C N] { PATTERN | -e PATTERN... |
-f FILE... } [FILE]...
Search for PATTERN in the FILEs (or in stdin if you're feeling mysterious). The moment you got here you already knew her ๐
-Hโ add afilename:prefix-hโ do not add afilename:prefix-nโ add aline_no:prefix-lโ show only the names of files that match-Lโ show only the names of files that don't match-cโ show only the count of matching lines-oโ show only the matching part of the line-qโ quiet mode. Returns0ifPATTERNis found,1otherwise ๐ค-vโ flip it, select the non-matching lines-sโ suppress open and read errors-rโ recurse ๐-Rโ recurse and dereference symlinks-iโ ignore case-wโ match whole words only-xโ match whole lines only-FโPATTERNis a literal (not a regexp)-EโPATTERNis an extended regexp-zโ NUL terminated input-m Nโ match up toNtimes per file-A Nโ printNlines of trailing context-B Nโ printNlines of leading context-C Nโ same as-A N -B N-e PTRNโ pattern to match-f FILEโ read the pattern from a file
๐ groups ๐
groups [USER]
Prints the groups USER is in. Short, sweet, slayed ๐ซถ
๐ gunzip ๐
gunzip [-cfkt] [FILE]...
Decompress the FILEs (or stdin).
-cโ write to stdout-fโ force it-kโ keep the input files ๐-tโ test integrity
โญ gzip โญ
gzip [-cfkdt] [FILE]...
Compress the FILEs (or stdin).
-dโ decompress-cโ write to stdout-fโ force it-kโ keep the input files ๐-tโ test integrity
๐ halt ๐
halt [-d DELAY] [-nfw]
Halts the system. Like, the whole system. Respect the power, bestie ๐
-d SECโ delay interval ofSEC-nโ do not sync-fโ force it (don't go through init)-wโ only write a wtmp record, nothing else
๐ head ๐
head [OPTIONS] [FILE]...
Prints the first 10 lines of the FILEs (or stdin). If you hand it more than one FILE, it puts a filename header in front of each one so you know which is which โจ
-n N[bkm]โ print the firstNlines-n -N[bkm]โ print all except the lastNlines-c [-]N[bkm]โ print the firstNbytes- sizing goes like this:
(b:*512 k:*1024 m:*1024^2)
- sizing goes like this:
-qโ never print headers-vโ always print headers
๐ฆ hexdump ๐ฆ
hexdump [-bcdoxCv] [-e FMT] [-f FMT_FILE] [-n LEN] [-s OFS] [FILE]...
Displays the FILEs (or stdin) in a format you specify. Absolute legend behaviour ๐
-bโ 1-byte octal display-cโ 1-byte character display-dโ 2-byte decimal display-oโ 2-byte octal display-xโ 2-byte hex display-Cโ hex + ASCII, 16 bytes per line-vโ show all of it (no dup folding)-e FORMAT_STRโ example:'16/1 "%02x|""\n"'-f FORMAT_FILEโ pull the format from a file-n LENGTHโ show only the firstLENGTHbytes-s OFFSETโ skipOFFSETbytes
๐ธ hostid ๐ธ
hostid
Prints out a unique 32-bit identifier for the machine. That's it, that's the whole vibe ๐
๐ hostname ๐
hostname [-sidf] [HOSTNAME | -F FILE]
Show or set the hostname or DNS domain name.
-sโ short-iโ addresses for the hostname-dโ DNS domain name-fโ fully qualified domain name-F FILEโ useFILE's content as the hostname
๐ฅ httpd ๐ฅ
httpd [-ifv[v]] [-c CONFFILE] [-p [IP:]PORT] [-M MAXCONN] [-K KILLSEC]
[-u USER[:GRP]] [-r REALM] [-h HOME] or httpd -d/-e/-m STRING
Listen for incoming HTTP requests. Yes, in busybox. Yes, she's iconic ๐
-iโ inetd mode-fโ run in the foreground-v[v]โ verbose (and-vv? even more verbose, bestie)-p [IP:]PORTโ bind toIP:PORT(default*:80)-M NUMโ pause ifNUMconnections are open (default256)-K NUMโ kill the CGIs afterNUMseconds-u USER[:GRP]โ set uid/gid after binding to the port-r REALMโ Authentication Realm for Basic Authentication-h HOMEโ home directory (default.)-c FILEโ configuration file (default{/etc,HOME}/httpd.conf)-m STRINGโ MD5 cryptSTRING-e STRINGโ HTML encodeSTRING-d STRINGโ URL decodeSTRING
๐ hwclock ๐
hwclock [-ul] [-f DEV] [-s|-w|--systz|--param-get PARAM|--param-set
PARAM=VAL]
Show or set the hardware clock, aka the RTC โฐ
-f DEVโ use this device (e.g./dev/rtc2)-uโ assume the RTC is kept in UTC-lโ assume the RTC is kept in local time- (if neither
-unor-lis given, it reads from/etc/adjtime)
- (if neither
-sโ set the system time from the RTC-wโ set the RTC from the system time--systzโ set the in-kernel timezone, and correct the system time if the RTC is kept in local time--param-get PARAMโ get an RTC parameter--param-set PARAM=VALโ set an RTC parameter
๐ฆ i2cdetect ๐ฆ
i2cdetect -l | -F I2CBUS | [-ya] [-q|-r] I2CBUS [FIRST LAST]
Detect I2C chips ๐
-lโ list the installed buses-F BUS#โ list functionalities on this bus-yโ disable interactive mode-aโ force scanning of non-regular addresses-qโ use smbus quick write commands for probing (this is the default)-rโ use smbus read byte commands for probingFIRSTandLASTlimit the probing range
๐ i2cdump ๐
i2cdump [-fy] [-r FIRST-LAST] BUS ADDR [MODE]
Examine I2C registers ๐
I2CBUSโ the I2C bus numberADDRESSโ0x03-0x77
MODE is:
bโ Byte (default)wโ WordWโ Word on even register addressesiโ I2C blocksโ SMBus blockcโ Consecutive byte
Append p for SMBus PEC โจ
-fโ force access-yโ disable interactive mode-rโ limit the number of registers being accessed
๐ i2cget ๐
i2cget [-fy] BUS CHIP-ADDRESS [DATA-ADDRESS [MODE]]
Read from I2C/SMBus chip registers.
I2CBUSโ the I2C bus numberADDRESSโ0x03-0x77
MODE is:
bโ read byte data (default)wโ read word datacโ write byte / read byte
Append p for SMBus PEC โจ
-fโ force access-yโ disable interactive mode
โญ i2cset โญ
i2cset [-fy] [-m MASK] BUS CHIP-ADDRESS DATA-ADDRESS [VALUE] ... [MODE]
Set I2C registers. Writing rights, use them wisely ๐ซถ
I2CBUSโ the I2C bus numberADDRESSโ0x03-0x77
MODE is:
cโ Byte, no valuebโ Byte data (default)wโ Word dataiโ I2C block datasโ SMBus block data
Append p for SMBus PEC โจ
-fโ force access-yโ disable interactive mode-rโ read back and compare the result-m MASKโ a mask specifying which bits to write
๐ธ i2ctransfer ๐ธ
i2ctransfer [-fay] I2CBUS { rLENGTH[@ADDR] | wLENGTH[@ADDR] DATA...}...
Read/write I2C data in one transfer. Efficient queen ๐
-fโ force access to busy addresses-aโ force access to non-regular addresses-yโ disable interactive mode
๐ id ๐
id [-ugGnr] [USER]
Print information about USER, or about the current user if you don't name anyone.
-uโ user ID-gโ group ID-Gโ supplementary group IDs-nโ print names instead of numbers-rโ print the real ID instead of the effective ID
๐ฅ ifconfig ๐ฅ
ifconfig [-a] [IFACE] [ADDRESS]
Configure a network interface ๐
[add ADDRESS[/PREFIXLEN]][del ADDRESS[/PREFIXLEN]][[-]broadcast [ADDRESS]][[-]pointopoint [ADDRESS]][netmask ADDRESS][dstaddr ADDRESS][outfill NN][keepalive NN][hw ether|infiniband ADDRESS][metric NN][mtu NN][[-]trailers][[-]arp][[-]allmulti][multicast][[-]promisc][txqueuelen NN][[-]dynamic][mem_start NN][io_addr NN][irq NN][up|down] ...
๐ฆ ifdown ๐ฆ
ifdown [-nmvf] [-i FILE] -a | IFACE...
Bring those interfaces down, bestie ๐
-aโ deconfigure all interfaces-i FILEโ useFILEinstead of/etc/network/interfaces-nโ dry run- (note: doesn't disable mappings)
-mโ don't run any mappings-vโ print out what would happen before doing it-fโ force
๐ ifup ๐
ifup [-nmvf] [-i FILE] -a | IFACE...
Bring those interfaces up, bestie ๐ Same energy, opposite direction ๐
-aโ config every interface, all of them, no stragglers โจ-i FILEโ use FILE instead of/etc/network/interfaces-nโ dry run (heads up tho: this does not disable mappings ๐)-mโ don't run any mappings-vโ print out what would happen before it actually does the thing-fโ force it ๐
init
init
init is literally the first process started during boot, and it never exits. It (re)spawns its children according to /etc/inittab. Signals it listens to:
- HUP: reload
/etc/inittab - TSTP: stop respawning until CONT
- QUIT: re-exec another init
- USR1/TERM/USR2/INT: run halt/reboot/poweroff/Ctrl-Alt-Del script
insmod
insmod FILE [SYMBOL=VALUE]...
Load a kernel module. That's it, that's the whole thing ๐ง
install
install [-cdDsp] [-o USER] [-g GRP] [-m MODE] [-t DIR] [SOURCE]... DEST
Copy files and set their attributes โ it's cp but with main character energy ๐
-cโ just copy (this is the default)-dโ create directories-Dโ create leading target directories-sโ strip symbol table-pโ preserve date-o USERโ set ownership-g GRPโ set group ownership-m MODEโ set permissions-t DIRโ install to DIR
ionice
ionice [-c 1-3] [-n 0-7] [-t] { -p PID | PROG ARGS }
Change the I/O priority and class ๐
-c Nโ class.1:realtime2:best-effort3:idle-n Nโ priority-tโ ignore errors
ip
ip [OPTIONS] address|route|link|tunnel|neigh|rule [ARGS]
OPTIONS := -f[amily] inet|inet6|link | -o[neline]
ip addr add|del IFADDR dev IFACE | show|flush [dev IFACE] [to PREFIX]
ip route list|flush|add|del|change|append|replace|test ROUTE
ip link set IFACE [up|down] [arp on|off] [multicast on|off]
[promisc on|off] [mtu NUM] [name NAME] [qlen NUM] [address MAC]
[master IFACE | nomaster] [netns PID] [type TYPE ARGS]
ip tunnel add|change|del|show [NAME]
[mode ipip|gre|sit] [remote ADDR] [local ADDR] [ttl TTL]
ip neigh show|flush [to PREFIX] [dev DEV] [nud STATE]
ip rule [list] | add|del SELECTOR ACTION
Bestie, ip is the whole networking toolkit in one command. It does a lot. ๐
ipcalc
ipcalc [-bnmphs] ADDRESS[/PREFIX] [NETMASK]
Calculate and display network settings from an IP address โจ
-bโ broadcast address-nโ network address-mโ default netmask for IP-pโ prefix for IP/NETMASK-hโ resolved host name-sโ no error messages
kill
kill [-l] [-SIG] PID...
Send a signal (default: TERM) to the given PIDs ๐ช
-lโ list all signal names and numbers
killall
killall [-lq] [-SIG] PROCESS_NAME...
Send a signal (default: TERM) to the given processes
-lโ list all signal names and numbers-qโ don't complain if no processes were killed
klogd
klogd [-c N] [-n]
Log kernel messages to syslog ๐
-c Nโ print to console messages more urgent than prio N (1-8)-nโ run in foreground
last
last
Show a listing of the last users that logged into the system. A little spooky, a little slay ๐ฏ๏ธ
less
less [-EFIMmNSRh~] [FILE]...
View FILE (or stdin) one screenful at a time โ the original pager, still iconic ๐
-Eโ quit once the end of a file is reached-Fโ quit if the entire file fits on the first screen-Iโ ignore case in all searches-M,-mโ display status line with line numbers and percentage through the file-Nโ prefix line number to each line-Sโ truncate long lines-Rโ remove color escape codes in input-~โ suppress~s displayed past EOF
link
link FILE LINK
Create a hard LINK to FILE ๐ซถ
ln
ln [-sfnbtv] [-S SUF] TARGET... LINK|DIR
Create a link LINK or DIR/TARGET to the specified TARGET(s) ๐
-sโ make symlinks instead of hardlinks-fโ remove existing destinations-nโ don't dereference symlinks โ treat like a normal file-bโ make a backup of the target (if it exists) before the link operation-S SUFโ use SUF as the suffix instead of~when making backup files-Tโ treat LINK as a file, not a DIR-vโ verbose
loadfont
loadfont < font
Load a console font from stdin ๐ค
loadkmap
loadkmap < keymap
Load a binary keyboard translation table from stdin โจ๏ธ
logger
logger [-s] [-t TAG] [-p PRIO] [MESSAGE]
Write MESSAGE (or stdin) to syslog ๐
-sโ log to stderr as well as the system log-t TAGโ log using the specified tag (defaults to user name)-p PRIOโ priority (a number, or a FACILITY.LEVEL pair)
login
login [-p] [-h HOST] [[-f] USER]
Begin a new session on the system ๐ธ
-fโ don't authenticate (the user is already authenticated)-h HOSTโ host the user came from (for network logins)-pโ preserve environment
Environment variable time:
$LOGIN_TIMEOUTโ seconds (default60,0disables it)
logname
logname
Print the name of the current user. Yes queen, who even are you ๐
logread
logread [-fF]
Show messages in syslogd's circular buffer ๐
-fโ output data as the log grows-Fโ same as-f, but dump the buffer first
losetup
losetup [-rP] [-o OFS] {-f|LOOPDEV} FILE: associate loop devices
losetup -c LOOPDEV: reread file size
losetup -d LOOPDEV: disassociate
losetup -a: show status
losetup -f: show next free loop device
-o OFSโ start OFS bytes into FILE-Pโ scan for partitions-rโ read-only-fโ show/use the next free loop device
ls
ls [-1AaCxdLHRFplinshrSXvctu] [-w WIDTH] [FILE]...
List directory contents โ the most-used command in the whole entire world, no cap โจ
-1โ one column output-aโ include names starting with.-Aโ like-a, but exclude.and..-xโ list by lines-dโ list directory names, not contents-Lโ follow symlinks-Hโ follow symlinks on the command line-Rโ recurse-pโ append/to directory names-Fโ append indicator (one of*/=@|) to names-lโ long format-iโ list inode numbers-nโ list numeric UIDs and GIDs instead of names-sโ list allocated blocks-lcโ list ctime-luโ list atime--full-timeโ list full date/time-hโ human readable sizes (1K243M2G)--group-directories-first-Sโ sort by size-Xโ sort by extension-vโ sort by version-tโ sort by mtime-tcโ sort by ctime-tuโ sort by atime-rโ reverse sort order-w Nโ format N columns wide--color[={always,never,auto}]
lsattr
lsattr [-Radlpv] [FILE]...
List ext2 file attributes ๐ฆ
-Rโ recurse-aโ include names starting with.-dโ list directory names, not contents-lโ list long flag names-pโ list project ID-vโ list version/generation number
lsblk
lsblk [BLOCKDEV]...
List block devices ๐พ
lsmod
lsmod
List loaded kernel modules ๐งฉ
lzcat
lzcat [FILE]...
Decompress to stdout ๐
lzma
lzma -d [-cfk] [FILE]...
Decompress *FILE*s (or stdin) ๐ฆ
-dโ decompress-cโ write to stdout-fโ force-kโ keep input files-tโ test integrity
lzop
lzop [-cfUvd123456789CF] [FILE]...
-1..9โ compression level-dโ decompress-cโ write to stdout-fโ force-Uโ delete input files-vโ verbose-Fโ don't store or verify checksum-Cโ also write checksum of compressed block
md5sum
md5sum [-c[sw]] [FILE]...
Print or check MD5 checksums ๐
-cโ check sums against list in *FILE*s-sโ don't output anything, status code shows success-wโ warn about improperly formatted checksum lines
mdev
mdev [-vS] { [-s] | [-df] }
-vโ verbose-Sโ log to syslog too-sโ scan/sysand populate/dev-dโ daemon, listen on netlink-fโ run in foreground
Bare mdev is a kernel hotplug helper. To activate it:
echo /sbin/mdev >/proc/sys/kernel/hotplug
It uses /etc/mdev.conf with lines like:
[-][ENV=regex;]...DEVNAME UID:GID PERM [>|=PATH]|[!] [@|$|*PROG]
where DEVNAME is a device name regex, @major,minor[-minor2], or an environment variable regex. A common use of the latter is loading modules for hotplugged devices:
$MODALIAS=.* 0:0 660 @modprobe "$MODALIAS"
If /dev/mdev.seq exists, mdev will wait for its value to match the $SEQNUM variable. This prevents plug/unplug races ๐. To activate this feature, create an empty /dev/mdev.seq at boot.
If /dev/mdev.log exists, the debug log will be appended to it ๐
microcom
microcom [-d DELAY_MS] [-t TIMEOUT_MS ] [-s SPEED] [-X] TTY
Copy bytes from stdin to TTY and from TTY to stdout ๐
-d DELAYโ wait up to DELAY ms for TTY output before sending every next byte to it-t TIMEOUTโ exit if both stdin and TTY are silent for TIMEOUT ms-s SPEEDโ set serial line to SPEED-Xโ disable special meaning of NUL and Ctrl-X from stdin
mim
mim [-f FILE] [SHELL_OPTIONS] [TARGET] ...
Run a script from a Makefile-like specification file ๐
-f FILEโ spec file (default Mimfile)
mkdir
mkdir [-m MODE] [-p] DIRECTORY...
Create DIRECTORY ๐
-m MODEโ mode-pโ no error if it exists; make parent directories as needed
mkdosfs
mkdosfs [-v] [-n LABEL] BLOCKDEV [KBYTES]
Make a FAT32 filesystem ๐ฝ
-vโ verbose-n LBLโ volume label
mke2fs
mke2fs [-Fn] [-b BLK_SIZE] [-i INODE_RATIO] [-I INODE_SIZE] [-m RESERVED_PERCENT] [-L LABEL] BLOCKDEV [KBYTES]
-b BLK_SIZEโ block size, bytes-Fโ force-i RATIOโ max number of files isfilesystem_size / RATIO-I BYTESโ inode size (min128)-L LBLโ volume label-m PERCENTโ percent of blocks to reserve for admin-nโ dry run
mkfifo
mkfifo [-m MODE] NAME
Create a named pipe ๐
-m MODEโ mode (defaulta=rw)
mknod
mknod [-m MODE] NAME TYPE [MAJOR MINOR]
Create a special file (block, character, or pipe) ๐งฟ
-m MODEโ creation mode (defaulta=rw)
TYPE:
bโ block devicecoruโ character devicepโ named pipe (MAJOR MINOR must be omitted)
mkpasswd
mkpasswd [-P FD] [-m TYPE] [-S SALT] [PASSWORD] [SALT]
Print crypt(3) hashed PASSWORD ๐
-P Nโ read password from fd N-m TYPEโdes,md5,sha256/512,yescrypt(defaultsha256)-S SALT
๐ง mkswap
mkswap [-L LBL] BLOCKDEV [KBYTES]
bestie we're getting a BLOCKDEV ready to be a swap partition, no cap ๐
-L LBLโ the Label, slay
๐ธ mktemp
mktemp [-dt] [-p DIR] [TEMPLATE]
Makes a temp file with a name built off TEMPLATE, then prints that name. TEMPLATE has to end in XXXXXX (like [/dir/]nameXXXXXX, fr fr). If you don't give a TEMPLATE at all, it just assumes -t tmp.XXXXXX ๐
-dโ make a directory, not a file-qโ fail but stay silent about it-tโ stick the base directory name on the front ofTEMPLATE-p DIRโ useDIRas the base directory (and yes, it implies-t)-uโ don't actually create anything, just print a name ๐ (naming without making, main character energy)
The base directory goes: -p DIR first, else $TMPDIR, else /tmp โ that's the order, periodt.
๐ modinfo
modinfo [-adlpn0] [-F keyword] MODULE
-aโ shortcut for-F author-dโ shortcut for-F description-lโ shortcut for-F license-pโ shortcut for-F parm-F keywordโ the keyword you're hunting for-0โ NUL terminated output
โจ modprobe
modprobe [-alrqvsDb] MODULE [SYMBOL=VALUE]...
-aโ load multipleMODULEs at once-lโ list (hereMODULEis a pattern)-rโ removeMODULE(stacks included) or do an autoclean-qโ quiet mode-vโ verbose, tell me everything-sโ log to syslog-Dโ show dependencies-bโ apply the blacklist to module names too
๐ฆ more
more [FILE]...
Look at FILE (or stdin if you gave nothing) one screenful at a time. Baby steps, we love her ๐ซถ
๐ mount
mount [OPTIONS] [-o OPT] DEVICE NODE
Mounts a filesystem. Heads up bestie: filesystem autodetection requires /proc ๐
-aโ mount everything in fstab-fโ dry run-iโ don't run the mount helper-rโ read-only mount-t FSTYPE[,...]โ filesystem type(s)-T FILEโ readFILEinstead of/etc/fstab-O OPTโ only mount filesystems that have optionOPT(and that's-aonly, iykyk)
-o OPT options, gather round:
loopโ ignored (loop devices are autodetected, we don't need to do anything)[a]syncโ writes are[a]synchronous[no]atimeโ disable/enable updates to inode access times[no]diratimeโ disable/enable atime updates to directories[no]relatimeโ disable/enable atime updates relative to modification time[no]devโ (dis)allow use of special device files[no]execโ (dis)allow use of executable files[no]suidโ (dis)allow set-user-id-root programs[r]sharedโ convert [recursively] to a shared subtree[r]slaveโ convert [recursively] to a slave subtree[r]privateโ convert [recursively] to a private subtree[un]bindableโ make mount point [un]able to be bind mounted[r]bindโ bind a file or directory [recursively] to another locationmoveโ relocate an existing mount pointremountโ remount a mounted filesystem, changing flagsroโ same as-r
There are filesystem-specific -o flags too, so don't be shocked when your fstype has its own lil menu ๐
๐ mt
mt [-f DEVICE] OPCODE VALUE
Controls magnetic tape drive operation. Retro icon behavior honestly ๐ผ
Opcodes:
bsf bsfm bsr bss datacompression drvbuffer eof eom erase fsf fsfm fsr
fss load lock mkpart nop offline ras1 ras2 ras3 reset retension rewind
rewoffline seek setblk setdensity setpart tell unload unlock weof wset
๐ mv
mv [-finT] SOURCE DEST
or:
mv [-fin] SOURCE... { -t DIRECTORY | DIRECTORY }
Rename SOURCE to DEST, or move your SOURCEs on over to DIRECTORY ๐
-fโ don't prompt before overwriting, we move fast-iโ interactive, prompt before overwriting-nโ don't overwrite an existing file-Tโ refuse to move ifDESTis a directory-t DIRโ move allSOURCEs intoDIR
๐ธ nameif
nameif [-s] [-c FILE] [IFNAME HWADDR]...
Renames a network interface while it's in the down state. Whatever device has address HWADDR gets renamed to IFNAME, simple as ๐
-c FILEโ configuration file (default:/etc/mactab)-sโ log to syslog
โญ nbd-client
nbd-client { [-b BLKSIZE] [-N NAME] [-t SEC] [-p] HOST [PORT] | -d } BLOCKDEV
Connects to HOST and gives you a network block device on BLOCKDEV โจ
๐ฆ nc
nc [-iN] [-wN] [-l] [-p PORT] [-f FILE|IPADDR PORT] [-e PROG]
Opens a pipe to IP:PORT or to a FILE
-lโ listen mode, for inbound connects (use-llwith-efor a persistent server โ yes, double-l, she's special ๐)-p PORTโ local port-w SECโ connect timeout-i SECโ delay interval for lines sent-f FILEโ use a file (ala/dev/ttyS0) instead of the network-e PROGโ runPROGafter connect
๐ netstat
netstat [-ral] [-tuwx] [-en]
Shows off networking information ๐
-rโ routing table-aโ all sockets-lโ listening sockets otherwise: connected sockets-tโ TCP sockets-uโ UDP sockets-wโ raw sockets-xโ Unix sockets otherwise: all socket types-eโ other/more information-nโ don't resolve names
๐ nl
nl [OPTIONS] [FILE]...
Writes your FILEs to standard output with line numbers added. Numbering girlies rise ๐ซถ
-b STYLEโ which lines to number โa: all,t: nonempty,n: none-i Nโ line number increment-s STRINGโ useSTRINGas the line number separator-v Nโ start fromN-w Nโ width of line numbers
๐ nohup
nohup PROG ARGS
Runs PROG immune to hangups, with output going to a non-tty. She cannot be hung up on, she's booked and busy ๐
๐ nologin
nologin
Politely refuses a login. Not mean, just boundaried ๐
โจ nproc
nproc [--all] [--ignore=N]
Prints the number of available CPUs ๐ฅ๏ธ
--allโ number of installed CPUs--ignore=Nโ excludeNCPUs
๐ง nsenter
nsenter [OPTIONS] [PROG ARGS]
-t PIDโ target process to get namespaces from-m[FILE]โ enter mount namespace-u[FILE]โ enter UTS namespace (hostname etc)-i[FILE]โ enter System V IPC namespace-n[FILE]โ enter network namespace-p[FILE]โ enter pid namespace-U[FILE]โ enter user namespace-S UIDโ set uid in the entered namespace-G GIDโ set gid in the entered namespace--preserve-credentialsโ don't touch uids or gids-r[DIR]โ set root directory-w[DIR]โ set working directory-Fโ don't fork before exec'ingPROG
๐ฆ nslookup
nslookup [-type=QUERY_TYPE] [-debug] HOST [DNS_SERVER]
Queries DNS about HOST ๐
QUERY_TYPE: soa, ns, a, aaaa, cname, mx, txt, ptr, srv, any
๐ nuke
nuke DIR...
Removes DIRs. That's it. That's the whole vibe. Not me being dramatic โ it's literally called nuke ๐
๐ธ od
od [-abcdfhilovxs] [-t TYPE] [-A RADIX] [-N SIZE] [-j SKIP] [-S MINSTR]
[-w WIDTH] [FILE]...
Prints your FILEs (or stdin) unambiguously, as octal bytes by default. Every byte accounted for, no secrets โจ
โญ openvt
openvt [-c N] [-sw] [PROG ARGS]
Starts PROG on a brand new virtual terminal ๐ฅ๏ธ
-c Nโ use the specified VT-sโ switch to the VT-wโ wait forPROGto exit
๐ partprobe
partprobe DEVICE...
Asks the kernel to rescan the partition table. "hey king, look again" energy ๐
๐ passwd
passwd [-a ALG] [-dlu] [USER]
Changes USER's password (default: current user) ๐
-a ALGโdes,md5,sha256/512,yescrypt(defaultsha256)-dโ set password to''-lโ lock (disable) account-uโ unlock (enable) account
๐ paste
paste [-d LIST] [-s] [FILE]...
Pastes lines from each input file, separated with tab
-d LISTโ use delimiters fromLIST, not tab-sโ serial: one file at a time
๐ฆ patch
patch [-RNE] [-p N] [-i DIFF] [ORIGFILE [PATCHFILE]]
-p Nโ stripNleading components from file names-i DIFFโ readDIFFinstead of stdin-Rโ reverse patch-Nโ ignore already applied patches-Eโ remove output files if they become empty--dry-runโ don't actually change files
โจ pidof
pidof [NAME]...
Lists the PIDs of all processes whose names match your NAMEs ๐ต๏ธ
๐ง ping
ping [OPTIONS] HOST
Sends ICMP ECHO_REQUESTs to HOST ๐ก
-4,-6โ force IP or IPv6 name resolution-c CNTโ send onlyCNTpings-s SIZEโ sendSIZEdata bytes in packets (default56)-i SECSโ interval-Aโ ping as soon as the reply is received-t TTLโ set TTL-I IFACE/IPโ source interface or IP address-W SECโ seconds to wait for the first response (default10) (that's after all-c CNTpackets are sent)-w SECโ seconds until ping exits (default: infinite) (it can exit earlier with-c CNT)-qโ quiet, only display output at start/finish-p HEXBYTEโ payload pattern
๐ ping6
ping6 [OPTIONS] HOST
Sends ICMP ECHO_REQUESTs to HOST ๐ก
-c CNTโ send onlyCNTpings-s SIZEโ sendSIZEdata bytes in packets (default56)-i SECSโ interval-Aโ ping as soon as the reply is received-I IFACE/IPโ source interface or IP address-W SECโ seconds to wait for the first response (default10) (after all-c CNTpackets are sent)-w SECโ seconds until ping exits (default: infinite) (can exit earlier with-c CNT)-qโ quiet, only display output at start/finish-p HEXBYTEโ payload pattern
๐ pivot_root
pivot_root NEW_ROOT PUT_OLD
Moves the current root file system over to PUT_OLD and makes NEW_ROOT the new root file system. Glow up but for your filesystem hierarchy ๐
๐ธ poweroff
poweroff [-d DELAY] [-nf]
Halts and shuts off power โก
-d SECโ delay interval-nโ do not sync-fโ force (don't go through init)
โญ printf
printf FORMAT [ARG]...
Formats and prints your ARG(s) according to FORMAT (a-la C printf) ๐
๐ฆ ps
ps [-o COL1,COL2=HEADER] [-T]
Shows the list of processes ๐
-o COL1,COL2=HEADERโ select columns for display-Tโ show threads
๐ pwd
pwd
Prints the full filename of the current working directory. Where am I? Here, bestie ๐
๐ rdate
rdate [-s/-p] HOST
Sets and prints the time from HOST using RFC 868 โฐ
-sโ only set system time-pโ only print time
โจ readlink
readlink [-fnv] FILE
Displays the value of a symlink ๐
-nโ don't add newline-fโ canonicalize by following all symlinks-vโ verbose
๐ง realpath
realpath FILE...
Prints absolute pathnames of your FILEs. No shortcuts, no vibes, just the truth ๐
๐ reboot
reboot [-d DELAY] [-nf]
Reboots the system ๐
-d SECโ delay interval-nโ do not sync-fโ force (don't go through init)
๐ renice
renice [-n] PRIORITY [[-p|g|u] ID...]...
Change scheduling priority of a running process โ yep, this is the rest of that one, the priority-shifter, and here's everything it takes:
-nโ adds PRIORITY to the current nice value. Without-n, the nice value gets set to PRIORITY, periodt.-pโ process ids (this is the default one, no cap)-gโ process group ids-uโ process user names
๐ reset
reset
Resets your terminal (that's the ESC codes) and resets termios too โ signals, buffering, echo, all of it. Your terminal was going through it and this is the glow-up โจ
๐ฆ resize
resize
Resizes the screen. That's it, that's the whole vibe ๐
๐ธ resume
resume BLOCKDEV [OFFSET]
Restores your system state from the suspend-to-disk data chilling in BLOCKDEV. Waking back up like nothing happened ๐
๐ rev
rev [FILE]...
Reverses lines of FILE. Literally the uno-reverse card for text ๐ฅ
๐
rm
rm [-irf] FILE...
Removes (unlinks) FILEs. Big power, use it responsibly bestie ๐ญ
-iโ always prompt before removing-fโ never prompt-R,-rโ recurse
Not me deleting my whole home directory with -rfโฆ do a vibe check on that path first, fr fr ๐
๐ rmdir
rmdir [-p] DIRECTORY...
Removes DIRECTORY if it is empty. If it's not empty? It's not happening, sorry diva ๐
-pโ include parents--ignore-fail-on-non-empty
โจ rmmod
rmmod [-wfa] [MODULE]...
Unloads kernel modules.
-wโ wait until the module is no longer used-fโ force unload-aโ remove all unused modules (recursively)
๐ฆ route
route [-ne] [-A inet[6]] [{add|del} [-net|-host] TARGET [netmask MASK]
[gw GATEWAY] [metric N] [mss BYTES] [window BYTES] [reject]
[IFACE]]
Shows or edits the kernel routing tables โ your lil map of where packets are headed ๐บ๏ธ
-nโ don't resolve names-eโ display other/more information-A inet[6]โ select address family
๐ธ rpm
rpm -i PACKAGE.rpm; rpm -qp[ildc] PACKAGE.rpm
Manipulates RPM packages.
Commands:
-iโ install package-qpโ query package-qpiโ show information-qplโ list contents-qpdโ list documents-qpcโ list config files
๐ rpm2cpio
rpm2cpio PACKAGE.rpm
Outputs a cpio archive of the rpm file. Unwrapping gifts, but make it archives ๐
๐ง run-init
run-init [-d CAP,CAP...] [-n] [-c CONSOLE_DEV] NEW_ROOT NEW_INIT [ARGS]
Frees the initramfs and switches to another root fs:
chroot to NEW_ROOT, delete all in /, move NEW_ROOT to /, execute NEW_INIT. PID must be 1. NEW_ROOT must be a mountpoint. Yes, it has main character energy and yes, those conditions are non-negotiable ๐
-c DEVโ reopen stdio to DEV after switch-d CAPSโ drop capabilities-nโ dry run
๐ run-parts
run-parts [-a ARG]... [-u UMASK] [--reverse] [--test] [--exit-on-error]
DIRECTORY
Runs a bunch of scripts in DIRECTORY. It's giving "group chat, everybody runs your errands" ๐ซถ
-a ARGโ pass ARG as argument to scripts-u UMASKโ set UMASK before running scripts--reverseโ reverse execution order--testโ dry run--exit-on-errorโ exit if a script exits with non-zero
๐ sed
sed [-i[SFX]] [-nrE] [-f FILE]... [-e CMD]... [FILE]...
or:
sed [-i[SFX]] [-nrE] CMD [FILE]...
The stream editor. Iconic. Legendary. She edits text and she does not miss ๐
-e CMDโ add CMD to sed commands to be executed-f FILEโ add FILE contents to sed commands to be executed-i[SFX]โ edit files in-place (otherwise write to stdout). Optionally back files up, appending SFX-nโ suppress automatic printing of pattern space-r,-Eโ use extended regex syntax
If no -e or -f, the first non-option argument is the sed command string. Remaining arguments are input files (stdin if none).
๐ seq
seq [-w] [-s SEP] [FIRST [INC]] LAST
Prints numbers from FIRST to LAST, in steps of INC. FIRST and INC both default to 1.
-wโ pad with leading zeros-s SEPโ string separator
โญ setkeycodes
setkeycodes { SCANCODE KEYCODE }...
Modifies the kernel's scancode-to-keycode map, allowing unusual keyboards to generate usable keycodes. Your weird lil keyboard gets a glow-up fr fr โจ๏ธ
SCANCODE is either xx or e0xx (hexadecimal), KEYCODE is decimal.
๐ setpriv
setpriv [OPTIONS] PROG ARGS
Runs PROG with different privilege settings.
-d,--dumpโ show current capabilities--nnp,--no-new-privsโ ignore setuid/setgid bits and file capabilities--inh-caps CAP,CAPโ set inheritable capabilities--ambient-caps CAP,CAPโ set ambient capabilities
๐ฆ setsid
setsid [-c] PROG ARGS
Runs PROG in a new session. PROG will have no controlling terminal and will not be affected by keyboard signals (^C etc).
-cโ set controlling terminal to stdin
๐ sh
sh [-il] [-|+Cabefmnuvx] [-|+o OPT]... [-c 'SCRIPT' [ARG0 ARGS] | FILE
ARGS | -s ARGS]
Unix shell interpreter. The blueprint. The original main character ๐ฅ
โจ sha1sum
sha1sum [-c[sw]] [FILE]...
Prints or checks SHA1 checksums.
-cโ check sums against list in FILEs-sโ don't output anything, status code shows success-wโ warn about improperly formatted checksum lines
โจ sha256sum
sha256sum [-c[sw]] [FILE]...
Prints or checks SHA256 checksums.
-cโ check sums against list in FILEs-sโ don't output anything, status code shows success-wโ warn about improperly formatted checksum lines
โจ sha384sum
sha384sum [-c[sw]] [FILE]...
Prints or checks SHA384 checksums.
-cโ check sums against list in FILEs-sโ don't output anything, status code shows success-wโ warn about improperly formatted checksum lines
โจ sha3sum
sha3sum [-c[sw]] [-a BITS] [FILE]...
Prints or checks SHA3 checksums.
-cโ check sums against list in FILEs-sโ don't output anything, status code shows success-wโ warn about improperly formatted checksum lines-a BITSโ224(default),256,384,512
โจ sha512sum
sha512sum [-c[sw]] [FILE]...
Prints or checks SHA512 checksums.
-cโ check sums against list in FILEs-sโ don't output anything, status code shows success-wโ warn about improperly formatted checksum lines
๐ shred
shred [-fuz] [-n N] [-s SIZE] FILE...
Overwrites/deletes FILEs. This one does NOT play around โ it's the "make it gone gone" command.
-fโ chmod to ensure writability-s SIZEโ size to write-n Nโ overwrite N times (default3)-zโ final overwrite with zeros-uโ remove file
Shredding is destructive and there's no undo, bestie. Be so sure ๐
๐ shuf
shuf [-n NUM] [-o FILE] [-z] [FILE | -e [ARG...] | -i L-H]
Randomly permutes lines.
-n NUMโ output at most NUM lines-o FILEโ write to FILE, not standard output-zโ NUL terminated output-eโ treat ARGs as lines-i L-Hโ treat numbers L-H as lines
๐ธ sleep
sleep [N]...
Pauses for a time equal to the total of the args given, where each arg can have an optional suffix of (s)econds, (m)inutes, (h)ours, or (d)ays. Me waiting for my iced coffee order โ
๐ฆ sort
sort [-nrughMcszbdfiokt] [-o FILE] [-k
START[.OFS][OPTS][,END[.OFS][OPTS]] [-t CHAR] [FILE]...
Sorts lines of text.
-o FILEโ output to FILE-cโ check whether input is sorted-bโ ignore leading blanks-fโ ignore case-iโ ignore unprintable characters-dโ dictionary order (blank or alphanumeric only)-nโ sort numbers-gโ general numerical sort-hโ sort human readable numbers (2K1G)-Mโ sort month-Vโ sort version-t CHARโ field separator-k N[,M]โ sort by Nth field-rโ reverse sort order-sโ stable (don't sort ties alphabetically)-uโ suppress duplicate lines-zโ NUL terminated input and output
๐ ssl_client
ssl_client [-n SNI] { -s FD [-r FD] | HOST | -e PROG ARGS }
๐ ssl_server
ssl_server -f PRIVKEY_CERT.pem PROG ARGS
Inetd-style TLS server.
-f PEMFILEโ HAProxy-style CRT file
๐ start-stop-daemon
start-stop-daemon -S|-K [OPTIONS] [-- ARGS]
Searches for matching processes, and then -S: start a process unless a matching process is found, -K: stop all matching processes.
Process matching:
-u USERNAME|UIDโ match only this user's processes-n NAMEโ match processes with NAME in comm field in/proc/PID/stat-x EXECUTABLEโ match processes with this command in/proc/PID/cmdline-p FILEโ match a process with PID from FILE
All specified conditions must match.
-S only:
-x EXECUTABLEโ program to run-a NAMEโ zeroth argument-bโ background-O FILEโ append stdout and stderr to FILE-N Nโ change nice level-c USER[:[GRP]]โ change user/group-d DIRโ change to DIR-mโ write PID to pidfile specified by-p
-K only:
-s SIGโ signal to send-tโ match only, exit with 0 if found
Other:
-oโ exit with status 0 if nothing is done-vโ verbose-qโ quiet
๐ stat
stat [-ltf] [-c FMT] FILE...
Displays file (default) or filesystem status.
-c FMTโ use the specified format-fโ display filesystem status-Lโ follow links-tโ terse display
FMT sequences for files:
%aโ access rights in octal%Aโ access rights in human readable form%bโ number of blocks allocated (see%B)%Bโ size in bytes of each block reported by%b%dโ device number in decimal%Dโ device number in hex%fโ raw mode in hex%Fโ file type%gโ group ID%Gโ group name%hโ number of hard links%iโ inode number%nโ file name%Nโ file name, with-> TARGETif symlink%oโ I/O block size%sโ total size in bytes%tโ major device type in hex%Tโ minor device type in hex%uโ user ID%Uโ user name%xโ time of last access%Xโ time of last access as seconds since Epoch%yโ time of last modification%Yโ time of last modification as seconds since Epoch%zโ time of last change%Zโ time of last change as seconds since Epoch
FMT sequences for file systems:
%aโ free blocks available to non-superuser%bโ total data blocks%cโ total file nodes%dโ free file nodes%fโ free blocks%iโ File System ID in hex%lโ maximum length of filenames%nโ file name%sโ block size (for faster transfer)%Sโ fundamental block size (for block counts)%tโ type in hex%Tโ type in human readable form
๐ strings
strings [-fo] [-t o|d|x] [-n LEN] [FILE]...
Displays printable strings in a binary file โ digging the readable lil sentences out of the chaos, so satisfying ๐
-fโ precede strings with filenames-oโ precede strings with octal offsets-t o|d|xโ precede strings with offsets in base 8/10/16-n LENโ at least LEN characters form a string (default4)
๐ stty
stty [-a|g] [-F DEVICE] [SETTING]...
Without arguments, prints baud rate, line discipline, and deviations from stty sane. Your terminal's whole personality report ๐
okay so the rest of stty bestie: ๐
-F DEVICEโ OpenDEVICEinstead of stdin ๐ซถ-aโ Print all current settings in human-readable form โจ-gโ Print instty-readable form ๐[SETTING]โ See manpage ๐
su ๐
su [-lmp] [-s SH] [-] [USER [FILE ARGS | -c 'CMD' [ARG0 ARGS]]]
Run shell under USER (by default, root) โ main character energy, no cap. ๐ซถ
-,-lโ Clear environment, go to home dir, run shell as login shell ๐-p,-mโ Do not set new$HOME,$SHELL,$USER,$LOGNAME๐-c CMDโ Command to pass to'sh -c'๐ฌ-s SHโ Shell to use instead of user's default ๐
sulogin ๐
sulogin [-t N] [TTY]
Single user login โ it's giving rescue mode. ๐ฅบ
-pโ Start a login shell ๐-t SECโ Timeout โณ
svc ๐ ๏ธ
svc [-udopchaitkx] SERVICE_DIR...
Control services monitored by runsv supervisor โ the way it just handles your services? Obsessed. ๐
-uโ If service is not running, start it; restart if it stops ๐-dโ If service is running, sendTERM+CONTsignals; do not restart it ๐-oโ Once: if service is not running, start it; do not restart it 1๏ธโฃ-pchaitkโ SendSTOP,CONT,HUP,ALRM,INT,TERM,KILLsignal to service ๐ฅ-xโ Exit:runsvwill exit as soon as the service is down ๐ช
svok โ
svok SERVICE_DIR
Check whether runsv supervisor is running. Exit code is 0 if it does, 100 if it does not, 111 (with error message) if SERVICE_DIR does not exist. Those exit codes matter, bestie. ๐ญ
swapoff ๐ซ
swapoff [-a] [DEVICE]
Stop swapping on DEVICE โ turn it off, periodt. ๐
-aโ Stop swapping on all swap devices ๐
swapon ๐
swapon [-a] [-e] [-d[POL]] [DEVICE]
Start swapping on DEVICE โ get that swap going, queen. ๐
-aโ Start swapping on all swap devices ๐-d[POL]โ Discard blocks atswapon(POL=once), as freed (POL=pages), or both (POLomitted) ๐๏ธ-eโ Silently skip devices that do not exist ๐คซ
switch_root ๐ฑ
switch_root [-c CONSOLE_DEV] NEW_ROOT NEW_INIT [ARGS]
Free initramfs and switch to another root fs: ๐ฆ
chroot to NEW_ROOT, delete all in /, move NEW_ROOT to /, execute NEW_INIT. PID must be 1. NEW_ROOT must be a mountpoint. This one is highkey powerful. ๐ฅ
-c DEVโ Reopen stdio toDEVafter switch ๐ฅ๏ธ
sync ๐พ
sync [-df] [FILE]...
Write all buffered blocks (in FILEs) to disk โ flush it, slay. ๐
-dโ Avoid syncing metadata ๐ท๏ธ-fโ Sync filesystems underlyingFILEs ๐๏ธ
sysctl โ๏ธ
sysctl [-enq] { -a | -p [FILE]... | [-w] [KEY[=VALUE]]... }
Show/set kernel parameters โ kernel tuning vibes. ๐ง
-eโ Don't warn about unknown keys ๐ค-nโ Don't show key names ๐-qโ Quiet ๐คซ-aโ Show all values ๐-pโ Set values fromFILEs (default/etc/sysctl.conf) ๐-wโ Set values โ๏ธ
syslogd ๐
syslogd [OPTIONS]
System logging utility โ the log queen. ๐ชต
-nโ Run in foreground ๐ฅ๏ธ-R HOST[:PORT]โ Log toHOST:PORT(defaultPORT:514) ๐-Lโ Log locally and via network (default is network only if-R) ๐-C[size_kb]โ Log to shared mem buffer (uselogreadto read it) ๐ง-O FILEโ Log toFILE(default:/var/log/messages, stdout if-) ๐-s SIZEโ Max size (KB) before rotation (default200KB,0=off) ๐-b NโNrotated logs to keep (default1, max99,0=purge) ๐๏ธ-l Nโ Log only messages more urgent than prioN(1-8) ๐จ-Sโ Smaller output ๐ค-tโ Strip client-generated timestamps โฐ-Dโ Drop duplicates ๐ฏ-f FILEโ UseFILEas config (default:/etc/syslog.conf) โ๏ธ
tac ๐
tac [FILE]...
Concatenate FILEs and print them in reverse โ reverse it, iconic. ๐
tail ๐พ
tail [OPTIONS] [FILE]...
Print last 10 lines of FILEs (or stdin) to. With more than one FILE, precede each with a filename header. โ the way it watches the end of files? Obsessed. ๐
-c [+]N[bkm]โ Print lastNbytes ๐-n N[bkm]โ Print lastNlines ๐-n +N[bkm]โ Start onNth line and print the rest (b:*512k:*1024m:*1024^2) โญ๏ธ-qโ Never print headers ๐ซ-vโ Always print headers โ-fโ Print data as file grows ๐ฑ-Fโ Same as-f, but keep retrying ๐-s SECONDSโ WaitSECONDSbetween reads with-fโณ
tar ๐ฆ
tar c|x|t [-ZzJjahmvokO] [-f TARFILE] [-C DIR] [FILE]...
Create, extract, or list files from a tar file โ archive bestie. ๐๏ธ
cโ Create โจxโ Extract ๐งฒtโ List ๐-f FILEโ Name ofTARFILE('-'for stdin/out) ๐-C DIRโ Change toDIRbefore operation ๐-vโ Verbose ๐ฃ๏ธ-Oโ Extract to stdout ๐จ๏ธ-mโ Don't restore mtime โฐ-oโ Don't restore user:group ๐ค-kโ Don't replace existing files ๐ซ-Zโ (De)compress usingcompress๐๏ธ-zโ (De)compress usinggzip๐-Jโ (De)compress usingxzโ-jโ (De)compress usingbzip2๐--lzmaโ (De)compress usinglzma๐-aโ (De)compress based on extension ๐-hโ Follow symlinks ๐--overwriteโ Replace existing files โป๏ธ--strip-components NUMโNUMof leading components to strip โ๏ธ--no-recursionโ Don't descend in directories ๐ซ--numeric-ownerโ Use numericuser:group๐ข--no-same-permissionsโ Don't restore access permissions ๐--to-command COMMANDโ Pipe files toCOMMAND๐ค
taskset ๐ฏ
taskset [-ap] [HEXMASK | -c LIST] { PID | PROG ARGS }
Set or get CPU affinity โ pin those processes, queen. ๐งฒ
-pโ Operate onPID๐-aโ Operate on all threads ๐งต-cโ Affinity is a list, not mask ๐
tc ๐ฆ
tc OBJECT CMD [dev STRING]
OBJECT: qdisc|class|filter CMD: add|del|change|replace|show โ traffic control, it's giving network royalty. ๐ ๏ธ
qdisc [handle QHANDLE] [root|ingress|parent CLASSID] [[QDISC_KIND]
[help|OPTIONS]] QDISC_KIND := [p|b]fifo|tbf|prio|red|etc. qdisc
show [dev STRING] [ingress] class [classid CLASSID] [root|parent
CLASSID] [[QDISC_KIND] [help|OPTIONS] ] class show [ dev STRING ]
[root|parent CLASSID] filter [pref PRIO] [protocol PROTO]
[root|classid CLASSID] [handle FILTERID] [[FILTER_TYPE]
[help|OPTIONS]] filter show [dev STRING] [root|parent CLASSID]
tee ๐ซ
tee [-ai] [FILE]...
Copy stdin to each FILE, and also to stdout โ split it, bestie. ๐ต
-aโ Append to the givenFILEs, don't overwrite ๐-iโ Ignore interrupt signals (SIGINT) ๐ซ
telnet ๐ก
telnet [-a] [-l USER] HOST [PORT]
Connect to telnet server โ old school but still here. ๐
-aโ Automatic login with$USERenvvar ๐ค-l USERโ Automatic login asUSER๐ค
telnetd ๐ฅ๏ธ
telnetd [OPTIONS]
Handle incoming telnet connections โ the server side, no cap. ๐
-l LOGINโ ExecLOGINon connect (default/bin/login) ๐-f ISSUE_FILEโ DisplayISSUE_FILEinstead of/etc/issue.net๐-Kโ Close connection as soon as login exits (normally wait until all programs close slave pty) ๐ช-p PORTโ Port to listen on. Default23๐ข-b ADDR[:PORT]โ Address to bind to ๐-Fโ Run in foreground ๐ฅ๏ธ-iโ Inetd mode ๐-vโ Verbose ๐ฃ๏ธ
tftp ๐
tftp [OPTIONS] HOST [PORT]
Transfer a file from/to tftp server โ simple file transfer vibes. ๐ค
-l FILEโ LocalFILE๐-r FILEโ RemoteFILE๐-gโ Get file ๐ฅ-pโ Put file ๐ค-b SIZEโ Transfer blocks in bytes ๐
time โฑ๏ธ
time [-vpa] [-o FILE] PROG ARGS
Run PROG, display resource usage when it exits โ time it, queen. ๐
-vโ Verbose ๐ฃ๏ธ-pโ POSIX output format ๐-f FMTโ Custom format ๐จ-o FILEโ Write result toFILE๐-aโ Append (else overwrite) โ
timeout โณ
timeout [-s SIG] [-k KILL_SECS] SECS PROG ARGS
Run PROG. Send SIG to it if it is not gone in SECS seconds. Default SIG: TERM. If it still exists in KILL_SECS seconds, send KILL. โ timeout, periodt. ๐
top ๐
top [-bH] [-n COUNT] [-d SECONDS]
Show a view of process activity in real time. Read the status of all processes from /proc each SECONDS and show a screenful of them. Keys: ๐
N/M/P/T: sort by pid/mem/cpu/time ๐งฎR: reverse sort ๐H: toggle threads ๐งตQ,^C: exit ๐ช
Options:
-bโ Batch mode ๐ฆ-n Nโ Exit afterNiterations ๐ข-d SECโ Delay between updates โฑ๏ธ-Hโ Show threads ๐งต
touch โจ
touch [-cham] [-d DATE] [-t DATE] [-r FILE] FILE...
Update mtime of FILEs โ touch it, make it fresh. ๐ฐ๏ธ
-cโ Don't create files ๐ซ-hโ Don't follow links ๐-aโ Change only atime ๐ฐ๏ธ-mโ Change only mtime ๐ฐ๏ธ-d DTโ Date/time to use ๐-t DTโ Date/time to use ๐-r FILEโ UseFILE's date/time ๐
tr ๐
tr [-cds] STRING1 [STRING2]
Translate, squeeze, or delete characters from stdin, writing to stdout โ character magic. ๐ค
-cโ Take complement ofSTRING1๐-dโ Delete input characters codedSTRING1๐๏ธ-sโ Squeeze multiple output characters ofSTRING2into one character ๐ค
traceroute ๐บ๏ธ
traceroute [-46Flnrv] [-f 1ST_TTL] [-m MAXTTL] [-q PROBES] [-p PORT]
[-t TOS] [-w WAIT_SEC] [-s SRC_IP] [-i IFACE] [-z PAUSE_MSEC]
HOST [BYTES]
Trace the route to HOST โ see the hops, bestie. ๐ค๏ธ
-4,-6โ Force IP or IPv6 name resolution ๐-Fโ Set don't fragment bit ๐งฉ-lโ Display TTL value of the returned packet ๐ฆ-nโ Print numeric addresses ๐ข-rโ Bypass routing tables, send directly toHOST๐ฃ๏ธ-vโ Verbose ๐ฃ๏ธ-f Nโ First number of hops (default1) 1๏ธโฃ-m Nโ Max number of hops ๐-q Nโ Number of probes per hop (default3) 3๏ธโฃ-p Nโ Base UDP port number used in probes (default33434) ๐ข-s IPโ Source address ๐-i IFACEโ Source interface ๐-t Nโ Type-of-service in probe packets (default0) 0๏ธโฃ-w SECโ Wait for a response (default3) โณ-z MSECโ Wait before each send โฑ๏ธ
traceroute6 ๐บ๏ธ
traceroute6 [-nrv] [-f 1ST_TTL] [-m MAXTTL] [-q PROBES] [-p PORT]
[-t TOS] [-w WAIT_SEC] [-s SRC_IP] [-i IFACE] [-z PAUSE_MSEC]
HOST [BYTES]
Trace the route to HOST โ IPv6 edition, slay. ๐ค๏ธ
-nโ Print numeric addresses ๐ข-rโ Bypass routing tables, send directly toHOST๐ฃ๏ธ-vโ Verbose ๐ฃ๏ธ-f Nโ First number of hops (default1) 1๏ธโฃ-m Nโ Max number of hops ๐-q Nโ Number of probes per hop (default3) 3๏ธโฃ-p Nโ Base UDP port number used in probes (default33434) ๐ข-s IPโ Source address ๐-i IFACEโ Source interface ๐-t Nโ Type-of-service in probe packets (default0) 0๏ธโฃ-w SECโ Wait for a response (default3) โณ-z MSECโ Wait before each send โฑ๏ธ
truncate โ๏ธ
truncate [-c] -s SIZE FILE...
Truncate FILEs to SIZE โ cut it down, queen. ๐
-cโ Do not create files ๐ซ-s SIZE๐
ts โฒ๏ธ
ts [-is] [STRFTIME]
Pipe stdin to stdout, add timestamp to each line โ timestamps on everything. ๐ฐ๏ธ
-sโ Time since start โฑ๏ธ-iโ Time since previous line โณ
tty ๐ฅ๏ธ
tty [-s]
Print file name of stdin's terminal โ literal main character behaviour, it just tells you which terminal you're sitting in. ๐
-sโ print nothing at all, only return the exit status
tunctl
tunctl [-f DEVICE] [-t NAME | -d NAME]
Create or delete TUN/TAP interfaces. Virtual network interfaces, made to order. โจ
-f DEVโ TUN device (default/dev/net/tun)-t NAMEโ create the iface (default:tapN)-d NAMEโ delete the iface
ubirename
ubirename UBI_DEVICE OLD_VOLNAME NEW_VOLNAME [OLD2 NEW2]...
Renames UBI volumes on UBI_DEVICE. Give it old names, give it new names, it handles the glow-up. ๐
udhcpc
udhcpc [-fbqRB] [-a[MSEC]] [-t N] [-T SEC] [-A SEC|-n] [-i IFACE]
[-s PROG] [-p PIDFILE] [-oC] [-r IP] [-V VENDOR] [-F NAME] [-x
OPT:VAL]... [-O OPT]...
-i IFACEโ interface to use (defaulteth0)-s PROGโ run PROG at DHCP events (default/etc/udhcpc/default.script)-p FILEโ create a pidfile-Bโ request broadcast replies-t Nโ send up to N discover packets (default 3)-T SECโ pause between packets (default 3)-A SECโ wait if the lease is not obtained (default 20)-bโ background if the lease is not obtained-nโ exit if the lease is not obtained-qโ exit after obtaining a lease-Rโ release IP on exit-fโ run in foreground-Sโ log to syslog too-a[MSEC]โ validate the offered address with an ARP ping-r IPโ request this IP address-oโ don't request any options (unless-Ois given)-O OPTโ request option OPT from the server (cumulative)-x OPT:VALโ include option OPT in sent packets (cumulative)
Examples of string, numeric, and hex byte opts:
-x hostname:bbox - option 12
-x lease:3600 - option 51 (lease time)
-x 0x3d:0100BEEFC0FFEE - option 61 (client id)
-x 14:'"dumpfile"' - option 14 (shell-quoted)
-F NAMEโ ask the server to update DNS mapping for NAME-V VENDORโ vendor identifier (default'udhcp VERSION')-Cโ don't send MAC as client identifier
Signals:
USR1โ renew leaseUSR2โ release lease
udhcpc6
udhcpc6 [-fbqR] [-t N] [-T SEC] [-A SEC|-n] [-i IFACE] [-s PROG]
[-p PIDFILE] [-mldo] [-r IPv6] [-x OPT:VAL]... [-O OPT]...
-i IFACEโ interface to use (defaulteth0)-p FILEโ create a pidfile-s PROGโ run PROG at DHCP events (default/etc/udhcpc/default6.script)-t Nโ send up to N discover packets-T SECโ pause between packets (default 3)-A SECโ wait if the lease is not obtained (default 20)-bโ background if the lease is not obtained-nโ exit if the lease is not obtained-qโ exit after obtaining a lease-Rโ release IP on exit-fโ run in foreground-Sโ log to syslog too-mโ send multicast renew requests rather than unicast ones-lโ send an 'information request' instead of 'solicit' (used for servers which do not assign IPv6 addresses)-r IPv6โ request this address ('no'to not request any IP)-dโ request prefix-oโ don't request any options (unless-Ois given)-O OPTโ request option OPT from the server (cumulative)-x OPT:VALโ include option OPT in sent packets (cumulative)
Examples of string, numeric, and hex byte opts:
-x hostname:bbox - option 12
-x lease:3600 - option 51 (lease time)
-x 0x3d:0100BEEFC0FFEE - option 61 (client id)
-x 14:'"dumpfile"' - option 14 (shell-quoted)
Signals:
USR1โ renew leaseUSR2โ release lease
udhcpd
udhcpd [-fS] [-I ADDR] [-a MSEC] [CONFFILE]
DHCP server. Handing out addresses like it's candy. ๐
-fโ run in foreground-Sโ log to syslog too-I ADDRโ local address-a MSECโ timeout for ARP ping (default 2000)
Signals:
USR1โ update lease file
uevent
uevent [PROG ARGS]
uevent runs PROG for every netlink notification. PROG's environment contains data passed from the kernel. Typical usage (a daemon for dynamic device node creation):
# uevent mdev & mdev -s
umount
umount [-rlfda] [-t FSTYPE] FILESYSTEM|DIRECTORY
Unmount filesystems. Time to say bye. ๐
-aโ unmount all filesystems-rโ remount devices read-only if the mount is busy-lโ lazy umount (detach filesystem)-fโ force umount (i.e., for an unreachable NFS server)-dโ free the loop device if it has been used-t FSTYPE[,...]โ unmount only these filesystem type(s)
uname
uname [-amnrspvio]
Print system information. All the lore about your machine, bestie. ๐
-aโ print all-mโ machine (hardware) type-nโ hostname-rโ kernel release-sโ kernel name (default)-pโ processor type-vโ kernel version-iโ hardware platform-oโ OS name
uncompress
uncompress [-cf] [FILE]...
Decompress *FILE*s (or stdin).
-cโ write to stdout-fโ overwrite
unexpand
unexpand [-fa][-t N] [FILE]...
Convert spaces to tabs, writing to stdout.
-aโ convert all blanks-fโ convert only leading blanks-t Nโ tabstops every N chars
uniq
uniq [-cduiz] [-f,s,w N] [FILE [OUTFILE]]
Discard duplicate lines. Duplicates? Not on my watch. ๐
-cโ prefix lines by the number of occurrences-dโ only print duplicate lines-uโ only print unique lines-iโ ignore case-zโ NUL terminated output-f Nโ skip first N fields-s Nโ skip first N chars (after any skipped fields)-w Nโ compare N characters in the line
unix2dos
unix2dos [-ud] [FILE]
Convert FILE in-place from Unix to DOS format. When no file is given, use stdin/stdout. The line-ending glow-up. โจ
-uโdos2unix-dโunix2dos
unlink
unlink FILE
Delete FILE by calling unlink(). Straight to the point, no small talk. ๐
unlzma
unlzma [-cfk] [FILE]...
Decompress *FILE*s (or stdin).
-cโ write to stdout-fโ force-kโ keep input files-tโ test integrity
unshare
unshare [OPTIONS] [PROG ARGS]
-m,--mount[=FILE]โ unshare mount namespace-u,--uts[=FILE]โ unshare UTS namespace (hostname etc.)-i,--ipc[=FILE]โ unshare System V IPC namespace-n,--net[=FILE]โ unshare network namespace-p,--pid[=FILE]โ unshare PID namespace-U,--user[=FILE]โ unshare user namespace-fโ fork before execing PROG-rโ map current user to root (implies-U)--mount-proc[=DIR]โ mount/procfilesystem first (implies-m)--propagation slave|shared|private|unchangedโ modify mount propagation in the mount namespace--setgroups allow|denyโ control thesetgroupssyscall in user namespaces
unxz
unxz [-cfk] [FILE]...
Decompress *FILE*s (or stdin).
-cโ write to stdout-fโ force-kโ keep input files-tโ test integrity
unzip
unzip [-lnojpqK] FILE[.zip] [FILE]... [-x FILE]... [-d DIR]
Extract *FILE*s from a ZIP archive.
-lโ list contents (with-qfor short form)-nโ never overwrite files (default: ask)-oโ overwrite-jโ do not restore paths-pโ write to stdout-tโ test-qโ quiet-Kโ do not clear the SUID bit-x FILEโ exclude *FILE*s-d DIRโ extract into DIR
uptime
uptime
Display the time since the last boot.
usleep
usleep N
Pause for N microseconds. A lil nap. ๐ด
uudecode
uudecode [-o OUTFILE] [INFILE]
Uudecode a file. Finds OUTFILE in the uuencoded source unless -o is given.
uuencode
uuencode [-m] [FILE] STORED_FILENAME
Uuencode FILE (or stdin) to stdout.
-mโ use base64 encoding per RFC1521
uuidgen
uuidgen
Generate a random UUID. Fresh off the press, every single time. ๐
vconfig
vconfig COMMAND [OPTIONS]
Create and remove virtual ethernet devices.
add IFACE VLAN_ID
rem VLAN_NAME
set_flag IFACE 0|1 VLAN_QOS
set_egress_map VLAN_NAME SKB_PRIO VLAN_QOS
set_ingress_map VLAN_NAME SKB_PRIO VLAN_QOS
set_name_type NAME_TYPE
vi
vi [-c CMD] [-R] [-H] [FILE]...
Edit FILE. Yes it's vi. Yes you can exit it. Iykyk. ๐
-c CMDโ initial command to run ($EXINITand~/.exrcalso available)-Rโ read-only-Hโ list available features
vmstat
vmstat [-n] [INTERVAL [COUNT]]
Show virtual memory statistics.
-nโ show header once
w
w
Show who is logged on.
watch
watch [-n SEC] [-tx] PROG ARGS
Run PROG periodically.
-n SECโ period (default 2)-tโ don't print header-xโexec(PROG,ARGS)instead ofsh -c 'PROG ARGS'
watchdog
watchdog [-t N[ms]] [-T N[ms]] [-F] DEV
Periodically write to watchdog device DEV. Keeping the machine alive, one heartbeat at a time. ๐ซถ
-T Nโ reboot after N seconds if not reset (default 60)-t Nโ reset every N seconds (default 30)-Fโ run in foreground
Use 500ms to specify the period in milliseconds.
wc
wc [-cmlwL] [FILE]...
Count lines, words, and bytes for *FILE*s (or stdin).
-cโ count bytes-mโ count characters-lโ count newlines-wโ count words-Lโ print longest line length
wget
wget [-cqS] [--spider] [-O FILE] [-o LOGFILE] [--header STR]
[--post-data STR | --post-file FILE] [-Y on/off]
[--no-check-certificate] [-P DIR] [-U AGENT] [-T SEC] URL...
Retrieve files via HTTP or FTP. Downloading things is a personality trait, fr fr. ๐ฅ
--spiderโ lowkey just vibe-checks whether the URL even exists.$?is0if it does ๐--header STRโ dropsSTR(formatted like'header: value') into the headers, no cap--post-data STRโ sendsSTRusing the POST method โจ--post-file FILEโ sendsFILEusing the POST method โจ--no-check-certificateโ don't validate the server's certificate (bestie, this is giving "trust issues, but make it intentional")-cโ continue retrieval of an aborted transfer ๐ซถ-qโ quiet ๐คซ-P DIRโ save toDIRโ default is.-Sโ show the server response ๐-T SECโ network read timeout isSECseconds โณ-O FILEโ save toFILE('-'for stdout)-o LOGFILEโ log messages toFILE๐-U STRโ useSTRfor the User-Agent header-Y on/offโ use proxy
which ๐
which [-a] COMMAND...
Locates COMMAND for you, bestie ๐
-aโ show all the matches, not just the first one ๐
who ๐
who [-aH]
Shows who is logged on โ the ultimate main character check ๐
-aโ show all-Hโ print column headers
whoami ๐ฆ
whoami
Prints the user name associated with the current effective user id. It's giving identity crisis, but make it technical โจ
xargs ๐ฅ
xargs [OPTIONS] [PROG ARGS]
Runs PROG on every single item handed to it by stdin. Go off, honestly ๐
-0โ NUL terminated input-a FILEโ read fromFILEinstead of stdin-oโ reopen stdin as/dev/tty-rโ don't run the command if the input is empty ๐-tโ print the command on stderr before execution ๐ฃ-pโ ask the user whether to run each command ๐-E STR,-e[STR]โSTRstops input processing-I STRโ replaceSTRwithinPROG ARGSwith the input line-n Nโ pass no more thanNargs toPROG-s Nโ pass a command line of no more thanNbytes-P Nโ run up toNPROGs in parallel โก-xโ exit if the size is exceeded
xxd ๐
xxd [-ri] [-ps] [-g N] [-c N] [-l LEN] [-s OFS] [-o OFS] [FILE]
Hex dumps FILE (or stdin) โ it's basically the hex girl aesthetic but for bytes ๐
-g Nโ bytes per group (default2)-c Nโ bytes per line (default:16, with-ps:30, with-i:12)-psโ show only hex bytes (no offset, no spaces)-iโ C include file style-l LENGTHโ show only the firstLENGTHbytes-s OFFSETโ skipOFFSETbytes-o OFFSETโ addOFFSETto the displayed offset-rโ reverse (with-p, assumes there are no offsets in the input)
xz ๐ธ
xz -d [-cfk] [FILE]...
Decompresses FILEs (or stdin) โจ
-dโ decompress-cโ write to stdout-fโ force-kโ keep input files ๐ซถ-tโ test integrity
xzcat ๐ง
xzcat [FILE]...
Decompress to stdout, that's the whole gig ๐
yes โญ
yes [STRING]
Repeatedly prints a line with STRING, or 'y'. It's the most committed applet in the whole box, and honestly? We respect the dedication ๐
zcat ๐
zcat [FILE]...
Decompress to stdout ๐
๐ LIBC NSS ๐
GNU Libc (glibc) uses the Name Service Switch (NSS) to configure how the C library behaves for the local environment, and to configure how it reads system data โ stuff like passwords and group information. This is implemented using an /etc/nsswitch.conf config file, plus one or more of the /lib/libnss_* libraries. BusyBox tries to avoid using any libc calls that make use of NSS. But some applets โ login and su, for example โ will use libc functions that require NSS. No cap ๐ซ
If you enable CONFIG_USE_BB_PWD_GRP, BusyBox will use internal functions to directly access the /etc/passwd, /etc/group, and /etc/shadow files without using NSS. This may let you run your system without needing to install any of the NSS configuration files and libraries. Slay ๐
When used with glibc, the BusyBox networking applets will similarly require that you install at least some of the glibc NSS stuff โ in particular, /etc/nsswitch.conf, /lib/libnss_dns*, /lib/libnss_files*, and /lib/libresolv* ๐ญ
Shameless Plug: as an alternative, one could use a C library such as uClibc. Besides making your system significantly smaller, uClibc does not require the use of any NSS support files or libraries. Iconic behaviour, fr fr ๐
๐ MAINTAINER ๐
Denis Vlasenko <vda.linux@googlemail.com>
๐ AUTHORS ๐
The following people have contributed code to BusyBox whether they know it or not. If you have written code included in BusyBox, you should probably be listed here so you can obtain your bit of eternal glory. If you should be listed here, or the description of what you have done needs more detail, or is incorrect, please send in an update. Not me gatekeeping the credits โ go claim your flowers ๐ธ
- Emanuele Aina
<emanuele.aina@tiscali.it>โrun-parts - Erik Andersen
<andersen@codepoet.org>โ Tons of new stuff, major rewrite of most of the core apps, tons of new apps as noted in header files. Lots of tedious effort writing these boring docs that nobody is going to actually read. - Laurence Anderson
<l.d.anderson@warwick.ac.uk>โrpm2cpio,unzip,get_header_cpio,read_gzinterface,rpm - Jeff Angielski
<jeff@theptrgroup.com>โftpput,ftpget - Edward Betts
<edward@debian.org>โexpr,hostid,logname,whoami - John Beppu
<beppu@codepoet.org>โdu,nslookup,sort - Brian Candler
<B.Candler@pobox.com>โtiny-ls(ls) - Randolph Chung
<tausq@debian.org>โfbset,ping,hostname - Dave Cinege
<dcinege@psychosis.com>โmore(v2),makedevs,dutmp, modularization, auto links file, various fixes, Linux Router Project maintenance - Jordan Crouse
<jordan@cosmicpenguin.net>โipcalc - Magnus Damm
<damm@opensource.se>โtftpclientinsmodpowerpc support - Larry Doolittle
<ldoolitt@recycle.lbl.gov>โ pristine source directory compilation, lots of patches and fixes. - Glenn Engel
<glenne@engel.org>โhttpd - Gennady Feldman
<gfeldman@gena01.com>โ Sysklogd (single threadedsyslogd, IPC Circular buffer support,logread), various fixes. - Karl M. Hegbloom
<karlheg@debian.org>โcp_mv.c, the test suite, various fixes toutility.c, &c. - Daniel Jacobowitz
<dan@debian.org>โmktemp.c - Matt Kraai
<kraai@alumni.cmu.edu>โ documentation, bugfixes, test suite - Stephan Linz
<linz@li-pro.net>โipcalc, Red Hat equivalence - John Lombardo
<john@deltanet.com>โtr - Glenn McGrath
<bug1@iinet.net.au>โ Common unarchiving code and unarchiving applets,ifupdown,ftpgetput,nameif,sed,patch,fold,install,uudecode. Various bugfixes, review and apply numerous patches. - Manuel Novoa III
<mjn3@codepoet.org>โcat,head,mkfifo,mknod,rmdir,sleep,tee,tty,uniq,usleep,wc,yes,mesg,vconfig,make_directory,parse_mode,dirname,mode_string,get_last_path_component,simplify_path, and a number triviallibbbroutines. Also bug fixes, partial rewrites, and size optimizations inash,basename,cal,cmp,cp,df,du,echo,env,ln,logname,md5sum,mkdir,mv,realpath,rm,sort,tail,touch,uname,watch,arith,human_readable,interface,dutmp,ifconfig,route - Vladimir Oleynik
<dzo@simtreas.ru>โcmdedit;xargs(current),httpd(current); ports:ash,crond,fdisk,inetd,stty,traceroute,top; locale, various fixes and irreconcilable critic of everything not perfect. - Bruce Perens
<bruce@pixar.com>โ Original author of BusyBox in 1995, 1996. Some of his code can still be found hiding here and there... - Tim Riker
<Tim@Rikers.org>โ bug fixes, member of fan club - Kent Robotti
<robotti@metconnect.com>โreset, tons and tons of bug reports and patches. - Chip Rosenthal
<chip@unicom.com>,<crosenth@covad.com>โwgetโ Contributed by permission of Covad Communications - Pavel Roskin
<proski@gnu.org>โ Lots of bugs fixes and patches. - Gyepi Sam
<gyepi@praxis-sw.com>โ Remote logging feature forsyslogd - Linus Torvalds
<torvalds@transmeta.com>โmkswap,fsck.minix,mkfs.minix - Mark Whitley
<mark@codepoet.org>โgrep,sed,cut,xargs(previous), style-guide, new-applet-HOWTO, bug fixes, etc. - Charles P. Wright
<cpwright@villagenet.com>โgzip,mini-netcat(nc) - Enrique Zanardi
<ezanardi@ull.es>โtarcat(since removed),loadkmap, various fixes, Debian maintenance - Tito Ragusa
<farmatito@tiscali.it>โdevfsdand size optimizations instrings,openvtanddeallocvt. - Paul Fox
<pgf@foxharp.boston.ma.us>โ vi editing mode forash, various other patches/fixes - Roberto A. Foglietta
<me@roberto.foglietta.name>โ port:dnsd - Bernhard Reutner-Fischer
<rep.dot.nop@gmail.com>โ misc - Mike Frysinger
<vapier@gentoo.org>โ initial e2fsprogs,printenv,setarch,sum, misc - Jie Zhang
<jie.zhang@analog.com>โ fixed two bugs inmshandhush(exitcode of killed processes)
And that's the whole page, bestie ๐ซถ you made it to the very end. This is from version 1.38.0, dated 2026-09-24, and it's the BUSYBOX(1) manual page. Stan the maintainer, stan the authors, stan the tiny binaries. Periodt ๐
โจ
THE END ๐
๐ฆ where this page comes from
- ubuntu stonking: busybox-static 1:1.38.0-3ubuntu4 ยท GPL-2.0-only
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms