BUSYBOX(1)

๐Ÿ“ฆ version 1.38.0, in ubuntu stonking

๐Ÿ’– 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
  • -c DIR โ€” Config directory [/etc/acpi]
  • -e FILE โ€” /proc event file [/proc/acpi/event]
  • -l FILE โ€” Log file [/var/log/acpid.log]
  • -p FILE โ€” Pid file [/var/run/acpid.pid]
  • -a FILE โ€” Action file [/etc/acpid.conf]
  • -M FILE โ€” 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
  • -o OFF โ€” Time offset, microseconds
  • -f FREQ โ€” Frequency adjust, integer kernel units (65536 is 1ppm)
  • -t TICK โ€” Microseconds per tick, usually 10000 (positive -t or -f values make clock run faster)
  • -p TCONST โ€” (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 โ€” Extract
  • p โ€” Extract to stdout
  • t โ€” 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
  • -i IF โ€” Network interface
  • -D โ€” Read HWADDR from IFACE
  • -A,-p AF โ€” Protocol family
  • -H HWTYPE โ€” 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
  • -c N โ€” Stop after sending N ARP requests
  • -w TIMEOUT โ€” Seconds to wait for ARP reply
  • -I IFACE โ€” Interface to use (default eth0)
  • -s SRC_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]...
  • -v VAR=VAL โ€” Set variable
  • -F SEP โ€” Use SEP as field separator
  • -f/-E FILE โ€” Read program from FILE
  • -e AWK_PROGRAM โ€” (no description given)

base64

base64 [-d] [-w COL] [FILE]

Base64 encode or decode FILE to standard output.

  • -d โ€” Decode data
  • -w COL โ€” 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
  • -s SUFFIX โ€” 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.

  • -o OFS โ€” Byte offset into device
  • -l LEN โ€” 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
  • --setbsz BYTES โ€” Set block size
  • --getsz โ€” Get device size in 512-byte sectors
  • --getsize64 โ€” Get device size in bytes
  • --getra โ€” Get readahead in 512-byte sectors
  • --setra SECTORS โ€” Set readahead
  • --flushbufs โ€” Flush buffers
  • --rereadpt โ€” Reread partition table

brctl

brctl COMMAND [BRIDGE [ARGS]]

