neulab/tldr huggingface dataset:
# get the label of a fat32 partition
fatlabel {{/dev/sda1}}
# set the label of a fat32 partition
fatlabel {{/dev/sdc3}} "{{new_label}}"
# search for a package in your current sources
apt-cache search {{query}}
# show information about a package
apt-cache show {{package}}
# show whether a package is installed and up to date
apt-cache policy {{package}}
# show dependencies for a package
apt-cache depends {{package}}
# show packages that depend on a particular package
apt-cache rdepends {{package}}
# refresh database content
sudo updatedb
# display file names as soon as they are found
sudo updatedb --verbose
# install a new package
sudo pacman --sync {{package_name}}
# synchronize and update all packages (add `downloadonly` to download the packages and not update them)
sudo pacman --sync --refresh --sysupgrade
# update all packages and install a new one without prompting
sudo pacman --sync --refresh --sysupgrade --noconfirm {{package_name}}
# search the package database for a regular expression or keyword
pacman --sync --search "{{search_pattern}}"
# display information about a package
pacman --sync --info {{package_name}}
# overwrite conflicting files during a package update
sudo pacman --sync --refresh --sysupgrade --overwrite {{path/to/file}}
# synchronize and update all packages, but ignore a specific package (can be used more than once)
sudo pacman --sync --refresh --sysupgrade --ignore {{package_name}}
# remove not installed packages and unused repositories from the cache (use two `clean` flags to clean all packages)
sudo pacman --sync --clean
# display help for this subcommand
pacman --remove --help
# remove a package and its dependencies
sudo pacman --remove --recursive {{package_name}}
# remove a package and both its dependencies and configuration files
sudo pacman --remove --recursive --nosave {{package_name}}
# remove a package without prompting
sudo pacman --remove --noconfirm {{package_name}}
# remove orphan packages (installed as dependencies but not required by any package)
sudo pacman --remove --recursive --nosave $(pacman --query --unrequired --deps --quiet)
# remove a package and all packages that depend on it
sudo pacman --remove --cascade {{package_name}}
# list packages that would be affected (does not remove any packages)
pacman --remove --print {{package_name}}
# display bpftrace version
bpftrace -V
# list all available probes
sudo bpftrace -l
# run a oneliner program (e.g. syscall count by program)
sudo bpftrace -e '{{tracepoint:raw_syscalls:sys_enter { @[comm] = count(); }}}'
# run a program from a file
sudo bpftrace {{path/to/file}}
# trace a program by pid
sudo bpftrace -e '{{tracepoint:raw_syscalls:sys_enter /pid == 123/ { @[comm] = count(); }}}'
# do a dry run and display the output in ebpf format
sudo bpftrace -d -e '{{one_line_program}}'
# open a file in the default editor
sensible-editor {{file}}
# open a file in the default editor, with the cursor at the end of the file
sensible-editor + {{file}}
# open a file in the default editor, with the cursor at the beginning of line 10
sensible-editor +10 {{file}}
# open 3 files in vertically split editor windows at the same time
sensible-editor -O3 {{file_1}} {{file_2}} {{file_3}}
# integrate firejail with your desktop environment
sudo firecfg
# open a restricted mozilla firefox
firejail {{firefox}}
# start a restricted apache server on a known interface and address
firejail --net={{eth0}} --ip={{192.168.1.244}} {{/etc/init.d/apache2}} {{start}}
# list running sandboxes
firejail --list
# list network activity from running sandboxes
firejail --netstats
# shutdown a running sandbox
firejail --shutdown={{7777}}
# build the package in the current directory
debuild
# build a binary package only
debuild -b
# do not run lintian after building the package
debuild --no-lintian
# start nmon
nmon
# save records to file ("s 300 c 288" by default)
nmon -f
# save records to file with a total of 240 measurements, by taking 30 seconds between each measurement
nmon -f -s {{30}} -c {{240}}
# view the queue
squeue
# view jobs queued by a specific user
squeue -u {{username}}
# view the queue and refresh every 5 seconds
squeue -i {{5}}
# view the queue with expected start times
squeue --start
# show the progress of running coreutils
progress
# show the progress of running coreutils in quiet mode
progress -q
# launch and monitor a single longrunning command
{{command}} & progress -mp $!
# start i7z (needs to be run in superuser mode)
sudo i7z
# discover directories using a [w]ordlist on a target [u]rl with [c]olorized and [v]erbose output
ffuf -w {{path/to/wordlist}} -u {{https://target/FUZZ}} -c -v
# fuzz host[h]eaders with a host file on a traget website and [m]atch http 200 [c]ode responses
ffuf -w {{hosts.txt}} -u {{https://example.org}} -H "{{Host: FUZZ}}" -mc {{200}}
# discover directories using a [w]ordlist on a target website with a max individual job time of 60 seconds and recursion discovery depth of 2 levels
ffuf -w {{path/to/wordlist}} -u {{https://target/FUZZ}} -maxtime-job {{60}} -recursion -recursion-depth {{2}}
# fuzz get parameter on a target website and [f]ilter out message [s]ize response of 4242 bytes
ffuf -w {{path/to/param_names.txt}} -u {{https://target/script.php?FUZZ=test_value}} -fs {{4242}}
# fuzz post method with post [d]ata of password on a target website and [f]ilter out http response [c]ode 401
ffuf -w {{path/to/postdata.txt}} -X {{POST}} -d "{{username=admin\&password=FUZZ}}" -u {{https://target/login.php}} -fc {{401}}
# discover subdomains using a subdoomain list on a target website
ffuf -w {{subdomains.txt}} -u {{https://website.com}} -H "{{Host: FUZZ.website.com}}"
# add all package binaries in the current directory and remove the old database file
repo-add --remove {{path/to/database.db.tar.gz}} {{*.pkg.tar.zst}}
# add all package binaries in the current directory in silent mode except for warning and error messages
repo-add --quiet {{path/to/database.db.tar.gz}} {{*.pkg.tar.zst}}
# add all package binaries in the current directory without showing color
repo-add --nocolor {{path/to/database.db.tar.gz}} {{*.pkg.tar.zst}}
# display executable invocations per user (username not displayed)
sudo sa
# display executable invocations per user, showing responsible usernames
sudo sa --print-users
# list resources used recently per user
sudo sa --user-summary
# edit the password file
vipw
# display the current version of `vipw`
vipw --version
# retrieve current status of the jail service
fail2ban-client status {{jail}}
# remove the specified ip from the jail service's ban list
fail2ban-client set {{jail}} unbanip {{ip}}
# verify fail2ban server is alive
fail2ban-client ping
# synchronize and set date and time
sudo ntpdate {{host}}
# query the host without setting the time
ntpdate -q {{host}}
# use an unprivileged port in case a firewall is blocking privileged ports
sudo ntpdate -u {{host}}
# force time to be stepped using `settimeofday` instead of `slewed`
sudo ntpdate -b {{host}}
# show all running services
systemctl status
# list failed units
systemctl --failed
# start/stop/restart/reload a service
systemctl {{start|stop|restart|reload}} {{unit}}
# show the status of a unit
systemctl status {{unit}}
# enable/disable a unit to be started on bootup
systemctl {{enable|disable}} {{unit}}
# mask/unmask a unit to prevent enablement and manual activation
systemctl {{mask|unmask}} {{unit}}
# reload systemd, scanning for new or changed units
systemctl daemon-reload
# check if a unit is enabled
systemctl is-enabled {{unit}}
# run `ipconfig.exe` program
wine {{ipconfig}} {{/all}}
# run `cmd.exe` in background
wine start {{cmd}}
# run windowslike package manager
wine uninstaller
# install msi packages
wine msiexec /i {{package}}
# display a message in fullscreen
sm "{{Hello World!}}"
# display a message with inverted colors
sm -i "{{Hello World!}}"
# display a message with a custom foreground color
sm -f {{blue}} "{{Hello World!}}"
# display a message with a custom background color
sm -b {{#008888}} "{{Hello World!}}"
# display a message rotated 3 times (in steps of 90 degrees, counterclockwise)
sm -r {{3}} "{{Hello World!}}"
# display a message using the output from another command
{{echo "Hello World!"}} | sm -
# create a btrfs filesystem on a single device
sudo mkfs.btrfs --metadata single --data single {{/dev/sda}}
# create a btrfs filesystem on multiple devices with raid1
sudo mkfs.btrfs --metadata raid1 --data raid1 {{/dev/sda}} {{/dev/sdb}} {{/dev/sdN}}
# set a label for the filesystem
sudo mkfs.btrfs --label "{{label}}" {{/dev/sda}} [{{/dev/sdN}}]
# mount a `.raw` image file into a dmg container file
xmount --in {{raw}} {{path/to/image.dd}} --out {{dmg}} {{mountpoint}}
# mount an ewf image file with writecache support into a vhd file to boot from
xmount --cache {{path/to/cache.ovl}} --in {{ewf}} {{path/to/image.E??}} --out {{vhd}} {{mountpoint}}
# mount the first partition at sector 2048 into a new `.raw` image file
xmount --offset {{2048}} --in {{raw}} {{path/to/image.dd}} --out {{raw}} {{mountpoint}}
# show the current number lock status
numlockx status
# turn the number lock on
numlockx on
# turn the number lock off
numlockx off
# toggle the current state
numlockx toggle
# launch the screenshooter gui
xfce4-screenshooter
# take a screenshot of the entire screen and launch the gui to ask how to proceed
xfce4-screenshooter --fullscreen
# take a screenshot of the entire screen and save it in the specified directory
xfce4-screenshooter --fullscreen --save {{path/to/directory}}
# wait some time before taking the screenshot
xfce4-screenshooter --delay {{seconds}}
# take a screenshot of a region of the screen (select using the mouse)
xfce4-screenshooter --region
# take a screenshot of the active window, and copy it to the clipboard
xfce4-screenshooter --window --clipboard
# take a screenshot of the active window, and open it with a chosen program
xfce4-screenshooter --window --open {{gimp}}
# install a new package
yum install {{package}}
# install a new package and assume yes to all questions (also works with update, great for automated updates)
yum -y install {{package}}
# find the package that provides a particular command
yum provides {{command}}
# remove a package
yum remove {{package}}
# display available updates for installed packages
yum check-update
# upgrade installed packages to the newest available versions
yum upgrade
# list time of each unit to start up
systemd-analyze blame
# print a tree of the timecritical chain of units
systemd-analyze critical-chain
# create an svg file showing when each system service started, highlighting the time that they spent on initialization
systemd-analyze plot > {{path/to/file.svg}}
# plot a dependency graph and convert it to an svg file
systemd-analyze dot | dot -T{{svg}} > {{path/to/file.svg}}
# display the version
gnome-extensions version
# list all the installed extensions
gnome-extensions list
# display information about a specific extension
gnome-extensions info "{{extension_id}}"
# display help for a subcommand (like `list`)
gnome-extensions help {{subcommand}}
# enable a specific extension
gnome-extensions enable "{{extension_id}}"
# disable a specific extension
gnome-extension disable "{{extension_id}}"
# uninstall a specific extension
gnome-extension uninstall "{{extension_id}}"
# remove the variable `foo`, or if the variable doesn't exist, remove the function `foo`
unset {{foo}}
# remove the variables foo and bar
unset -v {{foo}} {{bar}}
# remove the function my_func
unset -f {{my_func}}
# disable a virtual host
sudo a2dissite {{virtual_host}}
# don't show informative messages
sudo a2dissite --quiet {{virtual_host}}
# show kernel messages
dmesg
# show kernel error messages
dmesg --level err
# show kernel messages and keep reading new ones, similar to `tail f` (available in kernels 3.5.0 and newer)
dmesg -w
# show how much physical memory is available on this system
dmesg | grep -i memory
# show kernel messages 1 page at a time
dmesg | less
# show kernel messages with a timestamp (available in kernels 3.5.0 and newer)
dmesg -T
# show kernel messages in humanreadable form (available in kernels 3.5.0 and newer)
dmesg -H
# colorize output (available in kernels 3.5.0 and newer)
dmesg -L
# change the activation status of logical volumes in all volume groups
sudo vgchange --activate {{y|n}}
# change the activation status of logical volumes in the specified volume group (determine with `vgscan`)
sudo vgchange --activate {{y|n}} {{volume_group}}}
# show information about an address or network with a given subnet mask
ipcalc {{1.2.3.4}} {{255.255.255.0}}
# show information about an address or network in cidr notation
ipcalc {{1.2.3.4}}/{{24}}
# show the broadcast address of an address or network
ipcalc -b {{1.2.3.4}}/{{30}}
# show the network address of provided ip address and netmask
ipcalc -n {{1.2.3.4}}/{{24}}
# display geographic information about a given ip address
ipcalc -g {{1.2.3.4}}
# start xman in threebutton window
xman
# open the manual page output stored in a given file
xman -helpfile {{filename}}
# show both manual page and directory
xman -bothshown
# open a new window showing the user's home directory
nemo
# open a new window showing the current directory
nemo .
# close all open nemo windows
nemo --quit
# create an 'fsdax' mode namespace
ndctl create-namespace --mode={{fsdax}}
# change the mode of a namespace to 'raw'
ndctl create-namespace --reconfigure={{namespaceX.Y}} --mode={{raw}}
# check a sector mode namespace for consistency, and repair if needed
ndctl check-namespace --repair {{namespaceX.Y}}
# list all namespaces, regions, and buses (including disabled ones)
ndctl list --namespaces --regions --buses --idle
# list a specific namespace and include lots of additional information
ndctl list -vvv --namespace={{namespaceX.Y}}
# run a monitor to watch for smart health events for nvdimms on the 'acpi.nfit' bus
ndctl monitor --bus={{ACPI.NFIT}}
# remove a namespace (when applicable) or reset it to an initial state
ndctl destroy-namespace --force {{namespaceX.Y}}
# dump the `/var/log/wtmp` file to the standard output as plain text
utmpdump {{/var/log/wtmp}}
# load a previously dumped file into `/var/log/wtmp`
utmpdump -r {{dumpfile}} > {{/var/log/wtmp}}
# get swap information
swapon -s
# enable a given swap partition
swapon {{/dev/sdb7}}
# enable a given swap file
swapon {{path/to/file}}
# enable all swap areas
swapon -a
# enable swap by label of a device or file
swapon -L {{swap1}}
# display an analog clock
xclock
# display a 24hour digital clock with the hour and minute fields only
xclock -digital -brief
# display a digital clock using an strftime format string (see strftime(3))
xclock -digital -strftime {{format}}
# display a 24hour digital clock with the hour, minute and second fields that updates every second
xclock -digital -strftime '%H:%M:%S' -update 1
# display a 12hour digital clock with the hour and minute fields only
xclock -digital -twelve -brief
# display the size of an iso file
isosize {{path/to/file.iso}}
# display the block count and block size of an iso file
isosize --sectors {{path/to/file.iso}}
# display the size of an iso file divided by a given number (only usable when sectors is not given)
isosize --divisor={{number}} {{path/to/file.iso}}
# create a rom filesystem inside partition 1 on device b (`sdb1`)
mkfs.cramfs {{/dev/sdb1}}
# create a rom filesystem with a volumename
mkfs.cramfs -n {{volume_name}} {{/dev/sdb1}}
# show version of httpd package
rpm -q {{httpd}}
# list versions of all matching packages
rpm -qa '{{mariadb*}}'
# forcibly install a package regardless of currently installed versions
rpm -U {{package_name.rpm}} --force
# identify owner of a file and show version of the package
rpm -qf {{/etc/postfix/main.cf}}
# list packageowned files
rpm -ql {{kernel}}
# show scriptlets from an rpm file
rpm -qp --scripts {{package_name.rpm}}
# show changed, missing and/or incorrectly installed files of matching packages
rpm -Va '{{php-*}}'
# display the default device
eject -d
# eject the default device
eject
# eject a specific device (the default order is cdrom, scsi, floppy and tape)
eject {{/dev/cdrom}}
# toggle whether a device's tray is open or closed
eject -T {{/dev/cdrom}}
# eject a cd drive
eject -r {{/dev/cdrom}}
# eject a floppy drive
eject -f {{/mnt/floppy}}
# eject a tape drive
eject -q {{/mnt/tape}}
# start tracing a specific process by its pid
strace -p {{pid}}
# trace a process and filter output by system call
strace -p {{pid}} -e {{system_call_name}}
# count time, calls, and errors for each system call and report a summary on program exit
strace -p {{pid}} -c
# show the time spent in every system call
strace -p {{pid}} -T
# start tracing a program by executing it
strace {{program}}
# start tracing file operations of a program
strace -e trace=file {{program}}
# display status information of a commaseparated list of jobs
sstat --jobs={{job_id}}
# display job id, average cpu and average virtual memory size of a commaseparated list of jobs, with pipes as column delimiters
sstat --parsable --jobs={{job_id}} --format={{JobID}},{{AveCPU}},{{AveVMSize}}
# display list of fields available
sstat --helpformat
# fix a given ntfs partition
sudo ntfsfix {{/dev/sdXN}}
# display a simple message
whiptail --title "{{title}}" --msgbox "{{message}}" {{height_in_chars}} {{width_in_chars}}
# display a boolean choice, returning the result through the exit code
whiptail --title "{{title}}" --yesno "{{message}}" {{height_in_chars}} {{width_in_chars}}
# customise the text on the yes / no buttons
whiptail --title "{{title}}" --yes-button "{{text}}" --no-button "{{text}}" --yesno "{{message}}" {{height_in_chars}} {{width_in_chars}}
# display a text input box
{{result_variable_name}}="$(whiptail --title "{{title}}" --inputbox "{{message}}" {{height_in_chars}} {{width_in_chars}} {{default_text}} 3>&1 1>&2 2>&3)"
# display a password input box
{{result_variable_name}}="$(whiptail --title "{{title}}" --passwordbox "{{message}}" {{height_in_chars}} {{width_in_chars}} 3>&1 1>&2 2>&3)"
# display a multiplechoice menu
{{result_variable_name}}=$(whiptail --title "{{title}}" --menu "{{message}}" {{height_in_chars}} {{width_in_chars}} {{menu_display_height}} "{{value_1}}" "{{display_text_1}}" "{{value_n}}" "{{display_text_n}}" ..... 3>&1 1>&2 2>&3)
# launch anbox into the app manager
anbox launch --package={{org.anbox.appmgr}} --component={{org.anbox.appmgr.AppViewActivity}}
# launch a vnc server that allows multiple clients to connect
x11vnc -shared
# launch a vnc server in viewonly mode, and which won't terminate once the last client disconnects
x11vnc -forever -viewonly
# launch a vnc server on a specific display and screen (both starting at index zero)
x11vnc -display :{{display}}.{{screen}}
# launch a vnc server on the third display's default screen
x11vnc -display :{{2}}
# launch a vnc server on the first display's second screen
x11vnc -display :{{0}}.{{1}}
# run docker daemon
dockerd
# run docker daemon and config it to listen to specific sockets (unix and tcp)
dockerd --host unix://{{path/to/tmp.sock}} --host tcp://{{ip}}
# run with specific daemon pid file
dockerd --pidfile {{path/to/pid_file}}
# run in debug mode
dockerd --debug
# run and set a specific log level
dockerd --log-level={{debug|info|warn|error|fatal}}
# obtain a new certificate via webroot authorization, but do not install it automatically
sudo certbot certonly --webroot --webroot-path {{path/to/webroot}} --domain {{subdomain.example.com}}
# obtain a new certificate via nginx authorization, installing the new certificate automatically
sudo certbot --nginx --domain {{subdomain.example.com}}
# obtain a new certificate via apache authorization, installing the new certificate automatically
sudo certbot --apache --domain {{subdomain.example.com}}
# renew all let's encrypt certificates that expire in 30 days or less (don't forget to restart any servers that use them afterwards)
sudo certbot renew
# simulate the obtaining of a new certificate, but don't actually save any new certificates to disk
sudo certbot --webroot --webroot-path {{path/to/webroot}} --domain {{subdomain.example.com}} --dry-run
# obtain an untrusted test certificate instead
sudo certbot --webroot --webroot-path {{path/to/webroot}} --domain {{subdomain.example.com}} --test-cert
# halt the system
halt
# power off the system (same as `poweroff`)
halt --poweroff
# reboot the system (same as `reboot`)
halt --reboot
# halt immediately without contacting the system manager
halt --force --force
# write the wtmp shutdown entry without halting the system
halt --wtmp-only
# add a new apt repository
apt-add-repository {{repository_spec}}
# remove an apt repository
apt-add-repository --remove {{repository_spec}}
# update the package cache after adding a repository
apt-add-repository --update {{repository_spec}}
# enable source packages
apt-add-repository --enable-source {{repository_spec}}
# run a command when a file changes
while inotifywait {{path/to/file}}; do {{command}}; done
# be quiet about watching for changes
while inotifywait --quiet {{path/to/file}}; do {{command}}; done
# watch a directory recursively for changes
while inotifywait --recursive {{path/to/directory}}; do {{command}}; done
# exclude files matching a regular expression
while inotifywait --recursive {{path/to/directory}} --exclude '{{regular_expression}}'; do {{command}}; done
# wait at most 30 seconds
while inotifywait --timeout {{30}} {{path/to/file}}; do {{command}}; done
# only watch for file modification events
while inotifywait --event {{modify}} {{path/to/file}}; do {{command}}; done
# open an `at` prompt to create a new set of scheduled commands, press `ctrl + d` to save and exit
at {{hh:mm}}
# execute the commands and email the result using a local mailing program such as sendmail
at {{hh:mm}} -m
# execute a script at the given time
at {{hh:mm}} -f {{path/to/file}}
# display a system notification at 11pm on february 18th
echo "notify-send '{{Wake up!}}'" | at {{11pm}} {{Feb 18}}
# show information about all network interfaces
ip link
# show information about a specific network interface
ip link show {{ethN}}
# bring a network interface up or down
ip link set {{ethN}} {{up|down}}
# give a meaningful name to a network interface
ip link set {{ethN}} alias "{{LAN Interface}}"
# change the mac address of a network interface
ip link set {{ethN}} address {{ff:ff:ff:ff:ff:ff}}
# change the mtu size for a network interface to use jumbo frames
ip link set {{ethN}} mtu {{9000}}
# display information about all volume groups
sudo vgdisplay
# display information about volume group vg1
sudo vgdisplay {{vg1}}
# run using interactive mode
bitwise
# convert from decimal
bitwise {{12345}}
# convert from hexadecimal
bitwise {{0x563d}}
# convert a cstyle calculation
bitwise "{{0x123 + 0x20 - 30 / 50}}"
# display a cursor to send a window to the system tray when pressing the left mouse button (press any other mouse button to cancel)
kdocker
# open an application and send it to the system tray
kdocker {{application}}
# send focused window to the system tray
kdocker -f
# display a cursor to send a window to the system tray with a custom icon when pressing the left mouse button
kdocker -i {{/path/to/icon}}
# open an application, send it to the system tray and if focus is lost, minimize it
kdocker -l {{application}}
# print version
kdocker --version
# open a new terminal window
xfce4-terminal
# set the initial title
xfce4-terminal --initial-title "{{initial_title}}"
# open a new tab in the current terminal window
xfce4-terminal --tab
# execute a command in a new terminal window
xfce4-terminal --command "{{command_with_args}}"
# keep the terminal around after the executed command finishes executing
xfce4-terminal --command "{{command_with_args}}" --hold
# open multiple new tabs, executing a command in each
xfce4-terminal --tab --command "{{command_a}}" --tab --command "{{command_b}}"
# remove all but the 3 most recent package versions from the pacman cache
paccache -r
# set the number of package versions to keep
paccache -rk {{num_versions}}
# perform a dryrun and show the number of candidate packages for deletion
paccache -d
# move candidate packages to a directory instead of deleting them
paccache -m {{path/to/directory}}
# display an fstab compatible output based on a volume label
genfstab -L {{path/to/mount_point}}
# display an fstab compatible output based on a volume uuid
genfstab -U {{path/to/mount_point}}
# a usual way to generate an fstab file, requires root permissions
genfstab -U {{/mnt}} >> {{/mnt/etc/fstab}}
# append a volume into an fstab file to mount it automatically
genfstab -U {{path/to/mount_point}} | sudo tee -a /etc/fstab
# display the default question dialog
zenity --question
# display an info dialog displaying the text "hello!"
zenity --info --text="{{Hello!}}"
# display a name/password form and output the data separated by ";"
zenity --forms --add-entry="{{Name}}" --add-password="{{Password}}" --separator="{{;}}"
# display a file selection form in which the user can only select directories
zenity --file-selection --directory
# display a progress bar which updates its message every second and show a progress percent
{{(echo "#1"; sleep 1; echo "50"; echo "#2"; sleep 1; echo "100")}} | zenity --progress
# set a user's login shell to `nologin` to prevent the user from logging in
chsh -s {{user}} nologin
# customize message for users with the login shell of `nologin`
echo "{{declined_login_message}}" > /etc/nologin.txt
# create a new empty subvolume
sudo btrfs subvolume create {{path/to/new_subvolume}}
# list all subvolumes and snapshots in the specified filesystem
sudo btrfs subvolume list {{path/to/btrfs_filesystem}}
# delete a subvolume
sudo btrfs subvolume delete {{path/to/subvolume}}
# create a readonly snapshot of an existing subvolume
sudo btrfs subvolume snapshot -r {{path/to/source_subvolume}} {{path/to/target}}
# create a readwrite snapshot of an existing subvolume
sudo btrfs subvolume snapshot {{path/to/source_subvolume}} {{path/to/target}}
# show detailed information about a subvolume
sudo btrfs subvolume show {{path/to/subvolume}}
# display information about physical volumes
pvs
# display nonphysical volumes
pvs -a
# change default display to show more details
pvs -v
# display only specific fields
pvs -o {{field_name_1}},{{field_name_2}}
# append field to default display
pvs -o +{{field_name}}
# suppress heading line
pvs --noheadings
# use separator to separate fields
pvs --separator {{special_character}}
# scan a binary file
binwalk {{path/to/binary}}
# extract files from a binary, specifying the output directory
binwalk --extract --directory {{output_directory}} {{path/to/binary}}
# recursively extract files from a binary limiting the recursion depth to 2
binwalk --extract --matryoshka --depth {{2}} {{path/to/binary}}
# extract files from a binary with the specified file signature
binwalk --dd '{{png image:png}}' {{path/to/binary}}
# analyze the entropy of a binary, saving the plot with the same name as the binary and `.png` extension appended
binwalk --entropy --save {{path/to/binary}}
# combine entropy, signature and opcodes analysis in a single command
binwalk --entropy --signature --opcodes {{path/to/binary}}
# view logs of a program, specifying log files, directories or urls
lnav {{path/to/log_or_directory|url}}
# view logs of a specific remote host (ssh passwordless login required)
lnav {{ssh}} {{user}}@{{host1.example.com}}:{{/var/log/syslog.log}}
# validate the format of log files against the configuration and report any errors
lnav -C {{path/to/log_directory}}
# run a command on node 0 with memory allocated on node 0 and 1
numactl --cpunodebind={{0}} --membind={{0,1}} -- {{command}} {{command_arguments}}
# run a command on cpus (cores) 04 and 812 of the current cpuset
numactl --physcpubind={{+0-4,8-12}} -- {{command}} {{command_arguments}}
# run a command with its memory interleaved on all cpus
numactl --interleave={{all}} -- {{command}} {{command_arguments}}
# launch a vnc client which connects to a host on a given display
vncviewer {{host}}:{{display_number}}
# launch in fullscreen mode
vncviewer -FullScreen {{host}}:{{display_number}}
# launch a vnc client with a specific screen geometry
vncviewer --geometry {{width}}x{{height}} {{host}}:{{display_number}}
# launch a vnc client which connects to a host on a given port
vncviewer {{host}}::{{port}}
# open a new urxvt window
urxvt
# run in a specific directory
urxvt -cd {{path/to/directory}}
# run a command in a new urxvt window
urxvt -e {{command}}
# run a command and keep the window open
urxvt --hold -e {{command}}
# run a command within the `sh` shell
urxvt -e {{sh}} -c {{command}}
# show current configuration
sacctmgr show configuration
# add a cluster to the slurm database
sacctmgr add cluster {{cluster_name}}
# add an account to the slurm database
sacctmgr add account {{account_name}} cluster={{cluster_of_account}}
# show details of user/association/cluster/account
sacctmgr show {{user/association/cluster/account}}
# convert single images and/or whole directories containing valid image formats
imgp -x {{1366x1000}} {{path/to/directory}} {{path/to/file}}
# scale an image by 75% and overwrite the source image to a target resolution
imgp -x {{75}} -w {{path/to/file}}
# rotate an image clockwise by 90 degrees
imgp -o {{90}} {{path/to/file}}
# get all mirrors, sort for download speed and save them
sudo reflector --sort {{rate}} --save {{/etc/pacman.d/mirrorlist}}
# only get german https mirrors
reflector --country {{Germany}} --protocol {{https}}
# only get the 10 recently sync'd mirrors
reflector --latest {{10}}
# start bpytop
bpytop
# start in minimal mode without memory and networking boxes
bpytop -m
# show version
bpytop -v
# toggle minimal mode
m
# search for running programs or processes
f
# change settings
M
# [r]econnect to a running server, and turn on logging 3 levels of [v]erbosity
asterisk -r -vvv
# [r]econnect to a running server, run a single command, and return
asterisk -r -x "{{command}}"
# show chan_sip clients (phones)
asterisk -r -x "sip show peers"
# show active calls and channels
asterisk -r -x "core show channels"
# show voicemail mailboxes
asterisk -r -x "voicemail show users"
# terminate a channel
asterisk -r -x "hangup request {{channel_ID}}"
# reload chan_sip configuration
asterisk -r -x "sip reload"
# list all files, including hidden files
dir -all
# list files including their author (`l` is required)
dir -l --author
# list files excluding those that match a specified blob pattern
dir --hide={{pattern}}
# list subdirectories recursively
dir --recursive
# display help
dir --help
# restore all deleted files inside partition n on device x
sudo extundelete {{/dev/sdXN}} --restore-all
# restore a file from a path relative to root (do not start the path with `/`)
extundelete {{/dev/sdXN}} --restore-file {{path/to/file}}
# restore a directory from a path relative to root (do not start the path with `/`)
extundelete {{/dev/sdXN}} --restore-directory {{path/to/directory}}
# restore all files deleted after january 1st, 2020 (in unix time)
extundelete {{/dev/sdXN}} --restore-all --after {{1577840400}}
# split a file at lines 5 and 23
csplit {{file}} {{5}} {{23}}
# split a file every 5 lines (this will fail if the total number of lines is not divisible by 5)
csplit {{file}} {{5}} {*}
# split a file every 5 lines, ignoring exactdivision error
csplit -k {{file}} {{5}} {*}
# split a file at line 5 and use a custom prefix for the output files
csplit {{file}} {{5}} -f {{prefix}}
# split a file at a line matching a regular expression
csplit {{file}} /{{regular_expression}}/
# power off (halt) immediately
shutdown -h now
# reboot immediately
shutdown -r now
# reboot in 5 minutes
shutdown -r +{{5}} &
# shutdown at 100 pm (uses 24h clock)
shutdown -h 13:00
# cancel a pending shutdown/reboot operation
shutdown -c
# check the current system clock time
timedatectl
# set the local time of the system clock directly
timedatectl set-time "{{yyyy-MM-dd hh:mm:ss}}"
# list available timezones
timedatectl list-timezones
# set the system timezone
timedatectl set-timezone {{timezone}}
# enable network time protocol (ntp) synchronization
timedatectl set-ntp on
# start calcurse on interactive mode
calcurse
# print the appointments and events for the current day and exit
calcurse --appointment
# remove all local calcurse items and import remote objects
calcurse-caldav --init=keep-remote
# remove all remote objects and push local calcurse items
calcurse-caldav --init=keep-local
# copy local objects to the caldav server and vice versa
calcurse-caldav --init=two-way
# change the line endings of a file
unix2mac {{filename}}
# create a copy with macosstyle line endings
unix2mac -n {{filename}} {{new_filename}}
# run a .net assembly in debug mode
mono --debug {{path/to/program.exe}}
# run a .net assembly
mono {{path/to/program.exe}}
# open a new gnome terminal window
gnome-terminal
# run a specific command in a new terminal window
gnome-terminal -- {{command}}
# open a new tab in the last opened window instead
gnome-terminal --tab
# set the title of the new tab
gnome-terminal --tab --title "{{title}}"
# display all information about a pe file
readpe {{path/to/executable}}
# display all the headers present in a pe file
readpe --all-headers {{path/to/executable}}
# display all the sections present in a pe file
readpe --all-sections {{path/to/executable}}
# display a specific header from a pe file
readpe --header {{dos|coff|optional}} {{path/to/executable}}
# list all imported functions
readpe --imports {{path/to/executable}}
# list all exported functions
readpe --exports {{path/to/executable}}
# change the size of a logical volume to 120 gb
lvresize --size {{120G}} {{volume_group}}/{{logical_volume}}
# extend the size of a logical volume as well as the underlying filesystem by 120 gb
lvresize --size +{{120G}} --resizefs {{volume_group}}/{{logical_volume}}
# extend the size of a logical volume to 100% of the free physical volume space
lvresize --size {{100}}%FREE {{volume_group}}/{{logical_volume}}
# reduce the size of a logical volume as well as the underlying filesystem by 120 gb
lvresize --size -{{120G}} --resizefs {{volume_group}}/{{logical_volume}}
# show a notification with the title "test" and the content "this is a test"
notify-send "{{Test}}" "{{This is a test}}"
# show a notification with a custom icon
notify-send -i {{icon.png}} "{{Test}}" "{{This is a test}}"
# show a notification for 5 seconds
notify-send -t 5000 "{{Test}}" "{{This is a test}}"
# show a notification with an app's icon
notify-send "{{Test}}" --icon={{google-chrome}}
# compose action can be used to compose any existing file or new on default mailcap edit tool
compose {{filename}}
# with `runmailcap`
run-mailcap --action=compose {{filename}}
# display information about all logical volumes
sudo lvdisplay
# display information about all logical volumes in volume group vg1
sudo lvdisplay {{vg1}}
# display information about logical volume lv1 in volume group vg1
sudo lvdisplay {{vg1/lv1}}
# add a new apt repository
add-apt-repository {{repository_spec}}
# remove an apt repository
add-apt-repository --remove {{repository_spec}}
# update the package cache after adding a repository
add-apt-repository --update {{repository_spec}}
# enable source packages
add-apt-repository --enable-source {{repository_spec}}
# add one or more devices to a btrfs filesystem
sudo btrfs device add {{path/to/block_device1}} [{{path/to/block_device2}}] {{path/to/btrfs_filesystem}}
# remove a device from a btrfs filesystem
sudo btrfs device remove {{path/to/device|device_id}} [{{...}}]
# display error statistics
sudo btrfs device stats {{path/to/btrfs_filesystem}}
# scan all disks and inform the kernel of all detected btrfs filesystems
sudo btrfs device scan --all-devices
# display detailed perdisk allocation statistics
sudo btrfs device usage {{path/to/btrfs_filesystem}}
# list all services and the runlevels they are added to
rc-update show
# add a service to a runlevel
sudo rc-update add {{service_name}} {{runlevel}}
# delete a service from a runlevel
sudo rc-update delete {{service_name}} {{runlevel}}
# delete a service from all runlevels
sudo rc-update --all delete {{service_name}}
# list devices
rfkill
# filter by columns
rfkill -o {{ID,TYPE,DEVICE}}
# block devices by type (e.g. bluetooth, wlan)
rfkill block {{bluetooth}}
# unblock devices by type (e.g. bluetooth, wlan)
rfkill unblock {{wlan}}
# output in json format
rfkill -J
# display cpu statistics every 2 seconds
mpstat {{2}}
# display 5 reports, one by one, at 2 second intervals
mpstat {{2}} {{5}}
# display 5 reports, one by one, from a given processor, at 2 second intervals
mpstat -P {{0}} {{2}} {{5}}
# print the statuses of all network interfaces
nmcli device status
# print the available wifi access points
nmcli device wifi
# connect to the wifi network with a specified name and password
nmcli device wifi connect {{ssid}} password {{password}}
# print password and qr code for the current wifi network
nmcli device wifi show-password
# launch a vnc server on next available display
vncserver
# launch a vnc server with specific screen geometry
vncserver --geometry {{width}}x{{height}}
# kill an instance of vnc server running on a specific display
vncserver --kill :{{display_number}}
# view chains, rules, and packet/byte counters for the filter table
sudo iptables -vnL
# set chain policy rule
sudo iptables -P {{chain}} {{rule}}
# append rule to chain policy for ip
sudo iptables -A {{chain}} -s {{ip}} -j {{rule}}
# append rule to chain policy for ip considering protocol and port
sudo iptables -A {{chain}} -s {{ip}} -p {{protocol}} --dport {{port}} -j {{rule}}
# delete chain rule
sudo iptables -D {{chain}} {{rule_line_number}}
# save iptables configuration of a given table to a file
sudo iptables-save -t {{tablename}} > {{path/to/iptables_file}}
# restore iptables configuration from a file
sudo iptables-restore < {{path/to/iptables_file}}
# remove a logical volume in a volume group
sudo lvremove {{volume_group}}/{{logical_volume}}
# remove all logical volumes in a volume group
sudo lvremove {{volume_group}}
# automatically resize a filesystem
resize2fs {{/dev/sdXN}}
# resize the filesystem to a size of 40g, displaying a progress bar
resize2fs -p {{/dev/sdXN}} {{40G}}
# shrink the filesystem to its minimum possible size
resize2fs -M {{/dev/sdXN}}
# list available qt versions from the configuration files
qtchooser --list-versions
# print environment information
qtchooser --print-env
# run the specified tool using the specified qt version
qtchooser --run-tool={{tool}} --qt={{version_name}}
# add a qt version entry to be able to choose from
qtchooser --install {{version_name}} {{path/to/qmake}}
# display all available options
qtchooser --help
# show all data on the given interface and port
tcpflow -c -i {{eth0}} port {{80}}
# open alpine normally
alpine
# open alpine directly to the message composition screen to send an email to a given email address
alpine {{email@example.net}}
# quit alpine
'q' then 'y'
# use a command's output as input of the clip[b]oard (equivalent to `ctrl + c`)
echo 123 | xsel -ib
# use the contents of a file as input of the clipboard
cat {{file}} | xsel -ib
# output the clipboard's contents into the terminal (equivalent to `ctrl + v`)
xsel -ob
# output the clipboard's contents into a file
xsel -ob > {{file}}
# clear the clipboard
xsel -cb
# output the x11 primary selection's contents into the terminal (equivalent to a mouse middleclick)
xsel -op
# start `xrdb` in interactive mode
xrdb
# load values (e.g. style rules) from a resource file
xrdb -load {{~/.Xresources}}
# query the resource database and print currently set values
xrdb -query
# resolve the pathnames specified as the argument parameters
namei {{path/to/a}} {{path/to/b}} {{path/to/c}}
# display the results in a longlisting format
namei --long {{path/to/a}} {{path/to/b}} {{path/to/c}}
# show the mode bits of each file type in the style of `ls`
namei --modes {{path/to/a}} {{path/to/b}} {{path/to/c}}
# show owner and group name of each file
namei --owners {{path/to/a}} {{path/to/b}} {{path/to/c}}
# don't follow symlinks while resolving
namei --nosymlinks {{path/to/a}} {{path/to/b}} {{path/to/c}}
# initialize the `/dev/sda1` volume for use by lvm
pvcreate {{/dev/sda1}}
# force the creation without any confirmation prompts
pvcreate --force {{/dev/sda1}}
# search for a package
snap find {{package_name}}
# install a package
snap install {{package_name}}
# update a package
snap refresh {{package_name}}
# update a package to another channel (track, risk, or branch)
snap refresh {{package_name}} --channel={{channel}}
# update all packages
snap refresh
# display basic information about installed snap software
snap list
# uninstall a package
snap remove {{package_name}}
# check for recent snap changes in the system
snap changes
# download a file from a server
smbget {{smb://server/share/file}}
# download a share or directory recursively
smbget --recursive {{smb://server/share}}
# connect with a username and password
smbget {{smb://server/share/file}} --user {{username%password}}
# require encrypted transfers
smbget {{smb://server/share/file}} --encrypt
# disable a given swap partition
swapoff {{/dev/sdb7}}
# disable a given swap file
swapoff {{path/to/file}}
# disable all swap areas
swapoff -a
# disable swap by label of a device or file
swapoff -L {{swap1}}
# start i3 (note that a preexisting window manager must not be open when this command is run.)
i3
# open a new terminal window
Super + Return
# create a new workspace
Super + Shift + {{number}}
# switch to workspace {{number}}
Super + {{number}}
# open new window horizontally
Super + h
# open new window vertically
Super + v
# open application (type out application name after executing command)
Super + D
# change user's primary group membership
newgrp {{group_name}}
# reset primary group membership to user's default group in `/etc/passwd`
newgrp
# print action can be used to print any file on default runmailcap tool
print {{filename}}
# with `runmailcap`
run-mailcap --action=print {{filename}}
# train the bayesian filter to recognise an email as spam
rspamc learn_spam {{path/to/email_file}}
# train the bayesian filter to recognise an email as ham
rspamc learn_ham {{path/to/email_file}}
# generate a manual report on an email
rspamc symbols {{path/to/email_file}}
# show server statistics
rspamc stat
# create an ext4 filesystem inside partition 1 on device b (`sdb1`)
sudo mkfs.ext4 {{/dev/sdb1}}
# create an ext4 filesystem with a volumelabel
sudo mkfs.ext4 -L {{volume_label}} {{/dev/sdb1}}
# install local `.deb` packages resolving and installing its dependencies
gdebi {{path/to/package.deb}}
# display the program version
gdebi --version
# do not show progress information
gdebi {{path/to/package.deb}} --quiet
# set an apt configuration option
gdebi {{path/to/package.deb}} --option={{APT_OPTS}}
# use alternative root dir
gdebi {{path/to/package.deb}} --root={{path/to/root_dir}}
# create `sources.list` using the lowest latency server
sudo netselect-apt
# specify debian branch, stable is used by default
sudo netselect-apt {{testing}}
# include nonfree section
sudo netselect-apt --non-free
# specify a country for the mirror list lookup
sudo netselect-apt -c {{India}}
# list all windows, managed by the window manager
wmctrl -l
# switch to the first window whose (partial) title matches
wmctrl -a {{window_title}}
# move a window to the current workspace, raise it and give it focus
wmctrl -R {{window_title}}
# switch to a workspace
wmctrl -s {{workspace_number}}
# select a window and toggle fullscreen
wmctrl -r {{window_title}} -b toggle,fullscreen
# select a window a move it to a workspace
wmctrl -r {{window_title}} -t {{workspace_number}}
# list all currently loaded kernel modules
lsmod
# lock the display and show a padlock instead of the cursor
xtrlock
# display a blank screen as well as the padlock cursor
xtrlock -b
# fork the xtrlock process and return immediately
xtrlock -f
# list connected (and authorized) devices
boltctl
# list connected devices, including unauthorized ones
boltctl list
# authorize a device temporarily
boltctl authorize {{device_uuid}}
# authorize and remember a device
boltctl enroll {{device_uuid}}
# revoke a previously authorized device
boltctl forget {{device_uuid}}
# show more information about a device
boltctl info {{device_uuid}}
# start the daemon
bluetoothd
# start the daemon, logging to stdout
bluetoothd --nodetach
# start the daemon with a specific configuration file (defaults to `/etc/bluetooth/main.conf`)
bluetoothd --configfile {{path/to/file}}
# start the daemon with verbose output to stderr
bluetoothd --debug
# start the daemon with verbose output coming from specific files in the bluetoothd or plugins source
bluetoothd --debug={{path/to/file1}}:{{path/to/file2}}:{{path/to/file3}}
# open the user interface
nmtui
# show a list of available connections, with the option to activate or deactivate them
nmtui connect
# connect to a given network
nmtui connect {{name|uuid|device|SSID}}
# edit/add/delete a given network
nmtui edit {{name|id}}
# set the system hostname
nmtui hostname
# start qjoypad
qjoypad
# start qjoypad and look for devices in a specific directory
qjoypad --device={{path/to/directory}}
# start qjoypad but don't show a system tray icon
qjoypad --notray
# start qjoypad and force the window manager to use a system tray icon
qjoypad --force-tray
# force a running instance of qjoypad to update its list of devices and layouts
qjoypad --update
# load the given layout in an already running instance of qjoypad, or start qjoypad using the given layout
qjoypad "{{layout}}"
# start calculating, defaulting to all cpu cores and 1 second refresh interval
sudo cpufreq-aperf
# start calculating for cpu 1 only
sudo cpufreq-aperf -c {{1}}
# start calculating with a 3 second refresh interval for all cpu cores
sudo cpufreq-aperf -i {{3}}
# calculate only once
sudo cpufreq-aperf -o
# show the utilisation of the default amd gpu
radeontop
# enable colored output
radeontop --color
# select a specific gpu (the bus number is the first number in the output of `lspci`)
radeontop --bus {{bus_number}}
# specify the display refresh rate (higher means more gpu overhead)
radeontop --ticks {{samples_per_second}}
# list installed packages and versions
pacman --query
# list only packages and versions that were explicitly installed
pacman --query --explicit
# find which package owns a file
pacman --query --owns {{filename}}
# display information about an installed package
pacman --query --info {{package_name}}
# list files owned by a package
pacman --query --list {{package_name}}
# list orphan packages (installed as dependencies but not required by any package)
pacman --query --unrequired --deps --quiet
# list installed packages not found in the repositories
pacman --query --foreign
# list outdated packages
pacman --query --upgrades
# list all services available on the local network along with their addresses and ports while ignoring local ones
avahi-browse --all --resolve --ignore-local
# list all domains
avahi-browse --browse-domains
# limit the search to a particular domain
avahi-browse --all --domain={{domain}}
# start the interactive installer
archinstall
# start a preset installer
archinstall {{minimal|unattended}}
# change the group name
groupmod -n {{new_group_name}} {{old_group_name}}
# change the group id
groupmod -g {{new_group_id}} {{old_group_name}}
# analyze one or more log files in interactive mode
goaccess {{path/to/logfile1 path/to/file2 ...}}
# use a specific logformat (or predefined formats like "combined")
goaccess {{path/to/logfile}} --log-format={{format}}
# analyse a log from stdin
tail -f {{path/to/logfile}} | goaccess -
# analyze a log and write it to an html file in realtime
goaccess {{path/to/logfile}} --output {{path/to/file.html}} --real-time-html
# view the current and permanent mac addresses of a interface
macchanger --show {{interface}}
# set interface to a random mac
macchanger --random {{interface}}
# set interface to a specific mac
macchanger --mac {{XX:XX:XX:XX:XX:XX}} {{interface}}
# reset interface to its permanent hardware mac
macchanger --permanent {{interface}}
# list the partitions on a block device or disk image
sudo partx --list {{path/to/device_or_disk_image}}
# add all the partitions found in a given block device to the kernel
sudo partx --add --verbose {{path/to/device_or_disk_image}}
# delete all the partitions found from the kernel (does not alter partitions on disk)
sudo partx --delete {{path/to/device_or_disk_image}}
# set the cpu frequency policy of cpu 1 to "userspace"
sudo cpufreq-set -c {{1}} -g {{userspace}}
# set the current minimum cpu frequency of cpu 1
sudo cpufreq-set -c {{1}} --min {{min_frequency}}
# set the current maximum cpu frequency of cpu 1
sudo cpufreq-set -c {{1}} --max {{max_frequency}}