neulab/tldr huggingface dataset:
# find the package that owns a specific file
pacman --files {{filename}}
# find the package that owns a specific file, using a regular expression
pacman --files --regex '{{regular_expression}}'
# list only the package names
pacman --files --quiet {{filename}}
# list the files owned by a specific package
pacman --files --list {{package_name}}
# list only the absolute path to the files
pacman --query --list --quiet {{package_name}}
# edit quota of the current user
edquota --user $(whoami)
# edit quota of a specific user
sudo edquota --user {{username}}
# edit quota for a group
sudo edquota --group {{group}}
# restrict operations to a given filesystem (by default edquota operates on all filesystems with quotas)
sudo edquota --file-system {{filesystem}}
# edit the default grace period
sudo edquota -t
# duplicate a quota to other users
sudo edquota -p {{reference_user}} {{destination_user1}} {{destination_user2}}
# check if pulseaudio is running (a nonzero exit code means it is not running)
pulseaudio --check
# start the pulseaudio daemon in the background
pulseaudio --start
# kill the running pulseaudio daemon
pulseaudio --kill
# list available modules
pulseaudio --dump-modules
# load a module into the currently running daemon with the specified arguments
pulseaudio --load="{{module_name}} {{arguments}}"
# view information about an mp3 file
eyeD3 {{filename.mp3}}
# set the title of an mp3 file
eyeD3 --title "{{A Title}}" {{filename.mp3}}
# set the album of all the mp3 files in a directory
eyeD3 --album "{{Album Name}}" {{*.mp3}}
# set the front cover art for an mp3 file
eyeD3 --add-image {{front_cover.jpeg}}:FRONT_COVER: {{filename.mp3}}
# modify acl of a file for user with read and write access
setfacl -m u:{{username}}:rw {{file}}
# modify default acl of a file for all users
setfacl -d -m u::rw {{file}}
# remove acl of a file for a user
setfacl -x u:{{username}} {{file}}
# remove all acl entries of a file
setfacl -b {{file}}
# start a buffer for temporary notes, which won't be saved
zile
# open a file
zile {{path/to/file}}
# save a file
Ctrl + X, Ctrl + S
# quit
Ctrl + X, Ctrl + C
# open a file at a specified line number
zile +{{line_number}} {{path/to/file}}
# undo changes
Ctrl + X, U
# display system memory
free
# display memory in bytes/kb/mb/gb
free -{{b|k|m|g}}
# display memory in humanreadable units
free -h
# refresh the output every 2 seconds
free -s {{2}}
# show a service's status
rc-service {{service_name}} status
# start a service
sudo rc-service {{service_name}} start
# stop a service
sudo rc-servie {{service_name}} stop
# restart a service
sudo rc-service {{service_name}} restart
# simulate running a service's custom command
sudo rc-service --dry-run {{service_name}} {{command_name}}
# actually run a service's custom command
sudo rc-service {{service_name}} {{command_name}}
# resolve the location of a service definition on disk
sudo rc-service --resolve {{service_name}}
# connect to a remote computer (default port is 3389)
rdesktop -u {{username}} -p {{password}} {{host:port}}
# simple examples
rdesktop -u Administrator -p passwd123 192.168.1.111:3389
# connect to a remote computer with full screen (press `ctrl + alt + enter` to exist)
rdesktop -u {{username}} -p {{password}} -f {{host:port}}
# use the customed resolution (use the letter 'x' between the number)
rdesktop -u {{username}} -p {{password}} -g 1366x768 {{host:port}}
# connect to a remote computer using domain user
rdesktop -u {{username}} -p {{password}} -d {{domainname}} {{host:port}}
# use the 16bit color (speed up)
rdesktop -u {{username}} -p {{password}} -a 16 {{host:port}}
# start terminator window
terminator
# start with a fullscreen window
terminator -f
# split terminals horizontally
Ctrl + Shift + O
# split terminals vertically
Ctrl + Shift + E
# open new tab
Ctrl + Shift + T
# scan a domain and save the results to a sqlite database
dnsrecon --domain {{example.com}} --db {{path/to/database.sqlite}}
# scan a domain, specifying the nameserver and performing a zone transfer
dnsrecon --domain {{example.com}} --name_server {{nameserver.example.com}} --type axfr
# scan a domain, using a bruteforce attack and a dictionary of subdomains and hostnames
dnsrecon --domain {{example.com}} --dictionary {{path/to/dictionary.txt}} --type brt
# scan a domain, performing a reverse lookup of ip ranges from the spf record and saving the results to a json file
dnsrecon --domain {{example.com}} -s --json
# scan a domain, performing a google enumeration and saving the results to a csv file
dnsrecon --domain {{example.com}} -g --csv
# scan a domain, performing dns cache snooping
dnsrecon --domain {{example.com}} --type snoop --name_server {{nameserver.example.com}} --dictionary {{path/to/dictionary.txt}}
# scan a domain, performing zone walking
dnsrecon --domain {{example.com}} --type zonewalk
# check filesystem `/dev/sdx`, reporting any damaged blocks
fsck {{/dev/sdX}}
# check filesystem `/dev/sdx`, reporting any damaged blocks and interactively letting the user choose to repair each one
fsck -r {{/dev/sdX}}
# check filesystem `/dev/sdx`, reporting any damaged blocks and automatically repairing them
fsck -a {{/dev/sdX}}
# mount a device below `/media/` (using device as mount point)
pmount {{/dev/to/block/device}}
# mount a device with a specific filesystem type to `/media/label`
pmount --type {{filesystem}} {{/dev/to/block/device}} {{label}}
# mount a cdrom (filesystem type iso9660) in readonly mode
pmount --type {{iso9660}} --read-only {{/dev/cdrom}}
# mount an ntfsformatted disk, forcing readwrite access
pmount --type {{ntfs}} --read-write {{/dev/sdX}}
# display all mounted removable devices
pmount
# write metadata located on device to a specific file
e2image {{/dev/sdXN}} {{path/to/image_file}}
# print metadata located on device to stdout
e2image {{/dev/sdXN}} -
# restore the filesystem metadata back to the device
e2image -I {{/dev/sdXN}} {{path/to/image_file}}
# create a large raw sparse file with metadata at proper offsets
e2image -r {{/dev/sdXN}} {{path/to/image_file}}
# create a qcow2 image file instead of a normal or raw image file
e2image -Q {{/dev/sdXN}} {{path/to/image_file}}
# enable a configuration file
sudo a2enconf {{configuration_file}}
# don't show informative messages
sudo a2enconf --quiet {{configuration_file}}
# print the time and memory usage of a command
runlim {{command}} {{command_arguments}}
# log statistics to a file instead of stdout
runlim --output-file={{path/to/file}} {{command}} {{command_arguments}}
# limit time to an upper bound (in seconds)
runlim --time-limit={{number}} {{command}} {{command_arguments}}
# limit realtime to an upper bound (in seconds)
runlim --real-time-limit={{number}} {{command}} {{command_arguments}}
# limit space to an upper bound (in mb)
runlim --space-limit={{number}} {{command}} {{command_arguments}}
# launch the gui
sudo lshw -X
# list all hardware in tabular format
sudo lshw -short
# list all disks and storage controllers in tabular format
sudo lshw -class disk -class storage -short
# save all network interfaces to an html file
sudo lshw -class network -html > {{interfaces.html}}
# view the pinout information and gpio header diagram for the current raspberry pi
pinout
# open https//pinout.xyz/ in the default broswer
pinout -x
# show a list with information about currently existing ethernet bridges
sudo brctl show
# create a new ethernet bridge interface
sudo brctl add {{bridge_name}}
# delete an existing ethernet bridge interface
sudo brctl del {{bridge_name}}
# add an interface to an existing bridge
sudo brctl addif {{bridge_name}} {{interface_name}}
# remove an interface from an existing bridge
sudo brctl delif {{bridge_name}} {{interface_name}}
# create a fat filesystem inside partition 1 on device b (`sdb1`)
mkfs.fat {{/dev/sdb1}}
# start the apache daemon. throw a message if it is already running
sudo apache2ctl start
# stop the apache daemon
sudo apache2ctl stop
# restart the apache daemon
sudo apache2ctl restart
# test syntax of the configuration file
sudo apache2ctl -t
# list loaded modules
sudo apache2ctl -M
# apply settings (according to the actual power source)
sudo tlp start
# apply battery settings (ignoring the actual power source)
sudo tlp bat
# apply ac settings (ignoring the actual power source)
sudo tlp ac
# display a description from a man page
whatis {{command}}
# don't cut the description off at the end of the line
whatis --long {{command}}
# display descriptions for all commands matching a glob
whatis --wildcard {{net*}}
# search man page descriptions with a regular expression
whatis --regex '{{wish[0-9]\.[0-9]}}'
# open cmus into the specified directory (this will become your new working directory)
cmus {{path/to/directory}}
# add file/directory to library
:add {{path/to/file_or_directory}}
# pause/unpause current song
c
# toggle shuffle mode on/off
s
# quit cmus
q
# open a text file
kwrite {{path/to/file}}
# open multiple text files
kwrite {{file1 file2 ...}}
# open a text file with a specific encoding
kwrite --encoding={{UTF-8}} {{path/to/file}}
# open a text file and navigate to a specific line and column
kwrite --line {{line_number}} --column {{column_number}} {{path/to/file}}
# determine the current domain
runcon
# specify the domain to run a command in
runcon -t {{domain}}_t {{command}}
# specify the context role to run a command with
runcon -r {{role}}_r {{command}}
# specify the full context to run a command with
runcon {{user}}_u:{{role}}_r:{{domain}}_t {{command}}
# disable a module
sudo a2dismod {{module}}
# don't show informative messages
sudo a2dismod --quiet {{module}}
# create a ntfs filesystem inside partition 1 on device b (`sdb1`)
mkfs.ntfs {{/dev/sdb1}}
# create filesystem with a volumelabel
mkfs.ntfs -L {{volume_label}} {{/dev/sdb1}}
# create filesystem with specific uuid
mkfs.ntfs -U {{UUID}} {{/dev/sdb1}}
# compare files
diff3 {{file1}} {{file2}} {{file3}}
# show all changes, outlining conflicts
diff3 --show-all {{file1}} {{file2}} {{file3}}
# extract an archive into the current directory
ark --batch {{archive}}
# change extraction directory
ark --batch --destination {{path/to/directory}} {{archive}}
# create an archive if it does not exist and add files to it
ark --add-to {{archive}} {{file1}} {{file2}}
# print the count of unread articles
feedreader --unreadCount
# add a url for a feed to follow
feedreader --addFeed={{feed_url}}
# grab a specific article using its url
feedreader --grabArticle={{article_url}}
# download all images from a specific article
feedreader --url={{feed_url}} --grabImages={{article_path}}
# play media from a url
feedreader --playMedia={{article_url}}
# show ascii aliases of a character
ascii {{a}}
# show ascii aliases in short, scriptfriendly mode
ascii -t {{a}}
# show ascii aliases of multiple characters
ascii -s {{tldr}}
# show ascii table in decimal
ascii -d
# show ascii table in hexadecimal
ascii -x
# show ascii table in octal
ascii -o
# show ascii table in binary
ascii -b
# show options summary and complete ascii table
ascii
# update symlinks and rebuild the cache (usually run when a new library is installed)
sudo ldconfig
# update the symlinks for a given directory
sudo ldconfig -n {{path/to/directory}}
# print the libraries in the cache and check whether a given library is present
ldconfig -p | grep {{library_name}}
# add a new version for a nonmaintainer upload to the changelog
debchange --nmu
# add a changelog entry to the current version
debchange --append
# add a changelog entry to close the bug with specified id
debchange --closes {{bug_id}}
# open a new window and connect to multiple ssh servers
mssh {{user@host1}} {{user@host2}} {{...}}
# open a new window and connect to a group of servers predefined in `~/.mssh_clusters`
mssh --alias {{alias_name}}
# set the max number of counts before a filesystem is checked to 2
tune2fs -c {{2}} {{/dev/sdXN}}
# set the filesystem label to my_label
tune2fs -L {{'MY_LABEL'}} {{/dev/sdXN}}
# enable discard and userspecified extended attributes for a filesystem
tune2fs -o {{discard,user_xattr}} {{/dev/sdXN}}
# enable journaling for a filesystem
tune2fs -o^{{nobarrier}} {{/dev/sdXN}}
# list installed packages and their versions
pkginfo -i
# list files owned by a package
pkginfo -l {{package_name}}
# list the owner(s) of files matching a pattern
pkginfo -o {{pattern}}
# print the footprint of a file
pkginfo -f {{file}}
# show full table of all rpc services registered on localhost
rpcinfo
# show concise table of all rpc services registered on localhost
rpcinfo -s {{localhost}}
# display table of statistics of rpcbind operations on localhost
rpcinfo -m
# display list of entries of given service name (mountd) and version number (2) on a remote nfs share
rpcinfo -l {{remote_nfs_server_ip}} {{mountd}} {{2}}
# delete the registration for version 1 of the mountd service for all transports
rpcinfo -d {{mountd}} {{1}}
# generate a coverage report named `file.cpp.gcov`
gcov {{path/to/file.cpp}}
# write individual execution counts for every basic block
gcov --all-blocks {{path/to/file.cpp}}
# write branch frequencies to the output file and print summary information to stdout as a percentage
gcov --branch-probabilities {{path/to/file.cpp}}
# write branch frequencies as the number of branches taken, rather than the percentage
gcov --branch-counts {{path/to/file.cpp}}
# do not create a `gcov` output file
gcov --no-output {{path/to/file.cpp}}
# write file level as well as function level summaries
gcov --function-summaries {{path/to/file.cpp}}
# bind a raw character device to a block device
raw /dev/raw/raw{{1}} {{/dev/block_device}}
# query an existing binding instead of setting a new one
raw /dev/raw/raw{{1}}
# query all bound raw devices
raw -qa
# search block devices by filesystem label
findfs LABEL={{label}}
# search by filesystem uuid
findfs UUID={{uuid}}
# search by partition label (gpt or mac partition table)
findfs PARTLABEL={{partition_label}}
# search by partition uuid (gpt partition table only)
findfs PARTUUID={{partition_uuid}}
# run a command in a specific chroot
schroot --chroot {{chroot}} {{command}}
# run a command with options in a specific chroot
schroot --chroot {{chroot}} {{command}} -- {{command_options}}
# run a command in all available chroots
schroot --all {{command}}
# start an interactive shell within a specific chroot as a specific user
schroot --chroot {{chroot}} --user {{user}}
# list available chroots
schroot --list
# list partitions
sudo fdisk -l
# start the partition manipulator
sudo fdisk {{/dev/sdX}}
# once partitioning a disk, create a partition
n
# once partitioning a disk, select a partition to delete
d
# once partitioning a disk, view the partition table
p
# once partitioning a disk, write the changes made
w
# once partitioning a disk, discard the changes made
q
# once partitioning a disk, open a help menu
m
# list network interfaces and their associated ip addresses
ip address
# filter to show only active network interfaces
ip address show up
# display information about a specific network interface
ip address show dev {{eth0}}
# add an ip address to a network interface
ip address add {{ip_address}} dev {{eth0}}
# remove an ip address from a network interface
ip address delete {{ip_address}} dev {{eth0}}
# delete all ip addresses in a given scope from a network interface
ip address flush dev {{eth0}} scope {{global|host|link}}
# calculate the current compression ratio for a file or directory
sudo compsize {{path/to/file_or_directory}}
# don't traverse filesystem boundaries
sudo compsize --one-file-system {{path/to/file_or_directory}}
# show raw byte counts instead of humanreadable sizes
sudo compsize --bytes {{path/to/file_or_directory}}
# display a report for a specific file
filefrag {{path/to/file}}
# display a report for spaceseparated list of files
filefrag {{path/to/file1}} {{path/to/file2}}
# display a report using a 1024 byte blocksize
filefrag -b {{path/to/file}}
# sync the file before requesting the mapping
filefrag -s {{path/to/files}}
# display mapping of extended attributes
filefrag -x {{path/to/files}}
# display a report with verbose information
filefrag -v {{path/to/files}}
# build a linux ext2 filesystem on a partition
mkfs {{path/to/partition}}
# build a filesystem of a specified type
mkfs -t {{ext4}} {{path/to/partition}}
# build a filesystem of a specified type and check for bad blocks
mkfs -c -t {{ntfs}} {{path/to/partition}}
# list all local system locks
lslocks
# list locks with defined column headers
lslocks --output {{PID}},{{COMMAND}},{{PATH}}
# list locks producing a raw output (no columns), and without column headers
lslocks --raw --noheadings
# list locks by pid input
lslocks --pid {{PID}}
# list locks with json output to stdout
lslocks --json
# set the keyboard in french azerty
setxkbmap {{fr}}
# set multiple keyboard layouts, their variants and switching option
setxkbmap -layout {{us,de}} -variant {{,qwerty}} -option {{'grp:alt_caps_toggle'}}
# get help
setxkbmap -help
# list all layouts
localectl list-x11-keymap-layouts
# list variants for the layout
localectl list-x11-keymap-variants {{de}}
# list available switching options
localectl list-x11-keymap-options | grep grp:
# open a text file
gedit {{path/to/file}}
# open multiple text files
gedit {{file1 file2 ...}}
# open a text file with a specific encoding
gedit --encoding={{UTF-8}} {{path/to/file}}
# display a list of supported encodings
gedit --list-encodings
# execute command with specified argument(s) and save its output to log file
logsave {{path/to/logfile}} {{command}}
# take input from standard input and save it in a log file
logsave {{logfile}} -
# append the output to a log file, instead of replacing its current contents
logsave -a {{logfile}} {{command}}
# show verbose output
logsave -v {{logfile}} {{command}}
# create a block device
sudo mknod {{path/to/device_file}} b {{major_device_number}} {{minor_device_number}}
# create a character device
sudo mknod {{path/to/device_file}} c {{major_device_number}} {{minor_device_number}}
# create a fifo (queue) device
sudo mknod {{path/to/device_file}} p
# create a device file with default selinux security context
sudo mknod -Z {{path/to/device_file}} {{type}} {{major_device_number}} {{minor_device_number}}
# list all partitions
sudo blkid
# list all partitions in a table, including current mountpoints
sudo blkid -o list
# launch the moc terminal ui
mocp
# launch the moc terminal ui in a specific directory
mocp {{path/to/directory}}
# start the moc server in the background, without launching the moc terminal ui
mocp --server
# add a specific song to the play queue while moc is in the background
mocp --enqueue {{path/to/audio_file}}
# add songs recursively to the play queue while moc is in the background
mocp --append {{path/to/directory}}
# clear the play queue while moc is in the background
mocp --clear
# play or stop the currently queued song while moc is in the background
mocp --{{play|stop}}
# stop the moc server while it's in the background
mocp --exit
# create a debian stable release system inside the `debianroot` directory
sudo debootstrap stable {{path/to/debian-root/}} http://deb.debian.org/debian
# create an ubuntu 20.04 system inside the `focalroot` directory with a local mirror
sudo debootstrap focal {{path/to/focal-root/}} {{file:///path/to/mirror/}}
# switch to a bootstrapped system
sudo chroot {{path/to/root}}
# list available releases
ls /usr/share/debootstrap/scripts/
# display information about all cpus
lscpu
# display information in a table
lscpu --extended
# display only information about offline cpus in a table
lscpu --extended --offline
# list all available record targets
pw-record --list-targets
# record a sample recording using the default target
pw-record {{path/to/file.wav}}
# record a sample recording at a different volume level
pw-record --volume={{0.1}} {{path/to/file.wav}}
# record a sample recording using a different sample rate
pw-record --rate={{6000}} {{path/to/file.wav}}
# trace the route to a host
tcptraceroute {{host}}
# specify the destination port and packet length in bytes
tcptraceroute {{host}} {{destination_port}} {{packet_length}}
# specify the local source port and source address
tcptraceroute {{host}} -p {{source_port}} -s {{source_address}}
# set the first and maximum ttl
tcptraceroute {{host}} -f {{first_ttl}} -m {{max_ttl}}
# specify the wait time and number of queries per hop
tcptraceroute {{host}} -w {{wait_time}} -q {{number_of_queries}}
# specify the interface
tcptraceroute {{host}} -i {{interface}}
# show the highscores
snake4scores
# get list of all groups
getent group
# see the members of a group
getent group {{group_name}}
# get list of all services
getent services
# find a username by uid
getent passwd 1000
# perform a reverse dns lookup
getent hosts {{host}}
# show a quick summary overview of the cluster
sinfo --summarize
# view the detailed status of all partitions across the entire cluster
sinfo
# view the detailed status of a specific partition
sinfo --partition {{partition_name}}
# view information about idle nodes
sinfo --states {{idle}}
# summarise dead nodes
sinfo --dead
# list dead nodes and the reasons why
sinfo --list-reasons
# output local customizations
semanage -S {{store}} -o {{path/to/output_file}}
# take a set of commands from a specified file and load them in a single transaction
semanage -S {{store}} -i {{path/to/input_file}}
# manage booleans. booleans allow the administrator to modify the confinement of processes based on the current configuration
semanage boolean -S {{store}} {{--delete|--modify|--list|--noheading|--deleteall}} {{-on|-off}} -F {{boolean|boolean_file}}
# manage policy modules
semanage module -S {{store}} {{--add|--delete|--list|--modify}} {{--enable|--disable}} {{module_name}}
# disable/enable dontaudit rules in policy
semanage dontaudit -S {{store}} {{on|off}}
# create a new tomb with an initial size of 100 mb
tomb dig -s {{100}} {{encrypted_directory.tomb}}
# create a new key file that can be used to lock a tomb; user will be prompted for a password for the key
tomb forge {{encrypted_directory.tomb.key}}
# forcefully create a new key, even if the tomb isn't allowing key forging (due to swap)
tomb forge {{encrypted_directory.tomb.key}} -f
# initialize and lock an empty tomb using a key made with `forge`
tomb lock {{encrypted_directory.tomb}} -k {{encrypted_directory.tomb.key}}
# mount a tomb (by default in `/media`) using its key, making it usable as a regular filesystem directory
tomb open {{encrypted_directory.tomb}} -k {{encrypted_directory.tomb.key}}
# close a tomb (fails if the tomb is being used by a process)
tomb close {{encrypted_directory.tomb}}
# forcefully close all open tombs, killing any applications using them
tomb slam all
# list all open tombs
tomb list
# open the filesystem in read only mode
debugfs {{/dev/sdXN}}
# open the filesystem in read write mode
debugfs -w {{/dev/sdXN}}
# read commands from a specified file, execute them and then exit
debugfs -f {{path/to/cmd_file}} {{/dev/sdXN}}
# view the filesystem stats in debugfs console
stats
# close the filesystem
close -a
# list all available commands
lr
# write a string to a dconf path (note the nested quotes)
dconf write {{/example/dconf/path}} "'{{Example Value}}'"
# write a boolean to a dconf path
dconf write {{/example/dconf/path}} {{true|false}}
# write an integer to a dconf path
dconf write {{/example/dconf/path}} {{16}}
# write an array to a dconf path
dconf write {{/example/dconf/path}} "[{{'My First Value', 'My Second Value'}}]"
# write an empty array to a dconf path
dconf write {{/example/dconf/path}} "@as []"
# generate a random number
mcookie
# generate a random number, using the contents of a file as a seed for the randomness
mcookie --file {{path/to/file}}
# generate a random number, using a specific number of bytes from a file as a seed for the randomness
mcookie --file {{path/to/file}} --max-size {{number_of_bytes}}
# print the details of the randomness used, such as the origin and seed for each source
mcookie --verbose
# read a man page for a command that is provided by a specified package name
debman -p {{package_name}} {{command_name}}
# specify a package version to download
debman -p {{package_name}}={{version}} {{command_name}}
# read a man page in a `.deb` file
debman -f {{path/to/filename.deb}} {{command_name}}
# setup a given partition as swap area
sudo mkswap {{/dev/sdb7}}
# use a given file as swap area
sudo mkswap {{path/to/file}}
# check a partition for bad blocks before creating the swap area
sudo mkswap -c {{/dev/sdb7}}
# specify a label for the file (to allow `swapon` to use the label)
sudo mkswap -L {{swap1}} {{path/to/file}}
# list files in a zip archive
atool --list {{path/to/archive.zip}}
# unpack a tar.gz archive into a new subdirectory (or current directory if it contains only one file)
atool --extract {{path/to/archive.tar.gz}}
# create a new 7zip archive with two files
atool --add {{path/to/archive.7z}} {{path/to/file1}} {{path/to/file2}}
# extract all zip and rar archives in the current directory
atool --each --extract {{*.zip}} {{*.rar}}
# submit a script with default settings (depends on torque settings)
qsub {{script.sh}}
# submit a script with a specified wallclock runtime limit of 1 hour, 2 minutes and 3 seconds
qsub -l walltime={{1}}:{{2}}:{{3}} {{script.sh}}
# submit a script that is executed on 2 nodes using 4 cores per node
qsub -l nodes={{2}}:ppn={{4}} {{script.sh}}
# submit a script to a specific queue. note that different queues can have different maximum and minimum runtime limits
qsub -q {{queue_name}} {{script.sh}}
# scan for bluetooth devices
hcitool scan
# output the name of a device, returning its mac address
hcitool name {{bdaddr}}
# fetch information about a remote bluetooth device
hcitool info {{bdaddr}}
# check the link quality to a bluetooth device
hcitool lq {{bdaddr}}
# modify the transmit power level
hcitool tpl {{bdaddr}} {{0|1}}
# display the link policy
hcitool lp
# request authentication with a specific device
hcitool auth {{bdaddr}}
# display local devices
hcitool dev
# display the neighbour/arp table entries
ip neighbour
# remove entries in the neighbour table on device `eth0`
sudo ip neighbour flush dev {{eth0}}
# perform a neighbour lookup and return a neighbour entry
ip neighbour get {{lookup_ip}} dev {{eth0}}
# add or delete an arp entry for the neighbour ip address to `eth0`
sudo ip neighbour {{add|del}} {{ip_address}} lladdr {{mac_address}} dev {{eth0}} nud reachable
# change or replace an arp entry for the neighbour ip address to `eth0`
sudo ip neighbour {{change|replace}} {{ip_address}} lladdr {{new_mac_address}} dev {{eth0}}
# generate a bug report about a specific package, then send it by email
reportbug {{package}}
# report a bug that is not about a specific package (general problem, infrastructure, etc.)
reportbug other
# write the bug report to a file instead of sending it by email
reportbug -o {{filename}} {{package}}
# create an ext2 filesystem in partition 1 of device b (`sdb1`)
mkfs.ext2 {{/dev/sdb1}}
# create an ext3 filesystem in partition 1 of device b (`sdb1`)
mkfs.ext3 {{/dev/sdb1}}
# create an ext4 filesystem in partition 1 of device b (`sdb1`)
mkfs.ext4 {{/dev/sdb1}}
# view current configuration
sudo nft list ruleset
# add a new table with family "inet" and table "filter"
sudo nft add table {{inet}} {{filter}}
# add a new chain to accept all inbound traffic
sudo nft add chain {{inet}} {{filter}} {{input}} \{ type {{filter}} hook {{input}} priority {{0}} \; policy {{accept}} \}
# add a new rule to accept several tcp ports
sudo nft add rule {{inet}} {{filter}} {{input}} {{tcp}} {{dport \{ telnet, ssh, http, https \} accept}}
# show rule handles
sudo nft --handle --numeric list chain {{family}} {{table}} {{chain}}
# delete a rule
sudo nft delete rule {{inet}} {{filter}} {{input}} handle {{3}}
# save current configuration
sudo nft list ruleset > {{/etc/nftables.conf}}
# list all captured core dumps
coredumpctl list
# list captured core dumps for a program
coredumpctl list {{program}}
# show information about the core dumps matching a program with `pid`
coredumpctl info {{PID}}
# invoke debugger using the last core dump of a program
coredumpctl debug {{program}}
# extract the last core dump of a program to a file
coredumpctl --output={{path/to/file}} dump {{program}}
# lock every console (require current user or root to unlock)
physlock
# mute kernel messages on console while locked
physlock -m
# disable sysrq mechanism while locked
physlock -s
# display a message before the password prompt
physlock -p "{{Locked!}}"
# fork and detach physlock (useful for suspend or hibernate scripts)
physlock -d
# display the attributes of the files in the current directory
lsattr
# list the attributes of files in a particular path
lsattr {{path}}
# list file attributes recursively in the current and subsequent directories
lsattr -R
# show attributes of all the files in the current directory, including hidden ones
lsattr -a
# display attributes of directories in the current directory
lsattr -d
# create a shared memory segment
ipcmk --shmem {{segment_size_in_bytes}}
# create a semaphore
ipcmk --semaphore {{element_size}}
# create a message queue
ipcmk --queue
# create a shared memory segment with specific permissions (default is 0644)
ipcmk --shmem {{segment_size_in_bytes}} {{octal_permissons}}
# start hardinfo
hardinfo
# print report to standard output
hardinfo -r
# save report to html file
hardinfo -r -f html > hardinfo.html
# connect to a remote host
rpcclient --user {{domain}}\{{username}}%{{password}} {{ip}}
# connect to a remote host on a domain without a password
rpcclient --user {{username}} --workgroup {{domain}} --no-pass {{ip}}
# connect to a remote host, passing the password hash
rpcclient --user {{domain}}\{{username}} --pw-nt-hash {{ip}}
# execute shell commands on a remote host
rpcclient --user {{domain}}\{{username}}%{{password}} --command {{semicolon_separated_commands}} {{ip}}
# display domain users
rpcclient $> enumdomusers
# display privileges
rpcclient $> enumprivs
# display information about a specific user
rpcclient $> queryuser {{username|rid}}
# create a new user in the domain
rpcclient $> createdomuser {{username}}
# save the current screen layout
autorandr -s {{profile_name}}
# show the saved profiles
autorandr
# change the profile
autorandr -l {{profile_name}}
# set the default profile
autorandr -d {{profile_name}}
# display cpu, disk, net, paging and system statistics
dstat
# display statistics every 5 seconds and 4 updates only
dstat {{5}} {{4}}
# display cpu and memory statistics only
dstat --cpu --mem
# list all available dstat plugins
dstat --list
# display the process using the most memory and most cpu
dstat --top-mem --top-cpu
# display battery percentage and remaining battery time
dstat --battery --battery-remain
# disable cpus via a list of cpu id numbers
chcpu -d {{1,3}}
# enable a set of cpus via a range of cpu id numbers
chcpu -e {{1-10}}
# print all available information
lsb_release -a
# print a description (usually the full name) of the operating system
lsb_release -d
# print only the operating system name (id), suppressing the field name
lsb_release -i -s
# print the release number and codename of the distribution, suppressing the field names
lsb_release -rcs
# print (trace) library calls of a program binary
ltrace ./{{program}}
# count library calls. print a handy summary at the bottom
ltrace -c {{path/to/program}}
# trace calls to malloc and free, omit those done by libc
ltrace -e malloc+free-@libc.so* {{path/to/program}}
# write to file instead of terminal
ltrace -o {{file}} {{path/to/program}}
# change a user's name
usermod -l {{newname}} {{user}}
# add user to supplementary groups (mind the whitespace)
usermod -a -G {{group1,group2}} {{user}}
# create a new home directory for a user and move their files to it
usermod -m -d {{path/to/home}} {{user}}
# list available scanners to ensure the target device is connected and recognized
scanimage -L
# scan an image and save it to a file
scanimage --format={{pnm|tiff|png|jpeg}} > {{path/to/new_image}}
# perform a bruteforce attack (mode 3) with the default hashcat mask
hashcat --hash-type {{hash_type_id}} --attack-mode {{3}} {{hash_value}}
# perform a bruteforce attack (mode 3) with a known pattern of 4 digits
hashcat --hash-type {{hash_type_id}} --attack-mode {{3}} {{hash_value}} "{{?d?d?d?d}}"
# perform a bruteforce attack (mode 3) using at most 8 of all printable ascii characters
hashcat --hash-type {{hash_type_id}} --attack-mode {{3}} --increment {{hash_value}} "{{?a?a?a?a?a?a?a?a}}"
# perform a dictionary attack (mode 0) using the rockyou wordlist of a kali linux box
hashcat --hash-type {{hash_type_id}} --attack-mode {{0}} {{hash_value}} {{/usr/share/wordlists/rockyou.txt}}
# perform a rulebased dictionary attack (mode 0) using the rockyou wordlist mutated with common password variations
hashcat --hash-type {{hash_type_id}} --attack-mode {{0}} --rules-file {{/usr/share/hashcat/rules/best64.rule}} {{hash_value}} {{/usr/share/wordlists/rockyou.txt}}
# perform a combination attack (mode 1) using the concatenation of words from two different custom dictionaries
hashcat --hash-type {{hash_type_id}} --attack-mode {{1}} {{hash_value}} {{/path/to/dictionary1.txt}} {{/path/to/dictionary2.txt}}
# show result of an already cracked hash
hashcat --show {{hash_value}}
# list currently installed modules
dkms status
# rebuild all modules for the currently running kernel
dkms autoinstall
# install version 1.2.1 of the acpi_call module for the currently running kernel
dkms install -m {{acpi_call}} -v {{1.2.1}}
# remove version 1.2.1 of the acpi_call module from all kernels
dkms remove -m {{acpi_call}} -v {{1.2.1}} --all
# create subvolume
sudo btrfs subvolume create {{path/to/subvolume}}
# list subvolumes
sudo btrfs subvolume list {{path/to/mount_point}}
# show space usage information
sudo btrfs filesystem df {{path/to/mount_point}}
# enable quota
sudo btrfs quota enable {{path/to/subvolume}}
# show quota
sudo btrfs qgroup show {{path/to/subvolume}}
# calibrate power usage measurements
sudo powertop --calibrate
# generate html power usage report in the current directory
sudo powertop --html={{power_report.html}}
# tune to optimal settings
sudo powertop --auto-tune
# display attributes of a process
chrt --pid {{PID}}
# display attributes of all threads of a process
chrt --all-tasks --pid {{PID}}
# display the min/max priority values that can be used with `chrt`
chrt --max
# set the scheduling policy for a process
chrt --pid {{PID}} --{{deadline|idle|batch|rr|fifo|other}}
# check if zram is enabled
lsmod | grep -i zram
# enable zram with a dynamic number of devices (use `zramctl` to configure devices further)
sudo modprobe zram
# enable zram with exactly 2 devices
sudo modprobe zram num_devices={{2}}
# find and initialise the next free zram device to a 2 gb virtual drive using lz4 compression
sudo zramctl --find --size {{2GB}} --algorithm {{lz4}}
# list currently initialised devices
zramctl
# kill inprogress connections at a specified interface, host and port
tcpkill -i {{eth1}} host {{192.95.4.27}} and port {{2266}}
# display basic performance counter stats for a command
perf stat {{gcc hello.c}}
# display systemwide realtime performance counter profile
sudo perf top
# run a command and record its profile into `perf.data`
sudo perf record {{command}}
# read `perf.data` (created by `perf record`) and display the profile
sudo perf report
# trace all program executions occurring on the system
sudo extrace
# run a command and only trace descendants of this command
sudo extrace {{command}}
# print the current working directory of each process
sudo extrace -d
# resolve the full path of each executable
sudo extrace -l
# display the user running each process
sudo extrace -u
# synchronize all packages
emerge --sync
# update all packages, including dependencies
emerge -uDNav @world
# resume a failed updated, skipping the failing package
emerge --resume --skipfirst
# install a new package, with confirmation
emerge -av {{package_name}}
# remove a package, with confirmation
emerge -Cav {{package_name}}
# remove orphaned packages (that were installed only as dependencies)
emerge -avc
# search the package database for a keyword
emerge -S {{keyword}}
# list all the available wacom devices. the device name is in the first column
xsetwacom list
# set wacom area to specific screen. get name of the screen with `xrandr`
xsetwacom set "{{device_name}}" MapToOutput {{screen}}
# set mode to relative (like a mouse) or absolute (like a pen) mode
xsetwacom set "{{device_name}}" Mode "{{Relative|Absolute}}"
# rotate the input (useful for tabletpc when rotating screen) by 0|90|180|270 degrees from "natural" rotation
xsetwacom set "{{device_name}}" Rotate {{none|half|cw|ccw}}
# set button to only work when the tip of the pen is touching the tablet
xsetwacom set "{{device_name}}" TabletPCButton "on"
# list all networkmanager connections (shows name, uuid, type and device)
nmcli connection
# activate a connection by specifying a uuid
nmcli connection up uuid {{uuid}}
# deactivate a connection
nmcli connection down uuid {{uuid}}
# create an autoconfigured dual stack connection
nmcli connection add ifname {{interface_name}} type {{ethernet}} ipv4.method {{auto}} ipv6.method {{auto}}
# create a static ipv6only connection
nmcli connection add ifname {{interface_name}} type {{ethernet}} ip6 {{2001:db8::2/64}} gw6 {{2001:db8::1}} ipv6.dns {{2001:db8::1}} ipv4.method {{ignore}}
# create a static ipv4only connection
nmcli connection add ifname {{interface_name}} type {{ethernet}} ip4 {{10.0.0.7/8}} gw4 {{10.0.0.1}} ipv4.dns {{10.0.0.1}} ipv6.method {{ignore}}
# create a vpn connection using openvpn from a ovpn file
nmcli connection import type {{openvpn}} file {{path/to/vpn_config.ovpn}}
# display a list of missing language packages based on installed software and enabled locales
check-language-support
# list packages for a specific locale
check-language-support --language {{en}}
# display installed packages as well as missing ones
check-language-support --show-installed
# power off the system
poweroff
# halt the system (same as `halt`)
poweroff --halt
# reboot the system (same as `reboot`)
poweroff --reboot
# shut down immediately without contacting the system manager
poweroff --force --force
# write the wtmp shutdown entry without shutting down the system
poweroff --wtmp-only
# open a new window of the default browser
sensible-browser
# open a url in the default browser
sensible-browser {{url}}
# display signatures for specified device
sudo wipefs {{/dev/sdX}}
# wipe all available signatures for specified device
sudo wipefs --all {{/dev/sdX}}
# perform dry run
sudo wipefs --all --no-act {{/dev/sdX}}
# force wipe, even if the filesystem is mounted
sudo wipefs --all --force {{/dev/sdX}}
# open a menu of available flashcard decks for selection
flash
# display the program version
flash -v
# display information about the flashcard system
flash -i
# display a list of available commands
flash -h
# change the previewer from default `bat` to `cat`
flash -p {{cat}}
# connect to an ftp server
lftp {{ftp.example.com}}
# download multiple files (glob expression)
mget {{path/to/*.png}}
# upload multiple files (glob expression)
mput {{path/to/*.zip}}
# delete multiple files on the remote server
mrm {{path/to/*.txt}}
# rename a file on the remote server
mv {{original_filename}} {{new_filename}}
# download or update an entire directory
mirror {{path/to/remote_dir}} {{path/to/local_output_dir}}
# upload or update an entire directory
mirror -R {{path/to/local_dir}} {{path/to/remote_output_dir}}
# synchronize and update all packages
pacman --sync --refresh --sysupgrade
# list only the explicitly installed packages and versions
pacman --query --explicit
# list orphan packages (installed as dependencies but not actually required by any package)
pacman --query --unrequired --deps --quiet
# empty the entire pacman cache
pacman --sync --clean --clean
# get the hostname of the computer
hostnamectl
# set the hostname of the computer
sudo hostnamectl set-hostname "{{hostname}}"
# set a pretty hostname for the computer
sudo hostnamectl set-hostname --static "{{hostname.example.com}}" && sudo hostnamectl set-hostname --pretty "{{hostname}}"
# reset hostname to its default value
sudo hostnamectl set-hostname --pretty ""
# update the list of available packages and slackbuilds
spi --update
# install a package or slackbuild
spi --install {{package/slackbuild_name}}
# upgrade all installed packages to the latest versions available
spi --upgrade
# locate packages or slackbuilds by package name or description
spi {{search_terms}}
# display information about a package or slackbuild
spi --show {{package/slackbuild_name}}
# purge the local package and slackbuild caches
spi --clean
# set up a vpn tunnel
wg-quick up {{interface_name}}
# delete a vpn tunnel
wg-quick down {{interface_name}}
# overwrite free space and inodes of a disk with 38 writes (slow but secure)
sfill {{/path/to/mounted_disk_directory}}
# overwrite free space and inodes of a disk with 6 writes (fast but less secure) and show status
sfill -l -v {{/path/to/mounted_disk_directory}}
# overwrite free space and inodes of a disk with 1 write (very fast but insecure) and show status
sfill -ll -v {{/path/to/mounted_disk_directory}}
# overwrite only free space of a disk
sfill -I {{/path/to/mounted_disk_directory}}
# overwrite only free inodes of a disk
sfill -i {{/path/to/mounted_disk_directory}}
# show filesystem usage (optionally run as root to show detailed information)
btrfs filesystem usage {{path/to/btrfs_mount}}
# show usage by individual devices
sudo btrfs filesystem show {{path/to/btrfs_mount}}
# defragment a single file on a btrfs filesystem (avoid while a deduplication agent is running)
sudo btrfs filesystem defragment -v {{path/to/file}}
# defragment a directory recursively (does not cross subvolume boundaries)
sudo btrfs filesystem defragment -v -r {{path/to/directory}}
# force syncing unwritten data blocks to disk(s)
sudo btrfs filesystem sync {{path/to/btrfs_mount}}
# summarize disk usage for the files in a directory recursively
sudo btrfs filesystem du --summarize {{path/to/directory}}
# start the logical volume manager interactive shell
sudo lvm
# list the logical volume manager commands
sudo lvm help
# initialize a drive or partition to be used as a physical volume
sudo lvm pvcreate {{/dev/sdXY}}
# display information about physical volumes
sudo lvm pvdisplay
# create a volume group called vg1 from the physical volume on `/dev/sdxy`
sudo lvm vgcreate {{vg1}} {{/dev/sdXY}}
# display information about volume groups
sudo lvm vgdisplay
# create a logical volume with size 10g from volume group vg1
sudo lvm lvcreate -L {{10G}} {{vg1}}
# display information about logical volumes
sudo lvm lvdisplay
# start nethogs as root (default device is eth0)
sudo nethogs
# monitor bandwidth on specific device
sudo nethogs {{device}}
# monitor bandwidth on multiple devices
sudo nethogs {{device1}} {{device2}}
# specify refresh rate
sudo nethogs -t {{seconds}}
# install a new package
guix package -i {{package_name}}
# remove a package
guix package -r {{package_name}}
# search the package database for a regular expression
guix package -s "{{search_pattern}}"
# list installed packages
guix package -I
# list generations
guix package -l
# roll back to the previous generation
guix package --roll-back
# start a snake game
snake4
# choose level
{{1|2|3|4|5}}
# pause game
Spacebar
# quit game
q
# show the high scores
snake4 --highscores
# discover lxi devices on available networks
lxi discover
# capture a screenshot, detecting a plugin automatically
lxi screenshot --address {{ip_address}}
# capture a screenshot using a specified plugin
lxi screenshot --address {{ip_address}} --plugin {{rigol-1000z}}
# send an scpi command to an instrument
lxi scpi --address {{ip_address}} "{{*IDN?}}"
# run a benchmark for request and response performance
lxi benchmark --address {{ip_address}}
# display smb shares and permissions on a host, prompting for user's password or ntlm hash
smbmap -u {{username}} --prompt -H {{ip}}
# display smb shares and permissions on a host, specifying the domain and passing the password ntlm hash
smbmap -u {{username}} --prompt -d {{domain}} -H {{ip}}
# display smb shares and list a single level of directories and files
smbmap -u {{username}} --prompt -H {{ip}} -r
# display smb shares and recursively list a defined number of levels of directories and files
smbmap -u {{username}} --prompt -H {{ip}} -R --depth {{3}}
# display smb shares and recursively list directories and files, downloading the files matching a regular expression
smbmap -u {{username}} --prompt -H {{ip}} -R -A {{pattern}}
# display smb shares and recursively list directories and files, searching for file content matching a regular expression
smbmap -u {{username}} --prompt -H {{ip}} -R -F {{pattern}}
# execute a shell command on a remote system
smbmap -u {{username}} --prompt -H {{ip}} -x {{command}}
# upload a file to a remote system
smbmap -u {{username}} --prompt -H {{ip}} --upload {{source}} {{destination}}
# print how long the current user has been connected in hours
ac
# print how long users have been connected in hours
ac --individual-totals
# print how long a particular user has been connected in hours
ac --individual-totals {{username}}
# print how long a particular user has been connected in hours per day (with total)
ac --daily-totals --individual-totals {{username}}
# also display additional details
ac --compatibility
# wait for the user to make a selection and output its geometry to standard output
slop
# double click, rather than click and drag, to draw a selection
slop -D
# highlight the selection rather than outlining it
slop -l
# specify the output format
slop -f {{format_string}}
# specify the selection rectangle's color
slop -c {{red}},{{green}},{{blue}},{{alpha}}
# disown the current job
disown
# disown a specific job
disown %{{job_number}}
# disown all jobs
disown -a
# keep job (do not disown it), but mark it so that no future sighup is received on shell exit
disown -h %{{job_number}}
# report stats for all quotas in use
sudo repquota -all
# report quota stats for all users, even those who aren't using any of their quota
sudo repquota -v {{filesystem}}
# report on quotas for users only
repquota --user {{filesystem}}
# report on quotas for groups only
sudo repquota --group {{filesystem}}
# report on used quota and limits in a humanreadable format
sudo repquota --human-readable {{filesystem}}
# report on all quotas for users and groups in a humanreadable format
sudo repquota -augs
# display the most recent login of all users
lastlog
# display lastlog record of the specified user
lastlog -u {{username}}
# display records before 7 days ago
lastlog -b {{7}}
# display records more recent than 3 days
lastlog -t {{3}}
# execute a process in a given cgroup with given controller
cgexec -g {{controller}}:{{cgroup_name}} {{process_name}}
# increase a volume's size to 120 gb
lvextend --size {{120G}} {{logical_volume}}
# increase a volume's size by 40 gb as well as the underlying filesystem
lvextend --size +{{40G}} -r {{logical_volume}}
# increase a volume's size to 100% of the free physical volume space
lvextend --size {{100}}%FREE {{logical_volume}}
# get a running process' cpu affinity by pid
taskset --pid --cpu-list {{pid}}
# set a running process' cpu affinity by pid
taskset --pid --cpu-list {{cpu_id}} {{pid}}
# start a new process with affinity for a single cpu
taskset --cpu-list {{cpu_id}} {{command}}
# start a new process with affinity for multiple nonsequential cpus
taskset --cpu-list {{cpu_id_1}} {{cpu_id_2}} {{cpu_id_3}}
# start a new process with affinity for cpus 1 through 4
taskset --cpu-list {{cpu_id_1}},{{cpu_id_4}}
# output a summary of the last 2 months, days, and alltime
vnstati --summary --iface {{network_interface}} --output {{path/to/output.png}}
# output the 10 most trafficintensive days of all time
vnstati --top10 --iface {{network_interface}} --output {{path/to/output.png}}
# output monthly traffic statistics from the last 12 months
vnstati --months --iface {{network_interface}} --output {{path/to/output.png}}
# output hourly traffic statistics from the last 24 hours
vnstati --hours --iface {{network_interface}} --output {{path/to/output.png}}
# display information about all physical volumes
sudo pvdisplay
# display information about the physical volume on drive `/dev/sdxy`
sudo pvdisplay {{/dev/sdXY}}
# enter the bluetoothctl shell
bluetoothctl
# list devices
bluetoothctl -- devices
# pair a device
bluetoothctl -- pair {{mac_address}}
# remove a device
bluetoothctl -- remove {{mac_address}}
# connect a paired device
bluetoothctl -- connect {{mac_address}}
# disconnect a paired device
bluetoothctl -- disconnect {{mac_address}}
# show information for job
scontrol show job {{job_id}}