neulab/tldr huggingface dataset:
# set the current work frequency of cpu 1
sudo cpufreq-set -c {{1}} -f {{work_frequency}}
# expand a given acronym
wtf {{IMO}}
# specify a computer related search type
wtf -t {{comp}} {{WWW}}
# print the value of a dconf path
dconf read {{/example/dconf/path}}
# list contents of a dconf path
dconf list {{/example/dconf/path}}
# watch for dconf database changes in a path and subpaths
dconf watch {{/example/dconf/path}}
# display traffic summary for all interfaces
vnstat
# display traffic summary for a specific network interface
vnstat -i {{eth0}}
# display live stats for a specific network interface
vnstat -l -i {{eth0}}
# show traffic statistics on an hourly basis for the last 24 hours using a bar graph
vnstat -hg
# measure and show average traffic for 30 seconds
vnstat -tr {{30}}
# send a message
echo "{{message}}" | wall
# send a message from a file
wall {{file}}
# send a message with timeout (default 300)
wall -t {{seconds}} {{file}}
# set the value of a key. fails if the key doesn't exist or the value is out of range
gsettings set {{org.example.schema}} {{example-key}} {{value}}
# print the value of a key or the schemaprovided default if the key has not been set in `dconf`
gsetings get {{org.example.schema}} {{example-key}}
# unset a key, so that its schema default value will be used
gsettings reset {{org.example.schema}} {{example-key}}
# display all (nonrelocatable) schemas, keys, and values
gsettings list-recursively
# display all keys and values (default if not set) from one schema
gsettings list-recursively {{org.example.schema}}
# display schemaallowed values for a key (helpful with enum keys)
gsettings range {{org.example.schema}} {{example-key}}
# display the humanreadable description of a key
gsettings describe {{org.example.schema}} {{example-key}}
# display users in the system
lslogins
# display users belonging to a specific group
lslogins --groups={{groups}}
# display user accounts
lslogins --user-accs
# display last logins
lslogins --last
# display system accounts
lslogins --system-accs
# display supplementary groups
lslogins --supp-groups
# run photorec on a specific device
sudo photorec {{/dev/sdb}}
# run photorec on a disk image (`image.dd`)
sudo photorec {{path/to/image.dd}}
# capture a screenshot and save it to the given path
maim {{path/to/screenshot.png}}
# capture a screenshot of the selected region
maim --select {{path/to/screenshot.png}}
# capture a screenshot of the selected region and save it in the clipboard (requires `xclip`)
maim --select | xclip -selection clipboard -target image/png
# capture a screenshot of the current active window (requires `xdotool`)
maim --window $(xdotool getactivewindow) {{path/to/screenshot.png}}
# list all known package types that can be installed
kpackagetool5 --list-types
# install the package from a directory
kpackagetool5 --type {{package_type}} --install {{path/to/directory}}
# update installed package from a directory
kpackagetool5 --type {{package_type}} --upgrade {{path/to/directory}}
# list installed plasmoids (global for all users)
kpackagetool5 --type Plasma/Applet --list --global
# remove a plasmoid by name
kpackagetool5 --type Plasma/Applet --remove "{{name}}"
# launch finch
finch
# quit
alt + q or ctrl + c
# show actions menu
alt + a
# jump to nth window
alt + {{number_key}}
# close current window
alt + c
# start moving a window, use arrow keys to move, press escape when done
alt + m
# start resizing a window, use arrow keys to resize, press escape when done
alt + r
# display the routing policy
ip rule {{show|list}}
# add a new rule based on packet source addresses
sudo ip rule add from {{192.168.178.2/32}}
# add a new rule based on packet destination addresses
sudo ip rule add to {{192.168.178.2/32}}
# delete a rule based on packet source addresses
sudo ip rule delete from {{192.168.178.2/32}}
# delete a rule based on packet destination addresses
sudo ip rule delete to {{192.168.178.2/32}}
# flush all deleted rules
ip rule flush
# save all rules to a file
ip rule save > {{path/to/ip_rules.dat}}
# restore all rules from a file
ip rule restore < {{path/to/ip_rules.dat}}
# archive a directory with `tar`, then compress
lrztar {{path/to/directory}}
# same as above, with zpaq  extreme compression, but very slow
lrztar -z {{path/to/directory}}
# specify the output file
lrztar -o {{path/to/file}} {{path/to/directory}}
# override the number of processor threads to use
lrztar -p {{8}} {{path/to/directory}}
# force overwriting of existing files
lrztar -f {{path/to/directory}}
# install a package
dpkg -i {{path/to/file.deb}}
# remove a package
dpkg -r {{package_name}}
# list installed packages
dpkg -l {{pattern}}
# list a package's contents
dpkg -L {{package_name}}
# list contents of a local package file
dpkg -c {{path/to/file.deb}}
# find out which package owns a file
dpkg -S {{filename}}
# create a minix filesystem inside partition 1 on device b (`sdb1`)
mkfs.minix {{/dev/sdb1}}
# read input
line
# compress a file with lzma  slow compression, fast decompression
lrzip {{filename}}
# compress a file with bzip2  good middle ground for compression/speed
lrzip -b {{filename}}
# compress with zpaq  extreme compression, but very slow
lrzip -z {{filename}}
# compress with lzo  light compression, extremely fast decompression
lrzip -l {{filename}}
# compress a file and password protect/encrypt it
lrzip -e {{filename}}
# override the number of processor threads to use
lrzip -p {{8}} {{filename}}
# monitor files in the current directory
watch {{ls}}
# monitor disk space and highlight the changes
watch -d {{df}}
# monitor "node" processes, refreshing every 3 seconds
watch -n {{3}} "{{ps aux | grep node}}"
# create a vfat filesystem inside partition 1 on device b (`sdb1`)
mkfs.vfat {{/dev/sdb1}}
# create filesystem with a volumename
mkfs.vfat -n {{volume_name}} {{/dev/sdb1}}
# create filesystem with a volumeid
mkfs.vfat -i {{volume_id}} {{/dev/sdb1}}
# use 5 instead of 2 file allocation tables
mkfs.vfat -f 5 {{/dev/sdb1}}
# mark a package as automatically installed
sudo apt-mark auto {{package_name}}
# hold a package at its current version and prevent updates to it
sudo apt-mark hold {{package_name}}
# allow a package to be updated again
sudo apt-mark unhold {{package_name}}
# show manually installed packages
apt-mark showmanual
# show held packages that aren't being updated
apt-mark showhold
# launch dolphin
dolphin
# launch dolphin and display a specific directory
dolphin {{path/to/directory}}
# launch dolphin with a specific file or directory selected
dolphin --select {{path/to/file_or_directory}}
# launch dolphin in a separated window
dolphin --new-window
# launch dolphin in split view
dolphin --split
# start the dolphin daemon (only required to use the dbus interface)
dolphin --daemon
# display help
dolphin --help
# analyze the current working directory
ncdu
# analyze a given directory
ncdu {{path/to/directory}}
# save results to a file
ncdu -o {{path/to/file}}
# exclude files that match a pattern, argument can be given multiple times to add more patterns
ncdu --exclude '{{*.txt}}'
# add a symbolic link
sudo update-alternatives --install {{path/to/symlink}} {{command_name}} {{path/to/command_binary}} {{priority}}
# configure a symbolic link for `java`
sudo update-alternatives --config {{java}}
# remove a symbolic link
sudo update-alternatives --remove {{java}} {{/opt/java/jdk1.8.0_102/bin/java}}
# display information about a specified command
update-alternatives --display {{java}}
# display all commands and their current selection
update-alternatives --get-selections
# update a user's "name" field in the output of `finger`
chfn -f {{new_display_name}} {{username}}
# update a user's "office room number" field for the output of `finger`
chfn -o {{new_office_room_number}} {{username}}
# update a user's "office phone number" field for the output of `finger`
chfn -p {{new_office_telephone_number}} {{username}}
# update a user's "home phone number" field for the output of `finger`
chfn -h {{new_home_telephone_number}} {{username}}
# read the default configuration file `/etc/named.conf`, read any initial data and listen for queries
named
# read a custom configuration file
named -c {{path/to/named.conf}}
# use ipv4 or ipv6 only, even if the host machine is capable of utilising other protocols
named {{-4|-6}}
# listen for queries on a specific port instead of the default port 53
named -p {{port}}
# run the server in the foreground and do not daemonize
named -f
# update a po file according to the modification of its origin file
po4a-updatepo --format {{text}} --master {{path/to/master.txt}} --po {{path/to/result.po}}
# get a list of available formats
po4a-updatepo --help-format
# update several po files according to the modification of their origin file
po4a-updatepo --format {{text}} --master {{path/to/master.txt}} --po {{path/to/po1.po}} --po {{path/to/po2.po}}
# set up a git repo and perform various setup tasks (run from `/etc`)
sudo etckeeper init
# commit all changes in `/etc`
sudo etckeeper commit {{message}}
# run arbitrary git commands
sudo etckeeper vcs {{status}}
# check if there are uncommitted changes (only returns an exit code)
sudo etckeeper unclean
# destroy existing repo and stop tracking changes
sudo etckeeper uninit
# request the identification info of a given device
sudo hdparm -I /dev/{{device}}
# get the advanced power management level
sudo hdparm -B /dev/{{device}}
# set the advanced power management value (values 1127 permit spindown, and values 128254 do not)
sudo hdparm -B {{1}} /dev/{{device}}
# display the device's current power mode status
sudo hdparm -C /dev/{{device}}
# force a drive to immediately enter standby mode (usually causes a drive to spin down)
sudo hdparm -y /dev/{{device}}
# put the drive into idle (lowpower) mode, also setting its standby timeout
sudo hdparm -S {{standby_timeout}} {{device}}
# delete an existing group
groupdel {{group_name}}
# list all scsi devices
lsscsi
# list all scsi devices with detailed attributes
lsscsi -L
# list all scsi devices with humanreadable disk capacity
lsscsi -s
# start a snake game
nsnake
# navigate the snake
{{Up|Down|Left|Right}} arrow key
# pause/unpause the game
p
# quit the game
q
# show help during the game
h
# list enabled apache modules
sudo a2query -m
# check if a specific module is installed
sudo a2query -m {{module_name}}
# list enabled virtual hosts
sudo a2query -s
# display the currently enabled multi processing module
sudo a2query -M
# display the apache version
sudo a2query -v
# report a bug about the whole system
apport-bug
# report a bug about a specific package
apport-bug {{package}}
# report a bug about a specific executable
apport-bug {{path/to/executable}}
# report a bug about a specific process
apport-bug {{PID}}
# start monitoring networkmanager changes
nmcli monitor
# scan for volume groups and print information about each group found
sudo vgscan
# scan for volume groups and add the special files in `/dev`, if they don't already exist, needed to access the logical volumes in the found groups
sudo vgscan --mknodes
# print the package names of the dependencies that aren't installed
pacman --deptest {{package_name1}} {{package_name2}}
# check if the installed package satisfies the given minimum version
pacman --deptest "{{bash>=5}}"
# check if a later version of a package is installed
pacman --deptest "{{bash>5}}"
# display help
pacman --deptest --help
# reduce a volume's size to 120 gb
lvreduce --size {{120G}} {{logical_volume}}
# reduce a volume's size by 40 gb as well as the underlying filesystem
lvreduce --size -{{40G}} -r {{logical_volume}}
# change the current user's smb password
smbpasswd
# add a specified user to samba and set password(user should already exist in system)
smbpasswd -a {{username}}
# modify an existing samba user's password
smbpasswd {{username}}
# delete a samba user
smbpasswd -x {{username}}
# list sms messages available on the modem
sudo mmcli --modem={{modem}} --messaging-list-sms
# delete a message from the modem, specifying its path
sudo mmcli --modem={{modem}} --messaging-delete-sms={{path/to/message_file}}
# list nonfree and contrib packages (and their description)
vrms
# only output the package names
vrms --sparse
# embed data in a png, prompting for a passphrase
steghide embed --coverfile {{path/to/image.png}} --embedfile {{path/to/data.txt}}
# extract data from a wav audio file
steghide extract --stegofile {{path/to/sound.wav}}
# display file information, trying to detect an embedded file
steghide info {{path/to/file.jpg}}
# embed data in a jpeg image, using maximum compression
steghide embed --coverfile {{path/to/image.jpg}} --embedfile {{path/to/data.txt}} --compress {{9}}
# get the list of supported encryption algorithms and modes
steghide encinfo
# embed encrypted data in a jpeg image, e.g. with blowfish in cbc mode
steghide embed --coverfile {{path/to/image.jpg}} --embedfile {{path/to/data.txt}} --encryption {{blowfish|...}} {{cbc|...}}
# create array
mdadm --create {{/dev/md/MyRAID}} --level {{raid_level}} --raid-devices {{number_of_disks}} {{/dev/sdXN}}
# stop array
mdadm --stop {{/dev/md0}}
# mark disk as failed
mdadm --fail {{/dev/md0}} {{/dev/sdXN}}
# remove disk
mdadm --remove {{/dev/md0}} {{/dev/sdXN}}
# add disk to array
mdadm --assemble {{/dev/md0}} {{/dev/sdXN}}
# show raid info
mdadm --detail {{/dev/md0}}
# record a new session to a file named `typescript` in the current directory
script
# record a new session to a custom filepath
script {{path/to/session.out}}
# record a new session, appending to an existing file
script -a {{path/to/session.out}}
# record timing information (data is outputted to the standard error)
script -t 2> {{path/to/timingfile}}
# launch flameshot with a simpler interactive mode
flameshot launcher
# launch flameshot and immediately start interactively annotating parts of the screen to screenshot
flameshot gui
# take a full screenshot (all monitors)
flameshot full
# take a screenshot from monitor 1
flameshot screen --number {{1}}
# set the save path to write screenshots to
flameshot full --path {{path/to/directory}}
# delay the screenshot for n milliseconds and output to clipboard
flameshot full --delay {{2000}} --clipboard
# take a screenshot and export it to standardoutput
flameshot gui --raw
# display the filename and line number of the source code from an instruction address of an executable
addr2line --exe={{path/to/executable}} {{address}}
# display the function name, filename and line number
addr2line --exe={{path/to/executable}} --functions {{address}}
# demangle the function name for c++ code
addr2line --exe={{path/to/executable}} --functions --demangle {{address}}
# lock screen with a simple color background (rrggbb format)
i3lock -c {{0000ff}}
# lock screen to a png background
i3lock -i {{path/to/picture.png}}
# disable the unlock indicator (removes feedback on keypress)
i3lock -u
# display mouse pointer instead of hiding it ('default' for default pointer, 'win' for an ms windows pointer)
i3lock -p {{default|win}}
# lock screen to a png background displayed in multiple monitors, with enabled mouse pointer
i3lock -i {{path/to/picture.png}} -p {{default|win}} -t
# display information about a package
dpkg-deb --info {{path/to/file.deb}}
# display the package's name and version on one line
dpkg-deb --show {{path/to/file.deb}}
# list the package's contents
dpkg-deb --contents {{path/to/file.deb}}
# extract package's contents into a directory
dpkg-deb --extract {{path/to/file.deb}} {{path/to/directory}}
# create a package from a specified directory
dpkg-deb --build {{path/to/directory}}
# list all available playback targets
pw-cat --playback --list-targets
# play a wav file over the default target
pw-cat --playback {{path/to/file.wav}}
# list all available record targets
pw-cat --record --list-targets
# record a sample recording at a different volume level
pw-cat --record --volume={{0.1}} {{path/to/file.wav}}
# record a sample recording using a different sample rate
pw-cat --record --rate={{6000}} {{path/to/file.wav}}
# launch nautilus
nautilus
# launch nautilus as root user
sudo nautilus
# launch nautilus and display a specific directory
nautilus {{path/to/directory}}
# launch nautilus with a specific file or directory selected
nautilus --select {{path/to/file_or_directory}}
# launch nautilus in a separated window
nautilus --new-window
# close all nautilus instances
nautilus --quit
# display help
nautilus --help
# check the currently running kernel for spectre or meltdown
sudo spectre-meltdown-checker
# check the currently running kernel and show an explanation of the actions to take to mitigate a vulnerability
sudo spectre-meltdown-checker --explain
# check for specific variants (defaults to all)
sudo spectre-meltdown-checker --variant {{1|2|3|3a|4|l1tf|msbds|mfbds|mlpds|mdsum|taa|mcespc|srbds}}
# display output using a specific output format
sudo spectre-meltdown-checker --batch {{text|json|nrpe|prometheus|short}}
# don't use the `/sys` interface even if present
sudo spectre-meltdown-checker --no-sysfs
# check a nonrunning kernel
sudo spectre-meltdown-checker --kernel {{path/to/kernel_file}}
# list all the files included in an iso image
isoinfo -f -i {{path/to/image.iso}}
# e[x]tract a specific file from an iso image and send it out stdout
isoinfo -i {{path/to/image.iso}} -x {{/PATH/TO/FILE/INSIDE/ISO.EXT}}
# show header information for an iso disk image
isoinfo -d -i {{path/to/image.iso}}
# show the bandwidth usage
sudo iftop
# show the bandwidth usage of a given interface
sudo iftop -i {{interface}}
# show the bandwidth usage with port information
sudo iftop -P
# do not show bar graphs of traffic
sudo iftop -b
# do not look up hostnames
sudo iftop -n
# enable interface eth0
ifup {{eth0}}
# enable all the interfaces defined with "auto" in `/etc/network/interfaces`
ifup -a
# synchronize list of packages and versions available. this should be run first, before running subsequent aptitude commands
aptitude update
# install a new package and its dependencies
aptitude install {{package}}
# search for a package
aptitude search {{package}}
# search for an installed package (`?installed` is an aptitude search term)
aptitude search '?installed({{package}})'
# remove a package and all packages depending on it
aptitude remove {{package}}
# upgrade installed packages to the newest available versions
aptitude upgrade
# upgrade installed packages (like `aptitude upgrade`) including removing obsolete packages and installing additional packages to meet new package dependencies
aptitude full-upgrade
# put an installed package on hold to prevent it from being automatically upgraded
aptitude hold '?installed({{package}})'
# list all mounted filesystems
findmnt
# search for a device
findmnt {{/dev/sdb1}}
# search for a mountpoint
findmnt {{/}}
# find filesystems in specific type
findmnt -t {{ext4}}
# find filesystems with specific label
findmnt LABEL={{BigStorage}}
# show all recognized exif information in an image
exif {{path/to/image.jpg}}
# show a table listing known exif tags and whether each one exists in an image
exif --list-tags --no-fixup {{image.jpg}}
# extract the image thumbnail into the file `thumbnail.jpg`
exif --extract-thumbnail --output={{thumbnail.jpg}} {{image.jpg}}
# show the raw contents of the "model" tag in the given image
exif --ifd={{0}} --tag={{Model}} --machine-readable {{image.jpg}}
# change the value of the "artist" tag to john smith and save to `new.jpg`
exif --output={{new.jpg}} --ifd={{0}} --tag="{{Artist}}" --set-value="{{John Smith}}" --no-fixup {{image.jpg}}
# run the specified command in a virtual x server
xvfb-run {{command}}
# try to get a free server number, if the default (99) is not available
xvfb-run --auto-servernum {{command}}
# pass arguments to the xvfb server
xvfb-run --server-args "{{-screen 0 1024x768x24}}" {{command}}
# view documentation for the original command
tldr cal
# display information about all users who are currently logged in
w
# display information about a specific user
w {{user}}
# display information without including the header
w --no-header
# display information without including the login, jcpu and pcpu columns
w --short
# run command as a different user
runuser {{user}} -c '{{command}}'
# run command as a different user and group
runuser {{user}} -g {{group}} -c '{{command}}'
# start a login shell as a specific user
runuser {{user}} -l
# specify a shell for running instead of the default shell (also works for login)
runuser {{user}} -s {{/bin/sh}}
# preserve the entire environment of root (only if `login` is not specified)
runuser {{user}} --preserve-environment -c '{{command}}'
# add spaceseparated files or directories to a phar file
phar add -f {{path/to/phar_file}} {{files_or_directories}}
# display the contents of a phar file
phar list -f {{path/to/phar_file}}
# delete the specified file or directory from a phar file
phar delete -f {{path/to/phar_file}} -e {{file_or_directory}}
# display full usage information and available hashing/compression algorithms
phar help
# compress or uncompress files and directories in a phar file
phar compress -f {{path/to/phar_file}} -c {{algorithm}}
# get information about a phar file
phar info -f {{path/to/phar_file}}
# sign a phar file with a specific hash algorithm
phar sign -f {{path/to/phar_file}} -h {{algorithm}}
# sign a phar file with an openssl private key
phar sign -f {{path/to/phar_file}} -h openssl -y {{path/to/private_key}}
# update the ports tree
ports -u
# list the ports in the current tree
ports -l
# check the differences between installed packages and the ports tree
ports -d
# copy a file to another location
cp {{path/to/source_file.ext}} {{path/to/target_file.ext}}
# copy a file into another directory, keeping the filename
cp {{path/to/source_file.ext}} {{path/to/target_parent_directory}}
# recursively copy a directory's contents to another location (if the destination exists, the directory is copied inside it)
cp -r {{path/to/source_directory}} {{path/to/target_directory}}
# copy a directory recursively, in verbose mode (shows files as they are copied)
cp -vr {{path/to/source_directory}} {{path/to/target_directory}}
# copy text files to another location, in interactive mode (prompts user before overwriting)
cp -i {{*.txt}} {{path/to/target_directory}}
# follow symbolic links before copying
cp -L {{link}} {{path/to/target_directory}}
# use the full path of source files, creating any missing intermediate directories when copying
cp --parents {{source/path/to/file}} {{path/to/target_file}}
# list the current settings / bootnums
efibootmgr
# list the filepaths
efibootmgr -v
# add uefi shell v2 as a boot option
sudo efibootmgr -c -d {{/dev/sda1}} -l {{\EFI\tools\Shell.efi}} -L "{{UEFI Shell}}"
# change the current boot order
sudo efibootmgr -o {{0002,0008,0001,0005}}
# delete a boot option
sudo efibootmgr -b {{0008}} --delete-bootnum
# list all storage devices in a treelike format
lsblk
# also list empty devices
lsblk -a
# print the size column in bytes rather than in a humanreadable format
lsblk -b
# output info about filesystems
lsblk -f
# use ascii characters for tree formatting
lsblk -i
# output info about blockdevice topology
lsblk -t
# exclude the devices specified by the commaseparated list of major device numbers
lsblk -e {{1,7}}
# display a customized summary using a commaseparated list of columns
lsblk --output {{NAME}},{{SERIAL}},{{MODEL}},{{TRAN}},{{TYPE}},{{SIZE}},{{FSTYPE}},{{MOUNTPOINT}}
# compile and install terminfo for a terminal
tic -xe {{terminal}} {{path/to/terminal.info}}
# check terminfo file for errors
tic -c {{path/to/terminal.info}}
# print database locations
tic -D
# list trusted keys
apt-key list
# add a key to the trusted keystore
apt-key add {{public_key_file.asc}}
# delete a key from the trusted keystore
apt-key del {{key_id}}
# add a remote key to the trusted keystore
wget -qO - {{https://host.tld/filename.key}} | apt-key add -
# add a key from keyserver with only key id
apt-key adv --keyserver {{pgp.mit.edu}} --recv {{KEYID}}
# start the default shell as fakeroot
fakeroot
# run a command as fakeroot
fakeroot -- {{command}} {{command_arguments}}
# run a command as fakeroot and save the environment to a file on exit
fakeroot -s {{path/to/file}} -- {{command}} {{command_arguments}}
# load a fakeroot environment and run a command as fakeroot
fakeroot -i {{path/to/file}} -- {{command}} {{command_arguments}}
# run a command keeping the real ownership of files instead of pretending they are owned by root
fakeroot --unknown-is-real -- {{command}} {{command_arguments}}
# display help
fakeroot --help
# list all the usb devices available
lsusb
# list the usb hierarchy as a tree
lsusb -t
# list verbose information about usb devices
lsusb --verbose
# list detailed information about a usb device
lsusb -D {{device}}
# list devices with a specified vendor and product id only
lsusb -d {{vendor}}:{{product}}
# see action can be used to view any file (usually image) on default mailcap explorer
see {{filename}}
# using with `runmailcap`
run-mailcap --action=view {{filename}}
# choose the server with the lowest latency
sudo netselect {{host_1}} {{host_2}}
# display nameserver resolution and statistics
sudo netselect -vv {{host_1}} {{host_2}}
# define maximum ttl (time to live)
sudo netselect -m {{10}} {{host_1}} {{host_2}}
# print fastest n servers among the hosts
sudo netselect -s {{N}} {{host_1}} {{host_2}} {{host_3}}
# list available options
netselect
# check the configuration
sudo postfix check
# check the status of the postfix daemon
sudo postfix status
# start postfix
sudo postfix start
# gracefully stop postfix
sudo postfix stop
# flush the mail queue
sudo postfix flush
# reload the configuration files
sudo postfix reload
# initialize a luks volume (overwrites all data on the partition)
cryptsetup luksFormat {{/dev/sda1}}
# open a luks volume and create a decrypted mapping at `/dev/mapper/{{target}}`
cryptsetup luksOpen {{/dev/sda1}} {{target}}
# remove an existing mapping
cryptsetup luksClose {{target}}
# change the luks volume's passphrase
cryptsetup luksChangeKey {{/dev/sda1}}
# install one or more packages from files
sudo pacman --upgrade {{path/to/package1.pkg.tar.zst}} {{path/to/package2.pkg.tar.zst}}
# install a package without prompting
sudo pacman --upgrade --noconfirm {{path/to/package.pkg.tar.zst}}
# overwrite conflicting files during a package installation
sudo pacman --upgrade --overwrite {{path/to/file}} {{path/to/package.pkg.tar.zst}}
# install a package, skipping the dependency version checks
sudo pacman --upgrade --nodeps {{path/to/package.pkg.tar.zst}}
# list packages that would be affected (does not install any packages)
pacman --query --print {{path/to/package.pkg.tar.zst}}
# list all available cameras
uvcdynctrl -l
# specify the device to use (defaults to `video0`)
uvcdynctrl -d {{device_name}}
# list available controls
uvcdynctrl -c
# set a new control value (for negative values, add  before {{value}})
uvcdynctrl -s {{control_name}} {{value}}
# get the current control value
uvcdynctrl -g {{control_name}}
# save the state of the current controls to a file
uvcdynctrl -W {{filename}}
# load the state of the controls from a file
uvcdynctrl -L {{filename}}
# get the list of libraries and their dependencies
pkg-config --libs {{library1 library2 ...}}
# get the list of libraries, their dependencies, and proper cflags for gcc
pkg-config --cflags --libs {{library1 library2 ...}}
# compile your code with libgtk3, libwebkit2gtk4.0 and all their dependencies
c++ example.cpp $(pkg-config --cflags --libs gtk+-3.0 webkit2gtk-4.0) -o example
# load a new kernel
kexec -l {{path/to/kernel}} --initrd={{path/to/initrd}} --command-line={{arguments}}
# load a new kernel with current boot parameters
kexec -l {{path/to/kernel}} --initrd={{path/to/initrd}} --reuse-cmdline
# execute a currently loaded kernel
kexec -e
# unload current kexec target kernel
kexec -u
# limit an existing process with pid 1234 to only use 25% of the cpu
cpulimit --pid {{1234}} --limit {{25%}}
# limit an existing program by its executable name
cpulimit --exe {{program}} --limit {{25}}
# launch a given program and limit it to only use 50% of the cpu
cpulimit --limit {{50}} -- {{program arg1 arg2 ...}}
# launch a program, limit its cpu usage to 50% and run cpulimit in the background
cpulimit --limit {{50}} --background -- {{program}}
# kill its process if the program's cpu usage goes over 50%
cpulimit --limit 50 --kill -- {{program}}
# throttle both it and its child processes so that none go about 25% cpu
cpulimit --limit {{25}} --monitor-forks -- {{program}}
# display a random name (male or female) and address
rig
# display a [m]ale (or [f]emale) random name and address
rig -{{m|f}}
# use data files from a specific directory (default is `/usr/share/rig`)
rig -d {{path/to/directory}}
# display a specific number of identities
rig -c {{number}}
# display a specific number of female identities
rig -f -c {{number}}
# define group administrators
sudo gpasswd -A {{user1,user2}} {{group}}
# set the list of group members
sudo gpasswd -M {{user1,user2}} {{group}}
# create a password for the named group
gpasswd {{group}}
# add a user to the named group
gpasswd -a {{user}} {{group}}
# remove a user from the named group
gpasswd -d {{user}} {{group}}
# list partitions on all block devices
sudo parted --list
# start interactive mode with the specified disk selected
sudo parted {{/dev/sdX}}
# create a new partition table of the specified labeltype
sudo parted --script {{/dev/sdX}} mklabel {{aix|amiga|bsd|dvh|gpt|loop|mac|msdos|pc98|sun}}
# show partition information in interactive mode
print
# select a disk in interactive mode
select {{/dev/sdX}}
# create a 16 gb partition with the specified filesystem in interactive mode
mkpart {{primary|logical|extended}} {{btrfs|ext2|ext3|ext4|fat16|fat32|hfs|hfs+|linux-swap|ntfs|reiserfs|udf|xfs}} {{0%}} {{16G}}
# resize a partition in interactive mode
resizepart {{/dev/sdXN}} {{end_position_of_partition}}
# remove a partition in interactive mode
rm {{/dev/sdXN}}
# enable a module
sudo a2enmod {{module}}
# don't show informative messages
sudo a2enmod --quiet {{module}}
# change the volume label on a specific ext partition
e2label {{/dev/sda1}} "{{label_name}}"
# display suggestions for a given file
hlint {{path/to/file}} options
# check all haskell files and generate a report
hlint {{path/to/directory}} --report
# automatically apply most suggestions
hlint {{path/to/file}} --refactor
# display additional options
hlint {{path/to/file}} --refactor-options
# generate a settings file ignoring all outstanding hints
hlint {{path/to/file}} --default > {{.hlint.yaml}}
# show all available variables and their values
sysctl -a
# set a changeable kernel state variable
sysctl -w {{section.tunable}}={{value}}
# get currently open file handlers
sysctl fs.file-nr
# get limit for simultaneous open files
sysctl fs.file-max
# apply changes from `/etc/sysctl.conf`
sysctl -p
# open the current directory in the default file explorer
xdg-open .
# open a url in the default browser
xdg-open {{https://example.com}}
# open an image in the default image viewer
xdg-open {{path/to/image}}
# open a pdf in the default pdf viewer
xdg-open {{path/to/pdf}}
# display help
xdg-open --help
# check how many free blocks are present as contiguous and aligned free space
e2freefrag {{/dev/sdXN}}
# specify chunk size in kilobytes to print how many free chunks are available
e2freefrag -c {{chunk_size_in_kb}} {{/dev/sdXN}}
# open a terminal
st
# open a terminal with a specific title
st -T {{title}}
# open a terminal, execute a given command, and write the output to a file
st -o {{path/to/file}} -e {{command argument1 argument2}}
# increase/decrease the font size
Ctrl + Shift + {{Page Up|Page Down}}
# copy/paste from the clipboard
Ctrl + Shift + {{C|V}}
# show the list of apps
rofi -show drun
# show the list of all commands
rofi -show run
# switch between windows
rofi -show window
# pipe a list of items to stdin and print the selected item to stdout
printf "{{Choice1\nChoice2\nChoice3}}" | rofi -dmenu
# show the parameters and statistics of all the interfaces
iwconfig
# show the parameters and statistics of the specified interface
iwconfig {{interface}}
# set the essid (network name) of the specified interface (e.g. eth0 or wlp2s0)
iwconfig {{interface}} {{new_network_name}}
# set the operating mode of the specified interface
iwconfig {{interface}} mode {{ad hoc|Managed|Master|Repeater|Secondary|Monitor|Auto}}
# convert a text file to po file
po4a-gettextize --format {{text}} --master {{path/to/master.txt}} --po {{path/to/result.po}}
# get a list of available formats
po4a-gettextize --help-format
# convert a text file along with a translated document to a po file (`l` option can be provied multiple times)
po4a-gettextize --format {{text}} --master {{path/to/master.txt}} --localized {{path/to/translated.txt}} --po {{path/to/result.po}}
# check that lynis is uptodate
sudo lynis update info
# run a security audit of the system
sudo lynis audit system
# run a security audit of a dockerfile
sudo lynis audit dockerfile {{path/to/dockerfile}}
# check if a directory is a mountpoint
mountpoint {{path/to/directory}}
# check if a directory is a mountpoint without showing any output
mountpoint -q {{path/to/directory}}
# show major/minor numbers of a mountpoint's filesystem
mountpoint --fs-devno {{path/to/directory}}
# take an image of a device, creating a log file
sudo ddrescue {{/dev/sdb}} {{path/to/image.dd}} {{path/to/log.txt}}
# clone disk a to disk b, creating a log file
sudo ddrescue --force --no-scrape {{/dev/sdX}} {{/dev/sdY}} {{path/to/log.txt}}
# display a menu of the output of the `ls` command
{{ls}} | dmenu
# display a menu with custom items separated by a new line (`\n`)
echo -e "{{red}}\n{{green}}\n{{blue}}" | dmenu
# let the user choose between multiple items and save the selected one to a file
echo -e "{{red}}\n{{green}}\n{{blue}}" | dmenu > {{color.txt}}
# launch dmenu on a specific monitor
ls | dmenu -m {{1}}
# display dmenu at the bottom of the screen
ls | dmenu -b
# monitor everything on localhost
tshark
# only capture packets matching a specific capture filter
tshark -f '{{udp port 53}}'
# only show packets matching a specific output filter
tshark -Y '{{http.request.method == "GET"}}'
# decode a tcp port using a specific protocol (e.g. http)
tshark -d tcp.port=={{8888}},{{http}}
# specify the format of captured output
tshark -T {{json|text|ps|…}}
# select specific fields to output
tshark -T {{fields|ek|json|pdml}} -e {{http.request.method}} -e {{ip.src}}
# write captured packet to a file
tshark -w {{path/to/file}}
# analyze packets from a file
tshark -r {{filename}}.pcap
# show cpu frequency information for all cpus
cpufreq-info
# show cpu frequency information for the specified cpu
cpufreq-info -c {{cpu_number}}
# show the allowed minimum and maximum cpu frequency
cpufreq-info -l
# show the current minimum and maximum cpu frequency and policy in table format
cpufreq-info -o
# show available cpu frequency policies
cpufreq-info -g
# show current cpu work frequency in a humanreadable format, according to the cpufreq kernel module
cpufreq-info -f -m
# show current cpu work frequency in a humanreadable format, by reading it from hardware (only available to root)
sudo cpufreq-info -w -m
# build a flatpak and export it to a new repository
flatpak-builder {{path/to/build_directory}} {{path/to/manifest}}
# build a flatpak and export it to the specified repository
flatpak-builder --repo={{repository_name}} {{path/to/build_directory}} {{path/to/manifest}}
# build a flatpak and install it locally
flatpak-builder --install {{path/to/build_directory}} {{path/to/manifest}}
# build and sign a flatpak and export it to the specified repository
flatpak-builder --gpg-sign={{key_id}} --repo={{repository_name}} {{path/to/manifest}}
# run a shell inside of an application sandbox without installing it
flatpak-builder --run {{path/to/build_directory}} {{path/to/manifest}} {{sh}}
# play a beep
beep
# play a beep that repeats
beep -r {{repetitions}}
# play a beep at a specified frequency (hz) and duration (milliseconds)
beep -f {{frequency}} -l {{duration}}
# play each new frequency and duration as a distinct beep
beep -f {{frequency}} -l {{duration}} -n -f {{frequency}} -l {{duration}}
# play the c major scale
beep -f {{262}} -n -f {{294}} -n -f {{330}} -n -f {{349}} -n -f {{392}} -n -f {{440}} -n -f {{494}} -n -f {{523}}
# monitor all device events
sudo udevadm monitor
# print `uevents` sent out by the kernel
sudo udevadm monitor --kernel
# print device events after being processed by `udev`
sudo udevadm monitor --udev
# list attributes of a device
sudo udevadm info --attribute-walk --path {{/dev/sda1}}
# reload all `udev` rules
sudo udevadm control --reload-rules
# trigger all `udev` rules to run
sudo udevadm trigger
# record a snippet in "cd" quality (finish with ctrlc when done)
arecord -vv --format=cd {{path/to/file.wav}}
# record a snippet in "cd" quality, with a fixed duration of 10 seconds
arecord -vv --format=cd --duration={{10}} {{path/to/file.wav}}
# record a snippet and save it as an mp3 (finish with ctrlc when done)
arecord -vv --format=cd --file-type raw | lame -r - {{path/to/file.mp3}}
# list all sound cards and digital audio devices
arecord --list-devices
# allow interactive interface (e.g. use spacebar or enter to play or pause)
arecord --interactive
# generate a uuidv1 (based on time and system's hardware address, if present)
uuid
# generate a uuidv4 (based on random data)
uuid -v {{4}}
# generate multiple uuidv4 identifiers at once
uuid -v {{4}} -n {{number_of_uuids}}
# generate a uuidv4 and specify the output format
uuid -v {{4}} -F {{BIN|STR|SIV}}
# generate a uuidv4 and write the output to a file
uuid -v {{4}} -o {{path/to/file}}
# generate a uuidv5 (based on the supplied object name) with a specified namespace prefix
uuid -v {{5}} ns:{{DNS|URL|OID|X500}} {{object_name}}
# decode a given uuid
uuid -d {{uuid}}
# list local containers matching a string. omit the string to list all local containers
lxc list {{match_string}}
# list images matching a string. omit the string to list all images
lxc image list [{{remote}}:]{{match_string}}
# create a new container from an image
lxc init [{{remote}}:]{{image}} {{container}}
# start a container
lxc start [{{remote}}:]{{container}}
# stop a container
lxc stop [{{remote}}:]{{container}}
# show detailed info about a container
lxc info [{{remote}}:]{{container}}
# take a snapshot of a container
lxc snapshot [{{remote}}:]{{container}} {{snapshot}}
# mirror an image horizontally or vertically
jpegtran -flip {{horizontal|vertical}} {{path/to/image.jpg}} > {{path/to/output.jpg}}
# rotate an image 90, 180 or 270 degrees clockwise
jpegtran -rotate {{90|180|270}} {{path/to/image.jpg}} > {{path/to/output.jpg}}
# transpose the image across the upperleft to lower right axis
jpegtran -transpose {{path/to/image.jpg}} > {{path/to/output.jpg}}
# transverse the image across the upper right to lower left axis
jpegtran -transverse {{path/to/image.jpg}} > {{path/to/output.jpg}}
# convert the image to grayscale
jpegtran -grayscale {{path/to/image.jpg}} > {{path/to/output.jpg}}
# crop the image to a rectangular region of width `w` and height `h` from the upperleft corner, saving the output to a specific file
jpegtran -crop {{W}}x{{H}} -outfile {{path/to/output.jpg}} {{path/to/image.jpg}}
# crop the image to a rectangular region of width `w` and height `h`, starting at point `x` and `y` from the upperleft corner
jpegtran -crop {{W}}x{{H}}+{{X}}+{{Y}} {{path/to/image.jpg}} > {{path/to/output.jpg}}
# read an image from a file and print in ascii
asciiart {{path/to/image.jpg}}
# read an image from a url and print in ascii
asciiart {{www.example.com/image.jpg}}
# choose the output width (default is 100)
asciiart --width {{50}} {{path/to/image.jpg}}
# colorize the ascii output
asciiart --color {{path/to/image.jpg}}
# choose the output format (default format is text)
asciiart --format {{text|html}} {{path/to/image.jpg}}
# invert the character map
asciiart --invert-chars {{path/to/image.jpg}}
# combine the `/etc/shadow` and `/etc/passwd` of the current system
sudo unshadow /etc/passwd /etc/shadow
# combine two arbitrary shadow and password files
sudo unshadow {{path/to/passwd}} {{path/to/shadow}}
# mark a package as implicitly installed
sudo pacman --database --asdeps {{package_name}}
# mark a package as explicitly installed
sudo pacman --database --asexplicit {{package_name}}
# check that all the package dependencies are installed
pacman --database --check
# check the repositories to ensure all specified dependencies are available
pacman --database --check --check
# display only error messages
pacman --database --check --quiet
# list services with runlevel
chkconfig --list
# show a service's runlevel
chkconfig --list {{ntpd}}
# enable service at boot
chkconfig {{sshd}} on
# enable service at boot for runlevels 2, 3, 4, and 5
chkconfig --level {{2345}} {{sshd}} on
# disable service at boot
chkconfig {{ntpd}} off
# disable service at boot for runlevel 3
chkconfig --level {{3}} {{ntpd}} off
# show whether an alarm is set or not
sudo rtcwake -m show -v
# suspend to ram and wakeup after 10 seconds
sudo rtcwake -m mem -s {{10}}
# suspend to disk (higher power saving) and wakeup 15 minutes later
sudo rtcwake -m disk --date +{{15}}min
# freeze the system (more efficient than suspendtoram but version 3.9 or newer of the linux kernel is required) and wakeup at a given date and time
sudo rtcwake -m freeze --date {{YYYYMMDDhhmm}}
# disable a previously set alarm
sudo rtcwake -m disable
# perform a dry run to wakeup the computer at a given time. (press ctrl + c to abort)
sudo rtcwake -m on --date {{hh:ss}}
# start a new game
cuyo
# navigate the piece horizontally
{{A|D}} OR {{Left|Right}} arrow key
# turn the piece
{{W|Up arrow key}}
# hard drop the piece
{{S|Down arrow key}}
# run an installed application
flatpak run {{name}}
# install an application from a remote source
flatpak install {{remote}} {{name}}
# list all installed applications and runtimes
flatpak list
# update all installed applications and runtimes
flatpak update
# add a remote source
flatpak remote-add --if-not-exists {{remote_name}} {{remote_url}}
# list all configured remote sources
flatpak remote-list
# remove an installed application
flatpak remove {{name}}
# show information about an installed application
flatpak info {{name}}
# install the `base` package, linux kernel and firmware for common hardware
pacstrap {{path/to/new/root}} {{base}} {{linux}} {{linux-firmware}}
# install the `base` package, linux lts kernel and `basedevel` build tools
pacstrap {{path/to/new/root}} {{base}} {{base-devel}} {{linux-lts}}
# install packages without copy the host's mirrorlist to the target
pacstrap -M {{path/to/new/root}} {{packages}}
# use an alternate configuration file for pacman
pacstrap -C {{path/to/pacman.conf}} {{path/to/new/root}} {{packages}}
# install packages using the package cache on the host instead of on the target
pacstrap -c {{path/to/new/root}} {{packages}}
# install packages without copy the host's pacman keyring to the target
pacstrap -G {{path/to/new/root}} {{packages}}
# install packages in interactive mode (prompts for confirmation)
pacstrap -i {{path/to/new/root}} {{packages}}
# install packages using package files
pacstrap -U {{path/to/new/root}} {{path/to/package1}} {{path/to/package2}}
# list snapshots
sudo timeshift --list
# create a new snapshot (if scheduled)
sudo timeshift --check
# create a new snapshot (even if not scheduled)
sudo timeshift --create
# restore a snapshot (selecting which snapshot to restore interactively)
sudo timeshift --restore
# restore a specific snapshot
sudo timeshift --restore --snapshot '{{snapshot}}'
# delete a specific snapshot
sudo timeshift --delete --snapshot '{{snapshot}}'
# list all attributes of a kernel module
modinfo {{kernel_module}}
# list the specified attribute only
modinfo -F {{author|description|license|parm|filename}} {{kernel_module}}
# print current working directory of a process
pwdx {{process_id}}
# emulate 20 requests based on a given url list file per second for 60 seconds
http_load -rate {{20}} -seconds {{60}} {{path/to/urls.txt}}
# emulate 5 concurrent requests based on a given url list file for 60 seconds
http_load -parallel {{5}} -seconds {{60}} {{path/to/urls.txt}}
# emulate 1000 requests at 20 requests per second, based on a given url list file
http_load -rate {{20}} -fetches {{1000}} {{path/to/urls.txt}}
# emulate 1000 requests at 5 concurrent requests at a time, based on a given url list file
http_load -parallel {{5}} -fetches {{1000}} {{path/to/urls.txt}}
# run an `nmcli` subcommand
nmcli {{agent|connection|device|general|help|monitor|networking|radio}} {{command_options}}
# display the current version of networkmanager
nmcli --version
# display help
nmcli --help
# display help for a subcommand
nmcli {{subcommand}} --help
# enable only the primary monitor
mons -o
# enable only the secondary monitor
mons -s
# duplicate the primary monitor onto the secondary monitor, using the resolution of the primary monitor
mons -d
# mirror the primary monitor onto the secondary monitor, using the resolution of the secondary monitor
mons -m
# list the name and status of all services
service --status-all
# start/stop/restart/reload service (start/stop should always be available)
service {{service_name}} {{start|stop|restart|reload}}
# do a full restart (runs script twice with start and stop)
service {{service_name}} --full-restart
# show the current status of a service
service {{service_name}} status
# create a logical volume of 10 gigabytes in the volume group vg1
lvcreate -L {{10G}} {{vg1}}
# create a 1500 megabyte linear logical volume named mylv in the volume group vg1
lvcreate -L {{1500}} -n {{mylv}} {{vg1}}
# create a logical volume called mylv that uses 60% of the total space in volume group vg1
lvcreate -l {{60%VG}} -n {{mylv}} {{vg1}}
# create a logical volume called mylv that uses all the unallocated space in the volume group vg1
lvcreate -l {{100%FREE}} -n {{mylv}} {{vg1}}
# create an iso from a directory
mkisofs -o {{filename.iso}} {{path/to/source_directory}}
# set the disc label when creating an iso
mkisofs -o {{filename.iso}} -V "{{label_name}}" {{path/to/source_directory}}
# display the contents of the file with underlines where applicable
ul {{file.txt}}
# display the contents of the file with underlines made of dashes ``
ul -i {{file.txt}}
# open a new window showing the current directory
thunar
# open the bulk rename utility
thunar --bulk-rename
# close all open thunar windows
thunar --quit
# create an exfat filesystem inside partition 1 on device b (`sdb1`)
mkfs.exfat {{/dev/sdb1}}
# create and install a package with default settings
sudo checkinstall --default
# create a package but don't install it
sudo checkinstall --install={{no}}
# create a package without documentation
sudo checkinstall --nodoc
# create a package and set the name
sudo checkinstall --pkgname {{package}}
# create a package and specify where to save it
sudo checkinstall --pakdir {{path/to/directory}}
# suspend pulseaudio while running `jackd`
pasuspender -- {{jackd -d alsa --device hw:0}}
# list user accounts and their associated home directories
homectl list
# create a user account and their associated home directory
sudo homectl create {{username}}
# remove a specific user and the associated home directory
sudo homectl remove {{username}}
# change the password for a specific user
sudo homectl passwd {{username}}
# run a shell or a command with access to a specific home directory
sudo homectl with {{username}} -- {{command}} {{command_arguments}}
# lock or unlock a specific home directory
sudo homectl {{lock|unlock}} {{username}}
# change the disk space assigned to a specific home directory to 100 gib
sudo homectl resize {{username}} {{100G}}
# display help
homectl --help
# display the file access control list
getfacl {{path/to/file_or_directory}}
# display the file access control list with numeric user and group ids
getfacl -n {{path/to/file_or_directory}}
# display the file access control list with tabular output format
getfacl -t {{path/to/file_or_directory}}
# display keys which are currently being pressed on the screen
screenkey
# display keys and mouse buttons which are currently being pressed on the screen
screenkey --mouse
# launch the settings menu of screenkey
screenkey --show-settings
# launch screenkey at a specific position
screenkey --position {{top|center|bottom|fixed}}
# change the format of the key modifiers displayed on screen
screenkey --mods-mode {{normal|emacs|mac|win|tux}}
# change the appearance of screenkey
screenkey --bg-color "{{#a1b2c3}}" --font {{Hack}} --font-color {{yellow}} --opacity {{0.8}}
# drag and select a window on screen to display screenkey
screenkey --position fixed --geometry {{$(slop -n -f '%g')}}
# update the package database
sudo pacman --files --refresh