Manage ethernet bridges. Commands:

  • addbr BRIDGE โ€” Create BRIDGE
  • delbr BRIDGE โ€” Delete BRIDGE
  • addif BRIDGE IFACE โ€” Add IFACE to BRIDGE
  • delif BRIDGE 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 ^x or M-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 atime
  • a โ€” Append only
  • C โ€” No copy-on-write
  • c โ€” Compressed
  • D โ€” Synchronous dir updates
  • d โ€” Don't backup with dump
  • E โ€” Encrypted
  • e โ€” File uses extents
  • F โ€” Case-insensitive dir
  • I โ€” Indexed dir
  • i โ€” Immutable
  • j โ€” Write data to journal first
  • N โ€” File is stored in inode
  • P โ€” Hierarchical project ID dir
  • S โ€” Synchronous file updates
  • s โ€” Zero storage when deleted
  • T โ€” Top of dir hierarchy
  • t โ€” Don't tail-merge with other files
  • u โ€” Allow undelete
  • V โ€” 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 crontab
  • FILE โ€” 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 -f TAB, -F run of whitespace)
  • -f LIST โ€” Print only these fields (-d is single char)
  • -F LIST โ€” Print only these fields (-d is 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/-d TIME 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 stdin
  • of=FILE โ€” Write to FILE instead of stdout
  • bs=N โ€” Read and write N bytes at a time
  • ibs=N โ€” Read N bytes at a time
  • obs=N โ€” Write N bytes at a time
  • count=N โ€” Copy only N input blocks
  • skip=N โ€” Skip N input blocks
  • seek=N โ€” Skip N output blocks
  • conv=notrunc โ€” Don't truncate output file
  • conv=noerror โ€” Continue after read errors
  • conv=sync โ€” Pad blocks with zeros
  • conv=fsync โ€” Physically write data out before finishing
  • conv=swab โ€” Swap every pair of bytes
  • iflag=skip_bytes โ€” skip=N is in bytes
  • iflag=count_bytes โ€” count=N is in bytes
  • oflag=seek_bytes โ€” seek=N is in bytes
  • iflag=direct โ€” O_DIRECT input
  • oflag=direct โ€” O_DIRECT output
  • iflag=fullblock โ€” Read full blocks
  • oflag=append โ€” Open output in append mode
  • status=noxfer โ€” Suppress rate output
  • status=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 โ€” Use BASE/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 upon
  • WIDTH โ€” 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., 1K 243M 2G)
  • -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 ARG2
  • ARG1 & ARG2 โ€” ARG1 if neither argument is null or 0, otherwise 0
  • ARG1 < ARG2 โ€” 1 if ARG1 is less than ARG2, else 0. Similarly:
    • ARG1 <= ARG2
    • ARG1 = ARG2
    • ARG1 != ARG2
    • ARG1 >= ARG2
    • ARG1 > ARG2
  • ARG1 + ARG2 โ€” Sum of ARG1 and ARG2. Similarly:
    • ARG1 - ARG2
    • ARG1 * ARG2
    • ARG1 / ARG2
    • ARG1 % ARG2
  • STRING : REGEXP โ€” Anchored pattern match of REGEXP in STRING
  • match STRING REGEXP โ€” Same as STRING : REGEXP
  • substr STRING POS LEN โ€” Substring of STRING, POS counts from 1
  • index STRING CHARS โ€” Index in STRING where any CHARS is found, or 0
  • length STRING โ€” Length of STRING
  • quote TOKEN โ€” Interpret TOKEN as a string, even if it is a keyword like match or 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 attributes
  • r โ€” Read only
  • h โ€” Hidden
  • s โ€” System
  • v โ€” Volume label
  • d โ€” Directory
  • a โ€” 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 0 applies 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/failure
  • ACT1 [-a] ACT2 โ€” If ACT1 fails, stop, else do ACT2
  • ACT1 -o ACT2 โ€” If ACT1 succeeds, stop, else do ACT2
    • Note: -a has higher priority than -o
  • -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/N days in the past
  • -ctime DAYS โ€” ctime +N/-N/N days 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/N minutes in the past
  • -cmin MINS โ€” ctime +N/-N/N minutes 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 with 4
  • -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 โ€” show ISSUE_FILE instead of /etc/issue
  • -l LOGIN โ€” invoke LOGIN instead of /bin/login
  • -t SEC โ€” terminate after SEC if no login name was read ๐Ÿ˜ญ
  • -I INITSTR โ€” send INITSTR before literally anything else
  • -H HOST โ€” log HOST into the utmp file as the hostname
A BAUD_RATE of 0 leaves 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 a filename: prefix
  • -h โ€” do not add a filename: prefix
  • -n โ€” add a line_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. Returns 0 if PATTERN is found, 1 otherwise ๐Ÿค
  • -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 โ€” PATTERN is a literal (not a regexp)
  • -E โ€” PATTERN is an extended regexp
  • -z โ€” NUL terminated input
  • -m N โ€” match up to N times per file
  • -A N โ€” print N lines of trailing context
  • -B N โ€” print N lines 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 of SEC
  • -n โ€” do not sync
  • -f โ€” force it (don't go through init)
  • -w โ€” only write a wtmp record, nothing else

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 first N lines
  • -n -N[bkm] โ€” print all except the last N lines
  • -c [-]N[bkm] โ€” print the first N bytes
    • sizing goes like this: (b:*512 k:*1024 m:*1024^2)
  • -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 first LENGTH bytes
  • -s OFFSET โ€” skip OFFSET bytes

๐ŸŒธ 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 โ€” use FILE'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 to IP:PORT (default *:80)
  • -M NUM โ€” pause if NUM connections are open (default 256)
  • -K NUM โ€” kill the CGIs after NUM seconds
  • -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 crypt STRING
  • -e STRING โ€” HTML encode STRING
  • -d STRING โ€” URL decode STRING

๐ŸŽ€ 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 -u nor -l is given, it reads from /etc/adjtime)
  • -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 probing
  • FIRST and LAST limit the probing range

