neulab/tldr huggingface dataset:
# generate ascii art for a given text
toilet {{input_text}}
# generate ascii art using a custom font file
toilet {{input_text}} -f {{font_filename}}
# generate ascii art using a filter
toilet {{input_text}} --filter {{filter_name}}
# show available toilet filters
toilet --filter list
# start an application with the procfile in the current directory
foreman start
# start an application with a specified procfile
foreman start -f {{Procfile}}
# start a specific application
foreman start {{process}}
# validate procfile format
foreman check
# run oneoff commands with the process's environment
foreman run {{command}}
# start all processes except the one named "worker"
foreman start -m all=1,{{worker}}=0
# display a tree of processes
pstree
# display a tree of processes with pids
pstree -p
# display all process trees rooted at processes owned by specified user
pstree {{user}}
# check quotas on all mounted nonnfs filesystems
sudo quotacheck --all
# force check even if quotas are enabled (this can cause damage or loss to quota files)
sudo quotacheck --force {{mountpoint}}
# check quotas on a given filesystem in debug mode
sudo quotacheck --debug {{mountpoint}}
# check quotas on a given filesystem, displaying the progress
sudo quotacheck --verbose {{mountpoint}}
# check user quotas
sudo quotacheck --user {{user}} {{mountpoint}}
# check group quotas
sudo quotacheck --group {{group}} {{mountpoint}}
# print the mime type of a given file
mimetype {{path/to/file}}
# display only the mime type, and not the filename
mimetype --brief {{path/to/file}}
# display a description of the mime type
mimetype --describe {{path/to/file}}
# determine the mime type of stdin (does not check a filename)
{{some_command}} | mimetype --stdin
# display debug information about how the mime type was determined
mimetype --debug {{path/to/file}}
# display all the possible mime types of a given file in confidence order
mimetype --all {{path/to/file}}
# explicitly specify the 2letter language code of the output
mimetype --language {{path/to/file}}
# list password information for the user
chage --list {{username}}
# enable password expiration in 10 days
sudo chage --maxdays {{10}} {{username}}
# disable password expiration
sudo chage --maxdays {{-1}} {{username}}
# set account expiration date
sudo chage --expiredate {{YYYY-MM-DD}} {{username}}
# force user to change password on next log in
sudo chage --lastday {{0}} {{username}}
# tell the kernel about the existence of the specified partition
addpart {{device}} {{partition}} {{start}} {{length}}
# run the daemon with a configuration file
dbus-daemon --config-file {{path/to/file}}
# run the daemon with the standard perloginsession message bus configuration
dbus-daemon --session
# run the daemon with the standard systemwide message bus configuration
dbus-daemon --system
# set the address to listen on and override the configuration value for it
dbus-daemon --address {{address}}
# output the process id to stdout
dbus-daemon --print-pid
# force the message bus to write to the system log for messages
dbus-daemon --syslog
# view the available firewall zones
firewall-cmd --get-active-zones
# view the rules which are currently applied
firewall-cmd --list-all
# permanently move the interface into the block zone, effectively blocking all communication
firewall-cmd --permanent --zone={{block}} --change-interface={{enp1s0}}
# permanently open the port for a service in the specified zone (like port 443 when in the `public` zone)
firewall-cmd --permanent --zone={{public}} --add-service={{https}}
# permanently close the port for a service in the specified zone (like port 80 when in the `public` zone)
firewall-cmd --permanent --zone={{public}} --remove-service={{http}}
# permanently open two arbitrary ports in the specified zone
firewall-cmd --permanent --zone={{public}} --add-port={{25565/tcp}} --add-port={{19132/udp}}
# reload firewalld to force rule changes to take effect
firewall-cmd --reload
# display information for all cpus
cpuid
# display information only for the current cpu
cpuid -1
# display raw hex information with no decoding
cpuid -r
# create a random uuidv4
uuidgen --random
# create a uuidv1 based on the current time
uuidgen --time
# create a uuidv5 of the name with a specified namespace prefix
uuidgen --sha1 --namespace {{@dns|@url|@oid|@x500}} --name {{object_name}}
# compute and display the wpapsk key for a given ssid reading the passphrase from stdin
wpa_passphrase {{SSID}}
# compute and display wpapsk key for a given ssid specifying the passphrase as an argument
wpa_passphrase {{SSID}} {{passphrase}}
# display a summary of the top 10 historical uptime records
uprecords
# display the top 25 records
uprecords -m {{25}}
# display the downtime between reboots instead of the kernel version
uprecords -d
# show the most recent reboots
uprecords -B
# don't truncate information
uprecords -w
# change the line endings of a file
dos2unix {{filename}}
# create a copy with unixstyle line endings
dos2unix -n {{filename}} {{new_filename}}
# check a btrfs filesystem
sudo btrfs check {{path/to/partition}}
# check and repair a btrfs filesystem (dangerous)
sudo btrfs check --repair {{path/to/partition}}
# show the progress of the check
sudo btrfs check --progress {{path/to/partition}}
# verify the checksum of each data block (if the filesystem is good)
sudo btrfs check --check-data-csum {{path/to/partition}}
# use the `n`th superblock (`n` can be 0, 1 or 2)
sudo btrfs check --super {{n}} {{path/to/partition}}
# rebuild the checksum tree
sudo btrfs check --repair --init-csum-tree {{path/to/partition}}
# rebuild the extent tree
sudo btrfs check --repair --init-extent-tree {{path/to/partition}}
# list all available playback targets
pw-play --list-targets
# play a wav sound file over the default target
pw-play {{path/to/file.wav}}
# play a wav sound file at a different volume level
pw-play --volume={{0.1}} {{path/to/file.wav}}
# generate a permuted index where the first field of each line is an index reference
ptx --references {{path/to/file}}
# generate a permuted index with automatically generated index references
ptx --auto-reference {{path/to/file}}
# generate a permuted index with a fixed width
ptx --width={{width_in_columns}} {{path/to/file}}
# generate a permuted index with a list of filtered words
ptx --only-file={{path/to/filter}} {{path/to/file}}
# generate a permuted index with sysvstyle behaviors
ptx --traditional {{path/to/file}}
# perform a dry run (print what would be done without actually doing it)
mkinitcpio
# generate a ramdisk environment based on the `linux` preset
mkinitcpio --preset {{linux}}
# generate a ramdisk environment based on the `linuxlts` preset
mkinitcpio --preset {{linux-lts}}
# generate ramdisk environments based on all existing presets (used to regenerate all the initramfs images after a change in `/etc/mkinitcpio.conf`)
mkinitcpio --allpresets
# generate an initramfs image using an alternative configuration file
mkinitcpio --config {{path/to/mkinitcpio.conf}} --generate {{path/to/initramfs.img}}
# generate an initramfs image for a kernel other than the one currently running (the installed kernel releases can be found in `/usr/lib/modules/`)
mkinitcpio --kernel {{kernel_version}} --generate {{path/to/initramfs.img}}
# list all available hooks
mkinitcpio --listhooks
# display help for a specific hook
mkinitcpio --hookhelp {{hook_name}}
# check cluster health status
ceph status
# check cluster usage stats
ceph df
# get the statistics for the placement groups in a cluster
ceph pg dump --format {{plain}}
# create a storage pool
ceph osd pool create {{pool_name}} {{page_number}}
# delete a storage pool
ceph osd pool delete {{pool_name}}
# rename a storage pool
ceph osd pool rename {{current_name}} {{new_name}}
# selfrepair pool storage
ceph pg repair {{pool_name}}
# create new user
useradd {{name}}
# create new user with a default home directory
useradd --create-home {{name}}
# create new user with specified shell
useradd --shell {{path/to/shell}} {{name}}
# create new user belonging to additional groups (mind the lack of whitespace)
useradd --groups {{group1,group2}} {{name}}
# create new system user without a home directory
useradd --no-create-home --system {{name}}
# open the terminal with a title of `example`
xterm -T {{Example}}
# open the terminal in fullscreen mode
xterm -fullscreen
# open the terminal with a dark blue background and yellow foreground (font color)
xterm -bg {{darkblue}} -fg {{yellow}}
# open the terminal with 100 characters per line and 35 lines, in screen position x=200px, y=20px
xterm -geometry {{100}}x{{35}}+{{200}}+{{20}}
# open the terminal using a serif font and a font size equal to 20
xterm -fa {{'Serif'}} -fs {{20}}
# copy the output from a command to the x11 primary selection area (clipboard)
echo 123 | xclip
# copy the output from a command to a given x11 selection area
echo 123 | xclip -selection {{primary|secondary|clipboard}}
# copy the output from a command to the system clipboard, using short notation
echo 123 | xclip -sel clip
# copy the contents of a file into the system clipboard
xclip -sel clip {{input_file.txt}}
# copy the contents of a png into the system clipboard (can be pasted in other programs correctly)
xclip -sel clip -t image/png {{input_file.png}}
# copy the user input in the console into the system clipboard
xclip -i
# paste the contents of the x11 primary selection area to the console
xclip -o
# paste the contents of the system clipboard to the console
xclip -o -sel clip
# display a report of cpu and disk statistics since system startup
iostat
# display a report of cpu and disk statistics with units converted to megabytes
iostat -m
# display cpu statistics
iostat -c
# display disk statistics with disk names (including lvm)
iostat -N
# display extended disk statistics with disk names for device "sda"
iostat -xN {{sda}}
# display incremental reports of cpu and disk statistics every 2 seconds
iostat {{2}}
# show graph for a specific interface
speedometer -r {{eth0}} -t {{eth0}}
# synchronize the pkgfile database
sudo pkgfile --update
# search for a package that owns a specific file
pkgfile {{filename}}
# list all files provided by a package
pkgfile --list {{package_name}}
# list only files provided by a package located within the `bin` or `sbin` directory
pkgfile --list --binaries {{package_name}}
# search for a package that owns a specific file using caseinsensitive matching
pkgfile --ignorecase {{filename}}
# search for a package that owns a specific file in the `bin` or `sbin` directory
pkgfile --binaries {{filename}}
# search for a package that owns a specific file, displaying the package version
pkgfile --verbose {{filename}}
# search for a package that owns a specific file in a specific repository
pkgfile --repo {{repository_name}} {{filename}}
# get the current screen brightness as a percentage
xbacklight
# set the screen brightness to 40%
xbacklight -set {{40}}
# increase current brightness by 25%
xbacklight -inc {{25}}
# decrease current brightness by 75%
xbacklight -dec {{75}}
# increase backlight to 100%, over 60 seconds (value given in ms), using 60 steps
xbacklight -set {{100}} -time {{60000}} -steps {{60}}
# display the current configuration (or dry run)
authconfig --test
# configure the server to use a different password hashing algorithm
authconfig --update --passalgo={{algorithm}}
# enable ldap authentication
authconfig --update --enableldapauth
# disable ldap authentication
authconfig --update --disableldapauth
# enable network information service (nis)
authconfig --update --enablenis
# enable kerberos
authconfig --update --enablekrb5
# enable winbind (active directory) authentication
authconfig --update --enablewinbindauth
# enable local authorization
authconfig --update --enablelocauthorize
# display information about a specific undo file
e2undo -h {{path/to/undo_file}} {{/dev/sdXN}}
# perform a dryrun and display the candidate blocks for replaying
e2undo -nv {{path/to/undo_file}} {{/dev/sdXN}}
# perform an undo operation
e2undo {{path/to/undo_file}} {{/dev/sdXN}}
# perform an undo operation and display verbose information
e2undo -v {{path/to/undo_file}} {{/dev/sdXN}}
# write the old contents of the block to an undo file before overwriting a file system block
e2undo -z {{path/to/file.e2undo}} {{path/to/undo_file}} {{/dev/sdXN}}
# find which processes are accessing a file or directory
fuser {{path/to/file_or_directory}}
# show more fields (`user`, `pid`, `access` and `command`)
fuser --verbose {{path/to/file_or_directory}}
# identify processes using a tcp socket
fuser --namespace tcp {{port}}
# kill all processes accessing a file or directory (sends the `sigkill` signal)
fuser --kill {{path/to/file_or_directory}}
# find which processes are accessing the filesystem containing a specific file or directory
fuser --mount {{path/to/file_or_directory}}
# rename files using a perl common regular expression (substitute 'foo' with 'bar' wherever found)
rename {{'s/foo/bar/'}} {{*}}
# dryrun  display which renames would occur without performing them
rename -n {{'s/foo/bar/'}} {{*}}
# force renaming even if the operation would remove existing destination files
rename -f {{'s/foo/bar/'}} {{*}}
# convert filenames to lower case (use `f` in caseinsensitive filesystems to prevent "already exists" errors)
rename 'y/A-Z/a-z/' {{*}}
# replace whitespace with underscores
rename 's/\s+/_/g' {{*}}
# change to a specific runlevel
sudo openrc {{runlevel_name}}
# change to a specific runlevel, but don't stop any existing services
sudo openrc --no-stop {{runlevel_name}}
# display all devices detected by fwupd
fwupdmgr get-devices
# download the latest firmware metadata from lvfs
fwupdmgr refresh
# list the updates available for devices on your system
fwupdmgr get-updates
# install firmware updates
fwupdmgr update
# add partition mappings
kpartx -a {{whole_disk.img}}
# delete partition mappings
kpartx -d {{whole_disk.img}}
# list partition mappings
kpartx -l {{whole_disk.img}}
# launch with default, builtin config
conky
# create a new default config
conky -C > ~/.conkyrc
# launch conky with a given config file
conky -c {{path/to/config}}
# start in the background (daemonize)
conky -d
# align conky on the desktop
conky -a {{{top,bottom,middle}_{left,right,middle}}}
# pause for 5 seconds at startup before launching
conky -p {{5}}
# show all dmi table contents
sudo dmidecode
# show the bios version
sudo dmidecode -s bios-version
# show the system's serial number
sudo dmidecode -s system-serial-number
# show bios information
sudo dmidecode -t bios
# show cpu information
sudo dmidecode -t processor
# show memory information
sudo dmidecode -t memory
# list binary packages which would be generated from a rpm spec file
rpmspec --query {{path/to/rpm.spec}}
# get summary information for single binary packages generated from a rpm spec file
rpmspec --query --queryformat "{{%{name}: %{summary}\n}}" {{path/to/rpm.spec}}
# get the source package which would be generated from a rpm spec file
rpmspec --query --srpm {{path/to/rpm.spec}}
# parse a rpm spec file to `stdout`
rpmspec --parse {{path/to/rpm.spec}}
# check a specific `pkgbuild` file
namcap {{path/to/pkgbuild}}
# check a specific package file
namcap {{path/to/package.pkg.tar.zst}}
# check a file, printing extra [i]nformational messages
nnamcap -i {{path/to/file}}
# upgrade installed packages to the newest available versions
sudo dnf upgrade
# search packages via keywords
dnf search {{keywords}}
# display details about a package
dnf info {{package}}
# install a new package
sudo dnf install {{package}}
# install a new package and assume yes to all questions
sudo dnf -y install {{package}}
# remove a package
sudo dnf remove {{package}}
# list installed packages
dnf list --installed
# find which packages provide a given file
dnf provides {{file}}
# initialize the pacman keyring
sudo pacman-key --init
# add the default archlinux keys
sudo pacman-key --populate {{archlinux}}
# list keys from the public keyring
pacman-key --list-keys
# add the specified keys
sudo pacman-key --add {{path/to/keyfile.gpg}}
# receive a key from a key server
sudo pacman-key --recv-keys "{{uid|name|email}}"
# print the fingerprint of a specific key
pacman-key --finger "{{uid|name|email}}"
# sign an imported key locally
sudo pacman-key --lsign-key "{{uid|name|email}}"
# remove a specific key
sudo pacman-key --delete "{{uid|name|email}}"
# view jobs spawned by the current shell
jobs
# list jobs and their process ids
jobs -l
# display information about jobs with changed status
jobs -n
# display process id of process group leader
jobs -p
# display running processes
jobs -r
# display stopped processes
jobs -s
# open an lxterminal window
lxterminal
# open an lxterminal window, run a command, and then exit
lxterminal -e "{{command}}"
# open an lxterminal window with multiple tabs
lxterminal --tabs={{tab_name1,tab_name2,...}}
# open an lxterminal window with a specific title
lxterminal --title={{title_name}}
# open an lxterminal window with a specific working directory
lxterminal --working-directory={{path/to/directory}}
# to view a file
gs -dQUIET -dBATCH {{file.pdf}}
# reduce pdf file size to 150 dpi images for reading on a ebook device
gs -dNOPAUSE -dQUIET -dBATCH -sDEVICE=pdfwrite -dPDFSETTINGS=/ebook -sOutputFile={{output.pdf}} {{input.pdf}}
# convert pdf file (pages 1 through 3) to an image with 150 dpi resolution
gs -dQUIET -dBATCH -dNOPAUSE -sDEVICE=jpeg -r150 -dFirstPage={{1}} -dLastPage={{3}} -sOutputFile={{output_%d.jpg}} {{input.pdf}}
# extract pages from a pdf file
gs -dQUIET -dBATCH -dNOPAUSE -sDEVICE=pdfwrite -sOutputFile={{output.pdf}} {{input.pdf}}
# merge pdf files
gs -dQUIET -dBATCH -dNOPAUSE -sDEVICE=pdfwrite -sOutputFile={{output.pdf}} {{input1.pdf}} {{input2.pdf}}
# convert from postscript file to pdf file
gs -dQUIET -dBATCH -dNOPAUSE -sDEVICE=pdfwrite -sOutputFile={{output.pdf}} {{input.ps}}
# upgrade to the latest release
sudo do-release-upgrade
# upgrade to the latest development release
sudo do-release-upgrade --devel-release
# upgrade to the latest proposed release
sudo do-release-upgrade --proposed
# create a new volume group called vg1 using the `/dev/sda1` device
vgcreate {{vg1}} {{/dev/sda1}}
# create a new volume group called vg1 using multiple devices
vgcreate {{vg1}} {{/dev/sda1}} {{/dev/sdb1}} {{/dev/sdc1}}
# list all input devices
xinput list
# disable an input
xinput disable {{id}}
# enable an input
xinput enable {{id}}
# disconnect an input from its master
xinput float {{id}}
# reattach an input as slave to a master
xinput reattach {{id}} {{master_id}}
# list settings of an input device
xinput list-props {{id}}
# change a setting of an input device
xinput set-prop {{id}} {{setting_id}} {{value}}
# open a serial port using the specified baud rate
microcom --port {{path/to/serial_port}} --speed {{baud_rate}}
# establish a telnet connection to the specified host
microcom --telnet {{hostname}}:{{port}}
# run a command as a daemon
daemonize {{command}} {{command_arguments}}
# write the pid to the specified file
daemonize -p {{path/to/pidfile}} {{command}} {{command_arguments}}
# use a lock file to ensure that only one instance runs at a time
daemonize -l {{path/to/lockfile}} {{command}} {{command_arguments}}
# use the specified user account
sudo daemonize -u {{user}} {{command}} {{command_arguments}}
# show the current readings of all sensor chips
sensors
# show temperatures in degrees fahrenheit
sensors --fahrenheit
# update the metadata database
sudo apt update
# search for packages that contain the specified file or path
apt-file {{search|find}} {{part/of/filename}}
# list the contents of a specific package
apt-file {{show|list}} {{package_name}}
# search for packages that match the regular expression given in `pattern`
apt-file {{search|find}} --regexp {{regular_expression}}
# show highlevel information about disk drives and block devices
udisksctl status
# show detailed information about a device
udisksctl info --block-device {{/dev/sdX}}
# show detailed information about a device partition
udisksctl info --block-device {{/dev/sdXN}}
# mount a device partition and prints the mount point
udisksctl mount --block-device {{/dev/sdXN}}
# unmount a device partition
udisksctl unmount --block-device {{/dev/sdXN}}
# monitor the daemon for events
udisksctl monitor
# bruteforce a password with a length of 4 to 8 characters, and contains only alphanumeric characters (order matters)
fcrackzip --brute-force --length 4-8 --charset aA1 {{archive}}
# bruteforce a password in verbose mode with a length of 3 characters that only contains lowercase characters, `$` and `%`
fcrackzip -v --brute-force --length 3 --charset a:$% {{archive}}
# bruteforce a password that contains only lowercase and special characters
fcrackzip --brute-force --length 4 --charset a! {{archive}}
# bruteforce a password containing only digits, starting from the password `12345`
fcrackzip --brute-force --length 5 --charset 1 --init-password 12345 {{archive}}
# crack a password using a wordlist
fcrackzip --use-unzip --dictionary --init-password {{wordlist}} {{archive}}
# benchmark cracking performance
fcrackzip --benchmark
# show a summary of services and their status
rc-status
# include services in all runlevels in the summary
rc-status --all
# list services that have crashed
rc-status --crashed
# list manually started services
rc-status --manual
# list supervised services
rc-status --supervised
# get the current runlevel
rc-status --runlevel
# list all runlevels
rc-status --list
# reinitialise the current terminal
reset
# display the terminal type instead
reset -q
# show all outputs and configuration files to attach to a bug report
kscreen-console bug
# show paths to kscreen configuration files
kscreen-console config
# show kscreen output information and configuration
kscreen-console outputs
# monitor for changes
kscreen-console monitor
# show the current kscreen configuration as json
kscreen-console json
# display help
kscreen-console --help
# display help including qt specific commandline options
kscreen-console --help-all
# execute an expect script from a file
expect {{path/to/file}}
# execute a specified expect script
expect -c "{{commands}}"
# enter an interactive repl (use `exit` or ctrl + d to exit)
expect -i
# connect to a database with the currently logged in user
mycli {{database_name}}
# connect to a database with the specified user
mycli -u {{user}} {{database_name}}
# connect to a database on the specified host with the specified user
mycli -u {{user}} -h {{host}} {{database_name}}
# purge and process manual pages
mandb
# update a single entry
mandb --filename {{path/to/file}}
# create entries from scratch instead of updating
mandb --create
# only process user databases
mandb --user-db
# do not purge obsolete entries
mandb --no-purge
# check the validity of manual pages
mandb --test
# defragment the filesystem
e4defrag {{/dev/sdXN}}
# see how fragmented a filesystem is
e4defrag -c {{/dev/sdXN}}
# print errors and the fragmentation count before and after each file
e4defrag -v {{/dev/sdXN}}
# display a calendar for the current month
cal
# display previous, current and next month
cal -3
# use monday as the first day of the week
cal --monday
# display a calendar for a specific year (4 digits)
cal {{year}}
# display a calendar for a specific month and year
cal {{month}} {{year}}
# synchronize list of packages and versions available
zypper refresh
# install a new package
zypper install {{package}}
# remove a package
zypper remove {{package}}
# upgrade installed packages to the newest available versions
zypper update
# search package via keyword
zypper search {{keyword}}
# show information related to configured repositories
zypper repos --sort-by-priority
# start a scrub
sudo btrfs scrub start {{path/to/btrfs_mount}}
# show the status of an ongoing or last completed scrub
sudo btrfs scrub status {{path/to/btrfs_mount}}
# cancel an ongoing scrub
sudo btrfs scrub cancel {{path/to/btrfs_mount}}
# resume a previously cancelled scrub
sudo btrfs scrub resume {{path/to/btrfs_mount}}
# start a scrub, but wait until the scrub finishes before exiting
sudo btrfs scrub start -B {{path/to/btrfs_mount}}
# start a scrub in quiet mode (does not print errors or statistics)
sudo btrfs scrub start -q {{path/to/btrfs_mount}}
# start calc in interactive mode
calc
# perform a calculation in noninteractive mode
calc -p '{{85 * (36 / 4)}}'
# search for duplicate extents in a directory and show them
duperemove -r {{path/to/directory}}
# deduplicate duplicate extents on a btrfs or xfs (experimental) filesystem
duperemove -r -d {{path/to/directory}}
# use a hash file to store extent hashes (less memory usage and can be reused on subsequent runs)
duperemove -r -d --hashfile={{path/to/hashfile}} {{path/to/directory}}
# limit i/o threads (for hashing and dedupe stage) and cpu threads (for duplicate extent finding stage)
duperemove -r -d --hashfile={{path/to/hashfile}} --io-threads={{N}} --cpu-threads={{N}} {{path/to/directory}}
# run command in existing processes network namespace
nsenter -t {{pid}} -n {{command}} {{command_arguments}}
# run a new command in an existing processes pstable namespace
nsenter -t {{pid}} -p {{command}} {{command_arguments}}
# run command in existing processes ipc namespace
nsenter -t {{pid}} -i {{command}} {{command_arguments}}
# open an image
sxiv {{path/to/file}}
# open an image in fullscreen mode
sxiv -f {{path/to/file}}
# open a newlineseparated list of images, reading filenames from standard input
echo {{path/to/file}} | sxiv -i
# open a spaceseparated list of images as a slideshow
sxiv -S {{seconds}} {{path/to/file}}
# open a spaceseparated list of images in thumbnail mode
sxiv -t {{path/to/file}}
# display virtual memory statistics
vmstat
# display reports every 2 seconds for 5 times
vmstat {{2}} {{5}}
# decompress from a file to the current directory
lrzuntar {{path/to/archive.tar.lrz}}
# decompress from a file to the current directory using a specific number of processor threads
lrzuntar -p {{8}} {{path/to/archive.tar.lrz}}
# decompress from a file to the current directory and silently overwrite items that already exist
lrzuntar -f {{archive.tar.lrz}}
# specify the output path
lrzuntar -O {{path/to/directory}} {{archive.tar.lrz}}
# delete the compressed file after decompression
lrzuntar -D {{path/to/archive.tar.lrz}}
# list devices with changeable brightness
brightnessctl --list
# print the current brightness of the display backlight
brightnessctl get
# set the brightness of the display backlight to a specified percentage within range
brightnessctl set {{50%}}
# increase brightness by a specified increment
brightnessctl set {{+10%}}
# decrease brightness by a specified decrement
brightnessctl set {{-10%}}
# show a list of all last logged in users
sudo lastb
# show a list of all last logged in users since a given time
sudo lastb --since {{YYYY-MM-DD}}
# show a list of all last logged in users until a given time
sudo lastb --until {{YYYY-MM-DD}}
# show a list of all logged in users at a specific time
sudo lastb --present {{hh:mm}}
# show a list of all last logged in users and translate the ip into a hostname
sudo lastb --dns
# check status of currently active interfaces
wg
# generate a new private key
wg genkey
# generate a public key from a private key
wg pubkey < {{path/to/private_key}} > {{path/to/public_key}}
# generate a public and private key
wg genkey | tee {{path/to/private_key}} | wg pubkey > {{path/to/public_key}}
# spell check a single file
aspell check {{path/to/file}}
# list misspelled words from standard input
cat {{file}} | aspell list
# show available dictionary languages
aspell dicts
# run aspell with a different language (takes twoletter iso 639 language code)
aspell --lang={{cs}}
# list misspelled words from standard input and ignore words from personal word list
cat {{file}} | aspell --personal={{personal-word-list.pws}} {{list}}
# convert a translated po file back to a document
po4a-translate --format {{text}} --master {{path/to/master.doc}} --po {{path/to/result.po}} --localized {{path/to/translated.txt}}
# get a list of available formats
po4a-translate --help-format
# remove first column of stdin
colrm {{1 1}}
# remove from 3rd column till the end of each line
colrm {{3}}
# remove from the 3rd column till the 5th column of each line
colrm {{3 5}}
# disable interface eth0
ifdown {{eth0}}
# disable all interfaces which are enabled
ifdown -a
# display the current state of the system (known screens, resolutions, ...)
xrandr --query
# disable disconnected outputs and enable connected ones with default settings
xrandr --auto
# change the resolution and update frequency of displayport 1 to 1920x1080, 60hz
xrandr --output {{DP1}} --mode {{1920x1080}} --rate {{60}}
# set the resolution of hdmi2 to 1280x1024 and put it on the right of dp1
xrandr --output {{HDMI2}} --mode {{1280x1024}} --right-of {{DP1}}
# disable the vga1 output
xrandr --output {{VGA1}} --off
# set brightness for lvds1 to 50%
xrandr --output {{LVDS1}} --brightness {{0.5}}
# see display hardware information
xrandr -q
# install grub on a bios system
grub-install --target={{i386-pc}} {{path/to/device}}
# install grub on an uefi system
grub-install --target={{x86_64-efi}} --efi-directory={{path/to/efi_directory}} --bootloader-id={{GRUB}}
# install grub preloading specific modules
grub-install --target={{x86_64-efi}} --efi-directory={{path/to/efi_directory}} --modules="{{part_gpt part_msdos}}"
# remove a user
deluser {{username}}
# remove a user and their home directory
deluser --remove-home {{username}}
# remove a user and their home, but backup their files into a `.tar.gz` file in the specified directory
deluser --backup-to {{path/to/backup_directory}} --remove-home {{username}}
# remove a user, and all files owned by them
deluser --remove-all-files {{username}}
# analyze logs for a range of dates at a certain level of detail
logwatch --range {{yesterday|today|all|help}} --detail {{low|medium|others}}'
# restrict report to only include information for a selected service
logwatch --range {{all}} --service {{apache|pam_unix|etc}}
# display ext2, ext3 and ext4 filesystem information
dumpe2fs {{/dev/sdXN}}
# display the blocks which are reserved as bad in the filesystem
dumpe2fs -b {{/dev/sdXN}}
# force display filesystem information even with nonrecognisable feature flags
dumpe2fs -f {{/dev/sdXN}}
# only display the superblock information and not any of the block group descriptor detail information
dumpe2fs -h {{/dev/sdXN}}
# print the detailed group information block numbers in hexadecimal format
dumpe2fs -x {{/dev/sdXN}}
# set up a wireless connection interactively
wifi-menu
# interactively set up a connection to a network and obscure the password
wifi-menu --obscure
# display help
wifi-menu --help
# start a game at level 1
pacman4console
# start a game on a certain level (there are nine official levels)
pacman4console --level={{level_number}}
# start the pacman4console level editor, saving to a specified text file
pacman4consoleedit {{path/to/level_file}}
# play a custom level
pacman4console --level={{path/to/level_file}}
# trim unused blocks on all mounted partitions that support it
sudo fstrim --all
# trim unused blocks on a specified partition
sudo fstrim {{/}}
# display statistics after trimming
sudo fstrim --verbose {{/}}
# send a wol packet to a device
wol {{mac_address}}
# send a wol packet to a device in another subnet based on its ip
wol --ipaddr={{ip_address}} {{mac_address}}
# send a wol packet to a device in another subnet based on its hostname
wol --host={{hostname}} {{mac_address}}
# send a wol packet to a specific port on a host
wol --port={{port_number}} {{mac_address}}
# read hardware addresses, ip addresses/hostnames, optional ports and secureon passwords from a file
wol --file={{path/to/file}}
# turn on verbose output
wol --verbose {{mac_address}}
# open a new konsole in a specific directory
konsole --workdir {{path/to/directory}}
# run a specific command and do not close the window after it exits
konsole --noclose -e {{command}}
# open a new tab
konsole --new-tab
# open a konsole in the background and bring to the front when ctrl+shift+f12 (by default) is pressed
konsole --background-mode
# open a konsole with the emergency fallback profile
konsole --fallback-profile
# create an empty ip set which will contain ip addresses
ipset create {{set_name}} hash:ip
# destroy a specific ip set
ipset destroy {{set_name}}
# add an ip address to a specific set
ipset add {{set_name}} {{192.168.1.25}}
# delete a specific ip address from a set
ipset del {{set_name}} {{192.168.1.25}}
# save an ip set
ipset save {{set_name}} > {{path/to/ip_set}}
# remove a user
userdel {{name}}
# remove a user along with their home directory and mail spool
userdel --remove {{name}}
# remove a user from a group
userdel {{name}} {{group}}
# remove a user in other root directory
userdel --root {{path/to/other/root}} {{name}}
# update the list of available packages and versions (it's recommended to run this before other `aptget` commands)
apt-get update
# install a package, or update it to the latest available version
apt-get install {{package}}
# remove a package
apt-get remove {{package}}
# remove a package and its configuration files
apt-get purge {{package}}
# upgrade all installed packages to their newest available versions
apt-get upgrade
# clean the local repository  removing package files (`.deb`) from interrupted downloads that can no longer be downloaded
apt-get autoclean
# remove all packages that are no longer needed
apt-get autoremove
# upgrade installed packages (like `upgrade`), but remove obsolete packages and install additional packages to meet new dependencies
apt-get dist-upgrade
# show usage help, including the program version
collectd -h
# test the configuration file and then exit
collectd -t
# test plugin data collection functionality and then exit
collectd -T
# start collectd
collectd
# specify a custom configuration file location
collectd -C {{path/to/file}}
# specify a custom pid file location
collectd -P {{path/to/file}}
# don't fork into the background
collectd -f
# play a specific file (sampling rate, bit depth, etc. will be automatically determined for the file format)
aplay {{path/to/file}}
# play the first 10 seconds of a specific file at 2500 hz
aplay --duration={{10}} --rate={{2500}} {{path/to/file}}
# play the raw file as a 22050 hz, mono, 8bit, mulaw `.au` file
aplay --channels={{1}} --file-type {{raw}} --rate={{22050}} --format={{mu_law}} {{path/to/file}}
# create a wordlist file from the given url up to 2 links depth
cewl --depth {{2}} --write {{path/to/wordlist.txt}} {{url}}
# output an alphanumeric wordlist from the given url with words of minimum 5 characters
cewl --with-numbers --min_word_length {{5}} {{url}}
# output a wordlist from the given url in debug mode including email addresses
cewl --debug --email {{url}}
# output a wordlist from the given url using http basic or digest authentication
cewl --auth_type {{basic|digest}} --auth_user {{username}} --auth_pass {{password}} {{url}}
# output a wordlist from the given url through a proxy
cewl --proxy_host {{host}} --proxy_port {{port}} {{url}}
# display information about logical volumes
lvs
# display all logical volumes
lvs -a
# change default display to show more details
lvs -v
# display only specific fields
lvs -o {{field_name_1}},{{field_name_2}}
# append field to default display
lvs -o +{{field_name}}
# suppress heading line
lvs --noheadings
# use a separator to separate fields
lvs --separator {{=}}
# start chronyc in interactive mode
chronyc
# display tracking stats for the chrony daemon
chronyc tracking
# print the time sources that chrony is currently using
chronyc sources
# display stats for sources currently used by chrony daemon as a time source
chronyc sourcestats
# step the system clock immediately, bypassing any slewing
chronyc makestep
# display verbose information about each ntp source
chronyc ntpdata
# disable a configuration file
sudo a2disconf {{configuration_file}}
# don't show informative messages
sudo a2disconf --quiet {{configuration_file}}
# do a dry run and print the configuration to stdout
sudo grub-mkconfig
# generate the configuration file
sudo grub-mkconfig --output={{/boot/grub/grub.cfg}}
# print the help page
grub-mkconfig --help
# show cpu statistics at a 2 second interval for 10 times
pidstat {{2}} {{10}}
# show page faults and memory utilization
pidstat -r
# show input/output usage per process id
pidstat -d
# show information on a specific pid
pidstat -p {{PID}}
# show memory statistics for all processes whose command name include "fox" or "bird"
pidstat -C "{{fox|bird}}" -r -p ALL
# connect with a defined configuration file
sudo vpnc {{config_file}}
# terminate the previously created connection
sudo vpnc-disconnect
# change the line endings of a file
unix2dos {{filename}}
# create a copy with dosstyle line endings
unix2dos -n {{filename}} {{new_filename}}
# display available modules
module avail
# search for a module by name
module avail {{module_name}}
# load a module
module load {{module_name}}
# display loaded modules
module list
# unload a specific loaded module
module unload {{module_name}}
# unload all loaded modules
module purge
# start top
top
# do not show any idle or zombie processes
top -i
# show only processes owned by given user
top -u {{username}}
# sort processes by a field
top -o {{field_name}}
# show the individual threads of a given process
top -Hp {{process_id}}
# show only the processes with the given pid(s), passed as a commaseparated list. (normally you wouldn't know pids off hand. this example picks the pids from the process name)
top -p $(pgrep -d ',' {{process_name}})
# get help about interactive commands
?
# scan for available wireless networks
iw dev {{wlp}} scan
# join an open wireless network
iw dev {{wlp}} connect {{SSID}}
# close the current connection
iw dev {{wlp}} disconnect
# show information about the current connection
iw dev {{wlp}} link
# open a file
zathura {{path/to/file}}
# navigate left/up/down/right
<H|J|K|L> or arrow keys
# rotate
r
# invert colors
Ctrl + R
# search for text by a given string
/{{string}}
# create/delete bookmarks
:{{bmark|bdelete}} {{bookmark_name}}
# list bookmarks
:blist
# connect to the default host (irc.ofct.net) with the nickname set in the `$user` environment variable
sic
# connect to a given host, using a given nickname
sic -h {{host}} -n {{nickname}}
# connect to a given host, using a given nickname and password
sic -h {{host}} -n {{nickname}} -k {{password}}
# join a channel
:j #{{channel}}<Enter>
# send a message to a channel or user
:m #{{channel|user}}<Enter>
# set default channel or user
:s #{{channel|user}}<Enter>
# change the line endings of a file
mac2unix {{filename}}
# create a copy with unixstyle line endings
mac2unix -n {{filename}} {{new_filename}}
# execute brute force against an ftp server using a file containing usernames and a file containing passwords
medusa -M ftp -h host -U {{path/to/username_file}} -P {{path/to/password_file}}
# execute a login attempt against an http server using the username, password and useragent specified
medusa -M HTTP -h host -u {{username}} -p {{password}} -m USER-AGENT:"{{Agent}}"
# execute a brute force against a mysql server using a file containing usernames and a hash
medusa -M mysql -h host -U {{path/to/username_file}} -p {{hash}} -m PASS:HASH
# execute a brute force against a list of smb servers using a username and a pwdump file
medusa -M smbnt -H {{path/to/hosts_file}} -C {{path/to/pwdump_file}} -u {{username}} -m PASS:HASH
# fake the time to this evening, before printing the result of `date`
faketime '{{today 23:30}}' {{date}}
# open a new `bash` shell, which uses yesterday as the current date
faketime '{{yesterday}}' {{bash}}
# simulate how a program would act next friday night
faketime '{{next Friday 1 am}}' {{path/to/program}}
# spawn 4 workers to stress test cpu
stress -c {{4}}
# spawn 2 workers to stress test io and timeout after 5 seconds
stress -i {{2}} -t {{5}}
# spawn 2 workers to stress test memory (each worker allocates 256m bytes)
stress -m {{2}} --vm-bytes {{256M}}
# spawn 2 workers spinning on write()/unlink() (each worker writes 1g bytes)
stress -d {{2}} --hdd-bytes {{1GB}}
# make a package (run in the same directory as a `pkgbuild`)
makepkg
# make a package and install its dependencies
makepkg --syncdeps
# same as above, but install the package with `pacman` when done
makepkg --syncdeps --install
# make a package, but skip source checksums
makepkg --skipchecksums
# clean up work directories after a successful build
makepkg --clean
# rename files using simple substitutions (substitute 'foo' with 'bar' wherever found)
rename {{foo}} {{bar}} {{*}}
# dryrun  display which renames would occur without performing them
rename -vn {{foo}} {{bar}} {{*}}
# do not overwrite existing files
rename -o {{foo}} {{bar}} {{*}}
# change file extensions
rename {{.ext}} {{.bak}} {{*.ext}}
# prepend "foo" to all filenames in the current directory
rename {{''}} {{'foo'}} {{*}}
# rename a group of increasingly numbered files zeropadding the numbers up to 3 digits
rename {{foo}} {{foo00}} {{foo?}} && rename {{foo}} {{foo0}} {{foo??}}
# start a vnc server using a passwordfile
x0vncserver -display {{:0}} -passwordfile {{path/to/file}}
# start a vnc server using a specific port
x0vncserver -display {{:0}} -rfbport {{port}}
# print information about all the commands in the acct (record file)
lastcomm
# display commands executed by a given user
lastcomm --user {{user}}
# display information about a given command executed on the system
lastcomm --command {{command}}
# display information about commands executed on a given terminal
lastcomm --tty {{terminal_name}}
# start an interactive shell (`bash`, by default) in a new root directory
arch-chroot {{path/to/new/root}}
# specify the user (other than the current user) to run the shell as
arch-chroot -u {{user}} {{path/to/new/root}}
# run a custom command (instead of the default `bash`) in the new root directory
arch-chroot {{path/to/new/root}} {{command}} {{command_arguments}}
# specify the shell, other than the default `bash` (in this case, the `zsh` package should have been installed in the target system)
arch-chroot {{path/to/new/root}} {{zsh}}
# report i/o and transfer rate issued to physical devices, one per second (press ctrl+c to quit)
sar -b {{1}}
# report a total of 10 network device statistics, one per 2 seconds
sar -n DEV {{2}} {{10}}
# report cpu utilization, one per 2 seconds
sar -u ALL {{2}}
# report a total of 20 memory utilization statistics, one per second
sar -r ALL {{1}} {{20}}
# report the run queue length and load averages, one per second
sar -q {{1}}
# report paging statistics, one per 5 seconds
sar -B {{5}}
# pretend to load a module into the kernel, but don't actually do it
sudo modprobe --dry-run {{module_name}}
# load a module into the kernel
sudo modprobe {{module_name}}
# remove a module from the kernel
sudo modprobe --remove {{module_name}}
# remove a module and those that depend on it from the kernel
sudo modprobe --remove-dependencies {{module_name}}
# show a kernel module's dependencies
sudo modprobe --show-depends {{module_name}}
# show all tcp/udp/raw/unix sockets
ss -a {{-t|-u|-w|-x}}
# filter tcp sockets by states, only/exclude
ss {{state/exclude}} {{bucket/big/connected/synchronized/...}}
# show all tcp sockets connected to the local https port (443)
ss -t src :{{443}}
# show all tcp sockets listening on the local 8080 port
ss -lt src :{{8080}}
# show all tcp sockets along with processes connected to a remote ssh port
ss -pt dst :{{ssh}}
# show all udp sockets connected on specific source and destination ports
ss -u 'sport == :{{source_port}} and dport == :{{destination_port}}'
# show all tcp ipv4 sockets locally connected on the subnet 192.168.0.0/16
ss -4t src {{192.168/16}}
# start the partition manipulator with a specific device
cfdisk {{/dev/sdX}}
# create a new partition table for a specific device and manage it
cfdisk --zero {{/dev/sdX}}
# start htop
htop
# start htop displaying processes owned by a specific user
htop --user {{username}}
# sort processes by a specified `sort_item` (use `htop sort help` for available options)
htop --sort {{sort_item}}
# see interactive commands while running htop
?
# display help
htop --help
# list global (extern) functions in a file (prefixed with t)
nm -g {{file.o}}
# list only undefined symbols in a file
nm -u {{file.o}}
# list all symbols, even debugging symbols
nm -a {{file.o}}
# demangle c++ symbols (make them readable)
nm --demangle {{file.o}}
# show help
docker inspect
# display information about a container, image, or volume using a name or id
docker inspect {{container|image|ID}}
# display a container's ip address
docker inspect --format='{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' {{container}}
# display the path to the container's log file
docker inspect --format='{{.LogPath}}' {{container}}
# display the image name of the container
docker inspect --format='{{.Config.Image}}' {{container}}
# display the configuration information as json
docker inspect --format='{{json .Config}}' {{container}}
# display all port bindings
docker inspect --format='{{range $p, $conf := .NetworkSettings.Ports}} {{$p}} -> {{(index $conf 0).HostPort}} {{end}}' {{container}}
# launch steam, printing debug messages to stdout
steam
# launch steam and enable its inapp debug console tab
steam -console
# log into steam with the specified credentials
steam -login {{username}} {{password}}
# launch steam in big picture mode
steam -tenfoot
# exit steam
steam -shutdown
# create a named pipe at a given path
mkfifo {{path/to/pipe}}
# compile and run sequential erlang program as a common script and then exit
erlc {{files}} && erl -noshell '{{mymodule:myfunction(arguments)}}, init:stop().'
# connect to a running erlang node
erl -remsh {{nodename}}@{{hostname}} -sname {{custom_shortname}} -hidden -setcookie {{cookie_of_remote_node}}
# tell the erlang shell to load modules from a directory
erl -pa {{directory_with_beam_files}}
# check terminal's openness to write messages
mesg
# disable receiving messages from the write command
mesg n
# enable receiving messages from the write command
mesg y
# retrieve all public ssh keys of a remote host
ssh-keyscan {{host}}
# retrieve all public ssh keys of a remote host listening on a specific port
ssh-keyscan -p {{port}} {{host}}
# retrieve certain types of public ssh keys of a remote host
ssh-keyscan -t {{rsa,dsa,ecdsa,ed25519}} {{host}}
# manually update the ssh known_hosts file with the fingerprint of a given host
ssh-keyscan -H {{host}} >> ~/.ssh/known_hosts
# execute the binary from a given npm module
npx {{module_name}}
# in case a package has multiple binaries, specify the package name along with the binary
npx -p {{package_name}} {{module_name}}
# view help contents
npx --help
# compare files or directories
delta {{path/to/old_file_or_directory}} {{path/to/new_file_or_directory}}
# compare files or directories, showing the line numbers
delta --line-numbers {{path/to/old_file_or_directory}} {{path/to/new_file_or_directory}}
# compare files or directories, showing the differences side by side
delta --side-by-side {{path/to/old_file_or_directory}} {{path/to/new_file_or_directory}}
# compare files or directories, ignoring any git configuration settings
delta --no-gitconfig {{path/to/old_file_or_directory}} {{path/to/new_file_or_directory}}
# compare, rendering commit hashes, file names, and line numbers as hyperlinks, according to the hyperlink spec for terminal emulators
delta --hyperlinks {{path/to/old_file_or_directory}} {{path/to/new_file_or_directory}}
# display the current settings
delta --show-config
# display supported languages and associated file extensions
delta --list-languages
# add a timestamp to the beginning of each line
{{some_command}} | ts
# add timestamps with microsecond precision
{{some_command}} | ts "{{%b %d %H:%M:%.S}}"
# add [i]ncremental timestamps with microsecond precision, starting from zero
{{some_command}} | ts -i "{{%H:%M:%.S}}"
# convert existing timestamps in a text file (eg. a log file) into [r]elative format
cat {{path/to/file}} | ts -r
# display calendar for the current month
gcal
# display calendar for the month of february of the year 2010
gcal {{2}} {{2010}}
# provide calendar sheet with week numbers
gcal --with-week-number
# change starting day of week to 1st day of the week (monday)
gcal --starting-day={{1}}
# display the previous, current and next month surrounding today
gcal .
# compress a file, creating a compressed version next to the file
brotli {{file.ext}}
# decompress a file, creating an uncompressed version next to the file
brotli -d {{file.ext}}.br
# compress a file specifying the output filename
brotli {{file.ext}} -o {{compressed_file.ext.br}}
# decompress a brotli file specifying the output filename
brotli -d {{compressed_file.ext.br}} -o {{file.ext}}