๐Ÿ’œ i2cdump ๐Ÿ’œ

i2cdump [-fy] [-r FIRST-LAST] BUS ADDR [MODE]

Examine I2C registers ๐Ÿ‘€

  • I2CBUS โ€” the I2C bus number
  • ADDRESS โ€” 0x03-0x77

MODE is:

  • b โ€” Byte (default)
  • w โ€” Word
  • W โ€” Word on even register addresses
  • i โ€” I2C block
  • s โ€” SMBus block
  • c โ€” 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 number
  • ADDRESS โ€” 0x03-0x77

MODE is:

  • b โ€” read byte data (default)
  • w โ€” read word data
  • c โ€” 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 number
  • ADDRESS โ€” 0x03-0x77

MODE is:

  • c โ€” Byte, no value
  • b โ€” Byte data (default)
  • w โ€” Word data
  • i โ€” I2C block data
  • s โ€” 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 โ€” use FILE instead 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:realtime 2:best-effort 3: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 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 (default 60, 0 disables 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 (1K 243M 2G)
  • --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 /sys and 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 is filesystem_size / RATIO
  • -I BYTES โ€” inode size (min 128)
  • -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 (default a=rw)

mknod

mknod [-m MODE] NAME TYPE [MAJOR MINOR]

Create a special file (block, character, or pipe) ๐Ÿงฟ

  • -m MODE โ€” creation mode (default a=rw)

TYPE:

  • b โ€” block device
  • c or u โ€” character device
  • p โ€” 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 (default sha256)
  • -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 of TEMPLATE
  • -p DIR โ€” use DIR as 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 multiple MODULEs at once
  • -l โ€” list (here MODULE is a pattern)
  • -r โ€” remove MODULE (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 โ€” read FILE instead of /etc/fstab
  • -O OPT โ€” only mount filesystems that have option OPT (and that's -a only, 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 location
  • move โ€” relocate an existing mount point
  • remount โ€” remount a mounted filesystem, changing flags
  • ro โ€” 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 if DEST is a directory
  • -t DIR โ€” move all SOURCEs into DIR

๐ŸŒธ 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 -ll with -e for 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 โ€” run PROG after 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 โ€” use STRING as the line number separator
  • -v N โ€” start from N
  • -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 โ€” exclude N CPUs

๐Ÿงš 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'ing PROG

๐Ÿฆ‹ 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 for PROG to 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 (default sha256)
  • -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 from LIST, not tab
  • -s โ€” serial: one file at a time

๐Ÿฆ‹ patch

patch [-RNE] [-p N] [-i DIFF] [ORIGFILE [PATCHFILE]]
  • -p N โ€” strip N leading components from file names
  • -i DIFF โ€” read DIFF instead 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 only CNT pings
  • -s SIZE โ€” send SIZE data bytes in packets (default 56)
  • -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 (default 10) (that's after all -c CNT packets 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 only CNT pings
  • -s SIZE โ€” send SIZE data bytes in packets (default 56)
  • -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 (default 10) (after all -c CNT packets 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 [-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 (default 3)
  • -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 (2K 1G)
  • -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 -> TARGET if 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 (default 4)

๐Ÿ“ 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 โ€” Open DEVICE instead of stdin ๐Ÿซถ
  • -a โ€” Print all current settings in human-readable form โœจ
  • -g โ€” Print in stty-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, send TERM+CONT signals; do not restart it ๐Ÿ›‘
  • -o โ€” Once: if service is not running, start it; do not restart it 1๏ธโƒฃ
  • -pchaitk โ€” Send STOP, CONT, HUP, ALRM, INT, TERM, KILL signal to service ๐Ÿ’ฅ
  • -x โ€” Exit: runsv will 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 at swapon (POL=once), as freed (POL=pages), or both (POL omitted) ๐Ÿ—‘๏ธ
  • -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 to DEV after switch ๐Ÿ–ฅ๏ธ

sync ๐Ÿ’พ

sync [-df] [FILE]...

Write all buffered blocks (in FILEs) to disk โ€” flush it, slay. ๐Ÿ“

  • -d โ€” Avoid syncing metadata ๐Ÿท๏ธ
  • -f โ€” Sync filesystems underlying FILEs ๐Ÿ—‚๏ธ

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 from FILEs (default /etc/sysctl.conf) ๐Ÿ“„
  • -w โ€” Set values โœ๏ธ

syslogd ๐Ÿ“‹

syslogd [OPTIONS]

System logging utility โ€” the log queen. ๐Ÿชต

  • -n โ€” Run in foreground ๐Ÿ–ฅ๏ธ
  • -R HOST[:PORT] โ€” Log to HOST:PORT (default PORT:514) ๐ŸŒ
  • -L โ€” Log locally and via network (default is network only if -R) ๐Ÿ”€
  • -C[size_kb] โ€” Log to shared mem buffer (use logread to read it) ๐Ÿง 
  • -O FILE โ€” Log to FILE (default: /var/log/messages, stdout if -) ๐Ÿ“
  • -s SIZE โ€” Max size (KB) before rotation (default 200KB, 0=off) ๐Ÿ”„
  • -b N โ€” N rotated logs to keep (default 1, max 99, 0=purge) ๐Ÿ—ƒ๏ธ
  • -l N โ€” Log only messages more urgent than prio N (1-8) ๐Ÿšจ
  • -S โ€” Smaller output ๐Ÿค
  • -t โ€” Strip client-generated timestamps โฐ
  • -D โ€” Drop duplicates ๐Ÿ‘ฏ
  • -f FILE โ€” Use FILE as 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 last N bytes ๐Ÿ“
  • -n N[bkm] โ€” Print last N lines ๐Ÿ“–
  • -n +N[bkm] โ€” Start on Nth line and print the rest (b:*512 k:*1024 m:*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 โ€” Wait SECONDS between 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 of TARFILE ('-' for stdin/out) ๐Ÿ“
  • -C DIR โ€” Change to DIR before 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 using compress ๐Ÿ—œ๏ธ
  • -z โ€” (De)compress using gzip ๐Ÿ‡
  • -J โ€” (De)compress using xz โŒ
  • -j โ€” (De)compress using bzip2 ๐Ÿ
  • --lzma โ€” (De)compress using lzma ๐ŸŒ€
  • -a โ€” (De)compress based on extension ๐Ÿ”
  • -h โ€” Follow symlinks ๐Ÿ”—
  • --overwrite โ€” Replace existing files โ™ป๏ธ
  • --strip-components NUM โ€” NUM of leading components to strip โœ‚๏ธ
  • --no-recursion โ€” Don't descend in directories ๐Ÿšซ
  • --numeric-owner โ€” Use numeric user:group ๐Ÿ”ข
  • --no-same-permissions โ€” Don't restore access permissions ๐Ÿ”“
  • --to-command COMMAND โ€” Pipe files to COMMAND ๐Ÿ“ค

taskset ๐ŸŽฏ

taskset [-ap] [HEXMASK | -c LIST] { PID | PROG ARGS }

Set or get CPU affinity โ€” pin those processes, queen. ๐Ÿงฒ

  • -p โ€” Operate on PID ๐Ÿ†”
  • -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 given FILEs, 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 $USER envvar ๐Ÿค–
  • -l USER โ€” Automatic login as USER ๐Ÿ‘ค

telnetd ๐Ÿ–ฅ๏ธ

telnetd [OPTIONS]

Handle incoming telnet connections โ€” the server side, no cap. ๐Ÿ“ž

  • -l LOGIN โ€” Exec LOGIN on connect (default /bin/login) ๐Ÿ”‘
  • -f ISSUE_FILE โ€” Display ISSUE_FILE instead 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. Default 23 ๐Ÿ”ข
  • -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 โ€” Local FILE ๐Ÿ“‚
  • -r FILE โ€” Remote FILE ๐ŸŒ
  • -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 to FILE ๐Ÿ“
  • -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 after N iterations ๐Ÿ”ข
  • -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 โ€” Use FILE's date/time ๐Ÿ“

tr ๐Ÿ”„

tr [-cds] STRING1 [STRING2]

Translate, squeeze, or delete characters from stdin, writing to stdout โ€” character magic. ๐Ÿ”ค

  • -c โ€” Take complement of STRING1 ๐Ÿ”„
  • -d โ€” Delete input characters coded STRING1 ๐Ÿ—‘๏ธ
  • -s โ€” Squeeze multiple output characters of STRING2 into 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 to HOST ๐Ÿ›ฃ๏ธ
  • -v โ€” Verbose ๐Ÿ—ฃ๏ธ
  • -f N โ€” First number of hops (default 1) 1๏ธโƒฃ
  • -m N โ€” Max number of hops ๐Ÿ”
  • -q N โ€” Number of probes per hop (default 3) 3๏ธโƒฃ
  • -p N โ€” Base UDP port number used in probes (default 33434) ๐Ÿ”ข
  • -s IP โ€” Source address ๐Ÿ“
  • -i IFACE โ€” Source interface ๐Ÿ”Œ
  • -t N โ€” Type-of-service in probe packets (default 0) 0๏ธโƒฃ
  • -w SEC โ€” Wait for a response (default 3) โณ
  • -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 to HOST ๐Ÿ›ฃ๏ธ
  • -v โ€” Verbose ๐Ÿ—ฃ๏ธ
  • -f N โ€” First number of hops (default 1) 1๏ธโƒฃ
  • -m N โ€” Max number of hops ๐Ÿ”
  • -q N โ€” Number of probes per hop (default 3) 3๏ธโƒฃ
  • -p N โ€” Base UDP port number used in probes (default 33434) ๐Ÿ”ข
  • -s IP โ€” Source address ๐Ÿ“
  • -i IFACE โ€” Source interface ๐Ÿ”Œ
  • -t N โ€” Type-of-service in probe packets (default 0) 0๏ธโƒฃ
  • -w SEC โ€” Wait for a response (default 3) โณ
  • -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 (default eth0)
  • -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 -O is 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 lease
  • USR2 โ€” 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 (default eth0)
  • -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 -O is 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 lease
  • USR2 โ€” 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 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 /proc filesystem first (implies -m)
  • --propagation slave|shared|private|unchanged โ€” modify mount propagation in the mount namespace
  • --setgroups allow|deny โ€” control the setgroups syscall 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 -q for 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 ($EXINIT and ~/.exrc also 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 of sh -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. $? is 0 if it does ๐Ÿ’…
  • --header STR โ€” drops STR (formatted like 'header: value') into the headers, no cap
  • --post-data STR โ€” sends STR using the POST method โœจ
  • --post-file FILE โ€” sends FILE using 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 to DIR โ€” default is .
  • -S โ€” show the server response ๐Ÿ‘€
  • -T SEC โ€” network read timeout is SEC seconds โณ
  • -O FILE โ€” save to FILE ('-' for stdout)
  • -o LOGFILE โ€” log messages to FILE ๐Ÿ“
  • -U STR โ€” use STR for 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 from FILE instead 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] โ€” STR stops input processing
  • -I STR โ€” replace STR within PROG ARGS with the input line
  • -n N โ€” pass no more than N args to PROG
  • -s N โ€” pass a command line of no more than N bytes
  • -P N โ€” run up to N PROGs 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 (default 2)
  • -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 first LENGTH bytes
  • -s OFFSET โ€” skip OFFSET bytes
  • -o OFFSET โ€” add OFFSET to 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_gz interface, 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> โ€” tftp client insmod powerpc 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 threaded syslogd, IPC Circular buffer support, logread), various fixes.
  • Karl M. Hegbloom <karlheg@debian.org> โ€” cp_mv.c, the test suite, various fixes to utility.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 trivial libbb routines. Also bug fixes, partial rewrites, and size optimizations in ash, 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 for syslogd
  • 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> โ€” devfsd and size optimizations in strings, openvt and deallocvt.
  • Paul Fox <pgf@foxharp.boston.ma.us> โ€” vi editing mode for ash, 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 in msh and hush (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