TLDR Book
TLDR Book
am start -n {{com.android.settings/.Settings}}
am start -a {{android.intent.action.MAIN}} -c
{{android.intent.category.HOME}}
bugreport
bugreportz
Generate a zipped Android bug report.
bugreportz
bugreportz -p
bugreportz -v
• Display help:
bugreportz -h
cmd
Android service manager.
cmd -l
cmd {{alarm}}
dumpsys
dumpsys {{service}}
dumpsys -l
dumpsys {{service}} -h
dumpsys -t {{seconds}}
getprop
Show information about Android system properties.
getprop
getprop {{prop}}
getprop {{ro.build.version.sdk}}
getprop {{ro.build.version.release}}
getprop {{ro.vendor.product.model}}
getprop {{ro.oem_unlock_supported}}
getprop {{ro.boot.wifimacaddr}}
input
Send event codes or touchscreen gestures to an Android device.
logcat
logcat -f {{path/to/file}}
pkg upgrade
• Install a package:
• Uninstall a package:
• Reinstall a package:
pm list packages
pm list packages -s
pm list packages -3
pm path {{app}}
settings
Get information about the Android OS.
wm {{size}}
wm {{density}}
Common
2to3
Automated Python 2 to 3 code conversion.
• Display the changes that would be performed without performing them (dry-run):
2to3 {{path/to/file.py}}
• Convert all Python 2 language features except the specified ones to Python 3:
• Display a list of all available language features that can be converted from Python
2 to Python 3:
2to3 --list-fixes
7z a {{path/to/archive.7z}} {{path/to/file_or_directory}}
7z x {{path/to/archive.7z}}
7z x {{path/to/archive.7z}} -o{{path/to/output}}
7z x {{path/to/archive.7z}} -so
7z a -t{{7z|bzip2|gzip|lzip|tar|zip}} {{path/to/archive.7z}}
{{path/to/file_or_directory}}
7z l {{path/to/archive.7z}}
7z i
7za
File archiver with a high compression ratio.
7za x {{path/to/archive.7z}}
7za l {{path/to/archive.7z}}
7za i
7zr
File archiver with a high compression ratio.
7zr x {{path/to/archive.7z}}
7zr l {{path/to/archive.7z}}
7zr i
[
Check file types and compare values.
[ -n "${{variable}}" ]
[ -z "${{variable}}" ]
[ -f {{path/to/file}} ]
[ -d {{path/to/directory}} ]
[ -e {{path/to/file_or_directory}} ]
[[
Check file types and compare values.
[[ -n ${{variable}} ]]
[[ -z ${{variable}} ]]
[[ -f {{path/to/file}} ]]
[[ -d {{path/to/directory}} ]]
[[ -e {{path/to/file_or_directory}} ]]
aapt
Android Asset Packaging Tool.
• Create a new APK archive with files from the specified directory:
ab -n {{100}} {{url}}
• Execute 100 HTTP POST requests to a URL, using a JSON payload from a file:
• Use HTTP [K]eep Alive, i.e. perform multiple requests within one HTTP session:
ab -k {{url}}
ab -t {{60}} {{url}}
abduco
Terminal session manager.
• List sessions:
abduco
abduco -A {{name}}
Ctrl + \
• Search for files containing a string or regular expression in the current directory
recursively:
ack "{{search_pattern}}"
• Search for lines matching a pattern, printing [o]nly the matched text and not the
rest of the line:
ack -o "{{search_pattern}}"
• Print the file names and the number of matches for each file only:
ack --help-types
acme.sh --dns
Use a DNS-01 challenge to issue a TLS certificate.
• Issue a certificate while disabling automatic Cloudflare / Google DNS polling after
the DNS record is added by specifying a custom wait time in seconds:
• Issue a certificate for multiple domains using standalone mode using port 80:
• Install certificate files into the specified locations (useful for automatic certificate
renewal):
act -l
act
act {{event_type}}
act -a {{action_id}}
act -n
act -v
acyclic
Make a directed graph acyclic by reversing some edges.
acyclic -v -n {{path/to/input.gv}}
acyclic -?
adb install
Android Debug Bridge Install: Push packages to an Android emulator instance or
connected Android devices.
• Quickly update an installed package by only updating the parts of the APK that
changed:
• Remove all reverse socket connections from all emulators and devices:
adb shell
Some subcommands such as adb shell have their own usage documentation.
• Check whether the adb server process is running and start it:
adb start-server
adb kill-server
adb shell
adb devices
AdGuardHome
A network-wide software for blocking ads & tracking.
AdGuardHome
• Find files containing "foo", and print the line matches in context:
ag {{foo}}
ag {{foo}} {{path/to/directory}}
ag -l {{foo}}
• Find files containing "FOO" case-insensitively, and print only the match, rather
than the whole line:
ag -i -o {{FOO}}
ag {{foo}} -G {{bar}}
ag '{{^ba(r|z)$}}'
ag -g {{foo}}
agate
A simple server for the Gemini network protocol.
• Run server:
agate {{path/to/file}}
• Display help:
agate -h
age
A simple, modern and secure file encryption tool.
• Generate a key pair, saving the private key to an unencrypted file and printing the
public key to stdout:
• Encrypt a file with one or more public keys that are entered as literals:
• Encrypt a file with one or more public keys that are specified in a recipients file:
sudo airmon-ng
airpaste
• Send text:
• Send a file:
• Receive a file:
airpaste {{channel_name}}
ajson
Executes JSONPath on JSON objects.
alacritty
alacritty -e {{command}}
• Run with live config reload enabled (can also be enabled by default in
alacritty.yml):
It helps you find gender favouring, polarising, race related, religion inconsiderate, or
other unequal phrasing in text.
alex
alex {{textfile.md}}
Aliases expire with the current shell session unless defined in the shell's configuration
file, e.g. ~/.bashrc.
alias
alias {{word}}="{{command}}"
alias {{word}}
unalias {{word}}
• Find subdomains of a domain and actively verify them attempting to resolve the
found subdomains:
• Show the difference between the last two enumerations of the specified domain:
• Show the difference between a certain point in time and the last enumeration:
• Generate a Gephi Graph Exchange XML Format (GEXF) file based on database
data:
amass -version
amass -help
amass {{subcommand}}
androguard
Reverse engineering tool for Android applications. Written in Python.
ansible-doc --list
ansible-doc {{plugin_name}}
• Install a role:
• Remove a role:
ansible-galaxy list
ansible-inventory --list
ansible-playbook {{playbook}}
• Run tasks in playbook with extra variables defined via the command-line:
ansible-pull -U {{repository_url}}
• Pull a playbook from a VCS at a specific branch and execute a specific playbook:
• Pull a playbook from a VCS, specify hosts file and execute a specific playbook:
• Create a new encrypted vault file using a vault key file to encrypt it:
ansible-vault encrypt_string
Some subcommands such as ansible galaxy have their own usage documentation.
• Display a forecast using metric units for the next five days for Rzeszow, Poland:
• Display a forecast showing symbols and daylight data for your current location:
• Display a forecast showing wind and humidity data for your current location:
ant
ant -f {{buildfile.xml}}
ant -p
ant -d
ant -k
antibody
The fastest shell plugin manager.
antibody update
antibody list
apg
Creates arbitrarily complex random passwords.
apg
• Create a password with at least 1 symbol (S), 1 number (N), 1 uppercase (C), 1
lowercase (L):
apg -M SNCL
apg -m {{16}}
apg -x {{16}}
• Create a password that doesn't appear in a dictionary (the dictionary file has to be
provided):
apg -r {{dictionary_file}}
apktool
Reverse engineer APK files.
apktool d {{file.apk}}
apktool b {{path/to/directory}}
apktool if {{framework.apk}}
apm
Atom editor Package Manager.
See atom.
• Remove packages/themes:
• Upgrade packages/themes:
apropos {{regular_expression}}
apropos -l {{regular_expression}}
ar -x {{path/to/file.a}}
ar -t {{path/to/file.a}}
ar -s {{path/to/file.a}}
arc diff
arc list
arc amend
arc land
arch
Display the name of the system architecture.
arch
arduino-builder
A command-line tool for compiling arduino sketches.
• Compile a sketch:
• Build a sketch:
• Build a sketch, put the build results in the build directory, and reuse any previous
build results in that directory:
arduino --save-prefs
aria2
This command is an alias of aria2c.
tldr aria2c
aria2c
Fast download utility.
aria2c {{url}}
• Download the file pointed to by the specified URI with the specified output name:
• Download from multiple sources with each URI pointing to the same file:
arp-scan --localnet
arp-scan {{192.168.1.1}}/{{24}}
arp-scan {{127.0.0.0}}-{{127.0.0.31}}
arp-scan {{10.0.0.0}}:{{255.255.255.0}}
arp
Show and manipulate your system's ARP cache.
arp -a
sudo arp -a -d
arp -d {{address}}
arping {{host_ip}}
arping -f {{host_ip}}
arping -U {{ip_to_broadcast}}
• Extract an archive:
asciidoctor {{path/to/file.adoc}}
asciinema auth
• Make a new recording (once finished, user will be prompted to upload it or save it
locally):
asciinema rec
• Make a new recording, limiting any idle time to at most 2.5 seconds:
asdf plugin-list-all
• Install a plugin:
Supports loading of 40+ 3D file formats, and exporting to several popular 3D formats.
assimp listext
assimp listexport
• Convert a file to one of the supported output formats, using the default
parameters:
• Convert a file using custom parameters (the dox_cmd.h file in assimp's source code
lists available parameters):
assimp help
• Scan a repository:
astronomer {{tldr-pages/tldr-node-client}}
Upon running, a copy of the original file is created with an ".orig" appended to the
original file name.
• Apply the default style of 4 spaces per indent and no formatting changes:
astyle {{source_file}}
Service atd (or atrun) should be running for the actual executions.
at now + 5 minutes
atom {{path/to/file_or_directory}}
atom -n {{path/to/file_or_directory}}
• Open Atom in safe mode (does not load any additional packages):
atom --safe
• Prevent Atom from forking into the background, keeping Atom attached to the
terminal:
atom --foreground
• Wait for Atom window to close before returning (useful for Git commit editor):
atom --wait
atoum
A simple, modern and intuitive unit testing framework for PHP.
atoum --init
atoum
atoum -c {{path/to/file}}
atoum -f {{path/to/file}}
atoum -d {{path/to/directory}}
atoum -t {{tag}}
atq
• Show jobs from queue named 'a' (queues have single-character names):
atq -q {{a}}
sudo atq
atrm
Remove jobs scheduled by at or batch commands.
atrm {{10}}
auditd
auditd -d
auditd -l
autoflake
A tool to remove unused imports and variables from Python code.
• Remove unused variables from a single file and display the diff:
• Remove unused imports from multiple files and display the diffs:
• Remove unused variables recursively from all files in a directory, overwriting each
file:
j {{pattern}}
• Jump to a sub-directory (child) of the current directory that contains the given
pattern:
jc {{pattern}}
• Open a directory that contains the given pattern in the operating system file
manager:
jo {{pattern}}
j --purge
j -s
autopep8
Format Python code according to the PEP 8 style guide.
Auto-reconnects to keep port forwarding tunnels up. Accepts all ssh flags.
• Start an SSH session, restarting when a monitoring port fails to return data:
• Fork autossh into the background before executing ssh and don't open a remote
shell:
• Run in the background, with no monitoring port, and instead send SSH keep-alive
packets every 10 seconds to detect failure:
• Run in the background, with no monitoring port and no remote shell, exiting if the
port forward fails:
• Run in the background, logging autossh debug output and ssh verbose output to
files:
AUTOSSH_DEBUG=1 AUTOSSH_LOGFILE={{path/to/
autossh_log_file.log}} autossh -f -M {{monitor_port}} -v -E
{{path/to/ssh_log_file.log}} {{ssh_command}}
avo
The official command-line interface for Avo.
avo init
avo login
avo pull
avo status
avo conflict
avo edit
avrdude -p \?
avrdude -c \?
awk
A versatile programming language for working on files.
• Print the second column of the lines containing "foo" in a space-separated file:
• Print the last column of each line in a file, using a comma (instead of space) as a
field separator:
• Sum the values in the first column of a file and print the total:
awk '{if ($1 == "foo") print "Exact match foo"; else if ($1 ~
"bar") print "Partial match bar"; else print "Baz"}'
{{filename}}
• Print all lines where the 10th column value equals the specified value :
• Print all the lines which the 10th column value is between a min and a max :
• Create an AWS cost and usage report definition from a JSON file:
Provides secure and resizable computing capacity in the AWS cloud to enable faster
development and deployment of applications.
• Create a repository:
• Delete a repository:
• List jobs:
• Start a job:
• List triggers:
• Start a trigger:
• Log in with Google SSO using the IDP and SP identifiers and set the credentials
duration to one hour:
aws-google-auth -u {{example@example.com}} -I
{{$GOOGLE_IDP_ID}} -S {{$GOOGLE_SP_ID}} -d {{3600}}
• Log in [a]sking which role to use (in case of several available SAML roles):
aws-google-auth -u {{example@example.com}} -I
{{$GOOGLE_IDP_ID}} -S {{$GOOGLE_SP_ID}} -d {{3600}} -a
aws-google-auth -u {{example@example.com}} -I
{{$GOOGLE_IDP_ID}} -S {{$GOOGLE_SP_ID}} -d {{3600}} -a --
resolve-aliases
aws-google-auth -h
aws help
Display help information about the AWS CLI.
• Display help:
aws help
• Show aws iam help page (including all available iam commands):
• List users:
• List policies:
• List groups:
• Get a shard iterator for reading from the oldest message in a stream's shard:
• Run a function:
• List functions:
• List datasets:
• List users:
• List groups:
• List dashboards:
• Display who has access to the dataset and what kind of actions they can perform
on the dataset:
• Stop instance:
• Start instance:
• Reboot an instance:
• Delete an instance:
aws rds delete-db-instance --db-instance-identifier
{{instance_identifier}} --final-db-snapshot-identifier
{{snapshot_identifier}} --delete-automated-backups
aws s3
CLI for AWS S3 - provides storage through web services interfaces.
aws s3 ls {{bucket_name}}
aws s3 rm s3://{{bucket}}/{{path/to/file}}
• Create a bucket:
• Delete a bucket:
• List buckets:
• List the objects inside of a bucket and only show each object's key and size:
• Download object from a bucket (The output file is always the last argument):
• Create a secret:
• Delete a secret:
• Retrieve the value of a secret (to get the latest version of the secret omit --
version-stage):
• Delete a specific receipt rule set (the currently active rule set cannot be deleted):
• Send an email:
aws-vault list
awslogs groups
• Get logs for any streams in the specified group between 1 and 2 hours ago:
axel {{url}}
az account list
az account list-locations
az appconfig list
Part of azure-cli.
az bicep install
az bicep upgrade
az bicep version
az bicep list-versions
az bicep uninstall
az config
Manage Azure CLI configuration.
Part of azure-cli.
az config get
• Set a configuration:
• Unset a configuration:
Part of azure-cli.
az feedback
az lock
Manage Azure locks.
Part of azure-cli.
az lock list
• Log in interactively:
az login
az login --identity
Part of azure-cli.
az logout
Part of azure-cli.
• List network resources in a region that are used against a subscription quota:
az network list-usages
Part of azure-cli.
• List pipelines:
Part of azure-cli.
Part of azure-cli.
Part of azure-cli.
Part of azure-cli.
Part of azure-cli.
az vm list
• Create an UbuntuServer 18.04 LTS Virtual Machine and generate ssh keys:
az vm image list
az
The official CLI tool for Microsoft Azure.
• Log in to Azure:
az login
az account
az disk list
az vm list
az aks
az network
b2sum
Calculate BLAKE2 cryptographic checksums.
b2sum {{path/to/file}}
• Read a file of BLAKE2 sums and filenames and verify all files have matching
checksums:
b2sum -c {{path/to/file.b2}}
{{some_command}} | b2sum
babel
A transpiler which converts code from JavaScript ES6/ES7 syntax to ES5 syntax.
babel {{path/to/file}}
babel {{path/to/input_directory}}
babel --help
badblocks
Search a device for bad blocks.
Some usages of badblocks can cause destructive actions, such as erasing all data on a
disk, including the partition table.
• Search an unmounted disk for bad blocks with a non-destructive read-write test:
• Search an unmounted disk for bad blocks with a destructive write test:
• Search an unmounted disk for bad blocks with a destructive write test and show
verbose status:
• Search an unmounted disk in destructive mode and output found blocks to a file:
balena login
balena apps
balena devices
bandwhich --addresses
bandwhich --show-dns
bandwhich --total-utilization
banner
base32
Encode or decode file or standard input to/from Base32, to standard output.
• Encode a file:
base32 {{filename}}
• Decode a file:
{{somecommand}} | base32
• Encode the contents of a file as base64 and write the result to stdout:
base64 {{filename}}
• Decode the base64 contents of a file and write the result to stdout:
{{somecommand}} | base64
basename {{path/to/file}}
basename {{path/to/directory/}}
• Show only the file name from a path, with a suffix removed:
bash
bash -c "{{command}}"
• Execute a script:
bash {{path/to/script.sh}}
bash -x {{path/to/script.sh}}
bash -e {{path/to/script.sh}}
bash -s
• Print the Bash version ($BASH_VERSION contains the version without license
information):
bash --version
bashmarks
Save and jump to commonly used directories using 1 character commands.
s {{bookmark_name}}
• Go to a bookmarked directory:
g {{bookmark_name}}
p {{bookmark_name}}
• Delete a bookmark:
d {{bookmark_name}}
bastet
Clone of the game Tetris in the terminal.
bastet
Enter
Ctrl + C
bat
Print and concatenate files.
bat {{file}}
bat -n {{file}}
bat --list-languages
batch
Execute commands at a later time when the system load levels permit.
Service atd (or atrun) should be running for the actual executions.
batch
batch -f {{path/to/file}}
bc
An arbitrary precision calculator language.
bc
bc --mathlib
• Calculate an expression:
• Execute a script:
bc {{path/to/script.bc}}
• Write each block and block-cutvertex tree to multiple numbered filenames based
on output.gv:
bcomps -?
beanstalkd
A simple and generic work-queue server.
beanstalkd
beanstalkd -b {{path/to/persistence_directory}}
Used to intersect, group, convert and count data in BAM, BED, GFF/GTF, VCF format.
• Intersect two files regarding the sequences' strand and save the result to the
specified file:
• Intersect two files with a left outer join, i.e. report each feature from {{file_1}} and
NULL if no overlap with {{file_2}}:
• Group file {{path/to/file}} based on the first three and the fifth column and
summarize the sixth column by summing it up:
• Find for all features in {{file_1}}.bed the closest one in {{file_2}}.bed and write their
distance in an extra column (input files must be sorted):
behat --init
behat
behat --suite={{suite_name}}
behat --definitions
berks
Chef cookbook dependency manager.
berks install
betty version
• Download a file:
• Play Spotify:
betty go crazy
bfg
Remove large files or passwords from Git history like git-filter-branch.
Note: if your repository is connected to a remote, you will need to force push to it.
• Remove a file with sensitive data but leave the latest commit untouched:
• Remove all text mentioned in the specified file wherever it can be found in the
repository's history:
• Resume the most recently suspended job and run it in the background:
bg
• Resume a specific job (use jobs -l to get its ID) and run it in the background:
bg %{{job_id}}
bison
GNU parser generator.
bison {{path/to/file.y}}
• Compile in debug mode, which causes the resulting parser to write additional
information to the standard output:
bison --verbose
bitcoin-cli
Command-line client to interact with the Bitcoin daemon via RPC calls.
bitcoin-cli getwalletinfo
bitcoin-cli listunspent
black {{path/to/file_or_directory}}
black -c "{{code}}"
• Perform a dry run (print what would be done without actually doing it):
• Auto-format a file or directory without replacing single quotes with double quotes
(adoption helper, avoid using this for new projects):
blackfire config
blackfire agent
blackfire status
blender
Command-line interface to the Blender 3D computer graphics application.
• Render an animation using a specific image naming pattern, in a path relative (//)
to the .blend file:
• Render the animation of a specific scene, starting at frame 10 and ending at frame
500:
• Start an interactive Blender session in the terminal with a python console (do
import bpy after starting):
blender --background --python-console
blockout2
Tetris like game in 3D.
blockout2
{{Q|W|E|A|S|D}}
Spacebar
p
bmaptool
Create or copy block maps intelligently (designed to be faster than cp or dd).
boot repl
boot jar
boot dev
boot prod
bootctl
Control EFI firmware boot settings and manage boot loader.
• Set a flag to boot into the system firmware on the next boot (similar to sudo
systemctl reboot --firmware-setup):
• Specify the path to the EFI system partition (defaults to /efi/, /boot/ or /
boot/efi):
• Remove all installed versions of systemd-boot from the EFI system partition:
• Prune a repository by deleting all archives older than 7 days, listing changes:
• List environments:
bosh environments
• List deployments:
• Upload stemcell:
bower install
bower list
bower init
box compile
box info
box validate
box help
brew bundle
Bundler for Homebrew, Homebrew Cask and the Mac App Store.
brew bundle
• Install a cask:
• Upgrade an installed cask (if no cask name is given, all installed casks are
upgraded):
• Uninstall a cask:
• Install the latest stable version of a formula or cask (use --devel for
development versions):
brew list
• Upgrade an installed formula or cask (if none is given, all installed formulae/casks
are upgraded):
• Fetch the newest version of Homebrew and of all formulae and casks from the
Homebrew source repository:
brew update
• Show formulae and casks that have a more recent version available:
brew outdated
• Search for available formulae (i.e. packages) and casks (i.e. native packages):
brew doctor
brotli
Compress/uncompress files with Brotli compression.
brotli {{file.ext}}
brotli -d {{file.ext}}.br
• Start a server from local directory, watching all CSS files in a directory:
browser-sync init
bshell
bshell --ssh
bshell --vnc
bshell --domain={{domain}}
bssh
A GUI tool for browsing for SSH/VNC servers on the local network.
bssh
bssh --vnc
bssh --shell
bssh --domain={{domain}}
btm
An alternative to top.
• Show the default layout (CPU, memory, temperatures, disk, network, and
processes):
btm
• Enable basic mode, removing charts and condensing data (similar to top):
btm --basic
btm --dot_marker
btm --battery
• Refresh every 250 milliseconds and show the last 30 seconds in the charts:
• Delete a bookmark:
• Install all gems defined in the Gemfile expected in the working directory:
bundle install
• Update all gems by the rules defined in the Gemfile and regenerate
Gemfile.lock:
bundle update
• Update one or more specific gems(s) defined in the Gemfile but only to the next
patch version:
bundle outdated
bundler is a common name for the command bundle, but not a command itself.
tldr bundle
bundletool dump
Command-line tool to manipulate Android Application Bundles.
• Display the configuration and values for a specific resource using the ID:
• Generate APKs including only one single APK for universal usage:
bup -d {{path/to/repository}} ls
buzzphrase
bvnc
bvnc --ssh
bvnc --shell
bvnc --domain={{domain}}
bw
A CLI to access and manage a Bitwarden vault.
bw login
bw logout
bzgrep --{{context|before-context|after-context}}={{3}}
"{{search_pattern}}" {{path/to/file}}
• Search for lines matching a pattern, printing only the matched text:
• Compress a file:
bzip2 {{path/to/file_to_compress}}
• Decompress a file:
bzip2 -d {{path/to/compressed_file.bz2}}
c99 {{file.c}}
c99 -c {{file.c}}
• Compile source file(s), link with object file(s), and create an executable:
Manage Haskell projects and Cabal packages from the Hackage package repository.
cabal init
cabal build
cabal test
caddy
A powerful, enterprise-ready, open source web server with automatic HTTPS, written in
Go.
caddy run
caddy start
caddy stop
• Run a simple file server on the specified port with a browsable interface:
• Display basic information about the current app and available commands:
cake
cake routes
cake server
cake console
calendar
Display upcoming events from a calendar file.
• Show events for today and tomorrow (or the weekend on Friday) from the default
calendar:
calendar
calendar -A {{30}}
calendar -B {{7}}
calendar -f {{path/to/file}}
calibre-server
A server application that can be used to distribute e-books over a network.
Note: e-books must already be imported into the library using the GUI or the
calibredb CLI.
calibre-server
calibredb list
• Remove one or more e-books from the library. You need the e-book IDs (see
above):
carbon-now {{file}}
carbon-now --from-clipboard
{{input}} | carbon-now
• Create images interactively for custom settings and optionally save a preset:
carbon-now -i {{file}}
• Build the package or packages defined by the Cargo.toml manifest file in the
local path:
cargo build
cargo clippy
• Build the package or packages defined by the Cargo.toml manifest file in the
current working directory:
cargo rustc
Some subcommands such as cargo build have their own usage documentation.
• Install a crate:
cargo build
• Build using a specific number of threads (default is the number of CPU cores):
carp
carp -b {{path/to/file.carp}}
carp -x {{path/to/file.carp}}
cat {{file}}
cat -n {{file}}
cat -v -t -e {{file}}
cbonsai
Cbonsai is a beautifully random bonsai tree CLI generator.
cbonsai -l
cbonsai -i
cbonsai -m "{{message}}"
cbonsai -v
cbonsai -h
ccomps
Decompose graphs into their connected components.
• Print the number of nodes, edges, and connected components in one or more
graphs:
ccomps -?
cd
Change the current working directory.
cd {{path/to/directory}}
cd
cd ..
cd -
cdk
A CLI for AWS Cloud Development Kit (CDK).
cdk ls
• Synthesize and print the CloudFormation template for the specified stack(s):
• Compare the specified stack with the deployed stack or a local CloudFormation
template:
• Create a new CDK project in the current directory for a specified language:
cdk doc
cf
Command-line tool to manage apps and services on Cloud Foundry.
cf push {{app_name}}
cf marketplace
• Run a script whose code is included in the app, but runs independently:
cf ssh {{app_name}}
chars '{{ß}}'
chars {{U+1F63C}}
chars {{10}}
chars "{{^C}}"
cheat
Create and view interactive cheat sheets on the command-line.
cheat {{command}}
cheat -e {{command}}
cheat -l
cheat -s {{command}}
cheat -v
Chezmoi
A multi-machine dotfile manager, written in Go.
chezmoi init
chezmoi diff
chezmoi -v apply
chezmoi update
chgrp
Change group ownership of files and directories.
chisel server
• Run a chisel server that accepts authenticated connections using username and
password:
• Connect to a Chisel server and tunnel a specific port to a remote server and port:
• Connect to a Chisel server and tunnel a specific host and port to a remote server
and port:
• Give the [u]ser who owns a file the right to e[x]ecute it:
• Give [o]thers (not in the file owner's group) the same rights as the [g]roup:
chmod o= {{file}}
• Change permissions recursively giving [g]roup and [o]thers the ability to [w]rite:
• Recursively give [a]ll users [r]ead permissions to files and e[X]ecute permissions to
sub-directories within a directory:
choose {{4}}
• Print the first, 3rd, and 5th item from a line, where items are separated by ':'
instead of whitespace:
• Print everything from the 2nd to 5th item on the line, including the 5th:
choose {{1}}:{{4}}
• Print everything from the 2nd to 5th item on the line, excluding the 5th:
choose :{{2}}
• Print all items from the beginning of the line until the 3rd item (exclusive):
• Print all items from the 3rd to the end of the line:
choose {{2}}:
choose {{-1}}
chown
Change user and group ownership of files and directories.
• Highlight a source file with the Go lexer and output to an HTML file:
• Highlight a source file with the C++ lexer and output to an SVG, using the Monokai
style:
• Open a file:
chromium {{path/to/file.html}}
• Open a URL:
chromium {{example.com}}
chromium --app='{{https://example.com}}'
chromium --proxy-server="{{socks5://hostname:66}}"
{{example.com}}
chroot
Run command or interactive shell with special root directory.
chroot --userspec={{user:group}}
chsh
Change the user's login shell.
chsh
chsh --list-shells
circo
Render an image of a circular network graph from a graphviz file.
Layouts: dot, neato, twopi, circo, fdp, sfdp, osage & patchwork.
• Render a png image with a filename based on the input filename and output
format (uppercase -O):
• Render a svg image with the specified output filename (lowercase -o):
• Render the output in ps, pdf, svg, fig, png, gif, jpg, json, or dot format:
• Display help:
circo -?
circup
The CircuitPython library updater.
circup update
circup freeze
circup freeze -r
cksum
Calculates CRC checksums and byte counts of a file.
cksum {{path/to/file}}
clamdscan
A command-line virus scanner using the ClamAV Daemon.
clamdscan {{path/to/file_or_directory}}
{{command}} | clamdscan -
clamdscan --infected
clamdscan --remove
clamdscan --multiscan
• Pass the file descriptor instead of streaming the file to the daemon:
clamdscan --fdpass
clamscan
A command-line virus scanner.
clamscan {{path/to/file}}
clamscan -r {{path/to/directory}}
{{command}} | clamscan -
clamscan --infected
Part of LLVM.
tldr clang++
clang-format
Tool to auto-format C/C++/Java/JavaScript/Objective-C/Protobuf/C# code.
clang-format {{path/to/file}}
clang-format -i {{path/to/file}}
clang-format --style={{LLVM|Google|Chromium|Mozilla|WebKit}}
{{path/to/file}}
• Format a file using the .clang-format file in one of the parent directories of the
source file:
clang-format --style={{LLVM|Google|Chromium|Mozilla|WebKit}}
--dump-config > {{.clang-format}}
clang-tidy
An LLVM-based C/C++ linter to find style violations, bugs and security flaws through
static analysis.
clang-tidy {{path/to/file.cpp}}
• Don't run any checks other than the cppcoreguidelines checks on a file:
clang -c {{input_source.c}}
clear
Clears the screen of the terminal.
clear
clear -x
• Indicate the type of terminal to clean (defaults to the value of the environment
variable TERM):
clear -T {{type_of_terminal}}
clear -V
clementine
A modern music player and library organizer.
• Open Clementine:
clementine
clementine {{url/or/path/to/file.ext}}
clementine --play-pause
• Stop playback:
clementine --stop
clementine --next
clementine --previous
• Start CliFM:
clifm
• Open the file or directory whose ELN (entry list number) is 12:
12
n file dir/
s *.png
• Remove the previously selected files (use t to send the files to the recycle bin
instead):
r sel
• Exit CliFM:
q
clj
Clojure tool to start a REPL or invoke a specific function with data.
clj
• Execute a function:
clj -X {{namespace/function_name}}
clj -P
cloc {{path/to/directory}}
• Count all the lines of code in a directory, displaying a progress bar during the
counting process:
• Ignore files that are ignored by VCS, such as files specified in .gitignore:
• Count all the lines of code in a directory, displaying the results for each file instead
of each language:
clockwork-cli
clockwork-cli {{path/to/directory}}
tldr clj
cloudflared
Command-line tool to create a persistent connection to the Cloudflare network.
• Establish a tunnel to a host in Cloudflare from the local server, without verifying
the local server's certificate:
cmake {{path/to/project_directory}}
• Generate a build recipe, with build type set to Release with CMake variable:
cmake {{path/to/project_directory}} -D
{{CMAKE_BUILD_TYPE=Release}}
• Install the build artifacts into /usr/local/ and strip debugging symbols:
• Install the build artifacts using the custom prefix for paths:
cmatrix -a
cmatrix -C {{red}}
cmatrix -r
cmatrix -u {{2}}
cmp
Compare two files byte by byte.
• Find the byte and line number of the first difference between two files:
• Open VS Code:
code
code .
code {{path/to/file_or_directory}}
• Check for typos in all text files in the current directory, recursively:
codespell
codespell --write-changes
• Skip files with names that match the specified pattern (accepts a comma-separated
list of patterns using wildcards):
• Use a custom dictionary file when checking (--dictionary can be used multiple
times):
codespell --check-filenames
coffee
Executes CoffeeScript scripts or compiles them into JavaScript.
• Run a script:
coffee {{path/to/file.coffee}}
coffee --interactive
tldr git-cola
colordiff
A tool to colorize diff output.
The Perl script colordiff is a wrapper for diff and produces the same output but with
pretty syntax highlighting. Colour schemes can be customized.
• Compare files:
colorls -1
colorls --all
• Long format list (permissions, ownership, size, and modification date) of all files:
colorls --dirs
colorpicker
A minimalist X11 colorpicker.
Any mouse gesture except left click will exit the program.
• Launch colorpicker and print the hexadecimal and RGB value of each clicked pixel
to stdout:
colorpicker
• Only print the color of one clicked pixel and then exit:
colorpicker --one-shot
• Print the color of each clicked pixel and quit when a key is pressed:
colorpicker --quit-on-keypress
colorpicker --rgb
colorpicker --hex
column
Format standard input or a file into multiple columns.
• Specify the column delimiter character for the --table option (e.g. "," for CSV)
(defaults to whitespace):
• Produce three tab-separated columns: lines only in first file, lines only in second
file and common lines:
• Print only lines common to both files, reading one file from stdin:
• Get lines only found in first file, saving the result to a third file:
• Print lines only found in second file, when the files aren't sorted:
command {{ls}}
• Display the path to the executable or the alias definition of a specific command:
command -v {{command_name}}
compare
View the difference between 2 images.
• Compare 2 images:
compgen -c
compgen -a
compgen -A function
compgen -k
composer init
composer install
• Update all the dependencies in this project's composer.json and note versions
in composer.lock file:
composer update
composer self-update
conan frogarian
Displays the conan frogarian.
conan frogarian
conan
The open source, decentralized and cross-platform package manager to create and share
all your native binaries.
Some subcommands such as conan frogarian have their own usage documentation.
• List remotes:
• Create a new environment named py39, and install Python 3.9 and NumPy v1.11
or above in it:
• Create a new environment with a specified name and install a given package:
Some subcommands such as conda create have their own usage documentation.
• Load an environment:
• Unload an environment:
conda {{deactivate}}
conda list
consul --version
consul --help
• Create a GIF from a series of images with 100ms delay between them:
• Convert filename encoding and rename the file to the new encoding:
copyq
copyq clipboard
• Insert text containing escape sequences ('\n', '\t') into the clipboard history:
copyq read 0 1 2
cordova info
core-validate-commit
core-validate-commit {{commit_hash}}
core-validate-commit --list
core-validate-commit --list-subsystem
core-validate-commit --tap
• Display help:
core-validate-commit --help
corepack
Zero-runtime-dependency package acting as bridge between Node projects and their
package managers.
• Add the Corepack shims to the Node.js installation directory to make them
available as global commands:
corepack enable
corepack disable
• Prepare the package manager configured for the project in the current path:
corepack prepare
• Generate a key-pair:
cosign generate-key-pair
• Start CouchDB:
couchdb
couchdb -i
couchdb -b
couchdb -k
couchdb -d
cowsay
Print ASCII art (by default a cow) saying or thinking something.
cowsay -l
cp {{path/to/source_file.ext}} {{path/to/target_file.ext}}
cp {{path/to/source_file.ext}} {{path/to/
target_parent_directory}}
cp -R {{path/to/source_directory}} {{path/to/
target_directory}}
• Copy a directory recursively, in verbose mode (shows files as they are copied):
• Copy text files to another location, in interactive mode (prompts user before
overwriting):
cp -i {{*.txt}} {{path/to/target_directory}}
cp -L {{link}} {{path/to/target_directory}}
cpdf
CLI to manipulate existing PDF files in a variety of ways.
• Select pages 1, 2, 3 and 6 from a source document and write those to a destination
document:
Supports the following archive formats: cpio's custom binary, old ASCII, new ASCII, crc,
HPUX binary, HPUX old ASCII, old tar, and POSIX.1 tar.
• Take a list of file names from standard input and add them [o]nto an archive in
cpio's binary format:
• Copy all files and directories in a directory and add them [o]nto an archive, in
[v]erbose mode:
• P[i]ck all files from an archive, generating [d]irectories where needed, in [v]erbose
mode:
Instead of syntax errors, it focuses on the types of bugs that compilers normally do not
detect.
• Recursively check the current directory, showing progress on the screen and
logging error messages to a file:
• Check a given file, specifying which tests to perform (by default only errors are
shown):
cppcheck --enable={{error|warning|style|performance|
portability|information|all}} {{path/to/file.cpp}}
cppcheck --errorlist
• Check the current directory, providing paths for include files located outside it
(e.g. external libraries):
cppcheck --project={{path/to/project.sln}}
cppclean
Find unused code in C++ projects.
cppclean {{path/to/project}}
• Run on a project where the headers are in the inc1/ and inc2/ directories:
cppclean {{main.cpp}}
cradle deploy s3
cradle install
• Update a package:
Some subcommands such as cradle install have their own usage documentation.
• Connect to a server:
cradle help
cradle {{command}}
croc
Send and receive files easily and securely over any network.
croc {{passphrase}}
croc relay
• Call a command and display its output if it returns a non-zero exit code:
cronic {{command}}
crontab
Schedule cron jobs to run on a time interval for the current user.
crontab -e
• Replace the current crontab with the contents of the given file:
crontab {{path/to/file}}
crontab -l
crontab -r
• Sample job which runs at 10:00 every day (* means any value):
0 10 * * * {{command_to_execute}}
* * 3 Apr * {{command_to_execute}}
30 2 * * Fri {{/absolute/path/to/script.sh}}
crunch
Wordlist generator.
• Output a list of all permutations of the given strings (lengths are not processed):
• Output a list of words generated according to the given pattern and a maximum
number of duplicate letters:
• Write a list of words in chunk files of a given size, starting with the given string:
• Write a list of words stopping with the given string and inverting the wordlist:
• Write a list of words in compressed chunk files with a specified number of words:
cryfs-unmount {{path/to/mount_point}}
cryfs --show-ciphers
crystal
Tool for managing Crystal source code.
crystal {{path/to/file.cr}}
crystal play
crystal help
csc
The Microsoft C# Compiler.
• Embed a resource:
• Specify an icon:
csh
csh -f
• Execute a [c]ommand:
csh -c "{{command}}"
• Execute a script:
csh {{path/to/script.csh}}
csslint
A linter for CSS code.
csslint {{file.css}}
csslint --list-rules
csslint --errors={{errors,universal-selector,imports}}
{{file.css}}
csslint --warnings={{box-sizing,selector-max,floats}}
{{file.css}}
Included in csvkit.
csvclean {{bad.csv}}
csvclean -n {{bad.csv}}
csvcut
Filter and truncate CSV files. Like Unix's cut command, but for tabular data.
Included in csvkit.
csvcut -n {{data.csv}}
• Extract the columns named "id" and "first name" (in that order):
Included in csvkit.
csvformat -T {{data.csv}}
csvformat -U 0 {{data.csv}}
csvformat -U 1 {{data.csv}}
csvgrep
Filter CSV rows with string and pattern matching.
Included in csvkit.
• Find rows in which the "name" column does NOT include the string "John Doe":
{{cmd}} -t {{filename.csv}}
{{cmd}} -H {{filename.csv}}
csvlook
Render a CSV file in the console as a fixed-width table.
Included in csvkit.
csvlook {{data.csv}}
csvpy
Loads a CSV file into a Python shell.
Included in csvkit.
csvpy {{data.csv}}
Included in csvkit.
Included in csvkit.
csvsql {{path/to/data.csv}}
Included in csvkit.
csvstat {{data.csv}}
• Extract lines from a CSV file where the second column exactly matches 'Foo':
• Extract lines from a CSV file where the second column starts with 'Bar':
• Find lines in a CSV file where the second column ends with 'Baz' and then extract
the third and sixth columns:
• Generate tags for a single file, and output them to a file named "tags" in the
current directory, overwriting the file if it exists:
ctags {{path/to/file}}
• Generate tags for all files in the current directory, and output them to a specific
file, overwriting the file if it exists:
ctags -f {{filename}} *
• Generate tags for all files in the current directory and all subdirectories:
ctags --recurse
ctest
CMake test driver program.
• Run all tests defined in the CMake project, executing 4 jobs at a time in parallel:
ctest -N
cups-config --version
cups-config --serverbin
cups-config --serverroot
cups-config --datadir
cups-config --help
cupsd
Server daemon for the CUPS print server.
cupsd
cupsd -f
cupsd -l
cupsd -c {{path/to/cupsd.conf}}
cupsd -s {{path/to/cups-files.conf}}
cupsd -t -c {{path/to/cupsd.conf}}
cupsd -t -s {{path/to/cups-files.conf}}
cupsd -h
curl
Transfers data from or to a server.
• Download a file, saving the output under the filename indicated by the URL:
• Pass client certificate and key for a resource, skipping certificate validation:
cut -c {{1-16}}
• Cut out the first sixteen characters of each line of the given files:
• Cut out everything from the 3rd character to the end of each line:
cut -c {{3-}}
• Cut out the fifth field of each line, using a colon as a field delimiter (default
delimiter is tab):
• Cut out the 2nd and 10th fields of each line, using a semicolon as a delimiter:
• Cut out the fields 3 through to the end of each line, using a space as a delimiter:
• Checkout a project:
• Add a file:
• Commit a file:
cvs update
d8
Developer shell for the V8 JavaScript engine.
d8
d8 {{path/to/file.js}}
d8 -e "{{code}}
daps
DAPS is an open source program for transforming DocBook XML into output formats
such as HTML or PDF.
• Display help:
daps --help
• Display version:
daps --version
darkhttpd
Darkhttpd web server.
darkhttpd {{path/to/docroot}}
• Start server on specified port (port 8080 by default if running as non-root user):
• Listen only on specified IP address (by default, the server listens on all interfaces):
dart test
dash
dash -c "{{command}}"
• Execute a script:
dash {{path/to/script.sh}}
• Run commands from a script, printing each command before executing it:
dash -x {{path/to/script.sh}}
dash -e {{path/to/script.sh}}
dash -s
date
Set or display the system date.
date +"%c"
date -u +"%Y-%m-%dT%H:%M:%SZ"
• Display the current date as a Unix timestamp (seconds since the Unix epoch):
date +%s
• Display a specific date (represented as a Unix timestamp) using the default format:
date -d @1473305798
• Display the current date using the RFC-3339 format (YYYY-MM-DD hh:mm:ss
TZ):
date --rfc-3339=s
• Set the current date using the format MMDDhhmmYYYY.ss (YYYY and .ss are
optional):
date {{093023592021.59}}
dc
An arbitrary precision calculator. Uses reverse polish notation (RPN).
dc
• Execute a script:
dc {{path/to/script.dc}}
• Calculate 4 times 5 (4 5 *), subtract 17 (17 -), and [p]rint the output:
dc --expression='4 5 * 17 - p'
dc --expression='7 k 5 _3 / p'
• Calculate the golden ratio, phi: set number of decimal places to 100 (100 k), square
root of 5 (5 v) plus 1 (1 +), divided by 2 (2 /), and [p]rint result:
dc --expression='100 k 5 v 1 + 2 / p'
dcfldd
Enhanced version of dd for forensics and security.
• Copy a disk to a raw image file and hash the image using SHA256:
• Start a wizard to choose what kind of code (e.g. module, service, form, etc.) to
generate:
dcg
dcg {{service|plugin|theme|module|form}}
Warning: uses 3rd-party web services for MD5, SHA1 and SHA2 hash lookups. For
sensitive data, use -s to avoid these services.
dcode "{{NjM3YTQyNzQ1YTQ0NGUzMg==}}"
• Reverse a string:
• Make a bootable USB drive from an isohybrid file (such like archlinux-
xxx.iso) and show the progress:
• Clone a drive to another drive with 4 MiB block, ignore error and show progress:
• Generate a system backup into an IMG file and show the progress:
dd if=/dev/{{drive_device}} of={{path/to/file.img}}
status=progress
dd if={{path/to/file.img}} of=/dev/{{drive_device}}
status=progress
decaffeinate {{path/to/file.coffee}}
declare {{variable}}="{{value}}"
declare -i {{variable}}="{{value}}"
declare -r {{variable}}="{{value}}"
declare -g {{variable}}="{{value}}"
deemix
A barebone deezer downloader library built from the ashes of Deezloader Remix.
deemix {{https://www.deezer.com/us/track/00000000}}
• Compare, rendering commit hashes, file names, and line numbers as hyperlinks,
according to the hyperlink spec for terminal emulators:
delta --show-config
delta --list-languages
deluge-console
An interactive interface for the Deluge BitTorrent client.
deluge-console
connect {{hostname}}:{{port}}
add {{url|magnet|path/to/file}}
info
info {{torrent_id}}
• Pause a torrent:
pause {{torrent_id}}
• Resume a torrent:
resume {{torrent_id}}
rm {{torrent_id}}
deluge
A command-line BitTorrent client.
• Download a torrent:
deluge {{url|magnet|path/to/file}}
deluged
deluged -p {{port}}
deluged -c {{path/to/configuration_file}}
deluged -l {{path/to/log_file}}
deno
A secure runtime for JavaScript and TypeScript.
deno
Note: The Go command dep with the same name is deprecated and archived.
• Interactively initialize deployer in the local path (use a framework template with
--template={{template}}):
dep init
dep rollback
• List commands:
dep list
It removes spaces and other such annoyances like duplicate underline characters.
detox {{file}}
• Show how detox would rename all the files in a directory tree:
• Remove spaces and other undesirable characters from all files in a directory tree:
detox -r {{directory}}
dexdump
Display information about Android DEX files.
dexdump {{path/to/file.apk}}
dexdump -f {{path/to/file.apk}}
dexdump -d {{path/to/file.apk}}
df
df -h
• Display the filesystem and its disk usage containing the given file or directory:
df {{path/to/file_or_directory}}
df -i
df -x {{squashfs}} -x {{tmpfs}}
dfc
Gives an overview of the filesystem disk space usage with colours and graphs.
• Display filesystems and their disk usage in human-readable form with colours and
graphs:
dfc
dfc -a
dfc -c never
dfc -t ext
dhclient
DHCP client.
dict -D
dict -i {{database_name}}
dict {{word}}
dict -I
diff
Compare files and directories.
• Compare files, showing the differences in unified format (as used by git diff):
• Create a patch file for Git from the differences of two text files, treating
nonexistent files as empty:
• Compare two files and write an HTML-report to a file (use - for stdout):
• Compare two directories excluding files with a name matching a specified pattern:
• Query a specific DNS record type associated with a given domain name:
dig -x {{8.8.8.8}}
• Find authoritative name servers for the zone and display SOA records:
• Perform iterative queries and display the entire trace path to resolve a domain
name:
• Launch Dillo:
dillo
dillo {{duckduckgo.com}}
dillo {{path/to/file_or_directory}}
dillo --fullwindow
• Display version:
dillo --version
• Display help:
dillo --help
dircolors
Output commands to set the LS_COLOR environment variable and style ls, dir, etc.
dircolors
dircolors {{file}}
dircolors --bourne-shell
dircolors --c-shell
dircolors --print-data
direnv
Shell extension to load and unload environment variables depending on the current
directory.
• Grant direnv permission to load the .envrc present in the current directory:
• Revoke the authorization to load the .envrc present in the current directory:
• Edit the .envrc file in the default text editor and reload the environment on exit:
direnv reload
direnv status
dirname
Calculates the parent directory of a given file or directory path.
dirname {{path/to/file_or_directory}}
• Delimit output with a NUL character instead of a newline (useful when combining
with xargs):
The directory stack is a list of recently visited directories that can be manipulated with
the pushd and popd commands.
dirs
dirs -p
dirs +{{N}}
dirs -c
dirsearch
Web path scanner.
• Scan a list of web servers for common paths with the .php extension:
diskonaut
diskonaut {{path/to/directory}}
• Show file sizes rather than their block usage on the disk:
diskonaut --disable-delete-confirmation
distccd
Server daemon for the distcc distributed compiler.
distccd --daemon
• Start a daemon with a lowered priority that can run a maximum of 4 tasks at a
time:
dive {{your_image_tag}}
django-admin --version
• Compile and begin debugging the main package in the current directory (by
default, with no arguments):
dlv debug
dlv test
doas {{command}}
doas -s
• Parse a config file and check if the execution of a command as another user is
allowed:
doas -L
docker build
Build an image from a Dockerfile.
docker build .
• Display help:
docker-compose ps
docker-compose up -d
docker-compose up --build
docker-compose stop
docker container ls
docker cp {{path/to/file_or_directory_on_host}}
{{container_name}}:{{path/to/file_or_directory_in_container}}
docker cp {{container_name}}:{{path/to/
file_or_directory_in_container}} {{path/to/
file_or_directory_on_host}}
• Copy a file or directory from the host to a container, following symlinks (copies the
symlinked files directly, not the symlinks themselves):
docker image ls
docker images
• Show help:
docker inspect
docker login
• Log into a registry with a specific username (user will be prompted for a
password):
• Print logs from a certain point in time of container execution (i.e. 23m, 10s,
2013-01-02T13:23:37):
docker-machine ls
• Start a machine:
• Stop a machine:
docker network ls
docker ps
docker ps --all
docker ps --latest
docker ps --filter="name={{name}}"
• Filter containers by status (created, running, removing, paused, exited and dead):
docker ps --filter="status={{status}}"
• Show help:
docker rmi
docker secret ls
docker service ls
docker-slim
• Lint a Dockerfile:
• Show help:
docker start
docker stats
• Remove a worker from the swarm (run inside the worker node):
docker swarm ca
• Show help:
docker system
docker system df
• Remove unused data created more than a specified amount of time in the past:
Some subcommands such as docker run have their own usage documentation.
docker ps --all
docker images
docker rm {{container_name}}
• Show the hourly API limit, progress towards it, and when the rate limit resets:
• Display help:
• Create an app:
• Get an app:
• Create a droplet:
• Delete a droplet:
• List droplets:
• Parse a project:
doctum parse
• Render a project:
doctum render
doctum update
Easily deploy multiple apps to your server in different languages using a single git-
push command.
dokku apps
• Create an app:
• Remove an app:
• Install plugin:
• Display the latest commits for each row of a table when the specified commit was
made:
• View help:
dolt branch
• Rename a branch:
• Duplicate a branch:
• Delete a branch:
• Switch to a branch:
• Clone a repository, using an AWS region (uses the profile's default region if none is
provided):
• Clone a repository, using an AWS credentials profile (uses the default profile if
none is provided):
• Commit all staged changes, opening the editor specified by $EDITOR to enter the
commit message:
dolt commit
• Use the specified ISO 8601 commit date (defaults to current date and time):
• List all local and global configuration options and their values:
Some subcommands such as dolt commit have their own usage documentation.
dolt {{subcommand}}
dolt help
dot
Render an image of a linear directed network graph from a graphviz file.
Layouts: dot, neato, twopi, circo, fdp, sfdp, osage & patchwork.
• Render a png image with a filename based on the input filename and output
format (uppercase -O):
• Render a svg image with the specified output filename (lowercase -o):
• Render the output in ps, pdf, svg, fig, png, gif, jpg, json, or dot format:
echo "{{digraph {this -> that} }}" | dot -T {{gif}} > {{path/
to/image.gif}}
• Display help:
dot -?
dotnet build
Builds a .NET application and its dependencies.
dotnet build
• Remove the last migration, rolling back the code changes that were done for the
latest migration:
• Publish the .NET Core runtime with your application for the specified runtime:
dotnet restore
• Force all dependencies to be resolved even if the last restore was successful:
Some subcommands such as dotnet build have their own usage documentation.
dotnet restore
dotnet run
• Run a packaged dotnet application (only needs the runtime, the rest of the
commands require the .NET Core SDK installed):
dotnet {{path/to/application.dll}}
doxygen
A documentation system for various programming languages.
doxygen -g
doxygen -g {{path/to/config_file}}
doxygen {{path/to/config_file}}
drill
Perform various DNS queries.
drill {{example.com}}
• Lookup the mail server(s) associated with a given domain name (MX record):
drill mx {{example.com}}
drill -x {{8.8.8.8}}
drupal-check {{path/to/directory}}
Some subcommands such as drupal check have their own usage documentation.
• Install a module:
• Uninstall a module:
drupal cache:rebuild
drupal site:status
drush
A command-line shell and scripting interface for Drupal.
drush en {{foo}}
drush cr
drush cc css-js
du
Disk usage: estimate and summarize file and directory space usage.
• List the sizes of a directory and any subdirectories, in the given unit (B/KiB/MiB):
du -{{b|k|m}} {{path/to/directory}}
• List the sizes of a directory and any subdirectories, in human-readable form (i.e.
auto-selecting the appropriate unit for each size):
du -h {{path/to/directory}}
du -sh {{path/to/directory}}
• List the human-readable sizes of a directory and of all the files and directories
within it:
du -ah {{path/to/directory}}
du -h --max-depth=N {{path/to/directory}}
• List the human-readable size of all .jpg files in subdirectories of the current
directory, and show a cumulative total at the end:
du -ch {{*/*.jpg}}
dua
Dua (Disk Usage Analyzer) is a tool to conveniently learn about the usage of disk space
of a given directory.
dua {{path/to/directory}}
dua --apparent-size
dua --count-hard-links
dua aggregate
dua interactive
dune build
dune clean
dune runtest
• Start the utop REPL with compiled modules automatically loaded into it, to
remove the need to load them by hand:
dune utop
duplicacy
A lock-free deduplication cloud backup tool.
• Use current directory as the repository, initialize a SFTP storage and encrypt the
storage with a password:
duplicacy backup
duplicacy list
duplicacy check
• Prune revisions, keeping one revision every n days for all revisions older than m
days:
FTP_PASSWORD={{ftp_login_password}}
PASSPHRASE={{encryption_password}} duplicity {{path/to/
source/directory}} {{ftps://user@hostname/target/directory/
path/}}
• Delete versions older than 1 year from a backup stored on a WebDAV share:
dust
dust --reverse
dust --no-percent-bars
dvc add
Add changed files to the index.
dvc checkout
dvc commit
• Get the config value for a specified key for the current project:
dvc dag
dvc destroy
• Compare DVC tracked files from different Git commits, tags, and branches w.r.t the
current workspace:
• Compare the changes in DVC tracked files from 1 Git commit to another:
• Fetch the latest changes from the default remote upstream repository (if set):
dvc fetch
This prevents DVC from tracking changes in stage dependencies and re-execution until
unfreeze.
• Garbage collect from the cache, keeping only versions referenced by the current
workspace:
dvc gc --workspace
• Garbage collect from the cache, keeping only versions referenced by branch, tags,
and commits:
• Garbage collect from the cache, including the default cloud remote storage (if set):
• Garbage collect from the cache, including a specific cloud remote storage:
dvc init
This allows DVC to start tracking changes in stage dependencies again after they were
frozen.
Some subcommands such as dvc commit have their own usage documentation.
dvc --version
dvc --help
dvc {{subcommand}}
dwebp
dwebp decompresses WebP files into PNG, PAM, PPM or PGM images.
• Convert a webp file, but also crop and scale at the same time:
• Convert a webp file and don't use in-loop filtering to speed up the decoding
process:
File optimizer written in C++. It supports .png, .jpg, .gzip and .zip files.
• Compress a file:
ect {{path/to/file.png}}
• Start ed, editing an empty document (which can be saved as a new file in the
current directory):
ed
ed -p :
• Start ed editing an existing file (this shows the byte count of the loaded file):
ed -p : {{path/to/file}}
• Toggle the printing of error explanations. (By default, explanations are not printed
and only a ? appears):
• Add text to the current document. Mark completion by entering a period by itself
in a new line:
a<Enter>{{text_to_insert}}<Enter>.
• Print the entire document (, is a shortcut to the range 1,$ which covers the start
to the end of the document):
,p
• Write the current document to a new file (the filename can be omitted if ed was
called with an existing file):
w {{filename}}
• Quit ed:
q
edgepaint
Colorize edges of a graph layout to clarify crossing edges.
• Colorize edges of one or more graph layouts (that already have layout information)
to clarify crossing edges:
• Lay out a graph and colorize its edges, then convert to a PNG image:
edgepaint -?
egrep
Find patterns in files using extended regular expression (supports ?, +, {}, () and |).
• Search for a pattern in all files recursively in a directory, ignoring binary files:
electrum listaddresses -a
• Sign a message:
• Verify a message:
electrum -p socks5:{{127.0.0.1}}:9050 -s
{{56ckl5obj37gypcu.onion}}:50001:t -1
elinks
A text based browser similar to lynx.
• Start elinks:
elinks
• Quit elinks:
Ctrl + C
• Dump output of webpage to console, colorizing the text with ANSI control codes:
elixir {{path/to/file}}
elixir -e "{{code}}"
elm
Compile and run Elm source files.
elm init
elm repl
• Start local web server that compiles Elm files on page load:
elm reactor
elvish
elvish -c "{{command}}"
elvish {{path/to/script.elv}}
elvish -version
emacs
The extensible, customizable, self-documenting, real-time display editor.
emacs {{path/to/file}}
emacs --no-window-system
emacs --daemon
• Stop a running Emacs server and all its instances, asking for confirmation on
unsaved files:
Ctrl + X, Ctrl + S
• Quit Emacs:
Ctrl + X, Ctrl + C
emacsclient
Open files in an existing Emacs server.
emacsclient {{path/to/file}}
• Stop a running Emacs server and all its instances, asking for confirmation on
unsaved files:
ember build
ember serve
ember test
emulator -help
• Display the webcams on your development computer that are available for
emulation:
• Start an emulator overriding the facing back camera setting (use -camera-front
for front camera):
• Detect file(s) encoding specifying a language in the POSIX/C locale format (e.g.
zh_CN, en_US):
See also fusermount, which can unmount filesystems mounted by this command.
• Generate a PostScript file with a landscape layout, splitting the page into columns
(maximum 9):
enscript --help-highlight
• Generate a PostScript file with syntax highlighting and color for a specified
language:
• Rebuild and test with make if any .c source files in the current directory change:
env
• Run a program. Often used in scripts after the shebang (#!) for looking up the path
to the program:
env {{program}}
env -i {{program}}
• Run a task:
• Process input with equations, saving the output for future typesetting with groff to
PostScript:
• Typeset an input file with equations to PDF using the [me] macro package:
• Compile and run sequential Erlang program as a common script and then exit:
• Bundle and minify a JSX application with source maps in production mode:
eslint --init
eslint --fix
• Check status:
espanso status
espanso restart
espeak
Uses text-to-speech to speak through the default sound device.
espeak -f {{filename}}
espeak -v {{voice}}
etcd
A distributed, reliable key-value store for the most critical data of a distributed system.
etcd
• Start a single-node etcd cluster, listening for client requests on a custom URL:
• Add a user:
eva
eval "{{foo=bar}}"
evil-winrm
Windows Remote Management (WinRM) shell for pentesting.
• Connect to a host:
PS > menu
PS > {{script.ps1}}
• Open a file:
ex {{path/to/file}}
wq<Enter>
undo<Enter>
/{{search_pattern}}<Enter>
%s/{{regular_expression}}/{{replacement}}/g<Enter>
• Insert text:
i<Enter>{{text}}<C-c>
• Switch to Vim:
visual<Enter>
exa
A modern replacement for ls (List directory contents).
exa --oneline
exa --all
• Long format list (permissions, ownership, size and modification date) of all files:
exa --git-ignore
exec
Replace the current process with another process.
• Replace with the specified command using the current environment variables:
• Replace with the specified command and login using the default shell:
• Replace with the specified command and change the process name:
exenv versions
exenv {{version}}
• Configure the application token and the preferred workspace for Exercism:
• Submit an exercise:
exercism workspace
exiftool
Read and write meta information in files.
• Move the date at which all photos in a directory were taken 1 hour forward:
• Move the date at which all JPEG photos in the current directory were taken 1 day
and 2 hours backward:
• Only change the DateTimeOriginal field subtracting 1.5 hours, without keeping
backups:
• Exit the shell with the exit code of the last command executed:
exit
exit {{exit_code}}
exiv2
Image metadata manipulation tool.
exiv2 {{path/to/file}}
exiv2 -P kt {{path/to/file}}
exiv2 -P kv {{path/to/file}}
exiv2 -d a {{path/to/file}}
exiv2 -d a -k {{path/to/file}}
• Rename the file, prepending the date and time from metadata (not from the file
timestamp):
expand {{file}}
expand
expand -i {{file}}
expand -t={{1,4,6}}
export
Command to mark shell variables in the current environment to be exported with any
newly forked child processes.
export {{VARIABLE}}={{value}}
export -n {{VARIABLE}}
export -f {{FUNCTION_NAME}}
export PATH=$PATH:{{path/to/append}}
expose
An open source tunnel application for sharing websites.
expose
expose --subdomain={{subdomain}}
expose serve
• Evaluate logical or math expression with an operator ('+', '-', '*', '&', '|', etc.). Special
symbols should be escaped:
exrex '{{regular_expression}}'
• Generate all possible strings that match a regular expression, joined by a custom
delimiter string:
• Print eyes:
exrex '{{[oO0](_)[oO0]}}'
• Print a boat:
• Fill a fake flash drive with a single partition that matches its real capacity:
f3read {{path/to/mount_point}}
f3write
Fill a drive out with .h2w files to test its real capacity.
f3write {{path/to/mount_point}}
factor {{number}}
fakedata --generators
• Generate data using a custom output template (the first letter of generator names
must be capitalized):
false
fast
Test your download and upload speed using fast.com.
fast
fast --upload
fast --single-line
fastboot
Communicate with connected Android devices when in bootloader mode (the one place
adb doesn't work).
• Reboot the device from fastboot mode into fastboot mode again:
fastboot devices
fc-cache
• Force a rebuild of all font cache files, without checking if cache is up-to-date:
fc-cache -f
• Erase font cache files, then generate new font cache files:
fc-cache -r
fc-list
List available fonts installed on the system.
fc-list
fc-list | wc -l
fc-match
Match available fonts.
fc
fc -e {{'emacs'}}
fc -l
fc -r
fc '{{416}}' '{{420}}'
fd
An alternative to find.
• Recursively find files matching the given pattern in the current directory:
fd {{pattern}}
fd {{'^foo'}}
fd --extension {{txt}}
fd {{pattern}} {{path/to/directory}}
Layouts: dot, neato, twopi, circo, fdp, sfdp, osage & patchwork.
• Render a png image with a filename based on the input filename and output
format (uppercase -O):
• Render a svg image with the specified output filename (lowercase -o):
• Render the output in ps, pdf, svg, fig, png, gif, jpg, json, or dot format:
echo "{{digraph {this -> that} }}" | fdp -T {{gif}} > {{path/
to/image.gif}}
• Display help:
fdp -?
fdroid
F-Droid build tool.
F-Droid is an installable catalog of FOSS (Free and Open Source Software) applications
for the Android platform.
fdroidcl update
fdupes {{directory}}
fdupes -r {{directory}}
• Search recursively for duplicates and display interactive prompt to pick which
ones to keep, deleting the others:
feh {{path/to/images}}
A configuration file is required to interpret the input and format the output.
• Select input structure and print format from definitions in ~/.fferc config file:
• Display help:
ffe --help
ffmpeg
Video conversion tool.
• Quickly extract a single frame from a video at time mm:ss and save it as a 128x128
resolution image:
• Trim a video from a given start time mm:ss to an end time mm2:ss2 (omit the -to
flag to trim till the end):
• Convert AVI video to MP4. AAC Audio @ 128kbit, h264 Video @ CRF 23:
• Convert MP4 video to VP9 codec. For the best quality, use a CRF value
(recommended range 15-35) and -b:video MUST be 0:
ffplay {{path/to/file}}
• Upload a file:
• Download a file:
fg
fg %{{job_id}}
fgrep
Matches fixed strings in files.
• Count the number of lines that match the given string in a file:
• Show the line number in the file along with the line matched:
• Display all lines except those that contain the search string:
• Display filenames whose content matches the search string at least once:
figlet {{input_text}}
• Use a font from the default font directory (the extension can be omitted):
{{command}} | figlet
showfigfonts {{optional_string_to_display}}
file
Determine file type.
• Give a description of the type of the specified file. Works fine for files with no file
extension:
file {{filename}}
• Look inside a zipped file and determine the file type(s) inside:
file -z {{foo.zip}}
file -s {{filename}}
• Don't stop at first file type match; keep going until the end of the file:
file -k {{filename}}
file -i {{filename}}
fin
Docksal command-line utility.
• Run a command for each file (use {} within the command to access the filename):
finger
finger {{username}}
• Display the user's login name, real name, terminal name, and other information:
finger -s
finger -l
• Prevent matching against user's names and only use login names:
finger -m
firebase
Test, manage, and deploy Firebase projects from the command-line.
• Log in to https://console.firebase.google.com:
firebase login
firebase projects:list
firebase init
firebase deploy
• Start a local server to statically host the current Firebase project's assets:
firebase serve
• Start an interactive wizard to open one of many links of the current Firebase
project in the default web browser:
firebase open
firefox
A free and open source web browser.
firefox {{https://www.duckduckgo.com}}
firefox --private-window
firefox --safe-mode
• Use a specific profile to allow multiple separate instances of Firefox to run at once:
firefox --setDefaultBrowser
fish
The Friendly Interactive SHell, a command-line interpreter designed to be user friendly.
fish
fish --no-config
• Execute a command:
• Execute a script:
fish {{path/to/script.fish}}
• Start an interactive shell session in private mode, where the shell does not access
old history or save new history:
fish --private
• Define and export an environmental variable that persists across shell restarts
(builtin):
fish --version
fisher
Fisher, a fish-shell plugin manager.
fisher {{gist_url}}
• Edit 'fishfile' manually with your favorite editor and install multiple plugins:
fisher ls
• Update plugins:
fisher update
fkill
fkill {{pid|name|:port}}
flac
Encodes, decodes and tests FLAC files.
• Encode a WAV file to FLAC (this will create a FLAC file in the same location as the
WAV file):
flac {{path/to/file.wav}}
flac -t {{path/to/file.flac}}
flake8
Tool to check the style and quality of Python code.
flake8 {{path/to/file_or_directory}}
• Lint a file or directory recursively and show the line on which each error occurred:
• Lint a file or directory recursively and ignore a list of rules. (All available rules can
be found at flake8rules.com):
• Lint a file or directory recursively but exclude files matching the given globs or
substrings:
flask run
flask routes
flask shell
flex
Lexical analyser generator. Based on lex.
Given the specification for a lexical analyser, generates C code implementing it.
flex {{analyser.l}}
flow
flow ls
• Build a recursive fls list over a device, output paths will start with C:
• Analyse a single partition, providing the sector offset at which the filesystem
starts in the image:
flutter doctor
fluxctl list-images
fluxctl sync
fluxctl automate
fly
Command-line tool for concourse-ci.
• List targets:
fly targets
• List pipelines:
• Unpause pipeline:
• Destroy pipeline:
• Reformat a file:
fmt {{path/to/file}}
• Reformat a file without joining lines shorter than the given width together:
fmt -s {{path/to/file}}
• Reformat a file with uniform spacing (1 space between words and 2 spaces between
paragraphs):
fmt -u {{path/to/file}}
fnm
Fast Node.js version manager.
• List all available Node.js versions and highlight the default one:
fnm ls
fold {{file}}
• Wrap each line to width "5" and break the line at spaces (puts each space separated
word in a new line, words with length > 5 are wrapped):
forever {{script}}
• List running "forever" processes (along with IDs and other details of "forever"
processes):
forever list
• Print a quotation:
fortune
fortune -o
fortune -l
fortune -s
fortune -f
• Print a quotation from one of the database files listed by fortune -f:
fortune {{filename}}
fossa
CLI for the Fossa service - Generate realtime license audits, vulnerability scans and
reports about dependencies licenses.
fossa init
fossa build
fossa analyze
• Generate reports:
fossa report
• Test current revision against the FOSSA scan status and exit with errors if issues
are found:
fossa test
fping
A more powerful ping which can ping multiple hosts.
fping -a -g 192.168.1.0/24
fping -u -g 192.168.1.0/24
from
Prints mail header lines from the current user's mailbox.
• List mail:
from
from --count
MAIL={{path/to/mailbox}} from
from --sender={{me@example.com}}
fselect
Find files with SQL-like queries.
• Select full path and size from temporary or config files in a given directory:
• Use SQL aggregate functions to calculate minimum, maximum and average size of
files in a directory:
• Take a picture:
fswebcam {{filename}}
ftp {{ftp.example.com}}
binary
prompt off
mget {{*.png}}
mput {{*.zip}}
mdelete {{*.txt}}
fuck
fuck --{{yes|yeah|hard}}
func
Azure Functions Core Tools: Develop and test Azure Functions locally.
Local functions can connect to live Azure services, and can deploy a function app to an
Azure subscription.
func new
func start
fusermount -u {{path/to/mount_point}}
fusermount -z {{path/to/mount_point}}
• Display version:
fusermount --version
fzf
Command-line fuzzy finder.
Similar to sk.
ps aux | fzf
• Start fzf on entries that start with core and end with either go, rb, or py:
• Start fzf on entries that not match pyc and match exactly travis:
• Run Ganache:
ganache-cli
ganache-cli --accounts={{number_of_accounts}}
ganache-cli --secure
ganache-cli --account="{{account_private_key}},
{{account_balance}}"
ganache-cli --defaultBalanceEther={{default_balance}}
ganache-cli --verbose
gatsby
Static site generator for React.
gatsby develop
gatsby build
gatsby serve
gcal
Displays calendar.
gcal
gcal --with-week-number
gcal --starting-day={{1}}
gcal .
gcalcli
Command-line tool to interact with Google Calendar.
• List your events for all your calendars over the next 7 days:
gcalcli agenda
• Show events starting from or between specific dates (also takes relative dates e.g.
"tomorrow"):
gcalcli calw
gcalcli calm
gcc -S {{source.c}}
gcc -c {{source.c}}
gcloud
The official CLI tool for Google Cloud Platform.
• Display all Google Compute Engine instances in a project. Instances from all zones
are listed by default:
• Make a virtual mosaic from files whose name is specified in a text file:
• Debug an executable:
gdb {{executable}}
gdb -p {{procID}}
• Upload a local path to the parent folder with the specified ID:
gdu
gdu {{path/to/directory}}
gdu --show-disks
• Interactively show the disk usage of the current directory but ignore some sub-
directories:
gdu --no-hidden
• Update a gem:
gem list
• Uninstall a gem:
• Connect to the main Ethereum network and automatically download the full node:
geth
geth --testnet
• Enable mining:
geth --mine
gh alias
Manage GitHub CLI command aliases from the command-line.
gh alias
gh alias list
gh api --help
gh api repos/:owner/:repo/releases
gh auth login
gh auth status
• Log out:
gh auth logout
gh auth refresh
• Open the homepage of the current repository in the default web browser:
gh browse
gh browse {{owner}}/{{repository}}
• Open the settings page of the current repository in the default web browser:
gh browse --settings
• Open the wiki of the current repository in the default web browser:
gh browse --wiki
gh browse {{issue_or_pull_request_number}}
• Open a specific file or directory of the current repository in the web browser:
gh browse {{path_from_root_of_repository}}
gh browse --no-browser
gh codespace
Connect and manage your codespaces in GitHub.
gh codespace create
gh codespace list
gh codespace ssh
gh codespace ports
gh codespace logs
gh codespace delete
gh completion
• Use delta in side-by-side mode as the default pager for all gh commands:
tldr gh-codespace
gh environment
Display help about environment variables for the GitHub CLI command.
• Display help about environment variables that can be used with gh:
gh environment
gh extension
Manage extensions for the GitHub CLI.
• Initialize a new GitHub CLI extension project in a directory of the same name:
gh extension list
gh extension list
• Remove an extension:
gh formatting
gh gist
Work with GitHub Gists on the command-line.
• Edit a Gist:
gh help
gh help --help
• Display help about environment variables that can be used with gh:
gh help environment
gh help reference
gh help formatting
gh help mintty
gh help {{subcommand}}
gh issue create
• Create a new issue with a title, body and assign it to the current user:
• Create a new issue interactively, reading the body text from a file:
• Reopen an issue:
gh mintty
gh pr create
Manage GitHub pull requests from the command-line.
gh pr create
• Create a pull request, determining the title and description from the commit
messages of the current branch:
gh pr create --fill
gh pr create --draft
• Create a pull request specifying the base branch, title, and description:
gh pr create --web
gh pr merge
Merge GitHub pull requests.
• Merge the pull request associated with the current branch interactively:
gh pr merge
gh pr merge {{pr_number}}
• Merge the pull request, removing the branch on both the local and the remote:
gh pr merge --delete-branch
• Merge the current pull request with the specified merge strategy:
gh pr merge --{{merge|squash|rebase}}
• Squash the current pull request into one commit with the message body and
merge:
• Display help:
gh pr merge --help
gh pr
Manage GitHub pull requests from the command-line.
gh pr create
gh pr checkout {{pr_number}}
gh pr diff
gh pr review --approve
• Merge the pull request associated with the current branch interactively:
gh pr merge
gh pr edit
gh reference
gh release
Manage GitHub releases from the command-line.
gh release list
• Create a new repository (if the repository name is not set, the default name will be
the name of the current directory):
• Clone a repository:
• List repositories owned by a specific user or organization (if the owner is not set,
the default owner will be the currently logged in user):
gh run view
• Check a specific workflow and exit with a non-zero status if the run failed:
gh run watch
• Display the jobs for a run and wait until it's done:
gh screensaver
gh screensaver --list
gh secret set
Create or update GitHub secrets from the command line.
• Set a secret for the current repository (user will be prompted for the value):
gh secret list
• Set a secret for the current repository (user will be prompted for the value):
• Display help:
gh ssh-key
gh ssh-key list
• Add an SSH key to the currently authenticated user's account with a specific title:
gh workflow view
gh workflow list
• Run a manual workflow using a specific branch or tag with JSON parameters from
stdin:
gh issue create
gh issue list
gh pr create
• Locally check out the branch of a pull request, given its number:
gh pr checkout {{pr_number}}
gh pr status
ghc
The Glasgow Haskell Compiler.
ghc Main
ghc {{file.hs}}
ghc -O {{file.hs}}
ghc -c {{file.hs}}
ghci
ghc -e {{expression}}
ghci
The Glasgow Haskell Compiler's interactive environment.
ghci
ghci {{source_file.hs}}
ghci -X{{language_option}}
• Start a REPL and enable some level of compiler warnings (e.g. all or compact):
ghci -W{{warning_level}}
• Start a REPL with a colon-separated list of directories for finding source files:
ghci -i{{path/to/directory1}}:{{path/to/directory2}}
ghcup
Haskell toolchain installer.
ghcup tui
ghcup list
• Install cabal-install:
ghcup upgrade
ghdl
Open-source simulator for the VHDL language.
ghdl -a {{filename.vhdl}}
ghdl -e {{design}}
ghdl -r {{design}}
ghdl -s {{filename.vhdl}}
ghdl --help
ghost
A blogging platform and headless CMS.
ghost install
ghost start
ghost restart
• Check the system for any potential hiccups while installing or updating Ghost:
ghost doctor
• Run a Ghost instance directly (used by process managers and for debugging):
ghost run
ghost ls
gibo list
gibo update
gifsicle
Create GIFs.
• Optimise a GIF:
• Launch GIMP:
gimp
gimp --no-splash
gimp --new-instance
• Print errors and warnings to the console instead of showing them in a dialog box:
gimp --console-messages
gimp --debug-handlers
gist
Upload code to https://gist.github.com.
gist --login
gist --list
Part of git-extras.
git abort
git add
Adds changed files to the index.
git add -A
git add -u
git add -f
git add -p
git add -i
git alias
Create shortcuts for Git commands.
Part of git-extras.
git alias
git am {{path/to/file.patch}}
git am --abort
• Apply as much of a patch file as possible, saving failed hunks to reject files:
When a file is annexed, its content is moved into a key-value store, and a symlink is
made that points to the content.
• Help:
• Add a file:
git annotate is provided for those familiar with other version control systems.
• Print a file with the author name and commit hash prepended to each line:
• Print a file with the author email and commit hash prepended to each line:
• Store the patch result in the index without modifying the working tree:
Part of git-extras.
git archive-file
git archive
Create an archive of files from a named tree.
• Create a tar archive from the contents of the current HEAD and print it to standard
output:
• Create a zip archive from the current HEAD and print it to standard output:
• Create a tar archive from the contents of the latest commit on a specific branch:
Part of git-extras.
• Append the list of committers to the AUTHORS file and open it in the default
editor:
git authors
• Append the list of committers, excluding emails, to the AUTHORS file and open it
in the default editor:
Git automatically jumps back and forth in the commit graph to progressively narrow
down the faulty commit.
• Start a bisect session on a commit range bounded by a known buggy commit, and a
known clean (typically older) one:
• For each commit that git bisect selects, mark it as "bad" or "good" after testing
it for the issue:
• After git bisect pinpoints the faulty commit, end the bisect session and return
to the previous branch:
• Skip a commit during a bisect (e.g. one that fails the tests due to a different issue):
• Print file with author name and commit hash on each line:
• Print file with author email and commit hash on each line:
• List all branches (local and remote; the current branch is highlighted by *):
Part of git-extras.
git browse
Part of git-extras.
• List each branch showing date, latest commit hash and message:
git brv
git bug
A distributed bug tracker that uses git's internal storage, so no files are added in your
project.
You may submit your problems to the same git remote you use to interact with others,
much like commits and branches.
git bug ls
git bugreport
• Create a new bug report file in the specified directory, creating it if it does not
exist:
• Create a new bug report file with the specified filename suffix in strftime
format:
• Create a bundle file that contains all objects and references of a specific branch:
• Verify that a bundle file is valid and can be applied to the current repository:
• Unbundle a specific branch from a bundle file into the current repository:
• Get the [t]ype (blob, tree, commit, tag) of a given Git object:
Part of git-extras.
• Update existing file or create a new History.md file with the commit messages
since the latest Git tag:
git changelog
• List pretty formatted range of commits between the tag 0.5.0 and the tag 1.0.0:
• List pretty formatted range of commits between the commit 0b97430 and the tag
1.0.0:
• Do not check the index (used to debug why paths were tracked and not ignored):
• Normalize a refname:
• Restore any files changed since the last commit, ignoring any files that were
deleted:
• Export a copy of the entire tree at the last commit to the specified directory (the
trailing slash is important):
• Create and switch to a new branch based on a specific reference (branch, remote/
branch, tag are examples of valid references):
git checkout -
• Discard all unstaged changes in the current directory (see git reset for more
undo-like commands):
git checkout .
• Replace a file in the current directory with the version of it committed in a given
branch:
To apply changes to another branch, first use git checkout to switch to the desired
branch.
• Apply a range of commits to the current branch (see also git rebase --onto):
• Add the changes of a commit to the working directory, without creating a commit:
git cherry -v
git clean
git clean -i
git clean -f
git clean -x
git clear-soft
Clear a Git working directory as if it was freshly cloned with the current branch
excluding files in .gitignore.
Part of git-extras.
git clear-soft
git clear
Clear a Git working directory as if it was freshly cloned with the current branch
including files in .gitignore.
Part of git-extras.
• Reset all tracked files and delete all untracked files even if they are included in the
.gitignore:
git clear
git clone
Clone an existing repository.
• Clone quietly:
• Clone an existing repository only fetching the 10 most recent commits on the
default branch (useful to save time):
Part of git-extras.
git cola
• Format the standard input as multiple columns with a maximum width of 100:
• Format the standard input as multiple columns with a maximum padding of 30:
• Write a commit-graph file for the packed commits in the repository's local .git
directory:
• Write a commit-graph file containing all commits in the current commit-graph file
along with those reachable from HEAD:
• Create a commit object reading the message from a file (use - for stdin):
• Commit staged files and [S]ign them with the GPG key defined in ~/.gitconfig:
• Update the last commit by adding the currently staged changes, changing the
commit's hash:
Part of git-extras.
These configurations can be local (for the current repository) or global (for the current
user).
• List all configuration entries that have been defined either locally or globally:
• Edit the Git configuration for the current repository in the default editor:
Part of git-extras.
• Display all commit hashes and their corresponding commit messages from a
specific author:
git count-objects
• Display a count of all objects and their total disk usage, displaying sizes in human-
readable units:
Part of git-extras.
git count
• Print the number of commits per contributor and the total number of commits:
Part of git-extras.
Part of git-extras.
• Send credential information to all configured credential helpers to store for later
use:
• Erase the specified credential information from all the configured credential
helpers:
• Launch a Git daemon with a specific base directory and allow pulling from all sub-
directories that look like Git repositories:
• Launch a Git daemon for the specified directory, verbosely printing log messages
and allowing Git clients to write to it:
Part of git-extras. If deleting the checked out branch, only the remote branch will be
deleted.
Part of git-extras.
git delete-merged-branches
git delete-tag
Delete existing local and remote tags.
Part of git-extras.
• Delete a tag:
Part of git-extras.
• List files from the current checked out branch that differ from the main branch:
• List files from a specific branch that differ from another specific branch:
• Create a unique name for the current commit (the name contains the most recent
annotated tag, the number of additional commits, and the abbreviated commit
hash):
git describe
git diff-files
git diff
• Show changes from all commits since a given date/time (a date expression, e.g. "1
week 2 days" or an ISO date):
• Output a summary of file creations, renames and mode changes since a given
commit:
Part of git-extras.
• Display each file in the repository, showing commits and active days:
git effort
• Display files modified by a specific author, showing commits and active days:
• Display files modified since a specific time/date, showing commits and active days:
• Display only the specified files or directories, showing commits and active days:
• Display all files in a specific directory, showing commits and active days:
git fame
git fame -C
git fame -M
git fetch
Download objects and refs from a remote repository.
• Fetch the latest changes from the default remote upstream repository (if set):
git fetch
• Delete local references to remote branches that have been deleted upstream:
• Finish development on a feature branch, merging it into the develop branch and
deleting it:
Part of git-extras.
See also git am, which can apply generated .patch files.
• Write a .patch file for all the commits between 2 revisions to stdout:
Does not make any modifications. See git gc for cleaning up dangling blobs.
git fsck
git gc
git gc --aggressive
git gc --no-prune
git gc --quiet
git gc --help
git graft
Merge commits from a specific branch into another branch and delete the source
branch.
Part of git-extras.
• Merge all commits not present on the target branch from the source branch to
target branch, and delete the source branch:
git ignore
Conflicts between branches are tracked down to pairs of individual commits, to simplify
conflict resolution.
• Continue imerge operation after resolving conflicts (git add the conflicted files,
first):
Part of git-extras.
• Display remote locations, remote and local branches, most recent commit data and
.git/config settings:
git info
• Display remote locations, remote and local branches and most recent commit
data:
git init
• Initialize a repository with the specified name for the initial branch:
• Initialize a repository using SHA256 for object hashes (requires Git version 2.29+):
• Change the Git LFS endpoint URL (useful if the LFS server is separate from the Git
server):
• Push all Git LFS objects to the remote server (useful if errors are encountered):
Part of `git-extras.
git local-commits
git lock
Lock a file in a Git repository from being modified by a commit.
Part of git-extras.
git locked
git log
Show a history of commits.
• Show the sequence of commits starting from the current one, in reverse
chronological order of the Git repository in the current working directory:
git log
• Show a graph of commits in the current branch using only the first line of each
commit message:
• Show a graph of all commits, tags and branches in the entire repo:
If no name or URL are given, then the configured upstream branch will be used, or
remote origin if the former is not configured.
git ls-remote
• Remove everything from the body before a scissors line (e.g. "-->* --") and retrieve
the message or patch:
• Register the current repository in the user's list of repositories to daily have
maintenance run:
• Remove the current repository from the user's maintenance repository list:
git mergetool
• Explicitly use the GUI merge tool (see the merge.guitool config variable):
• Explicitly use the regular merge tool (see the merge.tool config variable):
Part of git-extras.
• Show commits which aren't shared between the currently checked-out branch and
another branch:
Part of git-extras.
git mr {{mr_number}}
git mr {{url}}
git mr clean
git mv
Move or rename files and update the Git index.
• Move file inside the repo and add the movement to the next commit:
• List all notes and the objects they are attached to:
Part of git-extras.
Part of git-extras.
git pr {{pr_number}}
git pr {{url}}
git pr clean
git prune
Git command for pruning all unreachable objects from the object database.
This command is often not used directly but as an internal command that is used by Git
gc.
• Prune unreachable objects and display what has been pruned to stdout:
git pull
• Download changes from given remote repository and branch, then merge them
into HEAD:
• Send local changes in the current branch to its default remote counterpart:
git push
• Send changes from a specific local branch to its remote counterpart, and set the
remote one as the default push/pull target of the local one:
• Diff the changes of ours and theirs from their common ancestor, e.g. after an
interactive rebase:
• Diff the changes of two commit ranges, e.g. to check whether conflicts have been
resolved appropriately when rebasing commits from base1 to base2:
Part of git-extras.
• Change an author's email and name across the whole Git repository:
• Change the email and name to the ones defined in the Git config:
• Change the email and name of all commits, regardless of their original author:
Commonly used to "move" an entire branch to another base, creating copies of the
commits in the new location.
• Continue a rebase that was interrupted by a merge failure, after editing conflicting
files:
• Continue a rebase that was paused due to merge conflicts, by skipping the
conflicted commit:
• Move part of the current branch onto a new base, providing the old base to start
from:
git reflog
Part of git-extras.
git remote -v
• Add a remote:
• Change the URL of a remote (use --add to keep the existing URL):
• Remove a remote:
• Rename a remote:
Part of git-extras.
Part of git-extras.
Part of git-extras.
git repack
git repack -d
git repl
Git REPL (read-evaluate-print-loop) - an interactive Git shell.
Part of git-extras.
git repl
{{git_subcommand}} {{command_arguments}}
!{{command}} {{command_arguments}}
exit
git replace
Create, list, and delete refs to replace objects.
• Replace any commit with a different one, leaving other commits unchanged:
• Produce a request summarizing the changes between the v1.1 release and a
specified branch:
• Produce a request summarizing the changes between the v0.1 release on the foo
branch and the local bar branch:
Part of git-extras.
• Unstage everything:
git reset
• Undo the last commit, keeping its changes (and any further uncommitted changes)
in the filesystem:
• Undo the last two commits, adding their changes to the index, i.e. staged for
commit:
• Discard any uncommitted changes, staged or not (for only unstaged changes, use
git checkout):
git restore :/
• Unstage a file:
git rm {{file}}
• Remove directory:
git rm -r {{directory}}
Part of git-extras.
git root
• Print the current working directory relative to the root of the current Git
repository:
• Encrypt secrets:
Part of git-extras.
• Replace the specified text and then commit the resulting changes with a standard
commit message:
git send-email -1
• Review and edit the email message for each patch you're about to send:
Part of git-extras.
• Create a Git repository in the current directory and commit all files:
git setup
• View a summary of all the commits made, grouped alphabetically by author name:
git shortlog
• View a summary of all the commits made, sorted by the number of commits made:
git shortlog -n
• View a summary of all the commits made, grouped by the committer identities
(name and email):
git shortlog -c
• View all users, emails and the number of commits in the current branch:
• View all users, emails and the number of commits in all branches:
• Read an IDX file for a Git packfile and dump its contents to stdout:
git show-ref
Part of git-extras.
• Show a decorated tree graph for all branches annotated with tags and branch
names:
git show-tree
git show
Show various types of Git objects (commits, tags, etc.).
• Show information about the latest commit (hash, message, changes, and other
metadata):
git show
• Show information about the 3rd commit from the HEAD of a branch:
• Show the contents of a file as it was at a given revision (e.g. branch, tag or
commit):
git sizer
git sizer -v
git sizer -h
git squash
Squash multiple commits into a single commit.
Part of git-extras.
• Merge all commits from a specific branch into the current branch as a single
commit:
• Squash all commits starting with a specific commit on the current branch:
• Squash the n latest commits and commit concatenating all individual messages:
git stage -A
git stage -u
git stage -f
git stage -p
git stage -i
git stash
Stash local Git changes in a temporary area.
git stash -u
git stash -p
• List all stashes (shows stash name, related branch and message):
• Apply a stash (default is stash@{0}), and remove it from the stash list if applying
doesn't cause conflicts:
Lists changed, added and deleted files compared to the currently checked-out commit.
• Show changed files which are not yet added for commit:
git status
git status -s
• Merge recent changes up to the latest subtree commit into the subtree:
Part of git-extras.
git summary
• Display data about a Git repository, merging committers using different emails
into 1 statistic for each author:
• Display data about a Git repository, showing the number of lines modified by each
contributor:
• Fetch updates from the remote SVN repository without changing the Git HEAD:
git switch -
• Switch to a branch and automatically merge the current branch and any
uncommitted changes into it:
• Store a reference by name, including a message with a reason for the update:
• For scripting, hide errors with --quiet and use --short to simplify ("refs/heads/
X" prints as "X"):
Part of git-extras.
git sync
• Sync the current local branch with the remote main branch:
git tag
• Create a tag with the given name pointing to the current commit:
Part of git-extras.
Part of git-extras.
git undo
• Pretend that a modified file is unchanged (git status will not show this as
changed):
git var -l
git verify-commit
Check for GPG verification of commits.
• Check commits for a GPG signature and show details of each commit:
• Check commits for a GPG signature and print the raw details:
• Check tags for a GPG signature and show details for each tag:
• Check tags for a GPG signature and print the raw details:
git whatchanged
• Display logs and changes for recent commits within the specified time frame:
• Display logs and changes for recent commits for specific files or directories:
• Create a new directory with the specified branch checked out into it:
• Create a new directory with a new branch checked out into it:
Some subcommands such as commit, add, branch, checkout, push, etc. have their
own usage documentation, accessible via tldr git subcommand.
git --version
git --help
• Show help on a Git subcommand (like clone, add, push, log, etc.):
git {{subcommand}}
github-label-sync {{repository_name}}
gitk
A graphical Git repository browser.
gitk
gitk {{path/to/file_or_directory}}
gitk --until="{{1/1/2015}}"
• Display the logs of every service and keep reading until Ctrl + C is pressed:
• Register a runner:
• Unregister a runner:
Some subcommands such as gitlab ctl have their own usage documentation.
gitlint
gitlint --staged
gitmoji
An interactive command-line tool for using emojis on commits.
gitmoji --commit
• Initialize the git hook (so gitmoji will be run every time git commit is run):
gitmoji --init
gitmoji --remove
gitmoji --list
gitmoji --update
gitmoji --config
gitsome
A terminal-based interface for GitHub, accessed via the gh command.
• Enter the gitsome shell (optional), to enable autocompletion and interactive help
for Git (and gh) commands:
gitsome
gh configure
• List notifications for the current account (as would be seen in https://github.com/
notifications):
gh notifications
• List the current account's starred repos, filtered by a given search string:
gh feed {{tldr-pages/tldr}}
• View the recent activity feed for a given GitHub user, using the default pager (e.g.
less):
gh feed {{torvalds}} -p
gixy
Analyze nginx configuration files.
gixy
gixy {{-l|-ll|-lll}}
glab alias
glab mr create
• Create a merge request, determining the title and description from the commit
messages of the current branch:
• Create a merge request specifying the target branch, title, and description:
• Merge the merge request associated with the current branch interactively:
glab mr merge
• Merge the merge request, removing the branch on both the local and the remote:
• Squash the current merge request into one commit with the message body and
merge:
• Display help:
Some subcommands such as glab mr create have their own usage documentation.
glab mr create
glab mr diff
glab mr approve
• Merge the merge request associated with the current branch interactively:
glab mr merge
glab mr update
• Create a new repository (if the repository name is not set, the default name will be
the name of the current directory):
• Clone a repository:
glab mr create
glab mr list
• List pipelines:
• Run in terminal:
glances
glances -w
glances -s
glances -c {{hostname}}
glances -s --password
glib-compile-resources
Compiles resource files (e.g. images) into a binary resource bundle.
These may be linked into GTK applications using the GResource API.
glib-compile-resources {{file.gresource.xml}}
glib-compile-resources --generate-source
{{file.gresource.xml}}
glib-compile-resources --generate-dependencies
{{file.gresource.xml}}
glow
Render Markdown in the terminal.
glow
glow {{path/to/file}}
glow -p {{path/to/file}}
glow {{https://example.com/file.md}}
glow {{github.com/owner/repository}}
gml2gv
Convert a graph from gml to gv format.
• Display help:
gml2gv -?
gmssl
GmSSL is a crypto toolkit supporting SM1, SM2, SM3, SM4, SM9, and ZUC/ZUC256.
• Print version:
gmssl version
gnomon
Utility to annotate console logging statements with timestamps and find slow processes.
• Use UNIX (or DOS) pipes to pipe the stdout of any command through gnomon:
• Set a high threshold of 0.5 seconds for the elapsed time; exceeding which the
timestamp will be colored bright red:
• Set a medium threshold of 0.2 seconds (Timestamp will be colored bright yellow):
• Get quotes for currencies and stocks specified in a file and print them:
gnucash
gnucash {{path/to/file.gnucash}}
gnucash --nofile
gnuplot
A graph plotter that outputs in several formats.
gnuplot
gnuplot {{path/to/definition.plt}}
• Set the output format by executing a command before loading the definition file:
go bug
go build
Compile Go sources.
• Compile a 'package main' file (output will be the filename without extension):
go build {{path/to/main.go}}
• Compile a package:
go clean -n
go clean -cache
go clean -testcache
go clean -modcache
go doc
Show documentation for a package or symbol.
go doc
go doc {{encoding/json}}
go env
go env {{GOPATH}}
go env -w {{GOBIN}}={{path/to/directory}}
go env -u {{GOBIN}}
go fix
Update packages to use new APIs.
go fix {{packages}}
go fmt
Format Go source files.
go fmt
go fmt {{path/to/package}}
• Format the package in the current directory and all subdirectories (note the ...):
go fmt {{./...}}
• Print what format commands would've been run, without modifying anything:
go fmt -n
go fmt -x
go generate
Generate Go files by running commands within source files.
go generate
go get
Add a dependency package, or download packages in legacy GOPATH mode.
go get {{example.com/pkg}}
go get {{example.com/pkg}}@{{v1.2.3}}
go get {{example.com/pkg}}@{{none}}
go install
Compile and install packages named by the import paths.
go install
go install {{path/to/package}}
• Install the latest version of a program, ignoring go.mod in the current directory:
go install {{golang.org/x/tools/gopls}}@{{latest}}
go install {{golang.org/x/tools/gopls}}
go list
List packages or modules.
• List packages:
go list ./...
go list std
go list -m -u all
go mod
Module maintenance.
go mod download
go mod tidy
go mod verify
go mod vendor
go run
Compile and run Go code without saving a binary.
• Run a Go file:
go run {{path/to/file.go}}
go run {{path/to/package}}
go test
Tests Go packages (files have to end with _test.go).
go test
go test -v
• Test the packages in the current directory and all subdirectories (note the ...):
go test -v ./...
• Test the package in the current directory and run all benchmarks:
go test -v -bench .
• Test the package in the current directory and run all benchmarks for 50 seconds:
go tool
• Print the command that would be executed, but do not execute it (similar to
whereis):
• Print Go version:
go version
go version {{path/to/executable}}
go vet
Check Go source code and report suspicious constructs (e.g. lint your Go source files).
Go vet returns a non-zero exit code if problems are found; returns a zero exit code if no
problems are found.
go vet
go vet {{path/to/file_or_directory}}
go vet -c={{N}}
go vet -json
go
Tool for managing go source code.
go get {{package_path}}
• Compile and run a source file (it has to contain a main package):
go run {{file}}.go
go build
• Execute all test cases of the current package (files have to end with _test.go):
go test
go install
• Discover subdomains:
godoc {{fmt}}
godoc -http=:{{6060}}
godot
godot -e
godot -p
• Export a project for a given export preset (the preset must be defined in the
project):
• Execute a standalone GDScript file (the script must inherit from SceneTree or
MainLoop):
godot -s {{script.gd}}
gofmt
Tool for formatting Go source code.
gofmt {{source.go}}
gofmt -w {{source.go}}
• Format a file, and then simplify the code, overwriting the original file:
gofmt -s -w {{source.go}}
gofmt -e {{source.go}}
goimports
Updates Go import lines, adding missing ones and removing unreferenced ones.
goimports {{file}}.go
• Write the result back to the source file instead of the standard output:
goimports -w {{file}}.go
• Display diffs and write the result back to the source file:
goimports -w -d {{file}}.go
• Set the import prefix string after 3rd-party packages (comma-separated list):
googler {{keyword}}
googler -j {{keyword}}
googler -x {{keyword}}
googler -u
?
gopass
Standard Unix Password Manager for Teams. Written in Go.
gopass init
gopass new
gopass mounts
gopass sync
gopass {{store_name|path/to/directory|email@email.com}}
gops
CLI tool which lists and diagnoses Go processes currently running on your system.
gops
gops {{pid}}
gops tree
goreload --all
gotty
Share your terminal as a web application.
gotty {{command}}
gotty -w {{shell}}
It shows files and directories being created, modified or removed over time.
• Run gource in a directory (if it isn't the repository's root directory, the root is
sought up from there):
gource {{path/to/repository}}
gource -{{width}}x{{height}}
gource -c {{time_scale_multiplier}}
• Set how long each day should be in the animation (this combines with -c, if
provided):
gource -s {{seconds}}
gource -f -b {{hex_color_code}}
• Compile Go program in the current directory for all operating systems and
architecture combinations:
gox
gox -os="{{os}}"
gox -osarch="{{os}}/{{arch}}"
gpg-tui
Terminal user interface for GNU Public Guard.
• Start gpg-tui:
gpg-tui
• Quit gpg-tui:
1|2|3
• Refresh gpg-tui:
r
gpg-zip
Encrypt files and directories in an archive using GPG.
gpg --full-generate-key
gpg2 --list-keys
• Encrypt a specified file for a specified recipient, writing the output to a new file
with .gpg appended:
• Encrypt a specified file with only a passphrase, writing the output to a new file
with .gpg appended:
• Export the public key of a specified email address to the standard output:
• Export the private key with a specified email address to the standard output:
gpgv {{path/to/file}}
• Add a file to the list of keyrings (a single exported key also counts as a keyring):
• Compile a package:
gradle build
• Run in offline mode to prevent Gradle from accessing the network during builds:
gradle clean
gradle assembleRelease
gradle tasks
• Process a grap file and save the output file for future processing with pic and
groff:
• Typeset a grap file to PDF using the [me] macro package, saving the output to a
file:
• Display help:
graphml2gv -?
grep
Find patterns in files using regular expressions.
• Search for a pattern in all files recursively in a directory, showing line numbers of
matches, ignoring binary files:
grep --{{context|before-context|after-context}}={{3}}
"{{search_pattern}}" {{path/to/file}}
• Search for lines matching a pattern, printing only the matched text:
grex {{space_separated_strings}}
grex -i {{space_separated_strings}}
grex -d {{space_separated_strings}}
grex -w {{space_separated_strings}}
grex -s {{space_separated_strings}}
grex -r {{space_separated_strings}}
grip
Preview GitHub-flavoured Markdown files locally.
• Start the server and serve the rendered README file of a current directory:
grip
grip {{path/to/file.md}}
• Start the server and open the README file of the current directory in the browser:
grip --browser
• Start the server in the specified port and serve the rendered README file of the
current directory:
grip {{port}}
groff
GNU replacement for the troff and nroff typesetting utilities.
• Render a man page using the ASCII output device, and display it using a pager:
• Typeset a roff file containing [t]ables and [p]ictures, using the [me] macro set, to
PDF, saving the output:
• Run a groff command with preprocessor and macro options guessed by the grog
utility:
groups
groups {{username}}
grumphp git:init
grumphp git:pre-commit
grumphp run
grunt
A JavaScript task runner for automating processes.
grunt
grunt {{task_name}}
grunt --no-write
grunt --help
gtop
System monitoring dashboard for the terminal.
gtop
m
guacd
Apache Guacamole proxy daemon.
Support loader for client plugins to interface between the Guacamole protocol and any
arbitrary remote desktop protocol (e.g. RDP, VNC, Other).
guacd -f -L {{debug}}
guacd -p {{path/to/file.pid}}
guetzli
JPEG image compression utility.
guile
guile {{script.scm}}
guile -c "{{expression}}"
• Listen on a port or a Unix domain socket (the default is port 37146) for remote
REPL connections:
guile --listen={{port_or_socket}}
gulp
JavaScript task runner and streaming build system.
gulp
gunicorn {{import.path:app_object}}
gunzip {{archive.tar.gz}}
• Display help:
gv2gml -?
gv2gxl
Convert a graph from gv to gxl format.
• Display help:
gv2gxl -?
gvcolor
Colorize a ranked digraph with a range of colors.
• Colorize one or more ranked digraph (that were already processed by dot):
• Lay out a graph and colorize it, then convert to a PNG image:
gvcolor -?
gvpack
Combine several graph layouts (that already have layout information).
• Combine several graph layouts at the graph level, keeping graphs separate:
gvpack -?
gxl2gv
Convert a graph from gxl to gv format.
• Display help:
gxl2gv -?
gzip
Compress/uncompress files with gzip compression (LZ77).
gzip {{file.ext}}
gzip -d {{file.ext}}.gz
• Specify the compression level. 1=Fastest (Worst), 9=Slowest (Best), Default level is
6:
• Lint a Dockerfile:
hadolint {{path/to/Dockerfile}}
hakyll-init {{path/to/directory}}
hakyll-init --help
handbrakecli
Command-line interface to the HandBrake video conversion and DVD ripping tool.
• Convert a video file to MKV (AAC 160kbit audio and x264 CRF20 video):
handbrakecli --preset-list
• Print the content of a DVD, getting the CSS keys in the process:
• Rip the first track of a DVD in the specified device. Audiotracks and subtitle
languages are specified as lists:
• Start hangups:
hangups
hangups -h
hardhat
hardhat compile
hardhat test
hardhat node
• Start a local Ethereum JSON-RPC node with a specific hostname and port:
hardhat clean
hashid
Python3 program that identifies data and password hashes.
• Identify hashes from standard input (through typing, copying and pasting, or
piping the hash into the program):
hashid
hashid {{hash}}
hashid {{path/to/hashes.txt}}
• Show hashcat's mode number and john's format string of the hash types:
haxelib upgrade
haxelib list
head
Output the first part of files.
Pressing i enters insert mode. <Esc> enters normal mode, which enables the use of
Helix commands.
• Open a file:
helix {{path/to/file}}
:theme {{theme_name}}
:wq<Enter>
:q!<Enter>
/{{search_pattern}}<Enter>
:format
hello
Print "Hello, world!", "hello, world" or a customizable text.
hello
hello --traditional
hello --greeting="{{greeting_text}}"
helm install
Install a helm chart.
Some subcommands such as helm install have their own usage documentation.
help2man {{executable}}
help2man --help
heroku
Create and manage Heroku apps from the command-line.
heroku login
heroku create
hexdump {{file}}
• Display the input offset in hexadecimal and its ASCII representation in two
columns:
hexdump -C {{file}}
• Display the hexadecimal representation of a file, but interpret only n bytes of the
input:
• Initialize a website:
hexo generate
hexo server
hexo deploy
hexo clean
hexyl
A simple hex viewer for the terminal. Uses colored output to distinguish different
categories of bytes.
hexyl {{path/to/file}}
hg add {{path/to/file}}
• Add all unstaged files, excluding those that match a specified pattern:
hg add --subrepos
hg add --dry-run
hg branch
Create or show a branch name.
hg branch
hg branch {{branch_name}}
hg clone
Create a copy of an existing repository in a new directory.
• Clone a repository with only the .hg directory, without checking out files:
• Clone a repository to a specific revision, tag or branch, keeping the entire history:
hg commit
hg commit {{path/to/file_or_directory}}
hg commit --interactive
hg init
Create a new repository in the specified directory.
hg init
hg init {{path/to/directory}}
hg log
Display the revision history of the repository.
hg log
hg log --graph
• Display the revision history with file names matching a specified pattern:
• Display the revision history, excluding file names that match a specified pattern:
hg pull
hg pull {{path/to/source_repository}}
hg pull --update
hg pull --force
hg push
hg push {{path/to/destination_repository}}
hg push --new-branch
hg remove {{path/to/file}}
• Remove all staged files, excluding those that match a specified pattern:
hg remove --subrepos
• Remove files from the repository that have been physically removed:
hg remove --after
hg root
Display the root location of a Hg repository.
hg root
hg serve
• Start a web server instance using the specified theme (see the templates
directory):
• Start a web server instance using the specified SSL certificate bundle:
hg status
hg status --modified
hg status --added
hg status --removed
hg status --deleted
hg update
hg update --clean
hg {{command}}
hg help
hg help {{command}}
hg --version
highlight
Outputs syntax-highlighted source code to a variety of formats.
• Run the previous command as root (!! is replaced by the previous command):
sudo !!
{{command}} !$
{{command}} !^
!{{n}}
!-{{n}}
!?{{string}}?
^{{string1}}^{{string2}}^
• Perform a history expansion, but print the command that would be run instead of
actually running it:
{{!-n}}:p
history
Command-line history.
history
• Display the last 20 commands (in zsh it displays all commands starting from the
20th):
history {{20}}
• Clear the commands history list (only for current bash shell):
history -c
• Overwrite history file with history of current bash shell (often combined with
history -c to purge history):
history -w
history -d {{offset}}
hive
CLI tool for Apache Hive.
hive
• Run HiveQL:
hive -e "{{hiveql_query}}"
hn
hn --limit {{number}}
• View stories on Hacker News, and keep the list open after selecting a link:
hn --keep-open
hn --latest
home-manager
Manage a user environment using Nix.
home-manager build
home-manager switch
host
Lookup Domain Name Server.
host {{domain}}
host {{ip_address}}
hostess list
hostid
hostname
Show or set the system's host name.
hostname
hostname -i
hostname -I
hostname --fqdn
hostname {{new_hostname}}
hping
Command-line oriented TCP/IP packet assembler and analyzer.
hping3 {{localhost}}
• Scan TCP port 80, scanning from the specific local source port 5090:
hr
hr {{string}}
hsd-cli info
hsd-cli mempool
hsd-cli tx {{address_or_hash}}
hsw-cli lock
hsw-cli get
hsw-cli balance
hsw-cli history
hsw-cli pending
hsw-cli tx {{transaction_hash}}
html5validator
A command-line tool for testing HTML5 validity.
html5validator {{path/to/file}}
• Start htop:
htop
• Sort processes by a specified sort_item (use htop --sort help for available
options):
• Display help:
htop --help
htpasswd
Create and manage htpasswd files to protect web server directories using basic
authentication.
• Add user to htpasswd file in batch mode without an interactive password prompt
(for script usage):
• Start an HTTP server on the default port to upload files to the current directory:
http-server-upload
• Start an HTTP server with the specified maximum allowed file size for uploads in
MiB (defaults to 200 MiB):
MAX_FILE_SIZE={{size_in_megabytes}} http-server-upload
• Start an HTTP server on a specific port to upload files to the current directory:
PORT={{port}} http-server-upload
UPLOAD_DIR={{path/to/directory}} http-server-upload
• Start an HTTP server using a specific directory to temporarily store files during the
upload process:
UPLOAD_TMP_DIR={{path/to/directory}} http-server-upload
• Start an HTTP server accepting uploads with a specific token field in the HTTP
post:
TOKEN={{secret}} http-server-upload
http-server
Simple static HTTP server to serve static files.
• Start an HTTP server listening on the default port to serve the current directory:
http-server
http-server -d {{false}}
• Start an HTTPS server on the default port using the specified certificate:
• Start an HTTP server and include the client's IP address in the output logging:
http-server --log-ip
http-server --cors
http-server --silent
http
HTTPie: HTTP client, aims to be easier to use than cURL.
httpflow -i {{any}}
httpflow -u '{{regular_expression}}'
httpflow -r {{out.cap}}
httpflow -w {{path/to/directory}}
httping
Measure the latency and throughput of a web server.
httping -g {{url}}
httping -l -g https://{{host}}
httprobe --help
httpry
A lightweight packet sniffer for displaying and logging HTTP traffic.
httpry -o {{path/to/file.log}}
• Listen on a specific interface and save output to a binary pcap format file:
httpry -m {{get|post|put|head|options|delete|trace|connect|
patch}}
httpry -d -o {{path/to/file.log}}
hub
A wrapper for Git that adds commands for working with GitHub-based projects.
If set up as instructed by hub alias, one can use git to run hub commands.
• Clone a repository using its slug (owners can omit the username):
• Create a fork of the current repository (cloned from another user) under your
GitHub profile:
hub fork
• Push the current local branch to GitHub and create a PR for it in the original
repository:
• Create a PR of the current (already pushed) branch, reusing the message from the
first commit:
• Create a new branch with the contents of a pull request and switch to it:
hub create
hub sync
hugo
Template-based static site generator. Uses modules, components, and themes.
• Create a new Hugo theme (themes may also be downloaded from https://
themes.gohugo.io/):
hugo
hugo --buildDrafts
• Build a site, start up a webserver to serve it, and automatically reload when pages
are edited:
hugo server
hunspell
Check spelling.
hunspell {{path/to/file}}
hunspell -l {{path/to/file}}
husky
Native Git hooks made easy.
husky install
husky uninstall
• Display help:
husky
hydra
Online password guessing tool.
Protocols supported include FTP, HTTP(S), SMTP, SNMP, XMPP, SSH, and more.
hydra-wizard
• Guess FTP credentials using usernames and passwords lists, specifying the number
of threads:
• Guess MySQL credentials using a username and a passwords list, exiting when a
username/password pair is found:
• Guess RDP credentials using a username and a passwords list, showing each
attempt:
• Guess POP3 credentials on a list of hosts using usernames and passwords lists,
exiting when a username/password pair is found:
hyperfine '{{make}}'
• Run a command before each benchmark run (to clear caches, etc.):
• Configure ia with API keys (some functions won't work without this step):
ia configure
ia download {{item}}
ibmcloud login
ibmcloud update
• Install the Cloud Foundry module for accessing Cloud Foundry services:
ibmcloud cf install
ibmcloud regions
ibmcloud version
• Display help:
ibmcloud help
ical
iconv -l
id
Display current user and group identity.
• Display current user's ID (UID), group ID (GID) and groups to which they belong:
id
id -u
id -g
• Display an arbitrary user's ID (UID), group ID (GID) and groups to which they
belong:
id {{username}}
id3tag
Tool for reading, writing, and manipulating ID3v1 and ID3v2 tags of MP3 files.
id3tag --help
identify
Command-line utility of Image Magick project to describe the format and characteristics
of one or more image files.
identify {{path/to/image}}
Looks for violations of Section 2.1 and 2.2 of the requirements listed on https://
www.ietf.org/id-info/checklist.
idnits {{path/to/file.txt}}
• Expect the specified year in the boilerplate instead of the current year:
iex
iex -S mix
if
Performs conditional processing in shell scripts.
• Execute the specified commands if the condition command's exit status is zero:
• Execute the specified commands if the condition command's exit status is not
zero:
• Execute the first specified commands if the condition command's exit status is
zero otherwise execute the second specified commands:
• List all possible conditions (test is an alias to [; both are commonly used with
if):
man [
ifconfig
Network Interface Configurator.
ifconfig eth0
ifconfig -a
ifconfig eth0 up
• Convert multiple images to a single PDF, each image being on its own page:
• Auto orient the image, use a page size of A4 in landscape mode, and set a border of
2cm horizontally and 5.1cm vertically:
• Shrink only larger images to a 10cm by 15cm rectangle inside a 30x20cm page:
• Convert an image to PDF, and specify metadata for the resulting file:
• Capture a specific window, given its ID as displayed by xwininfo, into the JPEG
format:
• Sign a layout with the default GPG key in default GPG keyring:
Included in csvkit.
in2csv {{data.xls}}
• Format C/C++ source according to the Linux style guide, automatically back up the
original files, and replace with the indented versions:
• Format C/C++ source according to the GNU style, saving the indented version to a
different file:
• Format C/C++ source according to the style of Kernighan & Ritchie (K&R), no tabs,
3 spaces per indent, and wrap lines at 120 characters:
• Analyse code using the configuration file (or create one if it does not exist):
infection
infection --only-covered
infection --show-mutations
influx
info
info {{menu_item}}
• Start reading at second menu item within first menu item manual:
initdb -D /usr/local/var/postgres
inkmake
GNU Makefile-style SVG exporting using Inkscape's backend.
inkmake {{path/to/Inkfile}}
• Display help:
inkmake --help
inkscape
An SVG (Scalable Vector Graphics) editing program.
inkscape {{filename.svg}}
• Export an SVG file into a bitmap with the default format (PNG) and the default
resolution (96 DPI):
• Export an SVG file into a bitmap of 600x400 pixels (aspect ratio distortion may
occur):
• Export the drawing (bounding box of all objects) of an SVG file into a bitmap:
• Duplicate the object with id="path123", rotate the duplicate 90 degrees, save the
file, and quit Inkscape:
• Preview an SVG:
inkview {{path/to/file.svg}}
install-tl -no-gui
• Start the GUI installer (default on macOS and Windows, requires Tcl/Tk):
install-tl -gui
• Start the installer with the settings from a specific profile file:
• Start the installer for installation on a portable device, like a USB stick:
install-tl -portable
install-tl -help
install
Copy files and set attributes.
Copy files (often executable) to a system location like /usr/local/bin, give them the
appropriate permissions/ownership.
ionic start
ionic serve
ionic g {{page}}
ionic info
ionice -p {{pid}}
ioping
Monitor I/O latency in real time.
• Show disk I/O latency using the default values and the current directory:
ioping .
ioping -c 10 -s 1M /tmp
ioping -R {{/dev/sdX}}
sudo iotop
• Count the number of packets sent from each source address appearing in a pcap
file:
• Group and count packets read from a network interface by IP packet length:
• Count the number of bytes sent between each address pair appearing in a pcap
file:
• Remove labels with a count smaller than a given number of bytes and output a
random sample of such labels:
• Specific information about the Message Queue which has the ID 32768:
ipcs -a
iperf
Measure network bandwidth between computers.
• Run on server:
iperf -s
• Run on server using UDP mode and set server port to listen on 5001:
iperf -u -s -p {{5001}}
• Run on client:
iperf -c {{server_address}}
iperf3 -s
iperf3 -s -p {{port}}
iperf3 -c {{server}}
iperf3 -c {{server}} -R
ipfs
Inter Planetary File System.
• Add a file from local to the filesystem, pin it and print the relative hash:
• Add a directory and its files recursively from local to the filesystem and print the
relative hash:
• Save a remote file and give it a name but not pin it:
ipfs pin ls
ipfs repo gc
ipsumdump
Summarise TCP/IP dumps into a human and machine readable ASCII format.
• Print the source and destination IP addresses of all packets in a pcap file:
• Print the timestamps, source address, source port, destination address, destination
port and protocol of all packets read from a given network interface:
ipython
ipython -i {{script.py}}
• Print the path to the directory for the default IPython profile:
irssi --help
• Join a channel:
/join {{#channelname}}
/win {{window_number}}
/quit
is-up
Check whether a website is up or down.
is-up {{example.com}}
iverilog
Preprocesses and compiles Verilog HDL (IEEE-1364) code, into executable programs for
simulation.
iverilog -E {{source.v}}
jadx
Dex to Java decompiler.
Produces Java source code from Android Dex and APK files.
jadx {{path/to/file}}
• Recursively archive all files in the current directory into a .jar file:
jar cf {{file.jar}} *
jar tf {{path/to/file.jar}}
• Execute a java .class file that contains a main method by using just the class
name:
java {{classname}}
java -
agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=*:
5005 -jar {{filename.jar}}
java -version
java -help
javac
Java Application Compiler.
javac {{file.java}}
javac {{*.java}}
• Compile a .java file and place the resulting class file in a specific directory:
• Generate documentation for Java source code and save the result in a directory:
{{ifconfig}} | jc {{--ifconfig}}
jc {{ifconfig}}
{{ifconfig}} | jc {{--ifconfig}} -p
jc -p {{ifconfig}}
jcal
Display calendar information in the Jalali format, with the current day highlighted.
jcal
jcal -3
jcal {{year}}
jdupes {{directory}}
jekyll serve
jekyll build
• Clean the site (removes site output and cache directory) without building:
jekyll clean
jello
A command-line JSON processor using Python syntax.
• Output a schema of JSON or JSON Lines data from stdin to stdout (useful for grep):
• Output all elements from arrays (or all the values from objects) in JSON or JSON-
Lines data from stdin to stdout:
• Output the first element in JSON or JSON-Lines data from stdin to stdout:
• Output the value of a given key of each element in JSON or JSON-Lines data from
stdin to stdout:
• Output the value of multiple keys as a new JSON object (assuming the input JSON
has the keys key_name and other_key_name):
• Output the value of a given key to a string (and disable JSON output):
jenv version
jenv versions
jest
• Run the test suites from files within the current and subdirectories, whose paths
match the given regular expression:
• Run the tests whose names match the given regular expression:
jest --onlyChanged
jest --watch
• Show help:
jest --help
jetifier
Jetifier AndroidX transition tool in npm format, with a react-native compatible style.
jetifier
jetifier reverse
jhat
Java Heap Analysis Tool.
• Analyze a heap dump (from jmap), view via HTTP on port 7000:
jhat {{dump_file.bin}}
• Analyze a heap dump, specifying an alternate port for the http server:
• Analyze a dump letting jhat use up to 8 GB RAM (2-4x dump size recommended):
jhipster
jhipster --skip-server
jhipster --skip-client
jhipster upgrade
jhipster ci-cd
jhipster kubernetes
jhsdb
Attach to a Java process or launch a postmortem debugger to analyze the core dump
from a crashed Java Virtual Machine.
• Initialise a project:
jigsaw init
jigsaw build
jigsaw serve
• Print shared object mappings for a Java process (output like pmap):
jmap {{java_pid}}
• Dump contents of the heap into a binary file for analysis with jhat:
jmtpfs {{path/to/directory}}
jmtpfs --listDevices
fusermount -u {{path/to/directory}}
jobs
Display status of jobs in the current session.
jobs
jobs %{{job_id}}
jobs -l
jobs -p
joe
Joe's own text editor.
joe
joe {{path/to/file}}
john {{path/to/hashes.txt}}
john --list=formats
john --restore={{path/to/mycrack.rec}}
join
Join lines of two sorted files on a common field.
• Join two files using a comma (instead of a space) as the field separator:
• Launch JOSM:
josm
josm --maximize
josm --reset-preferences
josm --skip-plugins
jp2a
Convert JPEG images to ASCII.
jp2a {{path/to/image.jpeg}}
jp2a {{www.example.com/image.jpeg}}
• Write the ASCII output in HTML file format, suitable for viewing in web browsers:
jps
jps -q
jps -m
jps -l
jps -v
jq
A command-line JSON processor that uses a domain-specific language.
jq . {{file.json}}
• Output all elements from arrays (or all the values from objects) in a JSON file:
jq '.[]' {{file.json}}
• Read JSON objects from a file into an array, and output it (inverse of jq .[]):
jq --slurp . {{file.json}}
jq '.[0]' {{file.json}}
• Output the value of a given key of each element in a JSON text from stdin:
• Output the value of multiple keys as a new JSON object (assuming the input JSON
has the keys key_name and other_key_name):
• Output the value of a given key to a string (and disable JSON output):
jrnl
jrnl -n {{10}}
• View everything that happened from the start of last year to the start of last
march:
json5 {{path/to/input_file.json5}}
json5 --help
jstack
Java Stack Trace Tool.
jstack {{java_pid}}
• Print mixed mode (Java/C++) stack traces for all threads in a Java process:
jstack -m {{java_pid}}
julia
julia {{program.jl}}
julia -e '{{julia_code}}'
julia -p {{N}}
jupyter
Web application to create and share documents that contain code, visualizations and
notes.
Primarily used for data analysis, scientific computing and machine learning.
jupyter notebook
jupyter lab
jupytext
Tool to convert Jupyter notebooks to plain text documents, and back again.
• Update the input cells in a notebook and preserve outputs and metadata:
Encryption algorithms available are HS256, HS384, HS512, RS256, RS384, RS512, ES256,
ES384.
• Decode a JWT:
k6 run {{script.js}}
• Run load test locally with a given number of virtual users and duration:
• Run load test locally and discard response bodies (significantly faster):
• Run load test locally using the base JavaScript compatibility mode (significantly
faster):
k6 cloud {{script.js}}
k8s-unused-secret-detector
Command-line interface tool for detecting unused Kubernetes secrets.
k8s-unused-secret-detector
k8s-unused-secret-detector -n {{namespace}}
k8sec list
• Unset a secret:
• Consume messages starting with the oldest offset and exit after the last message is
received:
kafkacat -L -b {{brokers}}
kafkacat -Q -t {{topic}}:{{partition}}:{{unix_timestamp}} -b
{{brokers}}
kaggle
Official CLI for Kaggle implemented in Python 3.
kahlan
kahlan --config={{path/to/configuration_file}}
kahlan --reporter={{dot|bar|json|tap|verbose}}
• Run specifications with code coverage (detail can be between 0 and 4):
kahlan --coverage={{detail_level}}
kak
Kakoune is a mode-based code editor implementing the "multiple selections" paradigm.
Data can be selected and simultaneously edited in different locations, using multiple
selections; users can also connect to the same session for collaborative editing.
kak {{path/to/file}}
• Enter insert mode from normal mode, to write text into the file:
<Escape>
%s{{foo}}<Enter>c{{bar}}<Escape>
• Unselect all secondary selections, and keep only the main one:
<Space>
/\d+<Enter>N
!cat {{path/to/file}}<Enter>
:w<Enter>
kate
KDE Text Editor.
kate {{https://example.com/path/to/file}}
kate --new
• Open a file in Kate with the cursor at the specific line and column:
• Launch Kate, creating a new temporary file with contents read from stdin:
• Display help:
kate --help
kdeconnect-cli
KDE Connect CLI.
kdeconnect-cli --list-devices
kdeconnect-cli --list-available
keepass2
keepass2 {{path/to/database.kbdx}}
• Search entries:
• Delete an entry:
• Sign a file:
• Encrypt a file:
• Decrypt a file:
keybase deprovision
keychain
Re-use ssh-agent and/or gpg-agent between logins.
keychain
keychain --list
keychain --list-fp
ikhal
• Print all events scheduled in personal calendar for the next seven days:
• Print all events scheduled not in personal calendar for tomorrow at 10:00:
• Print a calendar with a list of events for the next three months:
khal calendar
All signals except for SIGKILL and SIGSTOP can be intercepted by the process to
perform a clean exit.
kill {{process_id}}
• List available signal names (to be used without the SIG prefix):
kill -l
kill %{{job_id}}
• Terminate a program using the SIGHUP (hang up) signal. Many daemons will
reload instead of terminating:
• Terminate a program using the SIGINT (interrupt) signal. This is typically initiated
by the user pressing Ctrl + C:
• Send a SIGUSR1 signal to all processes with the given GID (group id):
All signals except SIGKILL and SIGSTOP can be intercepted by the process, allowing a
clean exit.
killall {{process_name}}
• List available signal names (to be used without the 'SIG' prefix):
killall --list
killall -i {{process_name}}
• Terminate a process using the SIGINT (interrupt) signal, which is the same signal
sent by pressing Ctrl + C:
Designed for testing Kubernetes itself, but may be used for local development or
continuous integration.
kitty
• Build an appliance:
• Display help:
kiwi-ng help
• Display version:
kiwi-ng -v
knife
CLI for interacting with a Chef server from a local Chef repo.
• Show a node:
• Edit a node:
• Edit a role:
kompose up -f {{docker-compose.yml}}
• Delete a cluster:
kotlin {{filename.jar}}
kotlin -version
kotlinc
Kotlin compiler.
kotlinc
kotlinc {{path/to/file.kt}}
• Compile a Kotlin file into a self contained jar file with the Kotlin runtime library
included:
ksh
ksh -c "{{command}}"
• Execute a script:
ksh {{path/to/script.ksh}}
ksh -x {{path/to/script.ksh}}
kube-capacity
A simple CLI that provides an overview of the resource requests, limits, and utilization
in a Kubernetes cluster.
Combine the best parts of kubectl top and kubectl describe into a CLI focused
on cluster resources.
• Output a list of nodes with the total CPU and Memory resource requests and
limits:
kube-capacity
• Include pods:
kube-capacity -p
• Include utilization:
kube-capacity -u
kube-fzf
Shell commands for command-line fuzzy searching of Kubernetes Pods.
findpod
findpod -a
• Describe a pod:
describepod
tailpod
execpod {{shell_command}}
• Port-forward a pod:
pfpod {{port_number}}
kubeadm
Command-line interface for creating and managing Kubernetes clusters.
kubeadm init
• Check if the Kubernetes cluster is upgradeable and which versions are available:
kubeadm reset
kubectl delete
Delete Kubernetes resources.
• Show pod logs newer than a relative time like 10s, 5m, or 1h:
• Run an Ubuntu pod interactively, never restart it, and remove it when it exits:
• Run an Ubuntu pod, overriding the default command with echo, and specifying
custom arguments:
Some subcommands such as kubectl run have their own usage documentation.
• Update specified pod with the label 'unhealthy' and the value 'true':
kubectl cluster-info
kubectx
kubectx {{name}}
kubectx -
kubectx -d {{name}}
kubens
Utility to switch between Kubernetes namespaces.
kubens
kubens {{name}}
kubens -
kubetail
Utility to tail multiple Kubernetes pod logs at the same time.
• Tail the logs of multiple pods (whose name starts with "my_app") in one go:
kubetail {{my_app}}
kubetail {{my_app_1}},{{my_app_2}}
kustomize
Kustomize is a tool to easily deploy resources for Kubernetes.
• Create a new MySQL database with the same name as the project:
lambo edit-config
• Open the configuration file that is run after new applications have been
scaffolded:
lambo edit-after
laravel-zero
A command-line installer for the Laravel Zero framework.
laravel-zero self-update
laravel-zero list
laravel
A command-line installer for the Laravel framework.
laravel list
last
View the last logged in users.
• View last logins, their duration and other information as read from /var/log/
wtmp:
last
last -n {{login_count}}
• Print the full date and time for entries and then display the hostname column last
to prevent truncation:
last -F -a
• View all logins by a specific user and show the IP address instead of the hostname:
last {{username}} -i
• View all recorded reboots (i.e., the last logins of the pseudo user "reboot"):
last reboot
• View all recorded shutdowns (i.e., the last logins of the pseudo user "shutdown"):
last shutdown
latex
Compile a DVI document from LaTeX source files.
latex {{source.tex}}
latexmk
latexmk {{source.tex}}
latexmk -f {{source.tex}}
latexmk -c {{source.tex}}
latexmk -c
lb
A tool for managing a blog contained in the current directory.
Drafts and posts to operate on are selected interactively when running the commands.
lb new
• Edit a draft:
lb edit
• Delete a draft:
lb trash
• Publish a draft:
lb publish
lb delete
lb revise
ldapsearch
CLI utility for querying an LDAP directory.
• Query an LDAP server for all items that are a member of the given group and
return the object's displayName value:
• Query an LDAP server with a no-newline password file for all items that are a
member of the given group and return the object's displayName value:
• Return all items that are part of multiple groups, returning the display name for
each item:
• Return all items that are members of at least 1 of the specified groups:
ldapsearch -D '{{admin_DN}}' -w '{{password}}' -h
{{ldap_host}} '(|({{memberOf=group1}})({{memberOf=group1}})
({{memberOf=group3}}))' displayName
leave {{time_to_leave}}
leave {{1200}}
leave +{{amount_of_time}}
leave +{{0404}}
lebab
A JavaScript modernizer for transpiling code to ES6/ES7.
lebab --help
lebab {{path/to/input_file}}
• Replace all .js files in-place in the specified directory, glob or file:
ledger budget
ledger stats
lein
Manage Clojure projects with declarative configuration.
lein repl
lein test
• Package up the project files and all its dependencies into a jar file:
lein uberjar
less
Open a file for interactive reading, allowing scrolling and search.
• Open a file:
less {{source_file}}
G (end), g (start)
/{{something}}
?{{something}}
• Exit:
q
lex
Lexical analyser generator.
Given the specification for a lexical analyser, generates C code implementing it.
lex {{analyser.l}}
• Print a license to stdout, using the defaults (auto-detected author name, and
current year):
license {{license_name}}
license ls
light-arionum-cli
light-arionum-cli balance
light-arionum-cli export
light-arionum-cli block
light-arionum-cli transactions
• Generate an HTML report for a specific website and save it to a file in the current
directory:
lighthouse {{https://example.com}}
• Generate a report using the browser in headless mode without logging to stdout:
• Generate a report, using the HTTP header key/value pairs in the specified JSON file
for all requests:
lighthouse --only-
categories={{performance,accessibility,best-
practices,seo,pwa}} {{https://example.com}}
• Display help:
lighthouse --help
lilypond
Typeset music and/or produce MIDI from file.
lilypond {{path/to/file}}
lilypond -s {{path/to/file}}
• Compile the specified file, and also specify the output filename:
lilypond --version
link
Create a hard link to an existing file.
linkchecker {{https://example.com/}}
live-server
live-server --port={{8081}}
live-server --open={{about.html}}
live-server --proxy={{/}}:{{http:localhost:3000}}
llc
Compiles LLVM Intermediate Representation or bitcode to target-specific assembly
language.
• Compile a bitcode or IR file to an assembly file with the same base name:
llc {{path/to/file.ll}}
• Debug an executable:
lldb {{executable}}
lldb -p {{pid}}
• Wait for a new process to launch with a given name, and attach to it:
lldb -w -n {{process_name}}
lli
Directly execute programs from LLVM bitcode.
lli {{path/to/file.ll}}
tldr ar
llvm-as
LLVM Intermediate Representation (.ll) to Bitcode (.bc) assembler.
• Assemble an IR file:
• Assemble an IR file and include a module hash in the produced Bitcode file:
llvm-bcanalyzer {{path/to/file.bc}}
llvm-config --prefix
llvm-config --targets-built
llvm-dis
Converts LLVM bitcode files into human-readable LLVM Intermediate Representation
(IR).
llvm-dis {{path/to/input.bc}} -o -
llvm-dis {{path/to/file.bc}}
• Convert a bitcode file to LLVM IR, writing the result to the specified file:
tldr clang++
llvm-gcc
This command is an alias of clang.
tldr clang
llvm-nm
This command is an alias of nm.
tldr nm
llvm-objdump
This command is an alias of objdump.
tldr objdump
llvm-strings
This command is an alias of strings.
tldr strings
lmms
Free, open source, cross-platform digital audio workstation.
Render a .mmp or .mmpz project file, dump a .mmpz as XML, or start the GUI.
lmms
ln -s {{/path/to/file_or_directory}} {{path/to/symlink}}
ln {{/path/to/file}} {{path/to/hardlink}}
loadtest
Run a load test on the selected HTTP or WebSockets URL.
• Run with concurrent users and a specified amount of requests per second:
loc
loc {{path/to/directory}}
loc --files
• Print lines of code without .gitignore (etc.) files (e.g. two -u flags will additionally
count hidden files and dirs):
loc -u
local
Declare local variables and give them attributes.
local {{variable}}="{{value}}"
local -i {{variable}}="{{value}}"
local -r {{variable}}="{{value}}"
locust
Load-testing tool to determine number of concurrent users a system can handle.
locust --host={{http://example.com}}
• Run test without web interface, spawning 1 user a second until there are 100 users:
logger {{message}}
• Send the output to a remote syslog server running at a given port. Default port is
514:
• Use a specific tag for every line logged. Default is the name of logged in user:
• Log messages with a given priority. Default is user.notice. See man logger for
all priority options:
logname
logstash
An Elasticsearch ETL (extract, transform and load) tool.
Commonly used to load data from various sources (such as databases and log files) into
Elasticsearch.
lolcat {{path/to/file}}
{{fortune}} | lolcat
lolcat -a {{path/to/file}}
lolcat -t {{path/to/file}}
lorem
Create more or less random lorem ipsum text.
lorem -n {{20}}
• Print the output of a command to the default printer (see lpstat command):
echo "test" | lp
lp {{path/to/filename}}
lp -d {{printer_name}} {{path/to/filename}}
• Print N copies of file to default printer (replace N with desired number of copies):
lp -n {{N}} {{path/to/filename}}
• Print only certain pages to the default printer (print pages 1, 3-5, and 16):
lp -P 1,3-5,16 {{path/to/filename}}
lp -i {{job_id}} -H resume
lpass
Command-line interface for the LastPass password manager.
lpass status
lpass ls
• Generate a new password for gmail.com with the identifier myinbox and add to
LastPass:
lpinfo -v
lpinfo -m
See also lpstat and lpadmin for listing and configuring printers.
lpr {{path/to/file}}
• Print 2 copies:
lpr -o sides={{two_sided_long_edge|two_sided_short_edge}}
{{path/to/file}}
• List printers present on the machine and whether they are enabled for printing:
lpstat -p
lpstat -d
lpstat -t
lpstat -u {{user}}
ls
List directory contents.
ls -1
ls -a
ls -F
• Long format list (permissions, ownership, size, and modification date) of all files:
ls -la
• Long format list with size displayed using human-readable units (KiB, MiB, GiB):
ls -lh
ls -lS
• Long format list of all files, sorted by modification date (oldest first):
ls -ltr
ls -d */
lsd
List directory contents.
lsd -1
• List all files and directories, including hidden ones, in the current directory:
lsd -a
• List all files and directories with trailing / added to directory names:
lsd -F
• List all files and directories in long format (permissions, ownership, size, and
modification date):
lsd -la
• List all files and directories in long format with size displayed using human-
readable units (KiB, MiB, GiB):
lsd -lh
• List all files and directories in long format, sorted by size (descending):
lsd -lS
• List all files and directories in long format, sorted by modification date (oldest
first):
lsd -ltr
lsd -d {{*/}}
lsof
Lists open files and the corresponding processes.
Note: Root privileges (or sudo) is required to list files opened by others.
lsof {{path/to/file}}
lsof -i :{{port}}
lsof -t {{path/to/file}}
lsof -u {{username}}
lsof -c {{process_or_command_name}}
lsof -p {{PID}}
lsof +D {{path/to/directory}}
• Find the process that is listening on a local IPv6 TCP port and don't convert
network or port numbers:
lt --port {{8000}}
lua
lumen list
lwp-request
Simple command-line HTTP client.
• Visit a website:
lynx {{example.com}}
• Exit:
q then y
lz4
Compress or decompress .lz4 files.
• Compress a file:
lz4 {{file}}
• Decompress a file:
lz4 -d {{file.lz4}}
lz4 -9 {{file}}
lzop
Compress or decompress files with LZO compression.
lzop {{file}}
• Decompress a file:
lzop -d {{file}}.lzo
m4 {{path/to/file}}
m4 -D{{macro_name}}={{macro_value}} {{path/to/file}}
magento
A CLI for managing the Magento PHP framework.
magento setup:upgrade
magento setup:di:compile
magento setup:static-content:deploy
magento maintenance:enable
magento maintenance:disable
magento list
magick
Create, edit, compose, or convert bitmap images.
• Send a typed email message. The command-line below continues after pressing
Enter key. Input CC email-id (optional) press Enter key. Input message text (can be
multiline). Press Ctrl-D key to complete the message text:
• Send mail (the content should be typed after the command, and ended with
Ctrl+D):
• Call the first target specified in the Makefile (usually named "all"):
make
make {{target}}
makebuildserver
makebuildserver --clean
makensis
Cross-platform compiler for NSIS installers.
makensis {{path/to/file.nsi}}
makepasswd
man {{command}}
man --path
man -w {{command}}
man -k "{{search_string}}"
Masscan
Network scanner for scanning as fast as possible.
Best run with elevated priviledges. Nmap compability run masscan --nmap to find out
more.
• Scan a class B subnet for the top 100 ports at 100,000 packets per second:
• Scan the Internet for a specific port range and export to a file:
mat2 --list
mat2 {{path/to/file}}
• Remove metadata from a file and print detailed output to the console:
matlab -nosplash
matlab -r "{{matlab_statement}}"
matlab -r "run({{path/to/script.m}})"
maza
Local ad blocker. Like Pi-hole but local and using the operating system.
maza update
• Start Maza:
• Stop Maza:
maza status
mc
Midnight Commander, a terminal based file manager.
Navigate the directory structure using the arrow keys, the mouse or by typing the
commands into the terminal.
• Start mc:
mc
mc -b
md5sum
Calculate MD5 cryptographic checksums.
md5sum {{path/to/file}}
• Read a file of MD5SUMs and verify all files have matching checksums:
md5sum -c {{path/to/file.md5}}
mdp {{presentation.md}}
mediainfo {{file}}
• Store the output to a given file along with displaying in the console:
mediainfo --Info-Parameters
meld
Graphical diffing and merging tool.
• Start meld:
meld
• Compare 2 files:
• Compare 2 directories:
• Compare 3 files:
mesg
mesg n
mesg y
meshlabserver
Command-line interface for the MeshLab 3D mesh processing software.
• Convert a WRL file to a OFF file, including the vertex and face normals in the
output mesh:
meshlabserver -d {{filename}}
• Process a 3D file using a filter script created in the MeshLab GUI (Filters > Show
current filter script > Save Script):
• Process a 3D file using a filter script, writing the output of the filters into a log file:
meson --help
meson --version
meteor
Full-stack JavaScript platform for building web applications.
meteor
meteor list
• Create a production build of the project as a tarball under the given directory:
You can use your keyboard, but also your mouse to navigate and/or select text.
• Open a file:
micro {{file}}
• Save a file:
Ctrl + S
Ctrl + K
• Execute a command:
• Quit:
Ctrl + Q
middleman
Static site generator written in Ruby.
middleman server
middleman deploy
minetest
Multiplayer infinite-world block sandbox.
minetest
minetest --quiet
minetestserver
Multiplayer infinite-world block sandbox server.
minetestserver
minetestserver --terminal
mingle
Bundle the edges of a graph layout.
• Bundle the edges of one or more graph layouts (that already have layout
information):
mingle -?
minifab
Utility tool that automates the setup and deployment of Hyperledger Fabric networks.
minifab up -i {{minifab_version}}
minifab down
minifab approve,commit,initialize,discover
minikube start
minikube ip
• Access a service named my_service exposed via a node port and get the URL:
minikube dashboard
minikube stop
minikube delete
miniserve
Simple HTTP file server CLI.
• Serve a directory:
miniserve {{path/to/directory}}
miniserve {{path/to/file}}
minisign -G
• Sign a file:
• Sign a file, adding a trusted (signed) and an untrusted (unsigned) comment in the
signature:
• Verify a file and the trusted comments in its signature using the specified public
key file:
• Verify a file and the trusted comments in its signature, specifying a public key as a
Base64 encoded literal:
mitmdump -w {{filename}}
mitmproxy
• Compile project:
mix compile
mix test
mix help
mixxx
Free and open source cross-platform DJ software.
mixxx --fullScreen
• Debug a malfunction:
mixxx --help
mkcert
Tool for making locally-trusted development certificates.
mkcert -install
mkcert {{example.org}}
• Generate wildcard certificate and private key for a given domain and its
subdomains:
mkcert "{{*.example.it}}"
mkcert -uninstall
mkdir
Creates a directory.
mkdir {{directory}}
mkdir -p {{path/to/directory}}
mkfifo
Makes FIFOs (named pipes).
mkfifo {{path/to/pipe}}
mktemp
Create a temporary file or directory.
• Create an empty temporary file and return the absolute path to it:
mktemp
mktemp -d
mktorrent -a {{tracker_announce_url,tracker_announce_url_2}}
-l {{21}} -o {{path/to/example.torrent}} {{path/to/
file_or_directory}}
• Display help:
mm2gv -?
mmdc
CLI for mermaid, a diagram generation tool with a domain-specific language.
A mermaid definition file is taken as input and a SVG, PNG, or PDF file is generated as
output.
• Convert a file to the specified format (automatically determined from the file
extension):
mmls {{path/to/image_file}}
• Display the partition table with an additional column for the partition size:
mmls -B -i {{path/to/image_file}}
mmv "{{[0-1][0-9]-[0-3][0-9]-[0-9][0-9][0-9][0-9].txt}}"
"{{#3#4-#1#2-#5#6#7#8.txt}}"
mocha
Execute Mocha JavaScript test runner.
mocha
mocha {{directory/with/tests}}
• Run tests on changes to JavaScript files in the current directory and once initially:
mocha --watch
• Open moe and create a backup file (file~) when saving edits:
moe {{path/to/file}}
Ctrl + X
mogrify
Perform operations on multiple images, such as resizing, cropping, flipping, and adding
effects.
• Resize all JPEG images in the directory to 50% of their initial size:
• Run tests:
molecule test
molecule create
molecule converge
molecule login
mongo
MongoDB interactive shell client.
• Connect to a database:
mongo {{database}}
• Connect to a database with a given username; user will be prompted for password:
• Create a dump of all databases (this will place the files inside a directory called
"dump"):
mongodump
• Create a dump of a given database with a given username; user will be prompted
for password:
• Create a dump from a specific instance; host, user, password and database will be
defined in the connection string:
mongoexport --uri={{connection_string}} --
collection={{collection_name}}
• Export the documents in the specified collection that match a query to a JSON file:
mongoexport --db={{database_name}} --
collection={{collection_name}} --query="{{query_object}}" --
out={{path/to/file.json}}
• Export documents that match the query in the specified file to a CSV file, omitting
the list of field names on the first line:
mongoexport --uri={{mongodb_uri}} --
collection={{collection_name}} --pretty
• Display help:
mongoexport --help
mongoimport
Imports content from a JSON, CSV, or TSV file into a MongoDB database.
mongoimport --file={{path/to/file.json}} --
uri={{mongodb_uri}} --collection={{collection_name}}
• Import a CSV file, using the first line of the file to determine field names:
• Import a JSON file using a specific mode and a query to match existing documents:
• Import a CSV file, reading field names from a separate CSV file and ignoring fields
with empty values:
• Display help:
mongoimport --help
mongorestore
Utility to import a collection or database from a binary dump into a MongoDB instance.
• Start MonoDevelop:
monodevelop
monodevelop {{path/to/file}}
monodevelop {{path/to/file}};{{line_number}};
{{column_number}}
monodevelop --new-window
monodevelop --no-redirect
monodevelop --perf-log
monodis
The Mono Common Intermediate Language (CIL) disassembler.
monodis {{path/to/assembly.exe}}
monop {{System.String}}
monop -r:{{path/to/assembly.exe}}
• Tile images into a grid, automatically resizing images larger than the grid cell size:
• Tile images into a grid, automatically calculating the grid cell size from the largest
image:
• Set the grid cell size and resize images to fit it before tiling:
• Limit the number of rows and columns in the grid, causing input images to
overflow into multiple output montages:
• Resize and crop images to fill their grid cells before tiling:
• Open a file:
more {{path/to/file}}
• Display help:
more --help
<Space>
/{{something}}
• Exit:
h
moro
Track work time.
• Invoke moro without parameters, to set the current time as the start of the
working day:
moro
moro hi {{09:30}}
• Invoke moro without parameters a second time, to set the current time at the end
of the working day:
moro
• Show a report of time logs and notes for the current working day:
moro report
• Show a report of time logs and notes for all working days on record:
mosh {{username}}@{{remote_host}}
• Start mosquitto:
mosquitto
mosquitto --daemon
mosquitto_passwd
Manage password files for mosquitto.
• Add a new user to a password file (will prompt to enter the password):
mosquitto_passwd -U {{path/to/password_file}}
mosquitto_pub
A simple MQTT version 3.1.1 client that will publish a single message on a topic and
exit.
• Publish light switch status and retain the message on the topic switches/
kitchen_lights/status to a remote host because there may be a long period
of time between light switch events:
• Send the contents of a file (data.txt), by reading from stdin and send the entire
input as a message and publish it to sensors/temperature topic:
• Read newline delimited data from stdin as a message and publish it to sensors/
temperature topic:
• Subscribe to multiple topics matching a given pattern. (+ takes any metric name):
mosquitto_sub -t {{sensors/machines/+/temperature/+}}
most
Open one or several files for interactive reading, allowing scrolling and search.
• Open a file:
most {{path/to/file}}
:O n
{{100}}j
<CTRL-x> o
• Exit:
Q
mount
Provides access to an entire filesystem in one directory.
mount
mount -a
mount {{/my_drive}}
mozillavpn login
mozillavpn activate
mozillavpn status
mozillavpn servers
mozillavpn deactivate
• Log out:
mozillavpn logout
mp3info {{path/to/file.mp3}}
mp3info -i {{path/to/file.mp3}}
• Set the number of the track in the album for a specific MP3 file:
mp3info -G
• Toggle play/pause:
mpc toggle
• Stop playing:
mpc stop
mpc status
mpc next
mpc prev
mpc [+-]{{seconds}}
mpd
Music Player Daemon.
• Start MPD:
mpd
mpd --no-config
mpd --no-daemon
mpd --kill
mpg321
High Performance MPEG 1.0/2.0/2.5 Audio Player for Layer 1, 2, and 3.
Mpg321 was written (sometime in 1999) to be a drop-in replacement for the (previously)
non-free mpg123 player.
mpg321 -B {{path/to/directory}}
• Play all files in the current directory and subdirectories, randomly (until
interrupted), with Basic Keys enabled:
mpg321 -B -Z -K .
mplayer
Cross-platform multimedia player.
mplayer {{path/to/file|url}}
• Pause playback:
<Space>
• Quit mplayer:
<Escape>
<Left> or <Right>
mpv
A audio/video player based on MPlayer.
mpv {{file}}
mpv '{{https://www.youtube.com/watch?v=dQw4w9WgXcQ}}'
DOWN <or> UP
[ <or> ]
mpv /dev/{{video0}}
mr
Manage all of your version control repositories at once.
• Register a repository:
mr register
mr -j{{5}} update
mr status
mr checkout
msbuild
The Microsoft build tool for Visual Studio project solutions.
msbuild
msbuild {{path/to/project_file}}
• Display detailed information at the end of the log about how the project was
configured:
msbuild /help
mscore
This command is an alias of musescore.
tldr musescore
msfvenom
Manually generate payloads for metasploit.
• List payloads:
msfvenom -l payloads
• List formats:
msfvenom -l formats
msfvenom -p linux/x64/meterpreter/reverse_tcp
LHOST={{local_ip}} LPORT={{local_port}} -f elf > {{path/to/
binary}}
msfvenom -p windows/x64/meterpreter/reverse_tcp
LHOST={{local_ip}} LPORT={{local_port}} -f exe > {{path/to/
binary.exe}}
msmtp
An SMTP client.
mtr {{host}}
mtr -n {{host}}
mtr -w {{host}}
mtr -4 {{host}}
• Wait for a given time (in seconds) before sending another packet to the same hop:
• Initialize the email database, optionally specifying the Maildir directory and email
addresses:
mu index
• Find messages using a specific keyword (in message body, subject, sender, ...):
mu find {{keyword}}
• Find messages to Alice with subject jellyfish containing the words apples or
oranges:
• Find unread messages about words starting with soc (the * only works at the end
of the search term) in the Sent Items folder:
• Find messages from Sam with attached images, between 2 KiB and 2 MiB, written
in 2021:
mu cfind {{Bob}}
multipass
CLI to manage Ubuntu virtual machines using native hypervisors.
multipass find
• Launch a new instance, set its name and use a cloud-init configuration file:
multipass list
multitail -Q 1 '{{pattern}}'
multitail -Q 1 '{{directory}}/*'
multitail -Q {{pattern}}
• Show 5 logfiles while merging 2 and put them in 2 columns with only one in the
left column:
mupdf {{filename}}
mupdf -I {{filename}}
mupdf -C {{FF0000}}
mupdf -A {{0}}
musescore
MuseScore 3 sheet music editor.
musescore --debug
musescore --experimental
• Export the given file to the specified output file. The file type depends on the given
extension:
• Start a project:
• Stop a project:
• Extract all images, fonts and resources embedded in a PDF out into the current
directory:
mutt -f {{mailbox}}
• Specify a draft file containing the header and the body of the message, in RFC 5322
format:
mv {{source}} {{target}}
mv -f {{source}} {{target}}
mv -i {{source}} {{target}}
mv -n {{source}} {{target}}
• Move files in verbose mode, showing files after they are moved:
mv -v {{source}} {{target}}
mvn
Apache Maven.
• Compile a project:
mvn compile
• Compile and package the compiled code in its distributable format, such as a jar:
mvn package
• Install the built package in local maven repository. (This will invoke the compile
and package commands too):
mvn install
mvn clean
• Clean and then package the code with a given build profile:
• Connect to a local database on port 3306, using the current user's username:
mycli {{database_name}}
• Connect to a database:
mysql {{database_name}}
• Restore a database from a backup created with mysqldump (user will be prompted
for a password):
• Restore all databases from a backup (user will be prompted for a password):
mysqld
mysqld --console
mysqld --log={{path/to/file.log}}
mysqld --print-defaults
mysqld --defaults-file={{path/to/file}}
mysqld --port={{port}}
• Backup a specific table redirecting the output to a file (user will be prompted for a
password):
• Backup all databases redirecting the output to a file (user will be prompted for a
password):
• Backup all databases from a remote host, redirecting the output to a file (user will
be prompted for a password):
• Start mytop:
mytop
• Connect with a specified username (the user will be prompted for a password):
n {{version}}
• Remove a version:
n rm {{version}}
n bin {{version}}
nano
Simple, easy to use command-line text editor. An enhanced, free Pico clone.
nano
nano {{path/to/file}}
• Open a specific file, positioning the cursor at the specified line and column:
• Open a specific file and indent new lines to the previous lines' indentation:
• Open nano and create a backup file (file~) when saving edits:
• Assemble source.asm into a binary file source, in the (default) raw binary
format:
nasm {{source.asm}}
nasm -hf
• Add a directory (must be written with trailing slash) to the include file search path
before assembling:
nativefier {{url}}
nbtscan {{192.168.0.1/24}}
nbtscan {{192.168.0.1}}
nbtscan -v {{192.168.0.1/24}}
nbtscan -e {{192.168.0.1/24}}
nbtscan -f {{path/to/file.txt}}
nc
Netcat is a versatile utility for working with TCP or UDP data.
nc -l {{port}}
nc {{ip_address}} {{port}}
• Set a timeout:
nc -k -l {{port}}
nc -q {{timeout}} {{ip_address}}
nc -v -z {{ip_address}} {{port}}
• Act as proxy and forward data from a local TCP port to the given remote host:
• Bundle a Node.js application into a temporary directory and run it for testing:
ncmpcpp --current-song
Layouts: dot, neato, twopi, circo, fdp, sfdp, osage & patchwork.
• Render a png image with a filename based on the input filename and output
format (uppercase -O):
• Render a svg image with the specified output filename (lowercase -o):
• Render the output in ps, pdf, svg, fig, png, gif, jpg, json, or dot format:
• Display help:
neato -?
ned
Is like grep but with powerful replace capabilities.
• Simple replace:
• Preview results of a find and replace without updating the target files:
• Return the default config, and create it if it's the first time the program runs:
neofetch
• Trigger an info line from appearing in the output, where 'infoname' is the function
name in the config file, e.g. memory:
• Hide/Show OS architecture:
neomutt -f {{path/to/mailbox}}
• Specify a draft file containing the header and the body of the message, in RFC 5322
format:
netlify login
netlify deploy
netlify init
netlify dev
netstat
Displays network-related information such as open connections, open socket ports, etc.
netstat --all
netstat --listening
netstat --tcp
netstat --program
netstat --continuous
• List listening TCP and UDP ports (+ user and process if you're root):
newsboat -i {{my-feeds.xml}}
newsboat -r
• See keyboard shortcuts (the most relevant are visible in the status line):
?
next
React framework that uses server-side rendering for building optimized web
applications.
next dev
next build
next start
next export
next telemetry
• Run with a given work directory for intermediate files, save execution report:
nextflow log
nextflow list
• Update Nextflow:
nextflow self-update
nf-core
The nf-core framework tools, to create, check and develop best-practice guidelines for
Nextflow.
nf-core list
nf-core create
ng new {{project_name}}
• Run the application with the following command in its root directory:
ng serve
ng build
ng test
ng version
nginx
Nginx web server.
nginx
nginx -c {{config_file}}
• Start server with a prefix for all relative paths in the config file:
nginx -t
nginx -s reload
ngrep
Filter network traffic packets using regular expressions.
ngrep -d any
ngrep -d {{eth0}}
• Execute a script:
ngs {{path/to/script.ngs}}
ngs --version
nice
Execute a program with a custom scheduling priority (niceness).
Niceness values range from -20 (the highest priority) to 19 (the lowest).
• Generate HTML documentation for a module (output will be placed in the current
directory):
• Install a package:
nimble list -i
nimble init
nimble build
nimble install
ninja
A Build system designed to be fast.
ninja
ninja -C {{path/to/directory}}
ninja -t targets
• Show help:
ninja -h
nix-build
Build a Nix expression.
nix-env -q
nix-env -q {{search_term}}
• Install package:
• Uninstall package:
nix-env -e {{pkg_name}}
nix-env -u {{pkg_name}}
nix-env -u
nix-shell
Start an interactive shell based on a Nix expression.
nix-shell
nix-shell {{default.nix}}
• Evaluate rest of file in specific interpreter, for use in #!-scripts (see https://
nixos.org/manual/nix/stable/#use-as-a-interpreter):
nix optimise-store
nix repl
nix upgrade-nix
nkf
Network kanji filter.
nkf -w {{path/to/file.txt}}
nkf -s {{path/to/file.txt}}
nl {{file}}
nl -t {{file}}
nl -b a {{file}}
• Number only the body lines that match a basic regular expression (BRE) pattern:
nl -b p'FooBar[0-9]' {{file}}
nload
A tool for visualizing network usage in the terminal.
• View all network traffic (use the arrow keys to switch interfaces):
nload
• View network traffic on specific interfaces (use the arrow keys to switch
interfaces):
nm -g {{file.o}}
nm -u {{file.o}}
nm -a {{file.o}}
nm --demangle {{file.o}}
nmap
Network exploration tool and security / port scanner.
• Check if an IP address is up, and guess the remote host's operating system:
nmap -O {{ip_or_hostname}}
• Try to determine whether the specified hosts are up and what their names are:
• Like above, but also run a default 1000-port TCP scan if host seems up:
nmap -A {{address_or_addresses}}
• Scan a specific list of ports (use -p- for all ports 1-65535):
• Perform TCP and UDP scanning (use -sU for UDP only, -sZ for SCTP, -sO for IP):
• Perform full port, service, version detection scan with all default NSE scripts active
against a host to determine weaknesses and info:
{{command}} | nms -a -c
node
Server-side JavaScript platform (Node.js).
node {{path/to/file}}
node
node -e "{{code}}"
node -p "{{process.versions}}"
• Execute the specified file and watch a specific file for changes:
nodemon {{path/to/file.js}}
• Manually restart nodemon (note nodemon must already be active for this to work):
rs
• Pass arguments to node itself if they're not nodemon arguments already (e.g. --
inspect):
nodenv version
nokogiri {{url|path/to/file}}
nop -?
noti
Monitor a process and trigger a banner notification.
• Display a notification even when you put it after the command to watch:
{{command_to_watch}}; noti
• Monitor a process by PID and trigger a notification when the PID disappears:
noti -w {{process_id}}
notmuch
Command-line based program for indexing, searching, reading, and tagging large
collections of email messages.
notmuch setup
This command is deprecated. See vercel, the updated version of this tool.
now
now list
• Remove a deployment:
now login
now init
npm-check
Check for outdated, incorrect, and unused npm package dependencies.
npm-check
npm-check --update
npm-check --update-all
npm-check --skip-unused
npm-home
Open the npm page, Yarn page, or GitHub repository of a package in the web browser.
npm-home {{package}}
npm-home -g {{package}}
npm-home -y {{package}}
npm-name
Check whether a package or organization name is available on npm.
npm-name {{package}}
npm-why {{package_name}}
npm
JavaScript and Node.js package manager.
npm init
npm install
npm list
nproc
• Display the number of installed processing units, including any inactive ones:
nproc --all
npx {{module_name}}
• In case a package has multiple binaries, specify the package name along with the
binary:
npx --help
nrm
npm registry manager.
nrm ls
nrm test
• Delete a registry:
• Query your system's default name server for an IP address (A record) of the
domain:
nslookup {{example.com}}
• Query a given name server for the whole zone file (zone transfer) of the domain
using TCP protocol:
• Query for a mail server (MX record) of the domain, showing details of the
transaction:
• Query a given name server on a specific port number for a TXT record of the
domain:
• Name a hash:
nth -t {{5f4dcc3b5aa765d61d8327deb882cf99}}
nth -f {{path/to/hashes}}
nth -t {{5f4dcc3b5aa765d61d8327deb882cf99}} -g
tldr netlify
nu
Nushell ("a new type of shell") takes a modern, structured approach to your command-
line.
nu
nu --commands "{{command}}"
• Execute a script:
nu {{path/to/script.nu}}
nu --version
nudoku
Sudoku game in terminal.
nudoku
nudoku -d {{easy|normal|hard}}
• Delete a number:
{{Backspace|x}}
• Get a hint:
Q
numfmt
Convert numbers to and from human-readable strings.
nvidia-smi
nvidia-smi --query
nvidia-smi dmon
nvim
Neovim, a programmer's text editor based on Vim, provides several modes for different
kinds of text manipulation.
Pressing i enters edit mode. <Esc> goes back to normal mode, which doesn't allow
regular text insertion.
• Open a file:
nvim {{file}}
<Esc>i
• Copy ("yank") or cut ("delete") the current line (paste it with P):
<Esc>{{yy|dd}}
<Esc>u
<Esc>/{{search_pattern}}<Enter>
<Esc>:%s/{{regular_expression}}/{{replacement}}/g<Enter>
<Esc>:wq<Enter>
<Esc>:q!<Enter>
nvm
Install, uninstall, or switch between Node.js versions under the fish shell.
Supports version numbers like "12.8" or "v16.13.1", and labels like "stable", "system", etc.
• List all available Node.js versions and highlight the default one:
nvm list
Supports version numbers like "12.8" or "v16.13.1", and labels like "stable", "system", etc.
• List all available Node.js versions and highlight the default one:
nvm list
nx build {{project}}
nx test {{project}}
nx run {{project}}:{{target}}
objdump -f {{binary}}
objdump -d {{binary}}
objdump -s {{binary}}
obs
Open Broadcaster Software.
• Launch OBS:
obs
obs --portable
obs --startrecording
obs --startreplaybuffer
obs --startstreaming
obs --minimize-to-tray
obs --verbose
oc
The OpenShift Container Platform CLI.
oc login
oc new-project {{project_name}}
oc project {{project_name}}
oc rsh {{pod_name}}
oc get pods
oc logout
ocaml
The OCaml repl (read-evaluate-print-loop).
ocaml
ocaml {{path/to/file.ml}}
ocamlc {{path/to/source_file.ml}}
ocamlc -i {{path/to/source_file.ml}}
ocamlfind
The findlib package manager for OCaml.
• Create a new searchable PDF/A file from a scanned PDF or image file:
• Skip pages of a mixed-format input PDF file that already contain text:
• Display help:
ocrmypdf --help
od
Display file contents in octal, decimal or hexadecimal format.
Optionally display the byte offsets and/or printable representation for each line.
• Display file using default settings: octal format, 8 bytes per line, byte offsets in
octal, and duplicate lines replaced with *:
od {{path/to/file}}
• Display file in verbose mode, i.e. without replacing duplicate lines with *:
od -v {{path/to/file}}
• Display file in hexadecimal format (2-byte units), with byte offsets in decimal
format:
• Display file in hexadecimal format (1-byte units), and 4 bytes per line:
• Display file in hexadecimal format along with its character representation, and do
not print byte offsets:
• Read only 100 bytes of a file starting from the 500th byte:
list functions;
• Delete a function:
show instances;
status {{instance_id}};
wait {{instance_id}};
• Kill an instance:
kill {{instance_id}};
odps resource
Manage resources in ODPS (Open Data Processing Service).
list resources;
add py {{script.py}};
• Delete resource:
• Delete table:
Some subcommands such as odps inst have their own usage documentation.
odpscmd --config={{odps_config.ini}}
use {{project_name}};
show tables;
• Describe a table:
desc {{table_name}};
• Describe a partition:
offlineimap -o
offlineimap -a {{account}}
offlineimap -f {{folder}}
ogr2ogr
Convert Simple Features data between file formats.
• Convert a CSV file into a GeoPackage, specifying the names of the coordinate
columns and assigning a coordinate reference system:
ogrinfo {{input}}.gpkg
ohdear-cli me
ohdear-cli sites:list
• Launch Okular:
okular
omf list
omf theme
• Apply a theme:
• Uninstall Oh My Fish:
omf destroy
omz
Oh My Zsh command-line tool.
• Update Oh My Zsh:
omz update
omz changelog
omz reload
opam init
opam list
opam update
opam upgrade
opam help
openconnect
A VPN client, for Cisco AnyConnect VPNs and others.
• Connect to a server:
openconnect {{vpn.example.org}}
openconnect --certificate={{path/to/file}}
{{vpn.example.org}}
openscad
Software for creating solid 3D CAD objects.
• Open a file:
openscad {{path/to/button.scad}}
• Calculate the SHA256 digest for a file, saving the result to a specific file:
• Sign a file using an RSA key, saving the result to a specific file:
• Generate an elliptic curve private key using the curve prime256v1, saving it to a
specific file:
openssl genrsa
• Save an RSA private key of an arbitrary number of bits to the output file:
• Generate an RSA private key and encrypt it with AES256 (you will be prompted for
a passphrase):
• Verify a timestamp request file and a timestamp response file from the server with
an SSL certificate file:
• Create a timestamp response for request using key and signing certificate and
output it to file.tsr:
• Convert a certificate between binary DER encoding and textual PEM encoding:
Some subcommands such as openssl req have their own usage documentation.
openssl help
openssl version
openttd
Open source clone of the Microprose game "Transport Tycoon Deluxe".
openttd -g
openttd -g {{path/to/file}}
openttd -r {{1920x1080}}
openttd -c {{path/to/file}}
openttd -f -D {{host}}:{{port}}
• Connect to the awaiting bob.example.com host with the same static key as on
bob.example.com:
• Optimize the program at level 2 and output the result to another file:
optipng {{path/to/file.png}}
orca-c
orca-c {{path/to/file.orca}}
• Start ORCA and set the maximum number of undo steps (defaults to 100):
F1
Ctrl + g
osage
Render an image of a clustered network graph from a graphviz file.
Layouts: dot, neato, twopi, circo, fdp, sfdp, osage & patchwork.
• Render a png image with a filename based on the input filename and output
format (uppercase -O):
• Render a svg image with the specified output filename (lowercase -o):
• Render the output in ps, pdf, svg, fig, png, gif, jpg, json, or dot format:
• Display help:
osage -?
p10k
Manage configurations for powerlevel10k.
p10k configure
• Reload powerlevel10k:
p10k reload
• Display help:
p10k help
p4
Perforce Version Control System.
p4 login -a
• Create a client:
p4 client
p4 sync
p4 change
p4 add
p4 describe -c {{changelist_number}}
p4 submit -c {{changelist_number}}
p5
Template builder and sketch manager for p5.js.
p5 new {{collection_name}}
p5 generate {{project_name}}
p5 server
p5 update
p7zip
Wrapper of 7-Zip file archiver with high compression ratio.
p7zip {{path/to/file}}
p7zip -k {{path/to/file}}
p7zip -d {{compressed.ext}}.7z
p7zip -d -k {{compressed.ext}}.7z
p7zip -f {{path/to/file}}
paci
A package manager for Bash scripts.
• Update the list of available packages and versions (it's recommended to run this
before other paci commands):
paci refresh
paci configure
• Install a package:
• Update a package:
• Build an image:
• Download the daily offer book into the current directory with the specified book
format (defaults to pdf):
packtpub login
packtpub logout
packtpub view-offer
packtpub view-offer
packtpub whoami
pactl
Control a running PulseAudio sound server.
• List all sinks (or other types - sinks are outputs and sink-inputs are active audio
streams):
• Change the default sink (output) to 1 (the number can be retrieved via the list
subcommand):
• Toggle mute on the default sink (using the special name @DEFAULT_SINK@):
• Use the allow boost option to increase, decrease, or set the volume above 100%:
pamixer --mute
pandoc
Convert documents between various formats.
pandoc --list-input-formats
pandoc --list-output-formats
paperkey
An OpenPGP key archiver.
• Take a specific secret key and generate a text file with the secret data:
• Take the secret key data in secret_data.txt and combine it with the public key
to reconstruct the secret key:
• Export a specific secret key and generate a text file with the secret data:
parallel-lint {{path/to/directory}}
• Lint a directory and show Git Blame results for rows containing errors:
• Break stdin into ~1M blocks, feed each block to stdin of new command:
particle setup
particle list
• Prompt for an otpauth URI token and create a new pass file:
• Prompt for an otpauth URI token and append to an existing pass file:
• Copy and don't print a 2FA code using the OTP token in a pass file:
• Prompt for an OTP secret value specifying issuer and account (at least one must be
specified) and append to existing pass file:
• Initialize (or re-encrypt) the storage using one or more GPG IDs:
• Save a new password and additional information (press Ctrl + D on a new line to
complete):
• Edit an entry:
pass -c {{path/to/data}}
pass
• Generate a new random password with a given length, and copy it to the clipboard:
• Initialize a new Git repository (any changes done by pass will be committed
automatically):
passwd
passwd {{username}}
passwd -S
• Make the password of the account blank (it will set the named account
passwordless):
passwd -d
paste
Merge lines of files.
• Join all the lines into a single line, using TAB as delimiter:
paste -s {{file}}
• Join all the lines into a single line, using the specified delimiter:
• Merge two files side by side, each in its column, using TAB as delimiter:
• Merge two files side by side, each in its column, using the specified delimiter:
• Convert colors from one format to another. Here from RGB to HSL:
pastel pick
pastel list
patch
Patch a file (or files) with a diff file.
• Apply a patch using a diff file (filenames must be included in the diff file):
Layouts: dot, neato, twopi, circo, fdp, sfdp, osage & patchwork.
• Render a png image with a filename based on the input filename and output
format (uppercase -O):
• Render a svg image with the specified output filename (lowercase -o):
• Render the output in ps, pdf, svg, fig, png, gif, jpg, json, or dot format:
• Display help:
patchwork -?
pathchk
Check the validity and portability of one or more pathnames.
pax -f {{archive.tar}}
• Copy to a directory, while keeping the original metadata; target/ must exist:
pdffonts {{path/to/file.pdf}}
• Print additional information on location of the font that will be used when the
PDF file is rasterized:
• Print additional information on location of the font that will be used when the
PDF file is converted to PostScript:
• Include file name and page number for each matched line:
• Do a case-insensitive search for lines that begin with "foo" and return the first 3
matches:
• Find pattern in files with a .pdf extension in the current directory recursively:
• Find pattern on files that match a specific glob in the current directory recursively:
• Extract all images from a PDF file and save them as PNGs:
• Extract images from a PDF file and include the page number in the output
filenames:
pdfinfo {{path/to/file.pdf}}
• Sign an A4 page (adjust delta to height for other formats) with a scanned signature
by overlaying them:
• Arrange the pages from the input file into a fancy 2x2 grid:
• Reverse the order of pages within each given file and concatenate them:
• Merge two PDFs into one with the default suffix "joined":
pdflatex {{source.tex}}
pdflatex -output-directory={{path/to/directory}}
{{source.tex}}
• Extract pages from PDF file and make a separate PDF file for each page:
pdftex {{source.tex}}
• Extract pages 1-3, 5 and 6-10 from a PDF file and save them as another one:
• Merge (concatenate) a list of PDF files and save the result as another one:
• Split each page of a PDF file into a separate file, with a given filename output
pattern:
pdftotext {{filename.pdf}} -
pdftotext {{filename.pdf}}
ps aux | peco
peerflix "{{torrent_url|magnet_link}}"
peerflix "{{magnet:?xt=urn:btih:
0123456789abcdef0123456789abcdef01234567}}" --list
• Start an interactive search for a city and fetch data for it:
peludna-prognoza
peludna-prognoza "{{city}}"
perl {{script.pl}}
perl -c {{script.pl}}
perl -e {{perl_statement}}
perl -d {{script.pl}}
• Loo[p] over all lines of a file, editing them [i]n-place using a find/replace
[e]xpression:
• Run a find/replace expression on a file, saving the original file with a given
extension:
• Run a multiline find/replace expression on a file, and save the result in another
file:
• Run a regular expression on stdin, printing out the first capture group for each
line:
pest --init
pest
pest --coverage
• Run tests with coverage and fail if the coverage is less than the minimum
percentage:
pfetch
PF_COLOR={{0}} pfetch
pg_ctl
Utility for controlling a PostgreSQL server and database cluster.
• Dump all databases into a custom-format archive file with moderate compression:
pgrep {{process_name}}
phan --init
phan
phing
phing -i {{path/to/build.xml}}
phing {{task_name}}
phive list
phive update
phive purge
phive help
php artisan
Laravel's Artisan command-line interface.
• Start PHP's built-in web server for the current Laravel application:
• Generate a new Eloquent model class with a migration, factory and resource
controller:
php-coveralls
php-coveralls --verbose
php-coveralls --exclude-no-stmt
• Start PHP's built-in web server for the current Yii application:
• Generate a controller, views and related files for the CRUD actions on the specified
model class:
php {{file}}
php -l {{file}}
php -a
• Run PHP code (Notes: Don't use <? ?> tags; escape double quotes with backslash):
php -r "{{code}}"
php -S {{host:port}}
php -m
php -i
phpbu
phpbu --configuration={{path/to/configuration_file.xml}}
phpbu --limit={{backup_task_name}}
phpbu --simulate
phpcbf
Fix violations detected by phpcs.
phpcbf {{path/to/directory}}
phpcbf -i
phpcbf {{path/to/directory}} -l
phpcpd
A copy and paste detector for PHP code.
phpcpd {{path/to/file_or_directory}}
• Sniff the specified directory for issues (defaults to the PEAR standard):
phpcs {{path/to/directory}}
phpcs -i
• Specify the format of the output report (e.g. full, xml, json, summary):
phpcs {{path/to/directory}} -l
phpdox
A PHP documentation generator.
phpdox --skel
phpdox
phpdox --collector
phpdox --generator
phpenv
A PHP version manager for development purposes.
phpenv rehash
phpenv versions
phpenv version
• Set the local PHP version, which overrides the global version:
phpize
phpize --clean
phploc
A tool for quickly measuring the size and analyzing the structure of a PHP project.
phploc {{path/to/directory}}
• Include only specific files from a comma-separated list (globs are allowed):
phpmd
phpspec run
phpstorm {{path/to/directory}}
• Open a file:
phpstorm {{path/to/file}}
• Run tests in the current directory. Note: Expects you to have a 'phpunit.xml':
phpunit
phpunit {{path/to/TestFile.php}}
piactl connect
piactl disconnect
piactl logout
pic
Picture preprocessor for the groff (GNU Troff) document formatting system.
• Process input with pictures, saving the output for future typesetting with groff to
PostScript:
• Typeset input with pictures to PDF using the [me] macro package:
• Start Picard:
picard
picard --long-version
pickle
A PHP extension installer based on Composer.
pigz {{filename}}
pigz -9 {{filename}}
• Decompress a file:
pigz -d {{archive.gz}}
pigz -l {{archive.tar.gz}}
ping
Send ICMP ECHO_REQUEST packets to network hosts.
• Ping host:
ping {{host}}
ping -n {{host}}
• Ping host and ring the bell when a packet is received (if your terminal supports it):
ping -a {{host}}
ping -O {{host}}
ping6
Send ICMP ECHO_REQUEST packets to network hosts via IPv6 address.
• Ping a host:
ping6 {{host}}
ping6 -n {{host}}
• Ping a host and ring the bell when a packet is received (if your terminal supports
it):
ping6 -a {{host}}
pinky
Print user information using the finger protocol.
pinky
pinky {{user}}
pinky {{user}} -l
pinky {{user}} -f
pio access
Set the access level on published resources (packages) in the registry.
• Show all resources that a user or team has access to and the access level:
pio boards
pio check
• Perform an analysis check and only report a specified defect severity type:
This will create a new temporary project which the source code will be copied into.
• Build a PlatformIO project in the default system temporary directory and delete it
afterwards:
pio ci {{path/to/project}}
• Build a PlatformIO project and specify a specific board (pio boards lists all of
them):
pio debug
• Start an interactive device monitor and set a specific baud rate (defaults to 9600):
• Start an interactive device monitor and set a specific EOL character (defaults to
CRLF):
Ctrl + T
pio home
Launch the PlatformIO Home web server.
pio home
• Automatically shutdown the server on timeout (in seconds) when no clients are
connected:
• Specify a unique session identifier to keep PlatformIO Home isolated from other
instances and protected from 3rd party access:
• Install a library:
• Uninstall a library:
• Delete an organization:
• List all organizations the current user is a member of and their owners:
Packages can only be removed within 72 hours (3 days) from the date that they are
published.
• Publish a package:
• Undo the removal, putting all versions or a specific version of the package back
into the registry:
• Initialize a new PlatformIO based project, specifying one or more project options:
pio remote [command] takes the same arguments as its locally executing
counterpart pio [command].
• Start a new Remote Agent with a specific name and share it with friends:
• List devices from specified Agents (omit --agent to specify all Agents):
pio run
• Install shell completion for the current shell (supports Bash, Fish, Zsh and
PowerShell):
• List unused PlatformIO data that would be removed but do not actually remove it:
• Delete a team:
• List all teams that the user is part of and their members:
• Rename a team:
pio test
• Perform a full update of all packages, development platforms and global libraries:
pio update
• Check for new versions of packages, platforms and libraries but do not actually
update them:
pio upgrade
Some subcommands such as pio run have their own usage documentation.
pio --help
pio --version
• Install a package:
• Install the local package in the current directory in develop (editable) mode:
• Uninstall a package:
Some subcommands such as pip install have their own usage documentation.
• Upgrade a package:
• Uninstall a package:
• Install a package:
• Upgrade a package:
• Uninstall a package:
pipenv
pipenv --three
• Install a package:
pipenv install
• Uninstall a package:
pipenv shell
pipx list
• Start a new PXE boot server which provides an Ubuntu boot image:
pkill "{{process_name}}"
• Kill all processes which match their full command instead of just the process
name:
pkill -f "{{command_name}}"
pkill -9 "{{process_name}}"
plantuml {{path/to/diagrams}}
• Display help:
plantuml -help
platformio
This command is an alias of pio.
tldr pio
play
Audio player of SoX - Sound eXchange.
Plays any audio from the command-line, with audio formats identified by the extension.
play {{audiofile}}
• Show the currently selected Perl version and how it was selected:
plenv version
plenv versions
• Set the global Perl version (used unless a local or shell version takes priority):
• Set the local application-specific Perl version (used in the current directory and all
directories below it):
• Set the shell-specific Perl version (used for the current session only):
• Display help:
plenv
• Generate an auto login link for the admin user and print it:
plesk login
plesk version
plesk db
• Start a process with a name that can be used for later operations:
• List processes:
pm2 list
pm2 monit
• Stop a process:
• Restart a process:
pm2 save
pm2 resurrect
pngcheck
Print detailed information about and verify PNG, JNG, and MNG files.
pngcheck {{image.png}}
pngcheck -c {{image.png}}
• [s]earch for PNGs within a specific file and display information about them:
pngcheck -s {{image.png}}
pngcheck -x {{image.png}}
pngcrush
PNG compression utility.
• Compress PNG file with all 114 available algorithms and pick the best result:
pnpm init
pnpm install
pnpm list
pnpx {{module_name}}
• Execute a specific binary from a given npm module, in case the module has
multiple binaries:
• Display help:
pnpx --help
podman
Simple management tool for pods, containers and images.
podman ps
podman ps --all
• Display the logs of one or more containers and follow log output:
poetry init
poetry update
See also pushd to place a directory on the stack and dirs to display directory stack
contents.
popd
• Remove the Nth directory (starting from zero to the left from the list printed with
dirs):
popd +N
• Remove the Nth directory (starting from zero to the right from the list printed
with dirs):
popd -N
popeye
Utility that reports potential issues with Kubernetes deployment manifests.
popeye
popeye -n {{namespace}}
popeye --context={{context}}
popeye -f {{spinach.yaml}}
postcss
PostCSS is a tool for transforming styles with JS plugins.
postcss {{path/to/file}}
postcss --help
pppd
Establish Point-to-Point connection to another computer.
pppd
pprof
Command-line tool for visualization and analysis of profile data.
pprof {{http://localhost:8080/debug/pprof}}
pr
Paginate or columnate files for printing.
• Print all files together, one in each column, without a header or footer:
• Print, beginning at page 2 up to page 5, with a given page length (including header
and footer):
• Print with an offset for each line and a truncating custom page width:
pre-commit install
pre-commit run
pre-commit clean
prettier
An opinionated code formatter for JavaScript, JSON, CSS, YAML, and more.
prettier {{path/to/file}}
• Format files or directories recursively using single quotes and no trailing commas:
pretty-bytes {{1337}}
pretty-bytes --help
printenv
Print values of all or specific environment variables.
printenv
printenv {{HOME}}
• Display the value of a variable and end with NUL instead of newline:
progpilot
progpilot {{path/to/file_or_directory}}
• Check if the config files are valid or not (if present report errors):
• Check if the rule files are valid or not (if present report errors):
• Pass Prometheus metrics over stdin to check them for consistency and
correctness:
• Use the dry run to see what would be protected (can also be used for freeing):
protoc --python_out={{path/to/output_directory}}
{{input_file.proto}}
• Generate Java code from a .proto file that imports other .proto files:
protoc --java_out={{path/to/output_directory}} --
proto_path={{path/to/import_search_path}}
{{input_file.proto}}
protoc --csharp_out={{path/to/c#_output_directory}} --
js_out={{path/to/js_output_directory}} {{input_file.proto}}
ps
Information about running processes.
ps aux
ps auxww
ps -o ppid= -p {{pid}}
ps --sort size
psalm
A static analysis tool for finding errors in PHP applications.
psalm --init
psalm
psalm {{path/to/file_or_directory}}
psalm --show-info
psalm --stats
psgrep {{process_name}}
psgrep -n {{process_name}}
psgrep -s {{process_name}}
psql
PostgreSQL command-line client.
• Connect to the database. It connects to localhost using default port 5432 with
default user as currently logged in user:
psql {{database}}
• Connect to the database on given server host running on given port with given
username, without a password prompt:
• Execute a single SQL query or PostgreSQL command on the given database (useful
in shell scripts):
• Run a command on two hosts, and print its output on each server inline:
psysh
• Find files containing "foo" and print the files with highlighted matches:
pt {{foo}}
• Find files containing "foo" and display count of matches in each file:
pt -c {{foo}}
• Find files containing "foo" as a whole word and ignore its case:
pt -wi {{foo}}
pt -G='{{\.bar$}}' {{foo}}
• Find files whose contents match the regular expression, up to 2 directories deep:
pt --depth={{2}} -e '{{^ba[rz]*$}}'
ptargrep
Find regular expression patterns in one or more tar archive files.
• Extract to the current directory using the basename of the file from the archive:
• Add a command to a group and start it immediately, see pueue group to manage
groups:
• Add a command with a label after some delay has passed, see pueue enqueue for
valid datetime formats:
pueue clean
• Show all groups with their statuses and number of parallel jobs:
pueue group
pueue help
pueue kill
• Kill all tasks across all groups and pause all groups:
pueue log
• Set the maximum number of tasks allowed to run in parallel, in the default group:
• Set the maximum number of tasks allowed to run in parallel, in a specific group:
pueue pause
• Pause all tasks in a group and prevent it from starting new tasks:
• Pause all tasks and prevent all groups from starting new tasks:
• Kill all tasks and remove everything (logs, status, groups, task IDs):
pueue reset
• Restart multiple tasks at once, and start them immediately (do not enqueue):
Only use this subcommand if the daemon isn't started by a service manager.
pueue shutdown
pueue start
Resume operation of specific tasks or groups of tasks.
pueue start
pueue status
Some subcommands such as pueue add have their own usage documentation.
pueue --help
pueue --version
pueue {{subcommand}}
pup
Command-line HTML parsing tool.
• Transform a raw HTML file into a cleaned, indented, and colored format:
• Print all text from the filtered HTML elements and their children:
puppet agent
• Apply a manifest:
Some subcommands such as puppet agent have their own usage documentation.
puppet {{subcommand}}
puppet --version
• Display help:
puppet --help
See also popd to switch back to original directory and dirs to display directory stack
contents.
pushd {{directory}}
pushd
• Rotate stack by making the 5th element the top of the stack:
pushd +4
pv
Monitor the progress of data through a pipe.
pv {{file}}
• Measure the speed and amount of data flow between pipes (-s is optional):
command1 | pv -s {{expected_amount_of_data_for_eta}} |
command2
• Attach to an already running process and see its file reading progress:
pv -d {{PID}}
• Stop reading after reading specified amount of data, rate limit to 1K/s:
pv -L 1K -S {{maximum_file_size_to_be_read}}
pve-firewall
Manage Proxmox VE Firewall.
pve-firewall compile
pve-firewall localnet
pve-firewall restart
pve-firewall start
pve-firewall stop
pve-firewall simulate
pve-firewall status
pvecm
Proxmox VE Cluster Manager.
• Return the version of the cluster join API available on this node:
pvecm apiver
pvecm nodes
pvecm status
pveperf
A benchmarking tool in Proxmox Server. Gather CPU and hard disk performance data for
the hard disk.
• Show CPU and hard disk performance data for the hard disk mounted at /:
pveperf
pwd
Print name of current/working directory.
pwd
• Print the current directory, and resolve all symlinks (i.e. show the "physical" path):
pwd --physical
pwd --logical
pwgen
Generate pronounceable passwords.
pwgen -y {{length}}
pwgen -s {{length}}
pwgen -c {{length}}
pwsh
PowerShell Core is a cross-platform automation and configuration tool/framework.
pwsh
• Show a live view of the functions that take the most execution time of a running
process:
• Start a program and show a live view of the functions that take the most execution
time:
pycodestyle {{file.py}}
pyenv virtualenvs
pyenv deactivate
pyenv
Switch between multiple versions of Python easily.
pyenv commands
pyenv versions
• Set Python version to be used in the current directory and all directories below it:
• Highlight file syntax and print to standard output (language is inferred from the
file extension):
pygmentize {{file.py}}
pygmentize -L lexers
pygmentize -L formatters
• Output an HTML file, with additional formatter options (full page, with line
numbers):
pylint {{path/to/file.py}}
pypy
pypy {{path/to/file.py}}
pypy -i {{path/to/file.py}}
pypy -c "{{expression}}"
python
python {{path/to/file.py}}
python -i {{path/to/file.py}}
python -c "{{expression}}"
• Start the built-in HTTP server on port 8000 in the current directory:
python -m {{http.server}}
python3
This command is an alias of python.
tldr python
q
Execute SQL-like queries on .csv and .tsv files.
• Read data from stdin; '-' in the query represents the data from stdin:
• Join two files (aliased as f1 and f2 in the example) on column c1, a common
column:
• Format output using an output delimiter with an output header line (note:
command will output column names based on the input file header or the column
aliases overridden in the query):
• Copy a single file (open an editor with the source filename on the left and the
target filename on the right):
qcp {{source_file}}
qcp {{*.jpg}}
• Copy files, but swap the positions of the source and the target filenames in the
editor:
qdbus
qdbus {{service_name}}
• Execute a specific method passing arguments and display the returned value:
• Display help:
qdbus --help
qemu-img
Tool for Quick Emulator Virtual HDD image creation and manipulation.
• Dump the allocation state of every sector of the specified disk image:
• Boot from physical device (e.g. from USB to test bootable medium):
• Move a single file (open an editor with the source filename on the left and the
target filename on the right):
qmv {{source_file}}
qmv {{*.jpg}}
• Move files, but swap the positions of the source and the target filenames in the
editor:
• Extract pages 1-3, 5 and 6-10 from a PDF file and save them as another one:
• Merge (concatenate) all the pages of a list of PDF files and save the result as a new
PDF:
• Merge (concatenate) given pages from a list of PDF files and save the result as a
new PDF:
• Write each group of n pages to a separate output file with a given filename
pattern:
• Generate a QR code:
echo "{{data}}" | qr
• Start Qt Creator:
qtcreator
qtcreator -lastsession
qtcreator -presentationMode
• After editing the file, refresh the current patch with the changes:
quilt refresh
quilt push -a
quilt pop -a
quota
Display users' disk space usage and allocated limits.
quota -s
quota -v
• Quiet output (only display quotas on filesystems where usage is over quota):
quota -q
• Print quotas for the groups of which the current user is a member:
quota -g
• Open qutebrowser with a temporary base directory and print logs to stdout as
JSON:
• Check R version:
R --version
• Start R in vanilla mode (i.e. a blank session that doesn't save the workspace at the
end):
R --vanilla
• Execute a file:
R -f {{path/to/file.R}}
R -e {{expr}}
R -d {{debugger}}
tldr radare2
r2e
Forwards RSS feeds to an email address.
• Subscribe to a feed:
r2e run
r2e list
rabin2 -I {{path/to/binary}}
rabin2 -l {{path/to/binary}}
rabin2 -i {{path/to/binary}}
rabin2 -z {{path/to/binary}}
rabin2 -j -I {{path/to/binary}}
racket
Racket language interpreter.
racket
racket {{path/to/script.rkt}}
racket -I typed/racket
raco
Racket command-line tools.
• Build (or rebuild) bytecode, documentation, executables, and metadata indexes for
collections:
• Display help:
raco help
radare2
A set of reverse engineering tools.
• Open a file in write mode without parsing the file format headers:
• Debug a program:
radare2 -d {{path/to/binary}}
> {{radare2_command}}?
> !{{shell_command}}
• Create databases, load the schema, and initialize with seed data:
rails db:setup
rails db
rails db:create
rails db:drop
rails db:migrate
rails db:migrate:status
rails db:rollback
rails db:seed
rails destroy
Destroy Rails resources.
rails destroy
rails generate
• Generate a new model named Post with attributes title and body:
• Generate a new controller named Posts with actions index, show, new and create:
• Generate a scaffold for a model named Post, predefining the attributes title and
body:
rails routes
• List routes partially matching URL helper method name, HTTP verb, or URL path:
Some subcommands such as rails generate have their own usage documentation.
rails server
rails console
rails --version
rainbowstream
Terminal-based Twitter client supporting realtime tweetstream, trends, sending, search,
favorites and user management.
Online help with h, up and down arrows for history, tab to auto-complete and 2-tab for
suggestion.
• Open RainbowStream:
rainbowstream
home [{{num_of_last_tweets}}]
whois @{{user}}
t {{message}}
rt {{tweet_id}}
fav {{tweet_id}}
s {{word}}
ranger
Console file manager with VI key bindings.
• Launch ranger:
ranger
ranger --show-only-dirs
ranger --confdir={{path/to/directory}}
ranger --datadir={{path/to/directory}}
ranger --profile
rapper
The Raptor RDF parsing utility.
• Archive a directory:
rbac-lookup
rbac-lookup {{search_term}}
• View all RBAC bindings along with the source role binding:
rbac-lookup -o wide
rbac-lookup -k {{user|group|serviceaccount}}
• View all RBAC bindings along with IAM roles (if you are using GKE):
rbac-lookup --gke
rbash
Restricted Bash shell, equivalent to bash --restricted.
Does not permit changing the working directory, redirecting command output, or
modifying environment variables, among other things.
rbash
rbash -c "{{command}}"
• Execute a script:
rbash {{path/to/script.sh}}
rbash -x {{path/to/script.sh}}
rbash -e {{path/to/script.sh}}
rbash -s
rbenv
A tool to easily install Ruby versions and manage application environments.
rbenv versions
rbenv version
rbt diff
rbt setup-repo
rc
A modern simplistic port listener & reverse shell.
Similar to nc.
rc -lp {{port}}
tldr rc
rclone
CLI program to copy/sync/move files and directories to and from many cloud services.
fusermount -u {{path/to/mount_point}}
rdfind
Find files with duplicate content and get rid of them.
react-native start
• Specify the maximum number of workers for transforming files (default is the
number of CPU cores):
react-native start
react-native run-android
react-native run-ios
react-native log-android
• Start tail system.log for an iOS simulator and print logs to stdout:
react-native log-ios
read
BASH builtin for retrieving data from standard input.
read {{variable}}
read -a {{array}}
read -r {{variable}}
read -s {{variable}}
readlink {{filename}}
readlink -f {{filename}}
realpath
Display the resolved absolute path for a file or directory.
realpath {{path/to/file_or_directory}}
rector levels
redis-cli
redis-cli -h {{host}}
redis-cli -u {{uri}}
• Specify a password:
redis-cli -a {{password}}
redis-cli {{redis_command}}
redis-cli -c
redis-server
Persistent key-value database.
• Start Redis server, using the default port (6379), and write logs to stdout:
redis-server
redis-server {{path/to/redis.conf}}
• Turn on Redshift with 5700K temperature during day and 3600K at night:
redshift -t {{5700}}:{{3600}}
redshift -l {{latitude}}:{{longitude}}
• Turn on Redshift with 70% screen brightness during day and 40% brightness at
night:
redshift -b {{0.7}}:{{0.4}}
redshift -g {{red}}:{{green}}:{{blue}}
redshift -O {{temperature}}
reflac
Recompress FLAC files in-place while preserving metadata.
reflac {{path/to/directory}}
reflex make
reflex -- echo {}
rekor-cli
Immutable tamper resistant ledger of metadata generated within a software projects
supply chain.
rekor-cli get --
uuid={{0e81b4d9299e2609e45b5c453a4c0e7820ac74e02c4935a8b830d104632fd2d
Niceness values range from -20 (most favorable to the process) to 19 (least favorable to
the process).
• Do a case-insensitive rename:
• Clean up the repository and keep only the most recent snapshot of each unique
backup:
resume init
resume validate
resume serve
rev
Reverse a line of text.
rev {{file}}
rg
Ripgrep is a recursive line-oriented CLI search tool.
rg {{regular_expression}}
• Search for a regular expression only in a certain filetype (e.g. HTML, CSS, etc.):
rg {{regular_expression}} {{set_of_subdirs}}
rg --files-with-matches {{regular_expression}}
rg --invert-match {{regular_expression}}
rg --fixed-strings -- {{string}}
rm
Remove files or directories.
rm {{path/to/file}} {{path/to/another/file}}
rm -r {{path/to/directory}}
rm -rf {{path/to/directory}}
rm -i {{file(s)}}
• Remove files in verbose mode, printing a message for each removed file:
rm -v {{path/to/directory/*}}
rmdir
Removes a directory.
rmdir {{path/to/directory}}
• Remove the target and its parent directories (useful for nested dirs):
rmdir -p {{path/to/directory}}
roave-backward-compatibility-check
A tool that can be used to verify backward compatibility breaks between two versions of
a PHP library.
roave-backward-compatibility-check
roave-backward-compatibility-check --from={{git_reference}}
• Check for breaking changes between the last tag and a specific reference:
roave-backward-compatibility-check --to={{git_reference}}
robo list
robo {{foo}}
roll {{3d}}
• Roll 4 6-sided dice, keep the 3 highest results and sum the results:
roll {{4d6h3}}
roll "{{2d20>10}}"
route -n
• Record an application:
rr replay
Rscript
Run a script with the R programming language.
• Run a script:
Rscript {{path/to/file.R}}
• Run a script in vanilla mode (i.e. a blank session that doesn't save the workspace at
the end):
• Display R version:
Rscript --version
rspec
Behavior-driven development testing framework written in Ruby to test Ruby code.
rspec --init
rspec
rspec {{path/to/directory}}
rspec {{path/to/file}}
• Run a specific test in a file (e.g. the test starts on line 83):
rspec {{path/to/file}}:{{83}}
• Show the feed of a given URL and wait for new entries appearing at the bottom:
rsstail -u {{url}}
rsstail -r -u {{url}}
rsstail -1 -u {{url}}
rsync
Transfer files either to or from a remote host (not between two remote hosts).
• Transfer file in [a]rchive (to preserve attributes) and compressed ([z]ipped) mode
with [v]erbose and [h]uman-readable [P]rogress:
• Transfer directory contents (but not the directory itself) from a remote to local:
rsync -r {{remote_host}}:{{path/to/remote_directory}}/
{{path/to/local_directory}}
• Transfer file over SSH and delete remote files that do not exist locally:
• Transfer file over SSH using a different port than the default and show global
progress:
rsync -e 'ssh -p {{port}}' --info=progress2 {{remote_host}}:
{{path/to/remote_file}} {{path/to/local_file}}
rtl_sdr
Raw data recorder for RTL-SDR receivers.
rtl_sdr -f {{100000000}} -S -
rtmpdump
A tool to dump media content streamed over the RTMP protocol.
• Download a file:
Use arrow keys to navigate. Right and Left to view and return from a submission,
respectively.
/front
• Open a subreddit:
/r/{{subreddit_name}}
• Expand/collapse comments:
[space]
• Open link:
• Log in:
?
ruby
Ruby programming language interpreter.
irb
ruby {{script.rb}}
ruby -e {{command}}
ruby -c {{script.rb}}
ruby -v
runit
3-stage init system.
runit
runsv {{path/to/service}}
runsvdir {{path/to/services}}
runsvdir -P {{path/to/services}}
rustc
The Rust compiler.
rustc {{file.rs}}
rustc -O {{file.rs}}
rustc -g {{file.rs}}
rustfmt {{source.rs}}
• Check a file for formatting and display any changes on the console:
• Backup any modified files before formatting (the original file is renamed with a
.bk extension):
• Switch the default toolchain to nightly so that the cargo and rustc commands
will use it:
• Use the nightly toolchain when inside the current project, but leave global settings
unchanged:
rustup update
rustup show
rustup doc
rvm
A tool for easily installing, managing, and working with multiple ruby environments.
rvm list
rvm requirements
s
Web search from the terminal.
s {{query}}
s --list-providers
• Authenticate the CLI client against the Vault server, using an authentication
token:
safe env
• Start Sails:
sails lift
salt-call state.highstate
• Perform a highstate dry-run, compute all changes but don't actually perform
them:
salt-call grains.items
salt-key
Manages salt minion keys on the salt master.
salt-key -L
salt-key -a {{MINION_ID}}
salt-key -r {{MINION_ID}}
salt-key -F
salt-run
Frontend for executing salt-runners on minions.
salt-run manage.status
salt-run manage.up
salt
Execute commands and assert state on remote salt minions.
• Upgrade packages using the OS package manager (apt, yum, brew) on a subset of
minions:
• Take input from stdin (-) and print the SAM header and any reads overlapping a
specific region to stdout:
• Sort file and save to BAM (the output format is automatically determined from the
output file's extension):
• Convert a SCSS or Sass file to CSS and print out the result:
sass {{inputfile.scss|inputfile.sass}}
• Convert a SCSS or Sass file to CSS and save the result to a file:
• Watch a SCSS or Sass file for changes and output or update the CSS file with same
filename:
• Watch a SCSS or Sass file for changes and output or update the CSS file with the
given filename:
sbcl
sbt
• Create a new Scala project from an existing Giter8 template hosted on GitHub:
sbt test
sbt clean
sbt compile
sbt -h
SC-IM
A curses based, vim-like spreadsheet calculator.
• Start SC-IM:
scim {{filename}}.csv
< or >
|
scala
Scala application launcher and interactive interpreter.
scala
scala {{script.scala}}
scala {{filename.jar}}
scala -e {{command}}
scalafmt
Code formatter for Scala.
scalafmt
• Check if files are correctly formatted, returning 0 if all files respect the formatting
style:
• Format only files that were edited against the current Git branch:
scan-build {{make}}
• Display help:
scan-build
scc
Tool written in Go that counts lines of code.
scc
scc {{path/to/directory}}
scc --by-file
scc -h
sccmap
Extract strongly connected components of directed graphs.
sccmap -?
scheme
MIT Scheme language interpreter and REPL (interactive shell).
scheme
scheme --quiet
scp
Secure copy.
Copy files between hosts using Secure Copy Protocol over SSH.
• Copy a file between two remote hosts transferring through the local host:
• Use a specific ssh private key for authentication with the remote host:
• Create a project:
• Open a webpage in the default browser as Scrapy sees it (disable JavaScript for
extra fidelity):
• Open Scrapy shell for URL, which allows interaction with the page source in a
Python shell (or IPython if available):
scrcpy
• Display a mirror of a specific device based on its ID or IP address (find it under the
adb devices command):
scrcpy --fullscreen
scrcpy --show-touches
• Set target directory for pushing files to device by drag and drop (non-APK):
screen
screen -S {{session_name}}
screen -ls
screen -r {{session_name}}
Ctrl + A, D
Ctrl + A, K
• Start screenfetch:
screenfetch
screenfetch -s
screenfetch -A '{{distribution_name}}'
screenfetch -D '{{distribution_name}}'
screenfetch -N
script
Make a typescript file of a terminal session.
script
• Stop recording:
exit
script {{logfile.log}}
script -a {{logfile.log}}
script -q {{logfile.log}}
sd
Intuitive find & replace CLI.
sdcv
sdcv --list-dicts
sdcv {{search_term}}
• Compare 2 files:
Supports Java, Groovy, Scala, Kotlin, Gradle, Maven, Vert.x and many others.
sdk list
sdk current
sdkmanager --list
• Install a package:
sdkmanager {{package}}
sdkmanager --update
• Uninstall a package:
If known version numbers are used as search terms, exploits for both the exact version
and others whose version range covers the one specified are shown.
searchsploit {{search_terms}}
• Make a copy of the resource to the current directory (requires the number of the
exploit):
• Open the resource to read with the pager defined in the $PAGER environment
variable:
searchsploit --update
secrethub
A tool to keep secrets out of config files.
security-checker security:check
• Replace the first occurrence of a regular expression in each line of a file, and print
the result:
• Replace all occurrences of an extended regular expression in a file, and print the
result:
• Replace all occurrences of a string in a file, overwriting the file (i.e. in-place):
• Replace separator / by any other character not used in the find or replace patterns,
e.g. #:
• Check if a version string respects the semantic versioning format (prints an empty
string if it does not match):
semver {{1.2}}
• Test if 1.2.3 matches the ^1.0 range (prints an empty string if it does not
match):
• Test multiple version strings and return only the ones that match:
• Send a message with the content of message.txt to the mail directory of local
user username:
seq 10
seq 5 3 20
seq -f "%04g" 5 3 20
sequelize
Promise-based Node.js ORM for Postgres, MySQL, MariaDB, SQLite and Microsoft SQL
Server.
sequelize db:migrate
sequelize db:migrate:undo:all
• Create a seed file with the specified name to populate the database:
sequelize db:seed:all
serverless
Toolkit for deploying and operating serverless architectures on AWS, Google Cloud,
Azure and IBM OpenWhisk.
Commands can be run either using the serverless command or its alias, sls.
serverless create
serverless deploy
serverless info
serverless logs -t
set
Display, set or unset values of shell attributes and positional parameters.
set
set -a
set -b
set -o {{vi}}
• Set the shell to exit as soon as the first error is encountered (mostly used in
scripts):
set -e
sfdp
Render an image of a scaled force-directed network graph from a graphviz file.
Layouts: dot, neato, twopi, circo, fdp, sfdp, osage & patchwork.
• Render a png image with a filename based on the input filename and output
format (uppercase -O):
• Render a svg image with the specified output filename (lowercase -o):
• Render the output in ps, pdf, svg, fig, png, gif, jpg, json, or dot format:
• Display help:
sfdp -?
sftp
Secure File Transfer Program.
sftp {{remote_user}}@{{remote_host}}
get {{/path/remote_file}}
put {{/path/local_file}}
• Transfer remote directory to the local system recursively (works with put too):
get -R {{/path/remote_directory}}
lls
ls
sh
Bourne shell, the standard command language interpreter.
sh
sh -c "{{command}}"
• Execute a script:
sh {{path/to/script.sh}}
sh -s
sha1sum
Calculate SHA1 cryptographic checksums.
sha1sum {{path/to/file}}
• Read a file of SHA1 sums and verify all files have matching checksums:
sha224sum {{path/to/file}}
• Read a file of SHA224 sums and verify all files have matching checksums:
sha256sum {{path/to/file}}
• Read a file of SHA256 sums and verify all files have matching checksums:
sha384sum {{path/to/file}}
• Read a file of SHA384 sums and verify all files have matching checksums:
sha512sum {{path/to/file}}
• Read a file of SHA512 sums and verify all files have matching checksums:
shards init
shards install
shards update
shards list
shasum {{path/to/file}}
• Check a list of sums and only show a message for files for which verification fails:
{{some_command}} | shasum
shc
Generic shell script compiler.
shc -f {{script}}
• Compile a shell script and set an expiration date for the executable:
Check shell scripts for errors, usage of deprecated/insecure features, and bad practices.
shellcheck {{path/to/script.sh}}
• Check a shell script interpreting it as the specified shell dialect (overrides the
shebang at the top of the script):
shellcheck --enable={{add-default-case|avoid-nullary-
conditions}}
shellcheck --list-optional
shift
Bash built-in command that shifts the arguments passed to the calling function or script
by a specified number of places.
shift
shift {{N}}
shiori
Simple bookmark manager built with Go.
shiori print
Generic POSIX shell variables (stored in $SHELLOPTS) are managed with the set
command instead.
shopt
• Set an option:
shopt -s {{option_name}}
• Unset an option:
shopt -u {{option_name}}
• Print a list of all options and their status formatted as runnable shopt commands:
shopt -p
help shopt
showfigfonts
Display available figlet fonts.
showfigfonts
showfigfonts {{input_text}}
shred
Overwrite files to securely delete data.
• Overwrite a file:
shred {{file}}
shuf {{filename}}
siege {{https://example.com}}
sindresorhus
singularity
Manage Singularity containers and images.
Similar to fzf.
ps aux | sk
sk --query "{{query}}"
• Build and deploy your app every time your code changes:
• List files:
skicka ls {{path/to/folder}}
skicka du {{path/to/parent/folder}}
• Create a folder:
• Delete a file:
skicka rm {{path/to/file}}
sl
Steam locomotive running through your terminal.
sl
sl -a
sl -F
sl -l
sl -e
slackcat
Utility for passing files and command output to Slack.
• Delay in seconds:
sleep {{seconds}}
• Delay in minutes:
sleep {{minutes}}m
• Delay in hours:
sleep {{hours}}h
slimrb
Convert Slim files to HTML.
smalltalkci {{path/to/.smalltalk.ston}}
smalltalkci
smalltalkci --headful
smalltalkci --clean
smartctl
View a disk's SMART data and other information.
sn -k {{path/to/key.snk}}
sn -R {{path/to/assembly.dll}} {{path/to/key_pair.snk}}
• Show the public key of the private key that was used to sign an assembly:
sn -T {{path/to/assembly.exe}}
sn -e {{path/to/assembly.dll}} {{path/to/output.pub}}
snyk
Find vulnerabilities in your code and remediate risks.
snyk auth
snyk test
snyk monitor
snyk wizard
socat
Multipurpose relay (SOcket CAT).
• Listen to a port, wait for an incoming connection and transfer data to STDIO:
socat - TCP-LISTEN:8080,fork
• Create a connection to a host and port, transfer data in STDIO to connected host:
socat - TCP4:www.example.com:80
solo ls
• Generate random bytes using the currently connected Solo's secure random
number generator:
• Scan a project with configuration file in your project's root directory named
sonar-project.properties:
sonar-scanner
sonar-scanner -D{{project.settings=myproject.properties}}
sonar-scanner -h
sonar-scanner -X
sops
SOPS: Secrets OPerationS.
• Encrypt a file:
sops -d {{path/to/myfile.enc.json}}
sops -r {{path/to/myfile.enc.yaml}}
sort {{path/to/file}}
• Sort /etc/passwd by the 3rd field of each line numerically, using ":" as a field
separator:
• Sort a file, printing the output to the specified output file (can be used to sort a file
in-place):
source {{path/to/file}}
. {{path/to/file}}
sox
Sound eXchange: play, record and convert audio files.
• Normalize an audio file (adjust volume to the maximum peak level, without
clipping):
spark token
• Run this when you use a project for the first time:
• Deploy locally:
speed-test
speed-test --json
speed-test --bytes
speed-test --verbose
speedtest-cli
Unofficial command-line interface for testing internet bandwidth using https://
speedtest.net.
speedtest-cli
speedtest-cli --bytes
speedtest-cli --secure
speedtest-cli --no-download
speedtest-cli --share
speedtest-cli --list
• Run a speed test and display the results as JSON (suppresses progress
information):
speedtest-cli --json
speedtest
Official command-line interface for testing internet bandwidth using https://
speedtest.net.
speedtest
speedtest --unit={{auto-decimal-bits|auto-decimal-bytes|auto-
binary-bits|auto-binary-bytes}}
speedtest --format={{human-readable|csv|tsv|json|jsonl|json-
pretty}}
• Run a speed test and specify the number of decimal points to use (0 to 8, defaults
to 2):
speedtest --precision={{precision}}
• Run a speed test and print its progress (only available for output format human-
readable and json):
speedtest --progress={{yes|no}}
speedtest --servers
speedtest --server-id={{server_id}}
spfquery
Query Sender Policy Framework records to validate e-mail senders.
• Build documentation:
• Compile your project, watch for changes, and auto-reload the browser:
spike watch
spike compile
spike clean
split
Split a file into pieces.
• Split a file, each split having 10 lines (except the last split):
• Split a file into 5 files. File is split such that each split has same size (except the
last split):
• Split a file with 512 bytes in each split (except the last split; use 512k for kilobytes
and 512m for megabytes):
• Split a file with at most 512 bytes in each split without breaking lines:
sqlite3
sqlite3 {{path/to/database.sqlite3}}
sqsc lq {{queue_prefix}}
sqsc ls {{queue_name}}
• Describe a queue:
• Pull all messages from a queue into a local SQLite database in your present
working directory:
Overwrites the existing data one or multiple times. Drop in replacement for rm.
srm -s {{path/to/file}}
srm -m {{path/to/file}}
• Recursively remove a directory and its contents overwriting each file with a single-
pass of random data:
srm -r -s {{path/to/directory}}
srm -i {{\*}}
ss-local
Run a Shadowsocks client as a SOCKS5 proxy.
• Run a Shadowsocks proxy by specifying the host, server port, local port, password,
and encryption method:
ss-local -c {{path/to/config/file.json}}
ss-local --fast-open
ssh-add
Manage loaded ssh keys in the ssh-agent.
Ensure that ssh-agent is up and running for the keys to be loaded in it.
ssh-add
ssh-add {{path/to/private_key}}
ssh-add -l
ssh-add -d {{path/to/private_key}}
ssh-add -D
ssh-add -K {{path/to/private_key}}
ssh-agent
Spawn an SSH Agent process.
An SSH Agent holds SSH keys decrypted in memory until removed or the process is
killed.
See also ssh-add, which can add and manage keys held by an SSH Agent.
eval $(ssh-agent)
ssh-agent -k
ssh-copy-id
Install your public key in a remote machine's authorized_keys.
ssh-copy-id {{username@remote_host}}
• Copy the given public key to the remote with specific port:
ssh-keygen
ssh-keygen -f {{~/.ssh/filename}}
• Remove the keys of a host from the known_hosts file (useful when a known host
has a new key):
ssh-keygen -R {{remote_host}}
ssh-keygen -p -f {{~/.ssh/filename}}
• Change the type of the key format (for example from OPENSSH format to PEM),
the file will be rewritten in-place:
ssh-keyscan {{host}}
• Retrieve all public ssh keys of a remote host listening on a specific port:
• Manually update the ssh known_hosts file with the fingerprint of a given host:
ssh {{username}}@{{remote_host}}
• SSH jumping: Connect through a jumphost to a remote server (Multiple jump hops
may be specified separated by comma characters):
ssh -A {{username}}@{{remote_host}}
sshd
Secure Shell Daemon - allows remote machines to securely log in to the current
machine.
sshd
sshd -D
sshd -D -d
sshd -p {{port}}
sshfs
Filesystem client based on ssh.
sshfs {{username}}@{{remote_host}}:{{remote_directory}}
{{mountpoint}}
umount {{mountpoint}}
sshfs {{username}}@{{remote_host}}:{{remote_directory}} -p
{{2222}}
• Use compression:
sshfs {{username}}@{{remote_host}}:{{remote_directory}} -C
It works by creating a TTY, feeding the password into it, and then redirecting stdin to
the ssh session.
• Connect to a remote server using a password supplied on a file descriptor (in this
case, stdin):
• Connect to a remote server using the first line of a file as the password,
automatically accept unknown ssh keys, and launch a command:
Doesn't require root or any special setup on the remote SSH server, though root access
on the local machine is prompted for.
• Also forward all DNS traffic to the server's default DNS resolver:
• Forward all traffic except that which is bound for a specific subnet:
• Use the tproxy method to forward all IPv4 and IPv6 traffic:
sslscan {{example.com}}
sslscan {{example.com}}:{{465}}
st-flash erase
st-info
Provides information about connected STLink and STM32 devices.
st-info --flash
st-info --sram
st-info --probe
st-util
Run GDB (GNU Debugger) server to interact with STM32 ARM Cortex microcontoller.
st-util -p {{4500}}
• Compile a package:
stack build
stack test
standard
standard {{path/to/file(s)}}
standard --fix
Some subcommands such as starship init have their own usage documentation.
• Explain each part of the current prompt and show the time taken to render them:
starship explain
starship print-config
starship configure
• Create a bug report GitHub issue pre-populated with information about the
system and starship configuration:
starship bug-report
• Show file properties such as size, permissions, creation and access dates among
others:
stat {{file}}
stat -t {{file}}
stat -f {{file}}
steam
steam -console
• Enable and open the Steam console tab in a running Steam instance:
steam steam://open/console
steam -tenfoot
• Exit Steam:
steam -shutdown
steamcmd
A command-line version of the Steam client.
stern .
stern {{pod_query}}
stl2gts --help
stolonctl
CLI for Stolon, a cloud native PostgreSQL manager for PostgreSQL high availability.
• Attempt to extract streams from the URL specified, and if it's successful, print out
a list of available streams to choose from:
streamlink {{example.com/stream}}
• Specify which player to use to feed stream data to (VLC is used by default if
found):
• Specify the amount of time to skip from the beginning of the stream. For live
streams, this is a negative offset from the end of the stream (rewind):
• Open the stream in the player, while at the same time writing it to a file:
strings {{file}}
strings -t d {{file}}
• Prefix each result with its offset within the file in hexadecimal:
strings -t x {{file}}
strip-nondeterminism
A tool to remove non-deterministic information (e.g. timestamps) from files.
strip-nondeterminism {{path/to/file}}
• Listen for events, filtering on events with the name charge.succeeded and
forwarding them to localhost:3000/events:
• Create a customer:
• Print to JSON:
stty -a
stty sane
su
Switch shell to another user.
su
su {{username}}
su - {{username}}
su - {{username}} -c "{{command}}"
subfinder
A subdomain discovery tool that discovers valid subdomains for websites.
Designed as a passive framework to be useful for bug bounties and safe for penetration
testing.
subfinder -d {{example.com}}
subfinder -d {{example.com}} -b
subl {{.}}
subl {{path/to/file_or_directory}}
subl {{path/to/file}}:{{line_number}}
subl -a {{path/to/file}}
subl -n {{path/to/file}}
subliminal
Python-based subtitle downloader.
sublist3r --help
sudo
Executes a single command as the superuser or another user.
• Repeat the last command prefixed with sudo (only in bash, zsh, etc.):
sudo !!
• Launch the default shell with superuser privileges and run login-specific files
(.profile, .bash_profile, etc.):
sudo --login
• Launch the default shell with superuser privileges without changing the
environment:
sudo --shell
• Launch the default shell as the specified user, loading the user's environment and
reading login-specific files (.profile, .bash_profile, etc.):
• List the allowed (and forbidden) commands for the invoking user:
sudo --list
sum
Compute checksums and the number of blocks for a file.
sum {{file}}
sup {{path/to/file.html}}
supervisorctl
Supervisor is a client/server system that allows its users to control a number of
processes on UNIX-like operating systems.
Supervisorctl is the command-line client piece of the supervisor which provides a shell-
like interface.
• Start/stop/restart a process:
supervisorctl update
supervisord
Supervisor is a client/server system for controlling some processes on UNIX-like
operating systems.
supervisord -c {{path/to/file}}
supervisord -n
surfraw
CLI to query a variety of web search engines.
Consists of a collection of elvi, each of which knows how to search a specific website.
surfraw -elvi
• Open the elvi's results page for a specific search in the browser:
• Search using an elvi with specific options and open the results page in the
browser:
• Display the URL to the elvi's results page for a specific search:
sr {{elvi}} "{{search_terms}}"
surge
Simple command-line web publishing.
surge {{path/to/my_project}}
• Deploy site to custom domain (note that the DNS records must point to the
surge.sh subdomain):
surge list
• Remove a project:
• Start a service:
sudo sv up {{path/to/service}}
• Stop a service:
• Reload a service:
• Start a service, but only if it's not running and don't restart it if it stops:
• Optimize an SVG:
• Optimize a file using the default plugins (overwrites the original file):
svgo {{test.svg}}
• Optimize all SVG files within a directory (overwrites the original files):
svgo -f {{path/to/directory/with/svg/files}}
• Optimize all SVG files within a directory and save the resulting files to another
directory:
• Optimize SVG content passed from another command, and save the result to a file:
svgo {{test.svg}} -o -
svgo --show-plugins
svn changelist
Associate a changelist with a set of files.
• Commit a changelist:
svn co {{url/to/repository}}
svn up
• Put files and directories under version control, scheduling them for addition to
repository. They will be added in next commit:
• Display changes from the last 10 revisions, showing modified files for each
revision:
svn help
swagger-codegen
Generate code and documentation for your REST api from a OpenAPI/swagger
definition.
• Generate Java code using the library retrofit2 and the option useRxJava2:
swagger-codegen langs
swc {{path/to/file}}
swift
• Execute a program:
swift {{file.swift}}
• Update dependencies:
It uses special .i or .swg files to generate the bindings (C/C++ with SWIG directives, then
outputs a C/C++ file that contains all the wrapper code needed to build an extension
module.
• Generate a binding between C and Ruby and prefix the Ruby module with
{{foo::bar::}}:
swipl
• Execute a script:
swipl {{path/to/file.pl}}
swipl --dump-runtime-variables
swipl --version
symfony
The console component for the Symfony framework.
symfony serve
symfony server:stop
symfony security:check
sync
Flushes all pending write operations to the appropriate disks.
sync
sync {{path/to/file}}
syncthing
Continuous bidirectional decentralised folder synchronisation tool.
• Start Syncthing:
syncthing
syncthing -no-browser
syncthing -device-id
syncthing -home={{path/to/directory}}
syncthing -reset-deltas
syncthing -gui-address={{ip_address:port|path/to/
socket.sock}}
syncthing -paths
syncthing -no-restart
tabula
Extract tables from PDF files.
• Extract tables from page 1 of a PDF, guessing which portion of the page to
examine:
• Extract all tables from a PDF, using ruling lines to determine cell boundaries:
• Extract all tables from a PDF, using blank space to determine cell boundaries:
tac {{file1}}
• Print the contents of the standard input reversed to the standard output:
{{command}} | tac
• Print the last lines of a given file and keep reading file until Ctrl + C:
• Show last 'num' lines in 'file' and refresh every 'n' seconds:
In version 1.8 and above, command line arguments are stored and reused until they're
overwritten or --reset is called.
• Connect to Tailscale:
sudo tailscale up
• Connect and offer the current machine to be an exit node for internet traffic:
• Connect and don't accept DNS configuration from the admin panel (defaults to
true):
• Connect to Tailscale:
sudo tailscale up
tailscale ip
• Ping a peer node at the Tailscale layer and display which route it took for each
response:
tailscale netcheck
tailscale web
tailscale bugreport
takeout enable
takeout disable
• List tasks:
task list
• Modify task:
• Delete task:
• Check/uncheck item:
tb --check {{item_id}}
tb --clear
• Process input with tables, saving the output for future typesetting with groff to
PostScript:
• Typeset input with tables to PDF using the [me] macro package:
tcpdump -D
tcpdump -i {{eth0}}
tcpdump -A tcp
• Capture the traffic from a specific interface, source, destination and destination
port:
• Capture all traffic except traffic over port 22 and save to a dump file:
tcpdump -r {{dumpfile.pcap}}
tcsh
C shell with file name completion and command line editing.
tcsh
tcsh -f
• Execute a [c]ommand:
tcsh -c "{{command}}"
• Execute a script:
tcsh {{path/to/script.tcsh}}
tcsh -n {{path/to/script.tcsh}}
tcsh --version
tea
A command-line tool to interact with Gitea servers.
tea repos ls
tea issues ls
tea pulls ls
tea open
tee
Read from standard input and write to standard output and files (or commands).
• Print standard input to the terminal, and also pipe it into another program for
further processing:
telnet {{host}}
quit
• Emit the default escape character combination for terminating the session:
Ctrl + ]
telnet {{towel.blinkenlights.nl}}
termdown
Countdown timer and stopwatch for the command-line.
• Start a stopwatch:
termdown
termdown {{1m30s}}
• Start a 1 minute 30 seconds countdown with blinking the terminal at the end:
termdown --time
terminalizer
Utility program which records the terminal and generate animated GIFs or share a
video.
terminalizer init
terraform fmt
terraform plan
terraform init
terraform validate
terraform fmt
terraform plan
terraform apply
terraform destroy
terragrunt
Keep your Terraform CLI arguments DRY.
terragrunt plan
terragrunt apply
terragrunt show
terragrunt output
terragrunt destroy
• Specify a custom language (default is English) with an ISO 639-2 code (e.g. deu =
Deutsch = German):
tesseract --list-langs
tesseract --help-psm
test
Check file types and compare values.
test -z "{{$GIT_BRANCH}}"
test -f "{{path/to/file_or_directory}}"
test ! -d "{{path/to/directory}}"
• If-else statement:
testssl {{example.com}}
testssl {{example.com:465}}
tex {{source.tex}}
texdoc {{search}}
texdoc {{texdoc}}
texliveonfly
Downloads missing TeX Live packages while compiling .tex files.
texliveonfly {{source.tex}}
texliveonfly --texlive_bin={{path/to/texlive_bin}}
{{source.tex}}
textql
Execute SQL against structured text like csv or tsv files.
• Print the lines in the specified .csv file that match a SQL query to stdout:
theHarvester --help
thunderbird
Email client and RSS reader.
• Open thunderbird:
thunderbird
thunderbird -P {{profile_name}}
• Show the sequence of commits starting from the current one in reverse
chronological order:
tig
tig {{branch}}
tig {{base_ref}}..{{compared_ref}}
tig --all
tig stash
time
See how long a command takes.
• Time "ls":
time ls
timeout
Run a command with a time limit.
• Run sleep 10 and terminate it, if it runs for more than 3 seconds:
• Specify the signal to be sent to the command after the time limit expires. (By
default, TERM is sent):
timetrap display
timew
A time tracking tool used to measure the duration of activities.
• Start a new stopwatch, giving a tag name to the activity being tracked:
timew
timew stop
timew summary
timidity
TiMidity++ is a MIDI file player and convertor.
timidity {{path/to/file.mid}}
tldr-lint {{pages_directory}}
• Show the tldr page for a command (hint: this is how you got here!):
tldr {{command}}
• Show the tldr page for cd, overriding the default platform:
tldr {{git-checkout}}
tldr -u
tldrl
This command is an alias of tldr-lint.
tldr tldr-lint
tlmgr arch
This command is an alias of tlmgr platform.
The default backup location is saved in the backupdir setting, which can be optained
with tlmgr option.
• Check the consistency of the whole TeX Live information in verbose mode:
tlmgr gui depends on the package perl-tk, which has to be installed manually.
• List all available TeX Live packages, prefexing installed ones with i:
tlmgr info
• Reinstall a package:
• Set TeX Live to get future updates from the internet after installing from DVD:
• Show the default paper size used by all TeX Live programs:
tlmgr paper
• Set the default paper size for all TeX Live programs to A4:
• Show the default paper size used by a specific TeX Live program:
• Set the default paper size for a specific TeX Live program to A4:
• List all available paper sizes for a specific TeX Live program:
• Dump the default paper size used by all TeX Live programs in JSON format:
tlmgr shell
{{sub_command}} {{arguments}}
quit
get
get {{variable}}
restart
protocol
tlmgr update
Update TeX Live packages.
Some subcommands such as tlmgr paper have their own usage documentation.
tlmgr gui
tlmgr conf
tmpmail
A temporary email right from your terminal written in POSIX sh.
tmpmail --generate
tmpmail
tmpmail --recent
tmpmail {{email_id}}
tmpmail --text
tmux
tmux ls
tmux attach
Ctrl-B d
Ctrl-B c
Ctrl-B w
• Edit a project:
• List projects:
tmuxinator list
• Delete a task:
• Delete done tasks and reset the IDs of the remaining tasks:
todo flush
todoist
Access Todoist from the command-line.
• Add a task:
• Add a high priority task with a label, project, and due date:
• Add a high priority task with a label, project, and due date in quick mode:
• List today's tasks with high priority that have the specified label:
todoman is a common name for the command todo, but not a command itself.
tldr todo
tokei
A program that prints out statistics about code.
tokei {{path/to/directory}}
• Run updates:
topgrade
topgrade -y
topgrade -c
topgrade --edit-config
topydo
A to-do list application that uses the todo.txt format.
topydo revert
touch
Change a file access and modification times (atime, mtime).
• Create a new empty file(s) or change the times for existing file(s) to current time:
touch {{path/to/file}}
• Use the times from a file to set the times on a second file:
touch {{path/to/file{1,2,3}.txt}}
tox
Automate Python testing across multiple Python versions.
tox
tox-quickstart
tox --listenvs-all
tox -e {{py36}}
• View a presentation:
tpp {{filename}}
• Output a presentation:
tput {{cols|lines|colors}}
tput bel
tput sgr0
tput {{smam|rmam}}
tr
Translate characters: run replacements based on single characters and character sets.
• Map each character of the first set to the corresponding character of the second
set:
• Delete all occurrences of the specified set of characters from the input:
• Traceroute to a host:
traceroute {{host}}
traceroute -n {{host}}
traefik
traefik --cluster
traefik --web
trans
Translate Shell is a command-line translator.
trans "{{word_or_sentence_to_translate}}"
trans -d {{word}}
transcode
Transcode video and audio codecs, and convert between media formats.
• Remove camera shakes after creating stabilisation file, transform video using
XviD:
• Resize the video to 640x480 pixels and convert to MPEG4 codec using XviD:
transcrypt
git ls-crypt
transcrypt --display
transcrypt --cipher={{cipher}}
transcrypt --rekey
transfersh
An unofficial command-line client for transfer.sh.
transfersh {{path/to/file}}
transmission-cli {{url|magnet|path/to/file}}
transmission-create -p -o {{path/to/example.torrent}} --
tracker {{tracker_announce_url}} --piecesize {{2048}} {{path/
to/file_or_directory}}
transmission-create --help
transmission-remote
Remote control utility for transmission-daemon and transmission.
• Remove torrent 1 and 2, and also delete local data for torrent 2:
• Move torrents 1-10 and 15-20 to a new directory (which will be created if it does
not exist):
Can be used to perform cleanups for interruptions by the user or other actions.
trap -l
trap -p
• Set a trap to execute commands when one or more signals are detected:
trash-put {{filename}}
trash-empty
trash-list
• Restore a trashed file by choosing a number from the list that results from this
command:
trash-restore
trash-rm {{filename}}
travis
Command-line client to interface with Travis CI.
travis version
• Authenticate the CLI client against the server, using an authentication token:
travis login
travis repos
travis init
trawl
Prints out network interface information to the console, much like ifconfig/ipconfig/ip/
ifdata.
trawl -n
trawl -f wi
trawl -i
trawl -l
tred
Compute the transitive reduction of directed graphs.
• Display help:
tred -?
tree
Show the contents of the current directory as a tree.
• Print files and directories up to 'num' levels of depth (where 1 means the current
directory):
tree -L {{num}}
tree -d
tree -a -C
• Print the tree without indentation lines, showing the full path instead (use -N to
not escape non-printable characters):
tree -i -f
• Print the size of each file and the cumulative size of each directory, in human-
readable format:
tree -s -h --du
• Print files within the tree hierarchy, using a wildcard (glob) pattern, and pruning
out directories that don't contain matching files:
• Print directories within the tree hierarchy, using the wildcard (glob) pattern, and
pruning out directories that aren't ancestors of the wanted one:
tree -I '{{directory_name1|directory_name2}}'
trivy
Scanner for vulnerabilities in container images, file systems, and Git repositories, as well
as for configuration issues.
• Scan an image:
• Format output for a PostScript printer using the [me] macro package, saving the
output to a file:
Use this with the || operator to make a command always exit with 0.
true
truffle
A tool for developing smart contracts for running services on the Ethereum blockchain.
truffle compile
truffle test
truffle migrate
• Set a size of 10 GB to an existing file, or create a new file with the specified size:
• Extend the file size by 50 MiB, fill with holes (which reads as zero bytes):
• Shrink the file by 2 GiB, by removing data from the end of file:
• Empty the file's content, but do not create the file if it does not exist:
ts-node {{path/to/file.ts}}
ts-node --help
ts
Add timestamps to every line from standard input.
{{some_command}} | ts
{{some_command}} | ts -i "{{%H:%M:%.S}}"
• Convert existing timestamps in a text file (eg. a log file) into [r]elative format:
cat {{path/to/file}} | ts -r
tsc
TypeScript compiler.
tsc {{foobar.ts}}
• Compile a TypeScript file into JavaScript using a specific target syntax (default is
ES3):
• Run the compiler using command-line options and arguments fetched from a text
file:
tsc @{{args.txt}}
tslint --init
tslint --fix
A common use is to show the dependency order of nodes in a directed acyclic graph.
• Perform a topological sort consistent with a partial sort per line of input separated
by blanks:
tsort {{file}}
tty
Returns terminal name.
tty
tuir
A text user-interface (TUI) to view and interact with Reddit from your terminal.
• Launch tuir:
tuir
• Open a subreddit:
/{{subreddit_name}}
• Open a link:
tuir -s {{subreddit_name}}
tuir --enable-media
twm
A window manager for the X Window system.
twm
twm -s
twm -f {{path/to/file}}
twm -v
twopi
Render an image of a radial network graph from a graphviz file.
Layouts: dot, neato, twopi, circo, fdp, sfdp, osage & patchwork.
• Render a png image with a filename based on the input filename and output
format (uppercase -O):
• Render a svg image with the specified output filename (lowercase -o):
• Render the output in ps, pdf, svg, fig, png, gif, jpg, json, or dot format:
• Display help:
twopi -?
tye
Developer tool that makes developing, testing, and deploying microservices and
distributed applications easier.
tye init
tye run
tye build
tye push
tye deploy
tye undeploy
type
Display the type of command the shell will execute.
type {{command}}
type -a {{command}}
type -p {{command}}
typeorm
A JavaScript ORM that can run on Node.js, browser, Cordova, Ionic, React Native,
NativeScript, and Electron platforms.
typeorm init
• Create a migration file with the SQL statements to update the schema:
typeorm migration:run
typeorm schema:log
typeset {{variable}}="{{value}}"
typeset -i {{variable}}="{{value}}"
typeset -r {{variable}}="{{value}}"
typeset -g {{variable}}="{{value}}"
u3d
Set of tools to interact with Unity from command line.
u3d
u3d list
u3d available
• Save the file with size up to the given maximums MAX1 and MAX2:
ulimit -a
ulimit -H -n
ulimit -S -n
ulimit -u 30
umask
Manage the read/write/execute permissions that are masked out (i.e. restricted) for
newly created files by the user.
umask
umask -S
• Change the mask symbolically to allow read permission for all users (the rest of
the mask bits are unchanged):
umask {{a+r}}
• Set the mask (using octal) to restrict no permissions for the file's owner, and
restrict all permissions for everyone else:
umask {{077}}
umount
Unlink a filesystem from its mount point, making it no longer accessible.
umount {{path/to/device_file}}
umount {{path/to/mounted_directory}}
umount -a
unalias
Remove aliases.
• Remove an alias:
unalias {{alias_name}}
unalias -a
uname
Print details about the current machine and the operating system running on it.
uname
uname --nodename
uname --all
unar
Extract contents from archive files.
unar {{archive}}
unar -f {{archive}}
unar -r {{archive}}
unar -s {{archive}}
unclutter
Hides the mouse cursor.
• Read filenames from stdin, and take backups before writing output back to the
original filepaths:
unexpand {{file}}
unexpand
unexpand -a {{file}}
• Adjust one or more directed graphs to improve the layout aspect ratio:
unflatten -?
uniq
Output the unique lines from the given input or file.
Since it does not detect repeated lines unless they are adjacent, we need to sort them
first.
• Sync two directories (creates log first time these two directories are synchronised):
• Show documentation:
units
search {{string}}
The file contents is lost if the link is the last one to the file.
unlink {{path/to/file}}
unrar
Extract RAR archives.
unrar x {{compressed.rar}}
• Extract files into current directory, losing directory structure in the archive:
unrar e {{compressed.rar}}
unrar t {{compressed.rar}}
unrar l {{compressed.rar}}
unzip
Extract compressed files in a ZIP archive.
• Extract zip file(s) (for multiple files, separate file paths by spaces):
unzip {{file(s)}}
unzip -l {{file.zip}}
• Extract the contents of the file(s) to stdout alongside the extracted file names:
unzip -c {{file.zip}}
• Extract a zip file created on Windows, containing files with non-ASCII (e.g.
Chinese or Japanese characters) filenames:
It allows uploading and downloading via HTTP/S, can set ad hoc SSL certificates and use
HTTP basic auth.
updog
• Start a HTTP server with a password (To log in, leave the username blank and
enter the password in the password field):
updog --ssl
uptime
Tell how long the system has been running and other information.
• Print current time, uptime, number of logged-in users and other information:
uptime
• Show only the amount of time the system has been booted for:
uptime --pretty
uptime --since
uptime --version
upx
Compress or decompress executables.
• Compress executable:
upx {{file}}
• Decompress executable:
upx -d {{file}}
• Detailed help:
upx --help
users
Display a list of logged in users.
users
users {{/var/log/wmtp}}
uudecode
Decode files encoded by uuencode.
• Decode a file that was encoded with uuencode and print the result to stdout:
uudecode {{path/to/encoded_file}}
• Decode a file that was encoded with uuencode and write the result to a file:
uuencode {{path/to/input_file}}
{{output_file_name_after_decoding}}
• Encode a file using Base64 instead of the default uuencode encoding and write the
result to a file:
uvicorn {{import.path:app_object}}
vagrant init
• Create Vagrantfile with the Ubuntu 20.04 (Focal Fossa) box from HashiCorp Atlas:
vagrant up
vagrant suspend
vagrant halt
vagrant ssh
vagrant ssh-config
vala
Vala code runner.
Tutorial: https://wiki.gnome.org/Projects/Vala/Tutorial.
vala --version
vala --help
valac
Vala code compiler.
Tutorial: https://wiki.gnome.org/Projects/Vala/Tutorial.
valac --version
valac --help
valgrind
Wrapper for a set of expert tools for profiling, optimizing and debugging programs.
valgrind {{program}}
• Use Memcheck to report all possible memory leaks of program in full detail:
• Use the Cachegrind tool to profile and log CPU cache operations of program:
• Use the Massif tool to profile and log heap memory and stack usage of program:
var-dump-server
vault init
• Unseal (unlock) the vault, by providing one of the key shares needed to access the
encrypted data store:
• Authenticate the CLI client against the Vault server, using an authentication
token:
• Store a new secret in the vault, using the generic back-end called "secret":
• Read a value from the vault, using the generic back-end called "secret":
• Seal (lock) the Vault server, by removing the encryption key of the data store from
memory:
vault seal
VBoxManage
Command-line interface to VirtualBox.
vcsh list
vcsh {{push|pull}}
• List files and directories in the current directory, one per line, with details:
vdir
vdir -h
vdir -a
vdir -S
• List files and directories sorting entries by modification time (newest first):
vdir -t
vdir --group-directories-first
• Launch an attack and plot the results on a graph (latency over time):
• Delete a backup:
• Create a restore from the latest successful backup triggered by specific schedule:
vercel
vercel --prod
• Deploy a directory:
vercel {{path/to/project}}
vercel init
• Remove a deployment:
tldr vim
view
A read-only version of vim.
• Open a file:
view {{file}}
vim
Vim (Vi IMproved), a command-line text editor, provides several modes for different
kinds of text manipulation.
Pressing i enters insert mode. <Esc> enters normal mode, which enables the use of
Vim commands.
• Open a file:
vim {{path/to/file}}
:help<Enter>
:wq<Enter>
/{{search_pattern}}<Enter>
:%s/{{regular_expression}}/{{replacement}}/g<Enter>
:set nu<Enter>
vimdiff
Open up two or more files in vim and show the differences between them.
Ctrl + w {{h|l}}
[c
]c
• Copy the highlighted difference from the other window to the current window:
do
• Copy the highlighted difference from the current window to the other window:
dp
:diffupdate
za
vimtutor
Vim tutor, teaching the basic vim commands.
• Launch the vim tutor using the given language (en, fr, de, ...):
vimtutor {{language}}
<Esc> :q <Enter>
virsh-connect
Connect to a virtual machine hypervisor.
virsh connect
• Launch a new instance of the hypervisor and connect to it as the local user:
• List the target name and source path of the block devices:
• List the disk type and device value as well as the target name and source path:
virsh help
virsh list
• List information about virtual machines with autostart either enabled or disabled:
• Enable autostart for the storage pool specified by name or UUID (determine using
virsh pool-list):
• Build the storage pool specified by name or UUID (determine using virsh pool-
list):
• Create the configuration file for a storage pool called pool_name using /var/vms
as the underlying storage system:
• Delete the underlying storage system for the storage pool specified by name or
UUID (determine using virsh pool-list):
• Stop a storage pool specified by name or UUID (determine using virsh pool-
list):
• List the name, UUID, state, persistence type, autostart status, capacity, space
allocated, and space available for the storage pool specified by name or UUID
(determine using virsh pool-list):
• List the name, state, and whether autostart is enabled or disabled for active
storage pools:
virsh pool-list
• List information for active and inactive or just inactive storage pools:
• List information for active storage pools with either autostart enabled or disabled:
• List information for active storage pools that are either persistent or transient:
• Start the storage pool specified by name or UUID (determine using virsh pool-
list) and create the underlying storage system if it doesn't exist:
• Delete the configuration for the storage pool specified name or UUID (determine
using virsh pool-list):
• Delete the configuration file and the specified storage volumes using the target
name or the source name (as obtained from the virsh domblklist command):
Some subcommands such as virsh list have their own usage documentation.
• Start/reboot/shutdown/suspend/resume a guest:
• Clone a virtual machine and automatically generate a new name, storage path, and
MAC address:
• Clone a virtual machine and specify the new name, storage path, and MAC
address:
• Create a virtual machine with 1 GB RAM and 12 GB storage and start a Debian
installation:
• Create a diskless live virtual machine without an emulated sound device or a USB
controller. Don't start an installation and don't autoconnect to console but attach
a cdrom to it (might be useful for when using a live CD like tails):
• Create a virtual machine with with 16 GiB RAM, 250 GiB storage, 8 cores with
hyperthreading, a specific CPU topology, and a CPU model that shares most
features with the host CPU:
• List all supported operations (enabled operations are indicated with asterisks):
virt-sysprep --list-operations
• Run all enabled operations but don't actually apply the changes:
virtualenv {{path/to/venv}}
source {{path/to/venv}}/bin/activate
deactivate
virtualenvwrapper
Group of simple wrapper commands for Python's virtualenv tool.
mkvirtualenv {{virtualenv_name}}
workon {{virtualenv_name}}
deactivate
lsvirtualenv
• Remove a virtualenv:
rmvirtualenv {{virtualenv_name}}
virtualenvwrapper
visudo
Safely edit the sudoers file.
sudo visudo
sudo visudo -c
visudo --version
viu
A small command-line application to view images from the terminal.
viu {{path/to/file}}
viu -t {{path/to/file}}
viu -n {{path/to/file}}
vladimyr
Dario Vladović's personal CLI.
vladimyr
vlc
Cross-platform multimedia player.
• Play a file:
vlc {{path/to/file}}
• Play in fullscreen:
• Play muted:
• Play repeatedly:
vlc {{https://www.youtube.com/watch?v=oHg5SJYRHA0}}
volta
A JavaScript Tool Manager that installs Node.js runtimes, npm and Yarn package
managers, or any binaries from npm.
volta list
• Display help:
volta help
• Unpublish an extension:
vsce package
Some subcommands such as vue build have their own usage documentation.
vue ui
vzdump
Backup Utility for virtual machines and containers.
• Dump a guest virtual machine into the default dump directory (usually /var/
lib/vz/dump/), excluding snapshots:
vzdump {{vm_id}}
• Back up the guest virtual machines with the IDs 101, 102, and 103:
• Back up all guest systems and send an notification email to the root and admin
users:
• Use snapshot mode (no downtime required) and a non-default dump directory:
• Back up all guest virtual machines excluding the IDs 101 and 102:
Print user login, TTY, remote host, login time, idle time, current process.
w -h
w3m
A text-based web browser.
• Open a URL:
w3m {{http://example.com}}
w3m {{http://example.com}} -M
Shift + T
Ctrl + H
• Quit w3m:
• Wait for a process to finish given its process ID (PID) and return its exit status:
wait {{pid}}
wait
waitress-serve
Pure Python WSGI HTTP Server.
waitress-serve {{import.path:wsgi_func}}
waitress-serve --listen={{localhost}}:{{8080}}
{{import.path:wsgi_func}}
waitress-serve --unix-socket={{path/to/socket}}
{{import.path:wsgi_func}}
waitress-serve --url-scheme={{https}}
{{import.path:wsgi_func}}
wal
A tool to create color schemes based on the dominant colors of a wallpaper.
wal -i {{image.png}}
wal -R
wapm
The WebAssembly package manager.
wapm init
wapm install
wapm list
• Register the current device to WARP (must be run before first connection):
warp-cli register
• Connect to WARP:
warp-cli connect
warp-cli disconnect
warp-cli status
• Display help:
warp-cli help
• Generate a zip file with information about the system configuration and the WARP
connection:
warp-diag
• Generate a zip file with debug information including a timestamp to the output
filename:
warp-diag --add-ts
warp-diag feedback
wasm-objdump
Display information from WebAssembly binaries.
wasm-objdump -h {{file.wasm}}
wasm-objdump -d {{file.wasm}}
• Apply all optimizations and write to a given file (takes more time, but generates
optimal code):
• Convert a file to a C source file and header and display it to the console:
wasm2c {{file.wasm}}
wasm2wat {{file.wasm}}
wat2wasm {{file.wat}}
wat2wasm -v {{file.wat}}
watch
Execute a program periodically, showing output fullscreen.
watch {{command}}
• Run make when any JavaScript, CSS and HTML files in the current directory
change:
• Run make when any file in the lib or src subdirectories change:
• Call/restart my_server when any file in the current directory change, sending
SIGKILL to stop the child process:
watson stop
watson log
watson edit
watson remove
wc
Count lines, words, and bytes.
wc --lines {{path/to/file}}
wc --words {{path/to/file}}
wc --bytes {{path/to/file}}
wc --chars {{path/to/file}}
{{find .}} | wc
wc --max-line-length {{path/to/file}}
weasyprint
Render HTML to PDF or PNG.
• Specify a base URL for relative URLs in the input HTML file:
web-ext run
web-ext lint
web-ext build
• Load CSS files too from the JavaScript file (this uses the CSS loader for .css files):
• Pass a config file (with e.g. the entry script and the output filename) and show
compilation progress:
• Download a torrent:
wget {{https://example.com/foo}}
• Download a single web page and all its resources with 3-second intervals between
requests (scripts, stylesheets, images, etc.):
• Download all listed files within a directory and its sub-directories (does not
download embedded page elements):
• Download a file from an HTTP server using Basic Auth (also works for FTP):
where {{command}}
whereis
Locate the binary, source, and manual page files for a command.
whereis {{ssh}}
• Locate unusual binaries (those that have more or less than one binary on the
system):
whereis -u *
• Locate binaries that have unusual manual entries (binaries that have more or less
than one manual installed):
whereis -u -m *
which
Locate a program in the user's path.
• Search the PATH environment variable and display the location of any matching
executables:
which {{executable}}
which -a {{executable}}
while
Simple shell loop.
• Display the username, line, and time of all currently logged-in sessions:
who
who am i
who -a
who -a -H
whoami
Print the username associated with the current effective user ID.
whoami
sudo whoami
whois
Command-line client for the WHOIS (RFC 3912) protocol.
whois {{example.com}}
whois {{8.8.8.8}}
whois -b {{8.8.8.8}}
wordgrinder
Command-line word processor.
wordgrinder
wordgrinder {{filename}}
Alt + M
wormhole
Get things from one computer to another, safely.
• Send a file:
• Receive a file:
wormhole send
wp
The official command-line interface to manage WordPress instances.
• Print information about the operating system, shell, PHP, and WP-CLI (wp)
installation:
wp --info
• Update WP-CLI:
wp cli update
wp import {{path/to/file.xml}}
wpa_supplicant
Manage protected wireless networks.
wpscan --update
• Scan a WordPress website, using random user agents and passive detection:
• Scan a WordPress website, checking for vulnerable plugins and specifying the path
to the wp-content directory:
wrangler login
wrangler publish
wrangler tail
write
Write a message on the terminal of a specified logged in user (ctrl-C to stop writing
messages).
Use the who command to find out all terminal_ids of all active users active on the
system. See also mesg.
• Run a benchmark for 30 seconds, using 12 threads, and keeping 400 HTTP
connections open:
• Start wuzz:
wuzz
F1
Ctrl + R
Ctrl + J, Tab
• Display help:
x11docker --help
x_x
View Excel and CSV files from the command-line.
x_x {{file.xlsx|file.csv}}
• View an XLSX or CSV file, using the first row as table headers:
The input is treated as a single block of text and split into separate pieces on spaces,
tabs, newlines and end-of-file.
• Delete all files with a .backup extension (-print0 uses a null character to split
file names, and -0 uses it as delimiter):
• Execute the command once for each input line, replacing any occurrences of the
placeholder (here marked as _) with the input line:
xcaddy build
• Build and run Caddy for a development plugin in the current directory:
xcaddy run
• Build and run Caddy for a development plugin using a specific Caddy config:
• Cut a file:
xcv x {{input_file}}
• Copy a file:
xcv c {{input_file}}
• Paste a file:
xcv v {{output_file}}
xcv l
xdelta
Delta encoding utility.
• Apply a patch:
• Create a patch:
DISPLAY=:2 {{command_name}}
xetex
Compile a PDF document from XeTeX source files.
xetex {{source.tex}}
xev
• Monitor all X events of the root window instead of creating a new one:
xev -root
xgettext {{path/to/input_file}}
xh {{httpbin.org/get}}
• Send a POST request with a JSON body (key-value pairs are added to a top-level
JSON object - e.g. {"name": "john", "age": 25}):
xkcdpass
• Generate one passphrase whose first letters of each word match the provided
argument:
xkcdpass -a {{acrostic}}
xkcdpass -i
xkill
Kill a window interactively in a graphical session.
• Display a cursor to kill a window when pressing the left mouse button (press any
other mouse button to cancel):
xkill
• Rename sub-elements of the element "table" that are named "rec" to "record":
• Update the XML table record with "id=3" to the value "id=5":
• Extract elements and their attributes and values from an XML document:
• Print sorted unique elements from an XML document to see its structure:
• Select all elements matching "XPATH1" and print the value of their sub-element
"XPATH2":
• Match "XPATH1" and print the value of "XPATH2" as text with new-lines:
• Validate one or more XML documents against a Document Type Definition (DTD):
• Validate one or more XML documents against an XML Schema Definition (XSD):
This command also has documentation about its subcommands, e.g. xml validate.
xml --help
• Execute a subcommand with input from a file or URI and output to a file:
xml --version
xmllint
XML parser and linter that supports XPath, a syntax for navigating XML trees.
• Return the href attribute of the second anchor element in an HTML file:
• Check that an XML file meets the requirements of its DOCTYPE declaration:
• Convert a DocBook XML document to HTML format and store the resulting files in
a separate directory:
xo
xo {{file1}}.js {{file2}}.js
xo --fix
xo --space
xo --prettier
xonsh
Python-powered, cross-platform, Unix-gazing shell.
xonsh
xonsh -c "{{command}}"
xonsh {{path/to/script_file.xonsh}}
xonsh --no-rc
xpdf
Portable Document Format (PDF) file viewer.
xpdf {{path/to/file.pdf}}
xpdf {{path/to/file.pdf.tar}}
• Open a directory:
xplr {{path/to/directory}}
• Focus on a file:
xplr {{path/to/file}}
• Focus on a directory:
xxd {{input_file}}
• Display a more compact output, replacing consecutive zeros (if any) with a star:
xxd -a {{input_file}}
• Display the output in plain mode, without any gaps between the columns:
xxd -p {{input_file}}
• Revert a plaintext hexdump back into binary, and save it as a binary file:
Note: xxh does not install anything into system directories on the target machine;
removing ~/.xxh will clear all traces of xxh on the target machine.
xxh "{{host}}"
• Install the current shell into the target machine without prompting:
• Set an environment variable for the shell process on the target machine:
xz {{file}}
• Decompress a xz file:
xz -d {{file.xz}}
xz --format={{lzma}} {{file}}
xz -d --format={{lzma}} {{file.lzma}}
xz -dc {{file.xz}}
xz -k {{file}}
xz -0 {{file}}
xz -9 {{file}}
yacas
Yet Another Computer Algebra System.
yacas
{{Integrate(x)Cos(x)}};
{{Example()}};
{{quit}}
• Execute one or more yacas scripts (without terminal or prompts), then exit:
• Yank using the default delimiters (\f, \n, \r, \s, \t):
• Display a diff of the changes that would be made, without making them (dry-run):
yarn-why {{package_name}}
yarn
JavaScript and Node.js package manager alternative.
yarn install
yarn init
• Identify whether a module is a dependency and list other modules that depend
upon it:
ybacklight Sc/Sm
ybacklight s{{420}}
ybacklight Si{{42}}
ybacklight d{{300}}
yes
Output something repeatedly.
This command is commonly used to answer yes to every prompt by install commands
(such as apt-get).
yes {{message}}
yes
All Yesod commands are invoked through the stack project manager.
ykinfo -a
ykinfo -s -q
ykinfo -c
ykman
The YubiKey Manager can be used to configure all aspects of the YubiKey.
ykman info
youtube-dl '{{https://www.youtube.com/watch?v=oHg5SJYRHA0}}'
• Download the best quality audio and video and merge them:
youtube-viewer {{search_term}}
youtube-viewer --login
youtube-viewer -{{7}}
yq
A lightweight and portable command-line YAML processor.
yq eval {{path/to/file.yaml}}
• Output the first element in a YAML file that contains only an array (v4+):
• Output the first element in a YAML file that contains only an array (v3):
z {{foo}}
z {{foo}} {{bar}}
z -r {{foo}}
z -t {{foo}}
z -l {{foo}}
z -x .
z -c {{foo}}
zbarimg
Scan and decode bar codes from image file(s).
zbarimg {{image_file}}
zcat
Print data from gzip compressed files.
zcat {{file.txt.gz}}
zcat -l {{file.txt.gz}}
zdb
ZFS debugger.
zdb
zdb -C {{poolname}}
zdb -b {{poolname}}
zeek
Passive network traffic analyser.
Any output and log files will be saved to the current working directory.
• Analyze live traffic from a network interface and load custom scripts:
• Analyze live traffic from a network interface, without loading any scripts:
zellij list-sessions
zellij attach
Alt + N
Ctrl + N, D
zfs
Manage ZFS filesystems.
zfs list
zig build
zig init-exe
zig init-lib
zig cc {{path/to/file.c}}
• Archive a directory and its contents with the highest level [9] of compression:
• Archive a directory and its contents to a multi-part [s]plit zip file (e.g. 3 GB parts):
• Check that a ZIP file is correctly aligned on 4-byte boundaries and display the
results in a verbose manner:
• List all files in a .zip file in long format (permissions, ownership, size, and
modification date):
zipinfo {{path/to/archive.zip}}
zipinfo -1 {{path/to/archive.zip}}
zless
View compressed files.
zless {{file.txt.gz}}
zm
A tool for managing articles of newspapers and blogs.
zm new
• Edit a draft:
zm edit
zm publish
zmore
View gzip compressed files with more.
zmore {{path/to/file.txt.gz}}
<Space>
/{{regular_expression}}
• Exit:
h
zmv
Move or rename files matching a specified extended glob pattern.
• Build the whole site in the public directory after deleting it:
zola build
• Build and serve the site using a local server (default is 127.0.0.1:1111):
zola serve
• Build all pages just like the build command would, but without writing any of the
results to disk:
zola check
zopflipng
PNG compression utility.
• Optimize a PNG:
• Generate shell configuration for command aliases (z, za, zi, zq, zr):
zpool status
• Check a ZFS pool for errors (verifies the checksum of EVERY block). Very CPU and
disk intensive:
zpool import
• Import a zpool:
zsh
zsh -c "{{command}}"
• Execute a script:
zsh {{path/to/script.zsh}}
• Start an interactive shell session in verbose mode, printing each command before
executing it:
zsh --verbose
zstd
Compress or decompress files with Zstandard compression.
zstd {{file}}
• Decompress a file:
zstd -d {{file}}.zst
• Decompress to stdout:
• Compress a file specifying the compression level, where 1=fastest, 19=slowest and
3=default:
• Unlock higher compression levels (up to 22) using more memory (both for
compression and decompression):
zsteg {{path/to/image.png}}
• Detect embedded data in a PNG, iterating pixels vertically and using MSB first:
• Detect embedded data in a PNG, extracting only prime pixels and inverting bits:
• Detect embedded data in a BMP image, specifying the minimum length of the
strings to be found and the find mode:
• Disable a module:
• Enable a module:
sudo a2query -m
sudo a2query -s
sudo a2query -M
sudo a2query -v
abbr
Manage abbreviations for the fish shell.
User-defined words are replaced with longer phrases after they are entered.
• Print how long the current user has been connected in hours:
ac
ac --individual-totals
ac --individual-totals {{username}}
• Print how long a particular user has been connected in hours per day (with total):
ac --compatibility
acpi
Shows battery status or thermal information.
acpi
acpi -t
acpi -c
acpi -tf
acpi -V
acpi -p
add-apt-repository
Manages apt repository definitions.
add-apt-repository {{repository_spec}}
• Display the filename and line number of the source code from an instruction
address of an executable:
• Create a new user with a default home directory and prompt the user to set a
password:
adduser {{username}}
• Create a new user with the specified shell set as the login shell:
• Convert a specific installation file to Debian format and install on the system:
alpine
alpine {{email@example.net}}
• Quit alpine:
This command comes with Debian based OSes, for RHEL based ones see httpd.
sudo apache2ctl -t
sudo apache2ctl -M
apk
Alpine Linux package management tool.
apk update
• Remove a package:
• Play a specific file (sampling rate, bit depth, etc. will be automatically determined
for the file format):
aplay {{path/to/file}}
• Play the raw file as a 22050 Hz, mono, 8-bit, Mu-Law .au file:
apport-bug
apport-bug {{package}}
apport-bug {{path/to/executable}}
apport-bug {{PID}}
apt-add-repository
Manages apt repository definitions.
apt-add-repository {{repository_spec}}
• Search for packages that match the regular expression given in pattern:
• Update the list of available packages and versions (it's recommended to run this
before other apt-get commands):
apt-get update
• Remove a package:
apt-get upgrade
• Clean the local repository - removing package files (.deb) from interrupted
downloads that can no longer be downloaded:
apt-get autoclean
apt-get autoremove
• Upgrade installed packages (like upgrade), but remove obsolete packages and
install additional packages to meet new dependencies:
apt-get dist-upgrade
apt-key
Key management utility for the APT Package Manager on Debian and Ubuntu.
Note: apt-key is now deprecated (except for the use of apt-key del in maintainer
scripts).
apt-key list
apt-mark showmanual
apt-mark showhold
apt moo
An APT easter egg.
apt moo
apt
Package management utility for Debian based distributions.
• Update the list of available packages and versions (it's recommended to run this
before other apt commands):
• Remove a package (using purge instead also removes its configuration files):
apt list
• Synchronize list of packages and versions available. This should be run first, before
running subsequent aptitude commands:
aptitude update
aptitude upgrade
aptitude full-upgrade
arch-chroot {{path/to/new/root}}
• Specify the user (other than the current user) to run the shell as:
• Run a custom command (instead of the default bash) in the new root directory:
• Specify the shell, other than the default bash (in this case, the zsh package
should have been installed in the target system):
archey
archinstall
Guided Arch Linux installer with a twist.
archinstall
archinstall {{minimal|unattended}}
archlinux-java
A helper script that provides functionalities for Java environments.
archlinux-java status
archlinux-java unset
archlinux-java fix
arecord
Sound recorder for ALSA soundcard driver.
• Record a snippet and save it as an MP3 (finish with Ctrl-C when done):
arecord --list-devices
arecord --interactive
arithmetic
Quiz on simple arithmetic problems.
arithmetic
arithmetic -o {{+|-|x|/}}
arithmetic -r {{7}}
ark
KDE archiving tool.
as {{file.s}}
as {{file.s}} -o {{out.o}}
as -f {{file.s}}
• Include a given path to the list of directories to search for files specified in
.include directives:
as -I {{path/to/directory}} {{file.s}}
ascii
Show ASCII character aliases.
ascii {{a}}
ascii -t {{a}}
ascii -s {{tldr}}
ascii -d
ascii -x
ascii -o
ascii -b
ascii
asciiart
Convert images to ASCII.
asciiart {{path/to/image.jpg}}
asciiart {{www.example.com/image.jpg}}
aspell dicts
• Run aspell with a different language (takes two-letter ISO 639 language code):
aspell --lang={{cs}}
• List misspelled words from standard input and ignore words from personal word
list:
Used for running the server itself, and managing an already running instance.
asterisk -r -vvv
asterisk -r -x "{{command}}"
• Terminate a channel:
at {{hh:mm}}
• Execute the commands and email the result using a local mailing program such as
Sendmail:
at {{hh:mm}} -m
at {{hh:mm}} -f {{path/to/file}}
• Unpack a tar.gz archive into a new subdirectory (or current directory if it contains
only one file):
• Update all AUR packages in a verbose mode and remove all make dependencies:
• Display the PKGBUILD file (build information) for a space-separated list of AUR
packages:
auracle outdated
aurman
An Arch Linux utility to build and install packages from the Arch User Repository.
• Synchronize and update all packages without show changes of PKGBUILD files:
• Search the package database for a keyword from the official repositories and AUR:
• Clear the package cache (use two --clean flags to clean all packages):
To be able to vote, the file ~/.config/aurvote must exist and contain your AUR
credentials.
aurvote --configure
aurvote --help
authconfig
A CLI interface for configuring system authentication resources.
authconfig --test
• Enable Kerberos:
• Build the package in the current directory and run all tests directly on the system:
autopkgtest -- {{null}}
• Download and build a specific package with apt-get, then run all tests:
• Test the package in the current directory using a new root directory:
autorandr -s {{profile_name}}
autorandr
autorandr -l {{profile_name}}
autorandr -d {{profile_name}}
avahi-browse
Displays services and hosts exposed on the local network via mDNS/DNS-SD.
• List all services available on the local network along with their addresses and ports
while ignoring local ones:
avahi-browse --browse-domains
• Display help:
balooctl
balooctl status
balooctl {{enable|disable}}
balooctl purge
balooctl suspend
balooctl resume
balooctl indexSize
balooctl check
beep
A utility to beep the PC speaker.
• Play a beep:
beep
beep -r {{repetitions}}
betterlockscreen --lock
betterlockscreen -u {{path/to/image.png}}
binwalk {{path/to/binary}}
• Analyze the entropy of a binary, saving the plot with the same name as the binary
and .png extension appended:
bitwise
bitwise {{12345}}
bitwise {{0x563d}}
blkdiscard /dev/{{device}}
sudo blkid
bluetoothctl
bluetoothctl devices
• Remove a device:
• Display help:
bluetoothctl help
bluetoothd
Daemon to manage bluetooth devices.
bluetoothd
bluetoothd --nodetach
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}}
blurlock
A simple wrapper around the i3 screen locker i3lock, which blurs the screen.
blurlock
• Lock the screen and disable the unlock indicator (removes feedback on keypress):
blurlock --no-unlock-indicator
• Lock the screen and show the number of failed login attempts:
blurlock --show-failed-attempts
bmon
Monitor bandwidth and capture network related statistics.
bmon -a
bmon -b
bmon -p {{interface_1,interface_2,interface_3}}
bmon -R {{2.0}}
boltctl
Control thunderbolt devices.
boltctl
boltctl list
Some subcommands such as bpftool prog have their own usage documentation.
bpftrace -V
sudo bpftrace -l
• Start bpytop:
bpytop
bpytop -m
• Show version:
bpytop -v
• Change settings:
M
brctl
Ethernet bridge administration.
brightnessctl --list
brightnessctl get
• Set the brightness of the display backlight to a specified percentage within range:
• Start bspwm (note that a pre-existing window manager must not be open when
this command is run):
bspwm -c {{path/to/config}}
tldr bspc
btrfs balance
Balance block groups on a btrfs filesystem.
• Balance data block groups which are less than 15% utilized, running the operation
in the background:
• Balance a max of 10 metadata chunks with less than 20% utilization and at least 1
chunk on a given device devid (see btrfs filesystem show):
• Convert data blocks to the raid6 and metadata to raid1c3 (see mkfs.btrfs(8) for
profiles):
• Convert data blocks to raid1, skipping already converted chunks (e.g. after a
previous cancelled conversion operation):
• Verify the checksum of each data block (if the filesystem is good):
• Scan all disks and inform the kernel of all detected btrfs filesystems:
• List available properties (and descriptions) for the given btrfs object:
• Get the label property for the given btrfs filesystem or device:
• Get all object type-specific properties for the given btrfs filesystem or device:
• Set the compression property for a given btrfs inode (either a file or directory):
• Fix device size alignment related problems (e.g. unable to mount the filesystem
with super total bytes mismatch):
• Recover a corrupted superblock from correct copies (recover the root of filesystem
tree):
• Restore files from a btrfs filesystem using a specific root tree bytenr (see btrfs-
find-root):
• Restore files from a btrfs filesystem (along with metadata, extended attributes, and
Symlinks), overwriting files in the target:
• Start a scrub:
• Start a scrub, but wait until the scrub finishes before exiting:
• Delete a subvolume:
btrfs version
• Display help:
Some subcommands such as btrfs device have their own usage documentation.
• Create subvolume:
• List subvolumes:
• Enable quota:
• Show quota:
• Search for lines matching a pattern, printing only the matched text:
• Search for lines matching the list of search strings separated by new lines in a
compressed file (case-sensitive):
• Search for lines matching the list of search strings separated by new lines in a
compressed file (case-insensitive):
• Search for lines that do not match the list of search strings separated by new lines
in a compressed file:
• Search for lines matching a pattern, printing only the matched text:
• Recursively search files in a bzip2 compressed tar archive for the given list of
strings:
cal
cal -3
cal --monday
cal {{year}}
calc
calcurse
• Print the appointments and events for the current day and exit:
calcurse --appointment
calcurse-caldav --init=keep-remote
calcurse-caldav --init=keep-local
calcurse-caldav --init=two-way
ceph
A unified storage system.
ceph status
ceph df
Successor to letsencrypt.
• Obtain a new certificate via nginx authorization, installing the new certificate
automatically:
• Obtain a new certificate via apache authorization, installing the new certificate
automatically:
• Renew all Let's Encrypt certificates that expire in 30 days or less (don't forget to
restart any servers that use them afterwards):
• Simulate the obtaining of a new certificate, but don't actually save any new
certificates to disk:
• Output an alphanumeric wordlist from the given URL with words of minimum 5
characters:
• Output a wordlist from the given URL in debug mode including email addresses:
• Output a wordlist from the given URL using HTTP Basic or Digest authentication:
cfdisk {{/dev/sdX}}
• Create a new partition table for a specific device and manage it:
cgcreate -g {{group_type}}:{{group_name}}
cgcreate -g {{group_type1}},{{group_type2}}:{{group_name}}
• Create a subgroup:
mkdir /sys/fs/cgroup/{{group_type}}/{{group_name}}/
{{subgroup_name}}
cgexec
Limit, measure, and control resources used by processes.
Multiple cgroup types (aka controllers) exist, such as cpu, memory, etc.
tldr cgclassify
tldr cgcreate
tldr cgexec
chage
Change user account and password expiry information.
chattr +i {{path/to/file_or_directory}}
chattr -i {{path/to/file_or_directory}}
chattr -R +i {{path/to/directory}}
chcon
Change SELinux security context of a file or files/directories.
ls -lZ {{path/to/file}}
chcpu -d {{1,3}}
chcpu -e {{1-10}}
check-language-support
Display a list of missing language packages on Ubuntu.
check-language-support
check-language-support --show-installed
check-support-status
Identify installed Debian packages for which support has had to be limited or
prematurely ended.
• Display packages whose support is limited, has already ended or will end earlier
than the distribution's end of life:
check-support-status
check-support-status --no-heading
checkinstall
Track the local installation of a software package, and produce a binary package which
can be used with a system's native package manager.
• Update a user's "Office Room Number" field for the output of finger:
• Update a user's "Office Phone Number" field for the output of finger:
• Update a user's "Home Phone Number" field for the output of finger:
chkconfig --list
chkconfig {{sshd}} on
Boot target machine with live cd like Kali Linux and run with elevated privileges.
chntpw -l {{path/to/sam_file}}
chntpw -i {{path/to/sam_file}}
chronyc
Query the Chrony NTP daemon.
chronyc
chronyc tracking
chronyc sources
• Display stats for sources currently used by chrony daemon as a time source:
chronyc sourcestats
chronyc makestep
chronyc ntpdata
chrt
Manipulate the real-time attributes of a process.
• Display the min/max priority values that can be used with chrt:
chrt --max
Designed especially for e-mail scanning on mail gateways, but can be used in other
contexts.
freshclam
clamscan {{path/to/file}}
Use arrow keys to navigate, <enter/return> to select, and numbers 1-8 switch
between different views.
• Open cmus into the specified directory (this will become your new working
directory):
cmus {{path/to/directory}}
:add {{path/to/file_or_directory}}
• Quit cmus:
q
collectd
System statistics collection daemon.
collectd -h
collectd -t
collectd -T
• Start collectd:
collectd
collectd -C {{path/to/file}}
collectd -P {{path/to/file}}
collectd -f
colrm
Remove columns from stdin.
colrm {{3}}
• Remove from the 3rd column till the 5th column of each line:
• Compose action can be used to compose any existing file or new on default
mailcap edit tool:
compose {{filename}}
• With run-mailcap:
conky
conky -c {{path/to/config}}
conky -d
conky -a {{{top,bottom,middle}_{left,right,middle}}}
conky -p {{5}}
coredumpctl
Retrieve and process saved core dumps and metadata.
coredumpctl list
• Show information about the core dumps matching a program with PID:
cp {{path/to/source_file.ext}} {{path/to/target_file.ext}}
cp {{path/to/source_file.ext}} {{path/to/
target_parent_directory}}
cp -r {{path/to/source_directory}} {{path/to/
target_directory}}
• Copy a directory recursively, in verbose mode (shows files as they are copied):
• Copy text files to another location, in interactive mode (prompts user before
overwriting):
cp -i {{*.txt}} {{path/to/target_directory}}
cp -L {{link}} {{path/to/target_directory}}
• Use the full path of source files, creating any missing intermediate directories
when copying:
• Start calculating, defaulting to all CPU cores and 1 second refresh interval:
sudo cpufreq-aperf
• Start calculating with a 3 second refresh interval for all CPU cores:
sudo cpufreq-aperf -o
cpufreq-info
A tool to show CPU frequency information.
cpufreq-info
cpufreq-info -c {{cpu_number}}
cpufreq-info -l
• Show the current minimum and maximum CPU frequency and policy in table
format:
cpufreq-info -o
cpufreq-info -g
cpufreq-info -f -m
sudo cpufreq-info -w -m
cpufreq-set
A tool to modify CPU frequency settings.
The frequency value should range between the output of command cpufreq-info -
l.
cpuid
cpuid -1
cpuid -r
cpulimit
A tool to throttle the CPU usage of other processes.
• Limit an existing process with PID 1234 to only use 25% of the CPU:
• Launch a given program and limit it to only use 50% of the CPU:
• Launch a program, limit its CPU usage to 50% and run cpulimit in the background:
• Kill its process if the program's CPU usage goes over 50%:
• Throttle both it and its child processes so that none go about 25% CPU:
• Create an access port for Internet sharing from the same Wi-Fi interface:
• Act as proxy and forward data from a local TCP port to the given remote host:
• Split a file every 5 lines (this will fail if the total number of lines is not divisible by
5):
• Split a file at line 5 and use a custom prefix for the output files:
• Pull an image:
• Tag an image:
ctrlaltdel
cuyo
• Use a lock file to ensure that only one instance runs at a time:
• Get the mean of a single column of float numbers (floats must use "," and not "."):
• Get the mean of a single column of numbers with a given decimal precision:
• Get the mean of a single column of numbers ignoring "Na" and "NaN" (literal)
strings:
• Run the daemon with the standard per-login-session message bus configuration:
dbus-daemon --session
• Run the daemon with the standard systemwide message bus configuration:
dbus-daemon --system
• Set the address to listen on and override the configuration value for it:
dbus-daemon --print-pid
• Force the message bus to write to the system log for messages:
dbus-daemon --syslog
dconf write
Write a value to a dconf database path.
This command requires the kernel module i2c-dev to be loaded. See also: modprobe.
ddcutil detect
debchange --nmu
debchange --append
• Read a man page for a command that is provided by a specified package name:
• Create an Ubuntu 20.04 system inside the focal-root directory with a local
mirror:
ls /usr/share/debootstrap/scripts/
deborphan
Display orphan packages on operating systems using the APT package manager.
• Display library packages (from the "libs" section of the package repository) which
are not required by another package:
deborphan
• List orphan packages from the "libs" section as well as orphan packages that have a
name that looks like a library name:
deborphan --guess-all
• Find packages which are only recommended or suggested (but not required) by
another package:
deborphan --nice-mode
debsecan
Debian Security Analyzer, a tool to list vulnerabilities on a particular Debian
installation.
debsecan
debugfs {{/dev/sdXN}}
debugfs -w {{/dev/sdXN}}
• Read commands from a specified file, execute them and then exit:
stats
close -a
lr
debuild
Tool to build a Debian package from source.
debuild
debuild -b
debuild --no-lintian
deluser
Delete a user from the system.
• Remove a user:
deluser {{username}}
• Remove a user and their home, but backup their files into a .tar.gz file in the
specified directory:
dex --autostart
• Execute a single program (with Terminal=true in the desktop file) in the given
terminal:
dget {{package_name}}
dget {{http://deb.debian.org/debian/pool/main/h/haskell-tldr/
haskell-tldr_0.4.0-2.dsc}}
• Download a package source tarball from its .dsc file but don't extract it:
dget -d {{http://deb.debian.org/debian/pool/main/h/haskell-
tldr/haskell-tldr_0.4.0-2.dsc}}
diff3
Compare three files line by line.
• Compare files:
Works as ls -C --escape.
dir -all
dir -l --author
dir --hide={{pattern}}
dir --recursive
• Display help:
dir --help
dirb
Scan HTTP-based webservers for directories and files.
dirb {{https://example.org}}
dirb {{https://example.org}} -r
disown
disown %{{job_number}}
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}}
distrobox-create
Create Distrobox containers with an input name and image.
The created container will be tightly integrated with the host, allowing sharing of the
HOME directory of the user, external storage, external usb devices and graphical apps
(X11/Wayland), and audio.
• Clone a distrobox:
Default command executed is your SHELL, but you can specify different shells or entire
commands to execute. If used inside a script, an application, or a service, you can specify
the --headless mode to disable tty and interactivity.
distrobox-enter container-name -- sh -l
distrobox-list
distrobox-list -v
distrobox-rm
Delete Distrobox containers.
• Remove a distrobox:
distrobox-rm {{container_name}}
dkms status
dkms autoinstall
• Install version 1.2.1 of the acpi_call module for the currently running kernel:
Creates a menu from a text input with each item on a new line.
{{ls}} | dmenu
• Let the user choose between multiple items and save the selected one to a file:
ls | dmenu -m {{1}}
ls | dmenu -b
dmesg
Write the kernel messages to standard output.
dmesg
• Show kernel messages and keep reading new ones, similar to tail -f (available
in kernels 3.5.0 and newer):
dmesg -w
dmesg | less
• Show kernel messages with a timestamp (available in kernels 3.5.0 and newer):
dmesg -T
dmesg -H
dmesg -L
dmidecode
Display the DMI (alternatively known as SMBIOS) table contents in a human-readable
format.
sudo dmidecode
• Remove a package:
• Scan a domain, performing a reverse lookup of IP ranges from the SPF record and
saving the results to a JSON file:
• Scan a domain, performing a Google enumeration and saving the results to a CSV
file:
sudo do-release-upgrade
dockerd
• Run docker daemon and config it to listen to specific sockets (UNIX and TCP):
dockerd --debug
dockerd --log-level={{debug|info|warn|error|fatal}}
dolphin
KDE file manager.
• Launch Dolphin:
dolphin
dolphin {{path/to/directory}}
dolphin --new-window
dolphin --split
• Start the Dolphin daemon (only required to use the DBus interface):
dolphin --daemon
• Display help:
dolphin --help
dos2unix
Change DOS-style line endings to Unix-style.
dos2unix {{filename}}
dphys-swapfile swapoff
dphys-swapfile swapon
dphys-swapfile setup
dpkg-deb
Pack, unpack and provide information about Debian archives.
dpkg-query -l
dpkg-query -l '{{pattern}}'
dpkg-query -L {{package_name}}
dpkg-query -s {{package_name}}
dpkg
Debian package manager.
Some subcommands such as dpkg deb have their own usage documentation.
• Install a package:
dpkg -i {{path/to/file.deb}}
• Remove a package:
dpkg -r {{package_name}}
dpkg -l {{pattern}}
dpkg -L {{package_name}}
dpkg -c {{path/to/file.deb}}
dpkg -S {{filename}}
dstat
Versatile tool for generating system resource statistics.
dstat
dstat --list
• Display the process using the most memory and most CPU:
Unmount the partition before running this command using umount {{device}}.
dumpe2fs {{/dev/sdXN}}
dumpe2fs -b {{/dev/sdXN}}
dumpe2fs -f {{/dev/sdXN}}
• Only display the superblock information and not any of the block group descriptor
detail information:
dumpe2fs -h {{/dev/sdXN}}
dumpe2fs -x {{/dev/sdXN}}
dunstctl
Control command for dunst.
• Pause notifications:
• Un-pause notifications:
dunstctl close-all
• Display help:
dunstctl --help
dunstify
A notification tool that is an extension of notify-send, but has more features based
around dunst.
• Specify a message ID (overwrites any previous messages with the same ID):
notify-send --help
duperemove
Finds duplicate filesystem extents and optionally schedule them for deduplication.
On some filesystems one extent can be referenced multiple times, when parts of the
content of the files are identical.
duperemove -r {{path/to/directory}}
duperemove -r -d {{path/to/directory}}
• Use a hash file to store extent hashes (less memory usage and can be reused on
subsequent runs):
• Limit I/O threads (for hashing and dedupe stage) and CPU threads (for duplicate
extent finding stage):
• Check how many free blocks are present as contiguous and aligned free space:
e2freefrag {{/dev/sdXN}}
• Specify chunk size in kilobytes to print how many free chunks are available:
e2fsck {{/dev/sdXN}}
e2fsck -p {{/dev/sdXN}}
e2fsck -c {{/dev/sdXN}}
e2image
Save critical ext2/ext3/ext4 filesystem metadata to a file.
e2image {{/dev/sdXN}} -
• Write the old contents of the block to an undo file before overwriting a file system
block:
e4defrag {{/dev/sdXN}}
e4defrag -c {{/dev/sdXN}}
• Print errors and the fragmentation count before and after each file:
e4defrag -v {{/dev/sdXN}}
ebuild
A low level interface to the Gentoo Portage system.
• Fetch, unpack, compile, install and qmerge the specified ebuild file:
• Edit action can be used to view any file on default mailcap explorer:
edit {{filename}}
• With run-mailcap:
sudo edquota -t
efibootmgr
efibootmgr -v
ego sync
• Enable/Disable mix-ins:
eix {{package_name}}
eject -d
eject
• Eject a specific device (the default order is cd-rom, scsi, floppy and tape):
eject {{/dev/cdrom}}
eject -T {{/dev/cdrom}}
• Eject a cd drive:
eject -r {{/dev/cdrom}}
eject -f {{/mnt/floppy}}
eject -q {{/mnt/tape}}
emerge
Gentoo Linux package manager utility.
emerge --sync
emerge -avc
emerge -S {{keyword}}
enum4linux
Tool for enumerating Windows and Samba information from remote systems.
enum4linux -a {{remote_host}}
enum4linux -U {{remote_host}}
• List shares:
enum4linux -S {{remote_host}}
• Get OS information:
enum4linux -o {{remote_host}}
equery
View information about Portage packages.
• Set up a Git repo and perform various setup tasks (run from /etc):
ethtool {{eth0}}
• Set the link speed, duplex mode, and parameter auto-negotiation for a given
interface:
exif {{path/to/image.jpg}}
• Show a table listing known EXIF tags and whether each one exists in an image:
• Show the raw contents of the "Model" tag in the given image:
• Change the value of the "Artist" tag to John Smith and save to new.jpg:
expect {{path/to/file}}
expect -c "{{commands}}"
expect -i
extrace
Trace exec() calls.
sudo extrace
sudo extrace -d
sudo extrace -l
sudo extrace -u
extundelete
Recover deleted files from ext3 or ext4 partitions by parsing the journal.
See also date for Unix time information and umount for unmounting partitions.
• Restore a file from a path relative to root (Do not start the path with /):
• Restore a directory from a path relative to root (Do not start the path with /):
• Restore all files deleted after January 1st, 2020 (in Unix time):
eyeD3 {{filename.mp3}}
fail2ban-client ping
fakeroot
Run a command in an environment faking root privileges for file manipulation.
fakeroot
• Run a command keeping the real ownership of files instead of pretending they are
owned by root:
• Display help:
fakeroot --help
faketime
Fake the system time for a given command.
• Fake the time to this evening, before printing the result of date:
• Open a new bash shell, which uses yesterday as the current date:
fatlabel {{/dev/sda1}}
• Brute-force a password containing only digits, starting from the password 12345:
fcrackzip --benchmark
fdisk
A program for managing partition tables and partitions on a hard disk.
• List partitions:
sudo fdisk -l
m
feedreader
A GUI desktop RSS client.
feedreader --unreadCount
feedreader --addFeed={{feed_url}}
feedreader --grabArticle={{article_url}}
feedreader --playMedia={{article_url}}
ffuf
Subdomain and directory discovery tool.
• Fuzz host-[H]eaders with a host file on a traget website and [m]atch HTTP 200
[c]ode responses:
• Fuzz GET parameter on a target website and [f]ilter out message [s]ize response of
4242 bytes:
• Fuzz POST method with POST [d]ata of password on a target website and [f]ilter
out HTTP response [c]ode 401:
NOTE: this page refers to the command from the rename Debian package.
• Rename files using a Perl Common Regular Expression (substitute 'foo' with 'bar'
wherever found):
• Force renaming even if the operation would remove existing destination files:
filefrag {{path/to/file}}
filefrag -b {{path/to/file}}
filefrag -s {{path/to/files}}
filefrag -x {{path/to/files}}
filefrag -v {{path/to/files}}
finch
Console-based modular messaging client.
• Launch finch:
finch
• Quit:
alt + q or ctrl + c
alt + a
alt + {{number_key}}
alt + c
• Start moving a window, use arrow keys to move, press escape when done:
alt + m
• Start resizing a window, use arrow keys to resize, press escape when done:
alt + r
findfs
Finds a filesystem by label or UUID.
findfs LABEL={{label}}
findfs UUID={{uuid}}
findfs PARTLABEL={{partition_label}}
findfs PARTUUID={{partition_uuid}}
findmnt
Find your filesystem.
findmnt
findmnt {{/dev/sdb1}}
findmnt {{/}}
findmnt -t {{ext4}}
findmnt LABEL={{BigStorage}}
firejail
Securely sandboxes processes to containers using built-in Linux capabilities.
sudo firecfg
firejail {{firefox}}
firejail --list
firejail --netstats
firejail --shutdown={{7777}}
firewall-cmd
The firewalld command-line client.
firewall-cmd --get-active-zones
firewall-cmd --list-all
• Permanently move the interface into the block zone, effectively blocking all
communication:
• Permanently open the port for a service in the specified zone (like port 443 when
in the public zone):
• Permanently close the port for a service in the specified zone (like port 80 when in
the public zone):
firewall-cmd --reload
flameshot
Screenshot utility with a GUI.
Supports basic image editing, such as text, shapes, colors, and imgur.
flameshot launcher
flameshot gui
flameshot full
flash
flash -v
flash -i
flash -h
flash -p {{cat}}
flashrom
Read, write, verify and erase flash chips.
flashrom -p {{linux_spi:dev=/dev/spidev0.0}}
flatpak-builder
Help build application dependencies.
flatpak-builder --gpg-sign={{key_id}} --
repo={{repository_name}} {{path/to/manifest}}
flatpak list
flatpak update
flatpak remote-list
• Run a command with a file lock as soon as the lock is not required by others:
• Run a command with a file lock, and exit if the lock doesn't exist:
• Run a command with a file lock, and exit with a specific error code if the lock
doesn't exist:
foreman start
foreman check
• Put a file or directory under version control, so it will be in the current checkout:
tldr fossil-commit
fossil commit
Commit files to a Fossil repository.
• Create a new version containing all the changes in the current checkout; user will
be prompted for a comment:
fossil commit
• Create a new version containing all the changes in the current checkout, using the
specified comment:
• Create a new version containing all the changes in the current checkout with a
comment read from a specific file:
• Create a new version containing changes from the specified files; user will be
prompted for a comment:
tldr fossil rm
fossil forget
This command is an alias of fossil rm, with the exception that it never removes files
from the disk.
tldr fossil rm
fossil rm
Remove files or directories from Fossil version control.
fossil rm {{path/to/file_or_directory}}
• Remove a file or directory from Fossil version control, and also delete it from the
disk:
• Re-add all previously removed and uncommitted files to Fossil version control:
fossil rm --reset
fossil
Distributed version control system.
Some subcommands such as fossil commit have their own usage documentation.
fossil version
fossil help
fossil {{subcommand}}
fprintd
Fingerprint management daemon.
man fprintd
fprintd-delete
Remove fingerprints from the database.
fprintd-delete {{username}}
• Display help:
fprintd-delete
fprintd-enroll
Enroll fingerprints into the database.
fprintd-enroll
fprintd-enroll {{username}}
• Display help:
fprintd-enroll --help
fprintd-list
List enrolled fingerprints.
fprintd-list {{username}}
• Display help:
fprintd-list
fprintd-verify
Verify fingerprints against the database.
fprintd-verify
fprint-verify {{username}}
• Fail the process if a fingerprint doesn't match with ones stored in the database for
the current user:
fprint-verify --g-fatal-warnings
• Display help:
fprintd-verify --help
free
Display amount of free and used memory in the system.
free
free -{{b|k|m|g}}
free -h
free -s {{2}}
fsck
Check the integrity of a filesystem or repair it. The filesystem should be unmounted at
the time the command is run.
fscrypt setup
Only supported by flash memory devices such as SSDs and microSD cards.
fuser {{path/to/file_or_directory}}
• Kill all processes accessing a file or directory (sends the SIGKILL signal):
• Find which processes are accessing the filesystem containing a specific file or
directory:
fwupdmgr get-devices
fwupdmgr refresh
fwupdmgr get-updates
fwupdmgr update
gbp
A system to integrate the Debian package build system with Git.
• Build the package in the current directory using the default builder (debuild):
Also displays a copy of source code annotated with execution frequencies of code
segments.
gcov {{path/to/file.cpp}}
• Write branch frequencies to the output file and print summary information to
stdout as a percentage:
• Write branch frequencies as the number of branches taken, rather than the
percentage:
gdebi {{path/to/package.deb}}
gdebi --version
gedit {{path/to/file}}
gedit --list-encodings
genfstab
Arch Linux install script to generate output suitable for addition to an fstab file.
genfstab -L {{path/to/mount_point}}
genfstab -U {{path/to/mount_point}}
• Generate a UUIDv4:
genid uuid
To run these from Windows rather than an already-running distribution, precede them
with wsl.
genie -i
genie -s
genie -c {{command}}
genkernel
Gentoo Linux utility to compile and install kernels.
getent group
getent services
getfacl {{path/to/file_or_directory}}
• Display the file access control list with numeric user and group IDs:
getfacl -n {{path/to/file_or_directory}}
• Display the file access control list with tabular output format:
getfacl -t {{path/to/file_or_directory}}
getopt
Parse command line arguments.
• Add a --verbose option with an optional argument with shorthand -v, and pass
a non-option parameter arg:
gnome-extensions version
gnome-extensions list
gnome-terminal
gnome-terminal -- {{command}}
gnome-terminal --tab
google-chrome --user-data-dir={{path/to/directory}}
google-chrome --user-data-dir={{path/to/directory}} --
disable-web-security
gpasswd
Administer /etc/group and /etc/gshadow.
gpasswd {{group}}
groupadd {{group_name}}
groupdel {{group_name}}
groupmod
Modify existing user groups in the system.
sudo grub-mkconfig
grub-mkconfig --help
gs
GhostScript is a PDF and PostScript interpreter.
• To view a file:
• Reduce PDF file size to 150 dpi images for reading on a e-book device:
• Convert PDF file (pages 1 through 3) to an image with 150 dpi resolution:
• Set the value of a key. Fails if the key doesn't exist or the value is out of range:
• Print the value of a key or the schema-provided default if the key has not been set
in dconf:
gsettings list-recursively
• Display all keys and values (default if not set) from one schema:
F12
F11
Ctrl+Shift+T
Super+X
Ctrl+PageUp
Shift+Ctrl+L
guix package
Install, upgrade and remove Guix packages, or rollback to previous configurations.
• Remove a package:
guix package -I
• List generations:
guix package -l
halt
halt --poweroff
halt --reboot
halt --wtmp-only
hardinfo
Show hardware information in GUI window.
• Start hardinfo:
hardinfo
hardinfo -r
• Perform a dictionary attack (mode 0) using the RockYou wordlist of a Kali Linux
box:
• Perform a combination attack (mode 1) using the concatenation of words from two
different custom dictionaries:
hcitool scan
hcitool lq {{bdaddr}}
hcitool lp
hcitool dev
hdparm
Get and set SATA and IDE hard drive parameters.
• Set the Advanced Power Management value (values 1-127 permit spin-down, and
values 128-254 do not):
• Force a drive to immediately enter standby mode (usually causes a drive to spin
down):
• Put the drive into idle (low-power) mode, also setting its standby timeout:
homectl list
• Change the disk space assigned to a specific home directory to 100 GiB:
• Display help:
homectl --help
homeshick
Synchronize Git dotfiles.
• Go to a castle:
homeshick cd {{castle_name}}
• Clone a castle:
hostnamectl
htpdate -q {{host}}
http-prompt
http-prompt {{http://example.com}}
Runs multiple HTTP fetches in parallel to test the throughput of a web server.
• Emulate 20 requests based on a given URL list file per second for 60 seconds:
• Emulate 5 concurrent requests based on a given URL list file for 60 seconds:
• Emulate 1000 requests at 20 requests per second, based on a given URL list file:
http {{https://example.com}}
http -v {{https://example.com}}
• Download a file:
hwclock
• Write the current software clock time to the hardware clock (sometimes used
during system setup):
hwclock --systohc
hwclock --hctosys
i3-scrot
Wrapper script around the screenshot utility scrot for the i3 window manager.
• Capture a screenshot of the whole screen and save it to the default directory:
i3-scrot
i3-scrot --window
i3-scrot --select
i3-scrot --desk-to-clipboard
i3-scrot --window-to-clipboard
i3-scrot --select-to-clibpoard
• Start i3 (Note that a pre-existing window manager must not be open when this
command is run.):
i3
Super + Return
Super + {{number}}
Super + h
Super + v
Super + D
i3exit
Exit the i3 window manager.
i3exit logout
• Lock i3:
i3exit lock
i3exit shutdown
i3exit suspend
i3exit switch_user
i3exit hibernate
i3exit reboot
i3lock
Simple screen locker built for the i3 window manager.
i3lock
• Lock the screen and disable the unlock indicator (removes feedback on keypress):
i3lock --no-unlock-indicator
• Lock the screen and show the number of failed login attempts:
i3lock --show-failed-attempts
i3status
Status line for the i3 window manager.
• Print the status line to stdout periodically, using the default configuration:
i3status
i3status -c {{path/to/i3status.conf}}
i3status -h
i7z
An Intel CPU (only i3, i5 and i7) realtime reporting tool.
sudo i7z
ifdown
Disable network interfaces.
ifdown {{eth0}}
ifdown -a
iftop
Show bandwidth usage on an interface by host.
sudo iftop
sudo iftop -P
sudo iftop -b
sudo iftop -n
?
ifup
Tool used to enable network interfaces.
ifup {{eth0}}
ifup -a
imgp
Command-line image resizer and rotator for JPEG and PNG images.
• Convert single images and/or whole directories containing valid image formats:
• Scale an image by 75% and overwrite the source image to a target resolution:
inxi
• Print a full description of CPU, memory, disk, network and process information:
inxi -Fz
inxi -r
iostat
Report statistics for devices and partitions.
iostat
• Display a report of CPU and disk statistics with units converted to megabytes:
iostat -m
iostat -c
iostat -N
• Display extended disk statistics with disk names for device "sda":
iostat {{2}}
ip address
IP Address management subcommand.
ip address
ip address show up
ip link
• Change the MTU size for a network interface to use jumbo frames:
ip neighbour
ip route {{show|list}}
ip rule {{show|list}}
ip rule flush
ip address
ip -brief address
ip -brief link
ip route
ip neighbour
ipcalc {{1.2.3.4}}/{{24}}
ipcalc -b {{1.2.3.4}}/{{30}}
ipcalc -n {{1.2.3.4}}/{{24}}
ipcalc -g {{1.2.3.4}}
ipcmk
Create IPC (Inter-process Communication) resources.
• Create a semaphore:
ipcmk --queue
ipcrm --all
ipset
A tool to create IP sets for firewall rules.
• Save an IP set:
• View chains, rules, and packet/byte counters for the filter table:
• Add a NAT rule to translate all traffic from the 192.168.0.0/24 subnet to the
host's public IP:
isoinfo -f -i {{path/to/image.iso}}
• E[x]tract a specific file from an ISO image and send it out stdout:
isoinfo -d -i {{path/to/image.iso}}
isosize
Display the size of an ISO file.
isosize {{path/to/file.iso}}
• Display the size of an ISO file divided by a given number (only usable when --
sectors is not given):
iwconfig
iwconfig {{interface}}
• Set the ESSID (network name) of the specified interface (e.g. eth0 or wlp2s0):
• Start the interactive mode, in this mode you can enter the commands directly,
with autocompletion:
iwctl
iwctl --help
• Connect to a network with a station, if credentials are needed they will be asked:
jobs
jobs -l
jobs -n
jobs -p
jobs -r
jobs -s
journalctl
Query the systemd journal.
journalctl -b
journalctl -b -1
• Show all messages with priority level 3 (errors) from this [b]oot:
journalctl -b --priority={{3}}
journalctl -f
journalctl -u {{unit}}
journalctl _PID={{pid}}
journalctl {{path/to/executable}}
jpegtran
Perform lossless transformation of JPEG files.
• Transverse the image across the upper right to lower left axis:
• Crop the image to a rectangular region of width W and height H from the upper-left
corner, saving the output to a specific file:
• Crop the image to a rectangular region of width W and height H, starting at point X
and Y from the upper-left corner:
• Launch VLC, and inhibit color correction (night mode) while it's running:
• 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
kdocker {{application}}
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
kexec
Directly reboot into a new kernel.
kexec -e
kexec -u
keyctl
Manipulate the Linux kernel keyring.
• Display books:
kjv -l
kjv {{Genesis}}
kjv /{{Plagues}}
kjv {{1Jn}}/{{antichrist}}
konsole
Konsole: The KDE terminal emulator.
• Run a specific command and do not close the window after it exits:
konsole --new-tab
• Open a Konsole in the background and bring to the front when Ctrl+Shift+F12 (by
default) is pressed:
konsole --background-mode
konsole --fallback-profile
kpackagetool5
KPackage Manager: Install, list, remove Plasma packages.
kpackagetool5 --list-types
kpartx -a {{whole_disk.img}}
kpartx -d {{whole_disk.img}}
kpartx -l {{whole_disk.img}}
kreadconfig5
Read KConfig entries for KDE Plasma.
kscreen-console bug
kscreen-console config
kscreen-console outputs
kscreen-console monitor
kscreen-console json
• Display help:
kscreen-console --help
kscreen-console --help-all
kscreen-doctor
Change and manipulate the screen setup from the command-line.
kscreen-doctor --outputs
kscreen-doctor {{output.1.rotation.right}}
kscreen-doctor {{output.HDMI-2.scale.2}}
ksvgtopng5
Convert SVG files to PNG format.
kwrite {{path/to/file}}
• Display help:
kwriteconfig5 --help
• Delete a key:
• Set up the server with Laravel dependencies using the default PHP version:
larasail setup
• Set up the server with Laravel dependencies using a specific PHP version:
larasail pass
larasail mysqlpass
lastb
Show a listing of last logged in users.
sudo lastb
• Show a list of all last logged in users and translate the IP into a hostname:
• Print information about all the commands in the acct (record file):
lastcomm
lastlog
• Dump all information, resolving computer hostnames with the selected DNS
server:
• Update symlinks and rebuild the cache (usually run when a new library is
installed):
sudo ldconfig
• Print the libraries in the cache and check whether a given library is present:
ldd {{path/to/binary}}
ldd -u {{path/to/binary}}
legit
Complementary command-line interface for Git.
git sync
lftp {{ftp.example.com}}
mget {{path/to/*.png}}
mput {{path/to/*.zip}}
mrm {{path/to/*.txt}}
mv {{original_filename}} {{new_filename}}
light
light -S {{50}}
light -U {{20}}
light -A {{20}}
line
Read a single line of input.
• Read input:
line
lnav
Advanced log file viewer to analyze logs with little to no setup.
lnav {{path/to/log_or_directory|url}}
• Validate the format of log files against the configuration and report any errors:
lnav -C {{path/to/log_directory}}
locale
Get locale-specific information.
locale
locale --all-locales
locale date_fmt
localectl
Control the system locale and keyboard layout settings.
• Show the current settings of the system locale and keyboard mapping:
localectl
localectl list-locales
localectl list-keymaps
• Set the system keyboard mapping for the console and X11:
• Look for pattern in the database. Note: the database is recomputed periodically
(usually weekly or daily):
locate {{pattern}}
• Look for a file by its exact filename (a pattern containing no globbing characters is
interpreted as *pattern*):
locate */{{filename}}
• Recompute the database. You need to do it if you want to find recently added files:
sudo updatedb
login
Initiates a session for a user.
• Log in as a user:
login {{user}}
login -f {{user}}
login -p {{user}}
• Execute command with specified argument(s) and save its output to log file:
logsave {{logfile}} -
• Append the output to a log file, instead of replacing its current contents:
losetup -a
• Attach a file to a new free loop device and scan the device for partitions:
sudo losetup -D
• Decompress a file:
lrunzip {{filename.lrz}}
lrunzip -f {{filename.lrz}}
lrunzip -K {{filename.lrz}}
lrzip {{filename}}
lrzip -b {{filename}}
lrzip -z {{filename}}
lrzip -l {{filename}}
lrzip -e {{filename}}
lrztar {{path/to/directory}}
lrztar -z {{path/to/directory}}
lrztar -f {{path/to/directory}}
lrzuntar
A wrapper for lrunzip to simplify decompression of directories.
lrzuntar {{path/to/archive.tar.lrz}}
• Decompress from a file to the current directory and silently overwrite items that
already exist:
lrzuntar -f {{archive.tar.lrz}}
lrzuntar -D {{path/to/archive.tar.lrz}}
lsattr
List file attributes on a Linux filesystem.
lsattr
lsattr {{path}}
lsattr -R
• Show attributes of all the files in the current directory, including hidden ones:
lsattr -a
lsattr -d
lsb_release
Provides certain LSB (Linux Standard Base) and distribution-specific information.
lsb_release -a
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
lsblk
Lists information about devices.
lsblk
lsblk -a
lsblk -b
lsblk -f
lsblk -i
lsblk -t
lsblk -e {{1,7}}
lscpu
lscpu --extended
sudo lshw -X
lslocks
• List locks producing a raw output (no columns), and without column headers:
lslocks --json
lslogins
Show information about users on a Linux system.
lslogins
lslogins --groups={{groups}}
lslogins --user-accs
lslogins --last
lslogins --system-accs
lslogins --supp-groups
lsmod
Shows the status of Linux kernel modules.
lsmod
lspci
List all PCI devices.
lspci
lspci -v
lspci -k
lspci -s {{00:18.3}}
lspci -vm
lsscsi
List SCSI devices (or hosts) and their attributes.
lsscsi
lsscsi -L
lsscsi -s
lsusb
Display information about USB buses and devices connected to them.
lsusb
lsusb -t
lsusb --verbose
lsusb -D {{device}}
lsusb -d {{vendor}}:{{product}}
ltrace
Display dynamic library calls of a process.
ltrace ./{{program}}
ltrace -c {{path/to/program}}
• Create a 1500 megabyte linear logical volume named mylv in the volume group
vg1:
• Create a logical volume called mylv that uses 60% of the total space in volume
group vg1:
• Create a logical volume called mylv that uses all the unallocated space in the
volume group vg1:
sudo lvdisplay
sudo lvm
• Create a volume group called vg1 from the physical volume on /dev/sdXY:
• Create a logical volume with size 10G from volume group vg1:
• Extend the size of a logical volume as well as the underlying filesystem by 120 GB:
• Extend the size of a logical volume to 100% of the free physical volume space:
• Reduce the size of a logical volume as well as the underlying filesystem by 120 GB:
lvs
lvs -a
lvs -v
lvs -o {{field_name_1}},{{field_name_2}}
lvs -o +{{field_name}}
lvs --noheadings
Any container names or patterns can be prefixed with the name of a remote server.
• List local containers matching a string. Omit the string to list all local containers:
• List images matching a string. Omit the string to list all images:
• Start a container:
• Stop a container:
lxi discover
lxterminal
lxterminal -e "{{command}}"
lxterminal --tabs={{tab_name1,tab_name2,...}}
lxterminal --title={{title_name}}
lxterminal --working-directory={{path/to/directory}}
lynis
System and security auditing tool.
mac2unix {{filename}}
maim {{path/to/screenshot.png}}
• Capture a screenshot of the selected region and save it in the clipboard (requires
xclip):
• Make a package:
makepkg
makepkg --syncdeps
makepkg --skipchecksums
makepkg --clean
makepkg --verifysource
mandb
mandb --create
mandb --user-db
mandb --no-purge
mandb --test
manpath
Determine the search path for manual pages.
manpath
manpath --global
mcookie
Generates random 128-bit hexadecimal numbers.
mcookie
• Generate a random number, using the contents of a file as a seed for the
randomness:
• Generate a random number, using a specific number of bytes from a file as a seed
for the randomness:
• Print the details of the randomness used, such as the origin and seed for each
source:
mcookie --verbose
mdadm
RAID management utility.
• Create array:
• Stop array:
• Remove disk:
mdbook init
mdbook clean
mdbook serve
• Watch a set of Markdown files and automatically build when a file is changed:
mdbook watch
Medusa
A modular and parallel login brute-forcer for a variety of protocols.
• Execute brute force against an FTP server using a file containing usernames and a
file containing passwords:
• Execute a login attempt against an HTTP server using the username, password and
user-agent specified:
• Execute a brute force against a MySQL server using a file containing usernames
and a hash:
• Execute a brute force against a list of SMB servers using a username and a
pwdump file:
tldr megatools-dl
megatools-dl
Download files from mega.nz.
megatools-dl {{https://mega.nz/...}}
mimetype {{path/to/file}}
• Display debug information about how the MIME type was determined:
• Display all the possible MIME types of a given file in confidence order:
• Enter the configuration menu before communicating with a given serial port:
mkfs.ext2 {{/dev/sdb1}}
mkfs.ext3 {{/dev/sdb1}}
mkfs.ext4 {{/dev/sdb1}}
mkfs.btrfs
Create a btrfs filesystem.
Defaults to raid1, which specifies 2 copies of a given data block spread across 2
different devices.
mkfs.cramfs {{/dev/sdb1}}
mkfs.exfat {{/dev/sdb1}}
mkfs.fat {{/dev/sdb1}}
mkfs.fat -f 5 {{/dev/sdb1}}
mkfs
Build a Linux filesystem on a hard disk partition.
mkfs {{path/to/partition}}
mkfs.minix {{/dev/sdb1}}
mkfs.ntfs
Creates a NTFS filesystem inside a partition.
mkfs.ntfs {{/dev/sdb1}}
mkfs.vfat {{/dev/sdb1}}
mkfs.vfat -f 5 {{/dev/sdb1}}
mkinitcpio
Generates initial ramdisk environments for booting the Linux kernel based on the
specified preset(s).
• Perform a dry run (print what would be done without actually doing it):
mkinitcpio
mkinitcpio --allpresets
• Generate an initramfs image for a kernel other than the one currently running (the
installed kernel releases can be found in /usr/lib/modules/):
mkinitcpio --listhooks
mklost+found
mknod
Create block or character device special files.
• Check a partition for bad blocks before creating the swap area:
• Specify a label for the file (to allow swapon to use the label):
mocp
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:
• Add songs recursively to 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}}
mocp --exit
modinfo
Extract information about a Linux kernel module.
modinfo {{kernel_module}}
modinfo -F {{author|description|license|parm|filename}}
{{kernel_module}}
modprobe
Add or remove modules from the Linux kernel.
• Pretend to load a module into the kernel, but don't actually do it:
module avail
• Load a module:
module list
module purge
mono
Runtime for the .NET Framework.
mono {{path/to/program.exe}}
mons
A tool to quickly manage two displays.
mons -o
mons -s
• Duplicate the primary monitor onto the secondary monitor, using the resolution
of the primary monitor:
mons -d
• Mirror the primary monitor onto the secondary monitor, using the resolution of
the secondary monitor:
mons -m
mountpoint
Test if a directory is a filesystem mountpoint.
mountpoint {{path/to/directory}}
mountpoint -q {{path/to/directory}}
• Fast forward:
• Quit:
q
mpstat
Report CPU statistics.
mpstat {{2}}
mt -f {{/dev/nstX}} status
mt -f {{/dev/nstX}} rewind
• Move forward a given files, then position the tape on first block of next file:
• Rewind the tape, then position the tape at beginning of the given file:
mt -f {{/dev/nstX}} eod
mt -f {{/dev/nstX}} eject
mt -f {{/dev/nstX} eof
mullvad
CLI client for Mullvad VPN.
mullvad connect
mullvad status
mycli
A CLI for MySQL, MariaDB, and Percona with auto-completion and syntax highlighting.
mycli {{database_name}}
namcap {{path/to/pkgbuild}}
namcap {{path/to/package.pkg.tar.zst}}
namcap -i {{path/to/file}}
named
Execute the DNS (Dynamic Name Service) server daemon that converts host names to IP
addresses and vice versa.
• Read the default configuration file /etc/named.conf, read any initial data and
listen for queries:
named
named -c {{path/to/named.conf}}
• Use IPv4 or IPv6 only, even if the host machine is capable of utilising other
protocols:
named {{-4|-6}}
• Listen for queries on a specific port instead of the default port 53:
named -p {{port}}
named -f
namei
Follows a pathname (which can be a symbolic link) until a terminal point is found (a file/
directory/char device etc).
This program is useful for finding "too many levels of symbolic links" problems.
• Show the mode bits of each file type in the style of ls:
• Launch Nautilus:
nautilus
sudo nautilus
nautilus {{path/to/directory}}
nautilus --new-window
nautilus --quit
• Display help:
nautilus --help
ncal
This command is an alias of cal.
tldr cal
ncat
Use the normal cat functionality over networks.
• Listen for input on the specified port and write it to the specified file:
• Accept multiple connections and keep ncat open after they have been closed:
• Write output of specified file to the specified host on the specified port:
ncdu
• Colorize output:
ncdu {{path/to/directory}}
ncdu -o {{path/to/file}}
• Exclude files that match a pattern, argument can be given multiple times to add
more patterns:
• Run a monitor to watch for SMART health events for NVDIMMs on the 'ACPI.NFIT'
bus:
needrestart
sudo needrestart
needrestart -{{v|q}}
needrestart -k
needrestart -w
needrestart -b
needrestart -c {{path/to/config}}
• Display help:
needrestart --help
nemo
File manager and graphical shell for Cinnamon.
nemo
nemo .
nemo --quit
nethogs
Monitor bandwidth usage per process.
sudo nethogs
sudo netselect-apt
netselect
newgrp
Switch primary group membership.
newgrp {{group_name}}
newgrp
nft
Allows configuration of tables, chains and rules provided by the Linux kernel firewall.
• Add a NAT rule to translate all traffic from the 192.168.0.0/24 subnet to the
host's public IP:
• Delete a rule:
nitrogen {{path/to/directory}}
nitrogen --restore
nixos-container
Starts NixOS containers using Linux containers.
nixos-option {{option_key}}
nixos-option boot.kernelModules
nixos-option users.users.{{username}}.openssh.authorizedKeys.
{{keyFiles|keys}}
nixos-option nix.buildMachines
NIXOS_CONFIG={{path_to_configuration.nix}} nixos-option
{{option_key}}
nixos-option -r users.users.{{user}}
nixos-rebuild
Reconfigure a NixOS machine.
• Build and switch to the new configuration, making it the boot default:
• Build and switch to the new configuration, making it the boot default and naming
the boot entry:
• Build and switch to the new configuration, making it the boot default and
installing updates:
• Build the new configuration and make it the boot default without switching to it:
• Build and activate the new configuration, but don't make a boot entry (for testing
purposes):
• List all NetworkManager connections (shows name, UUID, type and device):
nmcli connection
• Deactivate a connection:
nmcli monitor
nmcli
A command-line tool for controlling NetworkManager.
Some subcommands such as nmcli monitor have their own usage documentation.
nmcli {{agent|connection|device|general|help|monitor|
networking|radio}} {{command_options}}
nmcli --version
• Display help:
nmcli --help
• Start nmon:
nmon
nmon -f
nmtui
nmtui connect
nmtui hostname
nologin
Alternative shell that prevents a user from logging in.
• Set a user's login shell to nologin to prevent the user from logging in:
nordvpn login
nordvpn status
nordvpn connect
nordvpn countries
• Show a notification with the title "Test" and the content "This is a test":
nsnake
h
ntfsfix
Fix common problems on an NTFS partition.
ntpdate -q {{host}}
ntpq --interactive
ntpq --peers
ntpq --debug-level
ntpq --command={{rv}}
numactl
Control NUMA policy for processes or shared memory.
• Run a command on CPUs (cores) 0-4 and 8-12 of the current cpuset:
numlockx status
numlockx on
numlockx off
numlockx toggle
openfortivpn
A VPN client, for Fortinet's proprietary PPP+SSL VPN solution.
openfortivpn {{host}}:{{port}}
openfortivpn --trusted-cert={{sha256_sum}}
openrc
The OpenRC service manager.
openvpn3 sessions-list
openvpn3 configs-list
opkg
A lightweight package manager used to install OpenWrt packages.
• Install a package:
• Remove a package:
opkg update
opkg upgrade
opkg list
pacaur
A utility for Arch Linux to build and install packages from the Arch User Repository.
pacaur -Syu
pacaur -Syua
pacaur -S {{package_name}}
pacaur -Qs
paccache
A pacman cache cleaning utility.
• Remove all but the 3 most recent package versions from the pacman cache:
paccache -r
• Perform a dry-run and show the number of candidate packages for deletion:
paccache -d
paccache -m {{path/to/directory}}
pacman --database
Operate on the Arch Linux package database.
• Display help:
• Display help:
• Display help:
• Find the package that owns a specific file, using a regular expression:
pacman-key --list-keys
Every run of pacman-mirrors requires you to synchronize your database and update
your system using sudo pacman -Syyu.
pacman-mirrors --status
pacman-mirrors --get-branch
pacman --query
• List orphan packages (installed as dependencies but not required by any package):
• List packages that would be affected (does not remove any packages):
• Synchronize and update all packages, but ignore a specific package (can be used
more than once):
• Remove not installed packages and unused repositories from the cache (use two
--clean flags to clean all packages):
• Display help:
• List packages that would be affected (does not install any packages):
Some subcommands such as pacman sync have their own usage documentation.
pacman --query
• List orphan packages (installed as dependencies but not actually required by any
package):
pacman4console
pacman4console --level={{level_number}}
pacman4consoleedit {{path/to/level_file}}
pacman4console --level={{path/to/level_file}}
pacstall
An AUR package manager for Ubuntu.
• Install a package:
• Remove a package:
• Add a repository to the database (only GitHub and GitLab are supported):
pacstall --update
pacstall --upgrade
pacstall --list
pacstrap
Arch Linux install script to install packages to the specified new root directory.
• Install the base package, Linux kernel and firmware for common hardware:
• Install the base package, Linux LTS kernel and base-devel build tools:
• Install packages using the package cache on the host instead of on the target:
• Install packages without copy the host's pacman keyring to the target:
pactree {{package}}
• Display help:
pactree
pamac
A command-line utility for the GUI package manager pamac.
If you can't see the AUR packages, enable it in /etc/pamac.conf or in the GUI.
pamac checkupdates
pamac upgrade
parted
A partition manipulation program.
select {{/dev/sdX}}
rm {{/dev/sdXN}}
partprobe
Notify the operating system kernel of partition table changes.
sudo partprobe
• Notify the kernel of partition table changes and show a summary of devices and
their partitions:
• Show a summary of devices and their partitions but don't notify the kernel:
• Add all the partitions found in a given block device to the kernel:
• Delete all the partitions found from the kernel (does not alter partitions on disk):
paru {{package_name_or_seach_term}}
paru
paru -Sua
• Download PKGBUILD and other package source files from the AUR or ABS:
• List all Samba users (use verbose flag to show their settings):
NOTE: this page refers to the command from the perl-rename Arch Linux package.
• Rename files using a Perl Common Regular Expression (substitute 'foo' with 'bar'
wherever found):
• Force renaming even if the operation would remove existing destination files:
phar help
It is recommended to write recovered files to a disk separate to the one being recovered
from.
• Disable the JSON extension for every SAPI of every PHP version:
• Disable the JSON extension for PHP 7.3 with the cli SAPI:
• Enable the JSON extension for every SAPI of every PHP version:
• Enable the JSON extension for PHP 7.3 with the cli SAPI:
sudo phpquery -V
• List enabled extensions for PHP 7.3 with the cli SAPI:
• Check if the JSON extension is enabled for PHP 7.3 with the apache2 SAPI:
physlock
physlock -m
physlock -s
physlock -p "{{Locked!}}"
physlock -d
pi
Compute decimal Archimedes' constant Pi on the command-line.
pi
pi {{number}}
• Display help:
pi --help
• Display version:
pi --version
pi --bibliography
pidof
Gets the ID of a process using its name.
pidof {{bash}}
pidof -s {{bash}}
pidof -x {{script.py}}
pidstat -r
pidstat -d
pidstat -p {{PID}}
• Show memory statistics for all processes whose command name include "fox" or
"bird":
pihole status
• Update Pi-hole:
pihole updatePihole
pihole chronometer
pihole {{enable|disable}}
pihole restartdns
pihole tail
pinout
View the current Raspberry Pi's GPIO pin-out information on the terminal with an
ASCII diagram.
• View the pinout information and GPIO header diagram for the current Raspberry
Pi:
pinout
pinout -x
pivpn
Easy security-hardened OpenVPN setup and manager.
Originally designed for the Raspberry Pi, but works on other Linux devices too.
• Uninstall PiVPN:
• Get the list of libraries, their dependencies, and proper cflags for gcc:
• Compile your code with libgtk-3, libwebkit2gtk-4.0 and all their dependencies:
pkgadd {{package_name}}
pkgadd -u {{package_name}}
pkgfile
Tool for searching files from packages in the official repositories on arch-based systems.
pkgfile {{filename}}
• List only files provided by a package located within the bin or sbin directory:
• Search for a package that owns a specific file using case-insensitive matching:
• Search for a package that owns a specific file in the bin or sbin directory:
• Search for a package that owns a specific file, displaying the package version:
pkginfo -i
pkginfo -l {{package_name}}
pkginfo -o {{pattern}}
pkginfo -f {{file}}
pkgmk
Make a binary package for use with pkgadd on CRUX.
pkgmk -d
pkgmk -d -i
pkgmk -d -u
pkgmk -d -if
pkgmk -d -im
pkgmk -uf
pkgrm
Remove a package from a CRUX system.
pkgrm {{package_name}}
playerctl
Utility to control different media players.
• Toggle play:
playerctl play-pause
• Next media:
playerctl next
• Previous media:
playerctl previous
playerctl --list-all
pmount {{/dev/to/block/device}}
pmount
po4a-gettextize
Convert a file to a PO file.
po4a-gettextize --help-format
• Convert a text file along with a translated document to a PO file (-l option can be
provied multiple times):
The provided PO file should be the translation of the POT file which was produced by
po4a-gettextize.
po4a-translate --help-format
po4a-updatepo
Update the translation (in PO format) of a documentation.
po4a-updatepo --help-format
po4a {{path/to/config_file}}
ports
Update/list the ports tree on a CRUX system.
ports -u
ports -l
• Check the differences between installed packages and the ports tree:
ports -d
postfix
Postfix mail transfer agent (MTA) control program.
See also dovecot, a mail delivery agent (MDA) that integrates with Postfix.
• Start Postfix:
poweroff
poweroff --halt
poweroff --reboot
• Write the wtmp shutdown entry without shutting down the system:
poweroff --wtmp-only
powerprofilesctl
Make power profiles handling available over D-Bus.
powerprofilesctl list
powerstat
NOTE: this page refers to the command from the prename Fedora package.
• Rename files using a Perl Common Regular Expression (substitute 'foo' with 'bar'
wherever found):
• Force renaming even if the operation would remove existing destination files:
pridecat {{file}}
pridecat {{file}} -b
ls | pridecat --{{flag}}
print
An alias to a run-mailcap's action print.
• Print action can be used to print any file on default run-mailcap tool:
print {{filename}}
• With run-mailcap:
Given a process ID and one or more resources, prlimit tries to retrieve and/or modify the
limits.
• Display limit values for all current resources for the running parent process:
prlimit
• List all processes showing the PID, user, CPU usage, memory usage, and the
command which started them:
procs
• Show information about processes, if the commands which started them contain
zsh:
procs {{zsh}}
• Show information about processes with either a PID, command, or user containing
(zsh or firefox):
• Show information about processes with both PID 41 and a command or user
containing zsh:
progress
progress -q
protontricks
protontricks --gui
protonvpn-cli connect
• Display help:
protonvpn-cli connect
protonvpn-cli status
protonvpn-cli disconnect
• Install a package:
• Remove a package:
prt-get sysup
pstree
pstree -p
pstree {{user}}
ptx
Generate a permuted index of words from one or more text files.
• Generate a permuted index where the first field of each line is an index reference:
pulseaudio --check
pulseaudio --start
pulseaudio --kill
pulseaudio --dump-modules
• Load a module into the currently running daemon with the specified arguments:
pvcreate {{/dev/sda1}}
sudo pvdisplay
pvs
pvs -a
pvs -v
pvs -o {{field_name_1}},{{field_name_2}}
pvs -o +{{field_name}}
pvs --noheadings
pw-loopback
• Create a loopback device that automatically connects to the speakers and swaps
the left and right channels between the sink and source:
pw-loopback --capture-props='{{media.class=Audio/Sink
audio.position=[FL FR]}}' --playback-
props='{{audio.position=[FR FL]}}'
pw-play --list-targets
pw-play {{path/to/file.wav}}
pw-record --list-targets
pw-record {{path/to/file.wav}}
pwdx {{process_id}}
qjoypad
Translate input from gamepads or joysticks into keyboard strokes or mouse actions.
• Start QJoyPad:
qjoypad
qjoypad --device={{path/to/directory}}
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}}"
qm
Qemu/KVM Virtual Machine Manager.
qm list
• Using an ISO file uploaded on the local storage, create a virtual machine with a 4
GB IDE disk on the local-lvm storage and an ID of 100:
qm config {{100}}
qm start {{100}}
• Send a shutdown request, then wait until the virtual machine is stopped:
qsub {{script.sh}}
• Submit a script with a specified wallclock runtime limit of 1 hour, 2 minutes and 3
seconds:
• Submit a script to a specific queue. Note that different queues can have different
maximum and minimum runtime limits:
qtchooser --list-versions
qtchooser --print-env
qtchooser --help
quotacheck
Scan a filesystem for disk usage; create, check and repair quota files.
It is best to run quota check with quotas turned off to prevent damage or loss to quota
files.
• Force check even if quotas are enabled (this can cause damage or loss to quota
files):
radeontop
radeontop --color
• Select a specific GPU (the bus number is the first number in the output of lspci):
• Specify the display refresh rate (higher means more GPU overhead):
rankmirrors {{/etc/pacman.d/mirrorlist}}
rankmirrors -v {{/etc/pacman.d/mirrorlist}}
• Start raspi-config:
sudo raspi-config
raspinfo
Display Raspberry Pi system information.
raspinfo
raw
Bind a Unix raw character device.
raw /dev/raw/raw{{1}}
raw -qa
rc-service
Locate and run OpenRC services with arguments.
• Start a service:
• Stop a service:
• Restart a service:
rc-status
rc-status --all
rc-status --crashed
rc-status --manual
rc-status --supervised
rc-status --runlevel
rc-status --list
rc-update
Add and remove OpenRC services to and from runlevels.
• List all services and the runlevels they are added to:
rc-update show
It can be used to connect the remote computer using the RDP protocol.
• Simple Examples:
• Connect to a remote computer with full screen (press Ctrl + Alt + Enter to
exist):
• Use the customed resolution (use the letter 'x' between the number):
• Display the entries in symbol table section of the ELF file, if it has one:
• Display the information contained in the ELF header at the start of the file:
readpe {{path/to/executable}}
reboot
reboot --poweroff
reboot --halt
reboot --wtmp-only
reflector
Arch script to fetch and sort mirrorlists.
• Get all mirrors, sort for download speed and save them:
NOTE: this page refers to the command from the util-linux package.
Warning: This command has no safeguards and will overwrite files without prompting.
• Rename files using simple substitutions (substitute 'foo' with 'bar' wherever
found):
• Add all package binaries in the current directory and remove the old database file:
• Add all package binaries in the current directory in silent mode except for warning
and error messages:
• Add all package binaries in the current directory without showing color:
reportbug {{package}}
• Report a bug that is not about a specific package (general problem, infrastructure,
etc.):
reportbug other
• Report quota stats for all users, even those who aren't using any of their quota:
Best used when you forget to start a long running task in screen.
reptyr {{pid}}
reset
Reinitialises the current terminal. Clears the entire terminal screen.
reset
reset -q
resize2fs
Resize an ext2, ext3 or ext4 filesystem.
Does not resize the underlying partition. The filesystem may have to be unmounted
first, read the man page for more details.
resize2fs {{/dev/sdXN}}
resize2fs -M {{/dev/sdXN}}
resolvectl
Resolve domain names, IPV4 and IPv6 addresses, DNS resource records, and services.
resolvectl status
• Resolve the IPv4 and IPv6 addresses for one or more domains:
• Retrieve the public key from an email address from an OPENPGPKEY DNS record:
resolveip {{example.org}}
resolveip {{1.1.1.1}}
• List devices:
rfkill
• Filter by columns:
rfkill -o {{ID,TYPE,DEVICE}}
rfkill -J
rgrep
Recursively find patterns in files using regular expressions.
rgrep "{{search_pattern}}"
• Recursively search for an exact string (disables regular expressions) in the current
working directory:
rig
rig -{{m|f}}
rig -d {{path/to/directory}}
rig -c {{number}}
rig -f -c {{number}}
rmmod
Remove modules from the Linux kernel.
• Remove a module from the kernel and send errors to syslog instead of standard
error:
• Display help:
rmmob --help
• Display version:
rmmob --version
rofi
An application launcher and window switcher.
• Pipe a list of items to stdin and print the selected item to stdout:
rolldice d{{20}}
• Roll two six sided dice and drop the lowest roll:
rolldice {{2}}d{{6}}s{{1}}
rolldice {{2}}d{{20}}{{+5}}
rolldice {{2}}xd{{20}}
rpcclient
MS-RPC client tool (part of the samba suite).
• Display privileges:
rpcinfo
rpcinfo -s {{localhost}}
rpcinfo -m
• Display list of entries of given service name (mountd) and version number (2) on a
remote nfs share:
• Delete the registration for version 1 of the mountd service for all transports:
rpm -q {{httpd}}
• List binary packages which would be generated from a rpm spec file:
rpmspec --querytags
• Get summary information for single binary packages generated from a rpm spec
file:
• Get the source package which would be generated from a rpm spec file:
rspamc stat
rtcwake
Enter a system sleep state until specified wakeup time relative to your BIOS clock.
• Freeze the system (more efficient than suspend-to-RAM but version 3.9 or newer
of the Linux kernel is required) and wakeup at a given date and time:
• Perform a dry run to wakeup the computer at a given time. (Press Ctrl + C to
abort):
rtorrent {{torrent_or_magnet}}
<Ctrl>S
->
<Ctrl>Q
run-mailcap
Run MailCap Programs.
Run mailcap view, see, edit, compose, print - execute programs via entries in the mailcap
file (or any of its aliases) will use the given action to process each mime-type/file.
• In simple language:
With neither context nor command, print the current security context.
runcon
runuser {{user}} -l
• Specify a shell for running instead of the default shell (also works for login):
• Restore a snapshot:
Shows commands called by users, including basic info on CPU time spent processing and
I/O rates.
sudo sa
sudo sa --print-users
sudo sa --user-summary
sacct
Display accounting data from the Slurm service.
• Display job id, job name, partition, account, number of allocated cpus, job state,
and job exit codes for recent jobs:
sacct
• Display job id, job state, job exit code for recent jobs:
sacct --brief
• Display elapsed time, job name, number of requested CPUs, and memory
requested of a job:
sam init
sam package
sam build
sam deploy
sar
Monitor performance of various Linux subsystems.
• Report I/O and transfer rate issued to physical devices, one per second (press
CTRL+C to quit):
sar -b {{1}}
• Report the run queue length and load averages, one per second:
sar -q {{1}}
sar -B {{5}}
sbatch
Submit a batch job to the SLURM scheduler.
sbatch {{path/to/job.sh}}
scancel {{job_id}}
scancel {{user_name}}
scanimage
Scan images with the Scanner Access Now Easy API.
• List available scanners to ensure the target device is connected and recognized:
scanimage -L
schroot --list
scontrol
View information about and modify jobs.
screenkey
• Display keys and mouse buttons which are currently being pressed on the screen:
screenkey --mouse
screenkey --show-settings
script
script {{path/to/session.out}}
script -a {{path/to/session.out}}
• Capture a screenshot and save it to the current directory with the current date as
the filename:
scrot
scrot {{capture.png}}
scrot --select
scrot --focused
• See action can be used to view any file (usually image) on default mailcap
explorer:
see {{filename}}
• Take a set of commands from a specified file and load them in a single transaction:
sensible-browser
sensible-browser {{url}}
sensible-editor
Open 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:
sensors
sensors --fahrenheit
service
Manage services by running init scripts.
service --status-all
• Modify ACL of a file for user with read and write access:
setfacl -b {{file}}
setxkbmap
Set the keyboard using the X Keyboard Extension.
setxkbmap {{fr}}
• Get help:
setxkbmap -help
localectl list-x11-keymap-layouts
• 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 -I {{/path/to/mounted_disk_directory}}
sfill -i {{/path/to/mounted_disk_directory}}
sherlock
Find usernames across social networks.
• Search for a specific username on social networks saving the results to a file:
• Search for specific usernames on social networks saving the results into a
directory:
• Search for a specific username on social networks using the Tor network:
• Make requests over Tor with a new Tor circuit after each request:
• Search for a specific username on social networks and open results in the default
web browser:
• Display help:
sherlock --help
shiny-mirrors
Generate a pacman mirror list for Manjaro Linux.
Every run of shiny-mirrors requires you to synchronize your database and update your
system using sudo pacman -Syyu.
shiny-mirrors status
shutdown -h now
• Reboot immediately:
shutdown -r now
• Reboot in 5 minutes:
shutdown -h 13:00
shutdown -c
sic
Simple IRC client.
• Connect to the default host (irc.ofct.net) with the nickname set in the $USER
environment variable:
sic
• Join a channel:
:j #{{channel}}<Enter>
:m #{{channel|user}}<Enter>
:s #{{channel|user}}<Enter>
silentcast
Silent screencast creator. Saves in .mkv and animated GIF formats.
• Launch silentcast:
silentcast
silentcast --display={{display}}
sinfo
View information about Slurm nodes and partitions.
See also squeue and sbatch, which are also part of the Slurm workload manager.
sinfo --summarize
• View the detailed status of all partitions across the entire cluster:
sinfo
sinfo --dead
sinfo --list-reasons
slapt-get
An apt like system for Slackware package management.
slapt-get --update
• Remove a package:
slapt-get --upgrade
slapt-src --update
slapt-src --list
• Wait for the user to make a selection and output its geometry to standard output:
slop
slop -D
slop -l
slop -f {{format_string}}
slop -c {{red}},{{green}},{{blue}},{{alpha}}
sm
Displays a short message fullscreen.
sm "{{Hello World!}}"
sm -i "{{Hello World!}}"
• Connect to a share (user will be prompted for password; exit to quit the session):
smbclient {{//server/share}}
smbget {{smb://server/share/file}}
• Display SMB shares and permissions on a host, prompting for user's password or
NTLM hash:
• Display SMB shares and permissions on a host, specifying the domain and passing
the password NTLM hash:
• Display SMB shares and list a single level of directories and files:
• Display SMB shares and recursively list a defined number of levels of directories
and files:
• Display SMB shares and recursively list directories and files, downloading the files
matching a regular expression:
• Display SMB shares and recursively list directories and files, searching for file
content matching a regular expression:
smbpasswd
• Add a specified user to Samba and set password (user should already exist in
system):
• Delete a Samba user (use pdbedit instead if the Unix account has been deleted):
snake4
• Choose level:
{{1|2|3|4|5}}
• Pause game:
Spacebar
• Quit game:
snake4 --highscores
snake4scores
Show the high scores from the snake4 game.
snake4scores
snap
Tool for managing the "snap" self-contained software packages.
• Install a package:
• Update a package:
snap refresh
snap list
• Uninstall a package:
snap changes
snapper
Filesystem snapshot management tool.
snapper list-configs
• Delete a snapshot:
• Query the system information of a remote host using SNMPv1 and a community
string:
sudo spectre-meltdown-checker
• Check the currently running kernel and show an explanation of the actions to take
to mitigate a vulnerability:
spi --update
spi --upgrade
spi {{search_terms}}
spi --clean
squeue
View the jobs queued in the SLURM scheduler.
squeue
squeue -u {{username}}
squeue -i {{5}}
squeue --start
sreport
Generate reports on jobs, users, and clusters from accounting data.
ss -a {{-t|-u|-w|-x}}
ss {{state/exclude}} {{bucket/big/connected/
synchronized/...}}
• Show all TCP sockets connected to the local HTTPS port (443):
ss -t src :{{443}}
• Show all TCP sockets along with processes connected to a remote ssh port:
• Show all UDP sockets connected on specific source and destination ports:
• Show all TCP IPv4 sockets locally connected on the subnet 192.168.0.0/16:
sstat --jobs={{job_id}}
• Display job ID, average CPU and average virtual memory size of a comma-
separated list of jobs, with pipes as column delimiters:
sstat --helpformat
st
A simple terminal emulator for the X Window System.
• Open a terminal:
st
st -T {{title}}
• Open a terminal, execute a given command, and write the output to a file:
steghide encinfo
• Embed encrypted data in a JPEG image, e.g. with Blowfish in CBC mode:
strace -p {{pid}}
• Count time, calls, and errors for each system call and report a summary on
program exit:
strace -p {{pid}} -c
strace -p {{pid}} -T
strace {{program}}
stress -c {{4}}
• Spawn 2 workers to stress test memory (each worker allocates 256M bytes):
strip {{path/to/file}}
swapoff {{/dev/sdb7}}
swapoff {{path/to/file}}
swapoff -a
swapoff -L {{swap1}}
swapon
Enables device or file for swapping.
swapon -s
swapon {{/dev/sdb7}}
swapon {{path/to/file}}
swapon -a
swapon -L {{swap1}}
swupd
Package management utility for Clear Linux.
swupd check-update
swupd bundle-list
• Remove a bundle:
• Open an image:
sxiv {{path/to/file}}
sxiv -f {{path/to/file}}
sxiv -t {{path/to/file}}
synopkg
Package management utility for Synology DiskStation Manager.
• Start/Stop a package:
• Uninstall a package:
• Display help:
synoupgrade
sysctl
List and change kernel runtime variables.
sysctl -a
sysctl -w {{section.tunable}}={{value}}
sysctl fs.file-nr
sysctl fs.file-max
sysctl -p
systemctl
Control the systemd system and service manager.
systemctl status
systemctl --failed
• Start/Stop/Restart/Reload a service:
systemctl daemon-reload
Show timing details about the boot process of units (services, mount points, devices,
sockets).
systemd-analyze blame
systemd-analyze critical-chain
• Create an SVG file showing when each system service started, highlighting the
time that they spent on initialization:
systemd-analyze security
taskset
Get or set a process' CPU affinity or start a new process with a defined CPU affinity.
tcptraceroute {{host}}
terminator
terminator -f
Ctrl + Shift + O
Ctrl + Shift + E
Ctrl + Shift + T
thunar
Graphical file manager for XFCE desktop environments.
thunar
thunar --bulk-rename
thunar --quit
tic
Compile terminfo and install for ncurses.
tic -c {{path/to/terminal.info}}
tic -D
timedatectl
Control the system time and date.
timedatectl
timedatectl list-timezones
timedatectl set-ntp on
timeshift
System restore utility.
• List snapshots:
sudo tlp-stat
sudo tlp-stat -b
• Show configuration:
sudo tlp-stat -c
tlp
Advanced power management for Linux.
sudo tlp ac
toilet
A tool to display ASCII-art fonts.
toilet {{input_text}}
• Create a new key file that can be used to lock a tomb; user will be prompted for a
password for the key:
• Forcefully create a new key, even if the tomb isn't allowing key forging (due to
swap):
• Initialize and lock an empty tomb using a key made with forge:
• Mount a tomb (by default in /media) using its key, making it usable as a regular
filesystem directory:
• Forcefully close all open tombs, killing any applications using them:
tomb list
top
Display dynamic real-time information about running processes.
• Start top:
top
top -i
top -u {{username}}
top -o {{field_name}}
• Show only the processes with the given PID(s), passed as a comma-separated list.
(Normally you wouldn't know PIDs off hand. This example picks the PIDs from the
process name):
?
tracepath
Trace the path to a network host discovering MTU along this path.
• Specify the initial destination port, useful with non-standard firewall settings:
tracepath -b {{host}}
• Specify the initial packet length (defaults to 65535 for IPv4 and 128000 for IPv6):
tracepath -6 {{host}}
trash
A CLI for managing the trashcan / recycling bin.
trash {{path/to/file}}
trash-list
trash-restore
trash-empty
• Permanentely delete all files in the trash which are older than 10 days:
trash-empty {{10}}
• Remove all files in the trash, which match a specific blob pattern:
trash-rm "{{*.o}}"
trash-rm {{/path/to/file_or_directory}}
trizen
Arch Linux utility for building packages from the Arch User Repository (AUR).
trizen -Syua
trizen -S {{package}}
trizen -Qe
trust
Tool for operating on the trust policy store.
trust list
tshark
tshark -d tcp.port=={{8888}},{{http}}
tshark -T {{json|text|ps|…}}
tshark -w {{path/to/file}}
tshark -r {{filename}}.pcap
ttyplot
A realtime plotting utility for the command line with data input from stdin.
tuxi {{search_terms}}
• Display the search results in [r]aw format (no pretty output, no colors):
tuxi -r {{search_terms}}
• Display only search results (silences "Did you mean?", greetings and usage):
tuxi -q {{search_terms}}
• Display help:
tuxi -h
ubuntu-bug
This command is an alias of apport-bug.
tldr apport-bug
udevadm
Linux udev management tool.
udisksctl status
udisksctl monitor
ufw
Uncomplicated Firewall.
• Enable ufw:
ufw enable
• Disable ufw:
ufw disable
• Allow incoming traffic on port 5432 on this host with a comment identifying the
service:
• Allow only TCP traffic from 192.168.0.4 to any address on this host, on port 22:
• Delete a particular rule. The rule number can be retrieved from the ufw status
numbered command:
ul {{file.txt}}
ul -i {{file.txt}}
unix2dos
Change Unix-style line endings to DOS-style.
unix2dos {{filename}}
unix2mac {{filename}}
• Remove the variable foo, or if the variable doesn't exist, remove the function foo:
unset {{foo}}
unset -f {{my_func}}
unshadow
Utility provided by the John the Ripper project to obtain the traditional Unix password
file if the system uses shadow passwords.
update-alternatives --get-selections
update-rc.d
Install and remove services which are System-V style init script links.
• Install a service:
• Enable a service:
• Disable a service:
sudo updatedb
updpkgsums
• Display Version:
updpkgsums -v
• Display help:
updpkgsums -h
upower
System utility to provide power and battery information and statistics.
upower --dump
upower --enumerate
upower --monitor
upower --monitor-detail
• Display version:
upower --version
uprecords
Displays a summary of historical uptime records.
uprecords
uprecords -m {{25}}
uprecords -d
uprecords -B
uprecords -w
urxvt
Rxvt-unicode.
urxvt
urxvt -e {{command}}
useradd {{name}}
• Create new user belonging to additional groups (mind the lack of whitespace):
• Remove a user:
userdel {{name}}
• Remove a user along with their home directory and mail spool:
• Create a new home directory for a user and move their files to it:
utmpdump {{/var/log/wtmp}}
uuid
uuid -v {{4}}
uuid -d {{uuid}}
uuidd
Daemon for generating UUIDs.
uuidd --random
• Generate a time-based UUID, based on the current time and MAC address of the
system:
uuidd --time
uuidgen
Generate unique identifiers (UUIDs).
uuidgen --random
uuidgen --time
uvcdynctrl -l
uvcdynctrl -d {{device_name}}
uvcdynctrl -c
• Set a new control value (for negative values, add -- before {{-value}}):
uvcdynctrl -g {{control_name}}
uvcdynctrl -W {{filename}}
uvcdynctrl -L {{filename}}
v4l2-ctl
Control video devices.
v4l2-ctl --list-devices
• List supported video formats and resolutions of default video device /dev/
video0:
v4l2-ctl --list-formats-ext
vcgencmd commands
vcgencmd measure_temp
vcgencmd measure_volts
vcgencmd get_throttled
vcgencmd bootloader_config
• Display Help:
vcgencmd --help
veracrypt
Free and open source disk encryption software.
• Create a new volume through a text user interface and use /dev/urandom as a
source of random data:
• Change the activation status of logical volumes in the specified volume group
(determine with vgscan):
• Create a new volume group called vg1 using the /dev/sda1 device:
sudo vgdisplay
vgs
vgs -a
vgs -v
vgs -o {{field_name_1}},{{field_name_2}}
vgs -o +{{field_name}}
vgs --noheadings
vgs --separator =
vgscan
Scan for volume groups on all supported Logical Volume Manager (LVM) block devices.
• Scan for volume groups and print information about each group found:
sudo vgscan
• Scan for volume groups and add the special files in /dev, if they don't already
exist, needed to access the logical volumes in the found groups :
• View an image:
viewnior {{path/to/image.ext}}
vipw
vipw --version
virt-manager
CLI launcher for virt-manager, a desktop user interface for managing KVM and Xen
virtual machines and LXC containers.
• Launch virt-manager:
virt-manager
• Connect to a hypervisor:
virt-manager --no-fork
virt-manager --debug
virt-manager --show-domain-creator
virt-manager --show-host-summary
vmstat
Report information about processes, memory, paging, block IO, traps, disks and CPU
activity.
vmstat
• Return the current VMware software version (exit status determines whether the
system is a VM or not):
vmware-checkvm
vmware-checkvm -h
vncserver
Launches a VNC (Virtual Network Computing) desktop.
vncserver
vncviewer {{host}}:{{display_number}}
vncviewer {{host}}::{{port}}
vnstat
A console-based network traffic monitor.
vnstat
vnstat -i {{eth0}}
vnstat -l -i {{eth0}}
• Show traffic statistics on an hourly basis for the last 24 hours using a bar graph:
vnstat -hg
sudo vpnc-disconnect
vrms
Report non-free packages installed on Debian-based OSes.
vrms
vrms --sparse
w
Display who is logged in and their processes.
• Display information about all users who are currently logged in:
w {{user}}
w --no-header
• Display information without including the login, JCPU and PCPU columns:
w --short
wajig
Simplified all-in-one-place system support tool for Debian-based systems.
wajig update
wajig daily-upgrade
wajig sizes
wajig versions
wajig toupgrade
• Display packages which have some form of dependency on the given package:
• Send a message:
wall {{file}}
watch {{ls}}
watch -d {{df}}
wdctl
wdctl --oneline
wg-quick up {{interface_name}}
wg
wg genkey
wg showconf {{wg0}}
whatis
Display one-line descriptions from manual pages.
whatis {{command}}
• Display a boolean choice, returning the result through the exit code:
wifi-menu
wifi-menu --obscure
• Display help:
wifi-menu --help
wine
Run Windows programs on Unix.
wine uninstaller
winetricks
WINEPREFIX={{path/to/wine_directory}} winetricks
winetricks {{package}}
wipefs
Wipe filesystem, raid, or partition-table signatures from a device.
wl-copy {{text}}
{{command}} | wl-copy
wl-copy --clear
wl-paste
Tool to access data stored in the clipboard for Wayland.
wl-paste
wl-paste --paste-once
wl-paste | {{command}}
wl-paste --clear
wmctrl
CLI for X Window Manager.
wmctrl -l
wmctrl -a {{window_title}}
wmctrl -R {{window_title}}
• Switch to a workspace:
wmctrl -s {{workspace_number}}
Some invocations of wodim can cause destructive actions, such as erasing all the data
on a disc.
wodim --devices
• Burn a file to a disc, ejecting the disc once done (some recorders require this):
• Burn a file to the disc in an optical drive, potentially writing to multiple discs in
succession:
wol {{mac_address}}
wol --file={{path/to/file}}
wpa_cli scan
wpa_cli scan_results
• Add a network:
• Enable network:
• Save config:
wpa_cli save_config
wpa_passphrase
Generate a WPA-PSK key from an ASCII passphrase for a given SSID.
• Compute and display the WPA-PSK key for a given SSID reading the passphrase
from stdin:
wpa_passphrase {{SSID}}
• Compute and display WPA-PSK key for a given SSID specifying the passphrase as
an argument:
wtf {{IMO}}
By default, the server will automatically terminate once all clients disconnect from it.
x11vnc -shared
• Launch a VNC server in view-only mode, and which won't terminate once the last
client disconnects:
• Launch a VNC server on a specific display and screen (both starting at index zero):
xbacklight
• Increase backlight to 100%, over 60 seconds (value given in ms), using 60 steps:
xbps-remove {{package_name}}
• Remove a package and all of its dependencies recursively that are not required by
other packages:
• Synchronize your repository databases and update your system and dependencies:
• Remove packages that were installed as dependencies and aren't currently needed:
xbps-remove --remove-orphans
xbps-remove --clean-cache
xclip
X11 clipboard manipulation tool, similar to xsel.
Handles the X primary and secondary selections, plus the system clipboard (Ctrl + C/
Ctrl + V).
• Copy the output from a command to the X11 primary selection area (clipboard):
• Copy the output from a command to the system clipboard, using short notation:
• Copy the contents of a PNG into the system clipboard (can be pasted in other
programs correctly):
• Copy the user input in the console into the system clipboard:
xclip -i
• Paste the contents of the X11 primary selection area to the console:
xclip -o
xclock
• Display a 24-hour digital clock with the hour and minute fields only:
• Display a 24-hour digital clock with the hour, minute and second fields that
updates every second:
• Display a 12-hour digital clock with the hour and minute fields only:
The cow is displayed for either a fixed amount of time, or an amount of time calculated
from the size of the text. Click on the cow to dismiss it immediately.
ls | xcowsay
xcowsay --at={{X}},{{Y}}
xcowsay --cow-size={{small|med|large}}
xcowsay --think
xcowsay --image={{path/to/file}}
xcursorgen
Create an X cursor file from a collection of PNGs.
If --prefix is omitted, the image files must be located in the current working
directory.
• Create an X cursor file using a config file and specify the path to the image files:
• Create an X cursor file using a config file and write the output to stdout:
xcursorgen {{path/to/config.cursor}}
xdg-mime
Query and manage MIME types according to the XDG standard.
• Set imv as the default application for opening PNG and JPEG images:
xdg-open .
xdg-open {{https://example.com}}
xdg-open {{path/to/image}}
xdg-open {{path/to/pdf}}
• Display help:
xdg-open --help
xdg-user-dirs-update
Update XDG user directories.
• Write the result to the specified dry-run-file instead of the user-dirs.dirs file:
xdotool getactivewindow
xeyes
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 --region
• Take a screenshot of the active window, and open it with a chosen program:
xfce4-terminal
xfce4-terminal --tab
• Keep the terminal around after the executed command finishes executing:
xinput list
• Disable an input:
• Enable an input:
xman
xman -bothshown
xmount
Convert on-the-fly between multiple input and output hard disk image types with
optional write cache support.
Creates a virtual file system using FUSE (Filesystem in Userspace) that contains a virtual
representation of the input image.
• Mount an EWF image file with write-cache support into a VHD file to boot from:
• Mount the first partition at sector 2048 into a new .raw image file:
• Display the current state of the system (known screens, resolutions, ...):
xrandr --query
• Disable disconnected outputs and enable connected ones with default settings:
xrandr --auto
• Set the resolution of HDMI2 to 1280x1024 and put it on the right of DP1:
xrdb
xrdb -query
xsel
X11 selection and clipboard manipulation tool.
• Output the clipboard's contents into the terminal (equivalent to Ctrl + V):
xsel -ob
xsel -cb
• Output the X11 primary selection's contents into the terminal (equivalent to a
mouse middle-click):
xsel -op
xset
User preference utility for X.
xset s off
xset -dpms
xset +dpms
xsetwacom
Command-line tool to change settings for Wacom pen tablets at runtime.
• 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:
• Rotate the input (useful for tablet-PC when rotating screen) by 0|90|180|270
degrees from "natural" rotation:
• Set button to only work when the tip of the pen is touching the tablet:
xterm -T {{Example}}
xterm -fullscreen
• Open the terminal with a dark blue background and yellow foreground (font
color):
• Open the terminal with 100 characters per line and 35 lines, in screen position
x=200px, y=20px:
• Open the terminal using a Serif font and a font size equal to 20:
xtrlock
xtrlock -b
xtrlock -f
xvfb-run
Run a command in a virtual X server environment.
xvfb-run {{command}}
• Try to get a free server number, if the default (99) is not available:
• Run a video using mpv in a second monitor 1600x900 with 1920 offset on X-axis:
yaourt -Syua
yaourt -S {{package_name}}
• List installed packages, versions, and repositories (AUR packages will be listed
under the repository name 'local'):
yaourt -Q
yay
Yet Another Yogurt: A utility for Arch Linux to build and install packages from the Arch
User Repository.
• Interactively search and install packages from the repos and AUR:
yay {{package_name|search_term}}
• Synchronize and update all packages from the repos and AUR:
yay
yay -Sua
yay -S {{package_name}}
• Remove an installed package and both its dependencies and configuration files:
• Search the package database for a keyword from the repos and AUR:
yay -Yc
yay -Ps
yetris
Clone of the game Tetris in the terminal.
yetris
{{x|z}}
Spacebar
q
ytfzf
A POSIX script that helps you find and download videos and music.
• Install a new package and assume yes to all questions (also works with update,
great for automated updates):
• Remove a package:
yum check-update
yum upgrade
zathura
A vim-like modal document viewer, with an integrated command line.
• Open a file:
zathura {{path/to/file}}
• Navigate left/up/down/right:
• Rotate:
• Invert Colors:
Ctrl + R
/{{string}}
• Create/delete bookmarks:
:{{bmark|bdelete}} {{bookmark_name}}
• List bookmarks:
:blist
zegrep
Find extended regular expression patterns in compressed files using egrep.
• Search for lines matching a pattern, printing only the matched text:
zenity --question
• Display a file selection form in which the user can only select directories:
• Display a progress bar which updates its message every second and show a
progress percent:
• Display the lines which don’t have the pattern present (Invert the search
function):
zile
• Open a file:
zile {{path/to/file}}
• Save a file:
Ctrl + X, Ctrl + S
• Quit:
Ctrl + X, Ctrl + C
• Undo changes:
Ctrl + X, U
zramctl
Setup and control zram devices.
• Enable zram with a dynamic number of devices (use zramctl to configure devices
further):
• Find and initialise the next free zram device to a 2 GB virtual drive using LZ4
compression:
zramctl
zypper
SUSE & openSUSE package management utility.
zypper refresh
• Remove a package:
zypper update
Built-in command of OS X.
afinfo {{path/to/file}}
afinfo -b {{path/to/file}}
afinfo -i {{path/to/file}}
afinfo -x {{path/to/file}}
afinfo -h
afplay
Command-line audio player.
afplay {{path/to/file}}
airport -I
airport -s
sudo airport -z
apachectl
Apache HTTP Server control interface for macOS.
apachectl start
apachectl stop
apachectl restart
applecamerad
Camera manager.
applecamerad
appsleepd
Provides app sleep services.
appsleepd
arch
Display the name of the system architecture, or run a command under a different
architecture.
arch
archey
archey --nocolor
archey --macports
archey --offline
as
Portable GNU assembler.
as {{file.s}}
as {{file.s}} -o {{out.o}}
as -f {{file.s}}
• Include a given path to the list of directories to search for files specified in
.include directives:
as -I {{path/to/directory}} {{file.s}}
asr
Restore (copy) a disk image onto a volume.
avbdeviced
base64
Encode and decode using Base64 representation.
• Encode a file:
base64 --input={{plain_file}}
• Decode a file:
bc
bc --mathlib
• Calculate an expression:
bc --expression='{{5 / 3}}'
• Execute a script:
bc {{path/to/script.bc}}
bc --mathlib --expression='{{s|c|a|l|e}}({{1}})'
bird
This supports the syncing of iCloud and iCloud drive.
bird
bless
Set volume boot capability and startup disk options.
• Bless a volume with only Mac OS X or Darwin, and create the BootX and
boot.efi files as needed:
• Set a volume containing either Mac OS 9 and Mac OS X to be the active volume:
• Gather information about the currently selected volume (as determined by the
firmware), suitable for piping to a program capable of parsing Property Lists:
bnepd
brightness
Get and set the brightness level of all internal and certain external displays.
brightness -l
brightness {{1}}
brightness {{0.5}}
caffeinate
Prevent macOS from sleeping.
caffeinate -u -t {{3600}}
caffeinate -s {{command}}
caffeinate -i
cal
Prints calendar information.
cal
cal -3
cal -m {{month}}
cal -y
cal {{year}}
ncal -e {{year}}
carthage
A dependency management tool for Cocoa applications.
• Download the latest version of all dependencies mentioned in Cartfile, and build
them:
carthage update
carthage bootstrap
cfprefsd
chflags
Change file or directory flags.
cloudphotod
codesign
Create and manipulate code signatures for macOS.
codesign -v {{path/to/App.app}}
coreaudiod
Service for Core Audio, Apple's audio system.
coreaudiod
csrutil
Manage the System Integrity Protection configuration.
csrutil status
csrutil disable
csrutil enable
• Reset the System Integrity Protection status and clear the NetBoot list:
csrutil clear
csshX
Cluster SSH tool for macOS.
csshX cluster1
dark-mode
Control macOS dark mode from the command-line.
• Toggle dark mode (turn it on if it's currently off, off if it's currently on):
dark-mode
dark-mode on
dark-mode off
dark-mode status
date
Set or display the system date.
date +"%c"
date -u +"%Y-%m-%dT%H:%M:%SZ"
• Display the current date as a Unix timestamp (seconds since the Unix epoch):
date +%s
• Display a specific date (represented as a Unix timestamp) using the default format:
date -r 1473305798
dd
Convert and copy a file.
• Make a bootable USB drive from an isohybrid file (such like archlinux-
xxx.iso):
dd if={{file.iso}} of=/dev/{{usb_drive}}
diskutil list
• Unmount a volume:
distnoted
ditto
Copy files and directories.
• Print a line to the Terminal window for every file that's being copied:
• Copy a given file or directory, while retaining the original file permissions:
dmesg
dmesg | less
dot_clean
Merge ._* files with corresponding native files.
dot_clean {{path/to/directory}}
dot_clean -f {{path/to/directory}}
dot_clean -m {{path/to/directory}}
dot_clean -n {{path/to/directory}}
• Follow symlinks:
dot_clean -s {{path/to/directory}}
dot_clean -v {{path/to/directory}}
drutil
Interact with DVD burners.
drutil eject
• Burn a directory as an ISO9660 filesystem onto a DVD. Don't verify and eject when
complete:
• List the sizes of a directory and any subdirectories, in the given unit (KiB/MiB/
GiB):
du -{{k|m|g}} {{path/to/directory}}
• List the sizes of a directory and any subdirectories, in human-readable form (i.e.
auto-selecting the appropriate unit for each size):
du -h {{path/to/directory}}
du -sh {{path/to/directory}}
• List the human-readable sizes of a directory and of all the files and directories
within it:
du -ah {{path/to/directory}}
du -h -d {{N}} {{path/to/directory}}
• List the human-readable size of all .jpg files in subdirectories of the current
directory, and show a cumulative total at the end:
du -ch {{*/*.jpg}}
duti
Set default applications for document types and URL schemes on macOS.
• Set VLC as the default viewer for files with .m4v extensions:
• Set Finder as the default handler for the ftp:// URL scheme:
duti -x {{ext}}
duti -d {{uti}}
duti -l {{uti}}
emond
Event Monitor service that accepts events from various services, runs them through a
simple rules engine, and takes action.
emond
emond -r {{path/to/file_or_directory}}
emond -c {{path/to/config}}
fdesetup
Set and retrieve FileVault related information.
fdesetup status
• Enable FileVault:
• Disable FileVault:
filecoordinationd
fileicon
A macOS CLI to manage custom file and folder icons.
fileicon rm {{path/to/file_or_directory}}
• Save the custom icon of a file or directory as a .icns file into the current
directory:
fsck {{/dev/sdX}}
• Check filesystem /dev/sdX only if it is clean, reporting any damaged blocks and
interactively letting the user choose to repair each one:
fsck -f {{/dev/sdX}}
• Check filesystem /dev/sdX only if it is clean, reporting any damaged blocks and
automatically repairing them:
fsck -q {{/dev/sdX}}
GetFileInfo
Get information about a file in an HFS+ directory.
GetFileInfo {{path/to/filename}}
GetFileInfo -d {{path/to/filename}}
• Display the date and time a given file was last modified:
GetFileInfo -m {{path/to/filename}}
GetFileInfo -c {{path/to/filename}}
hdiutil
Utility to create and manage disk images.
• Mount an image:
• Unmount an image:
hdiutil info
icalBuddy -n eventsToday
icalBuddy uncompletedTasks
icalBuddy -n tasksDueBefore:today+{{days}}
imgcat {{filename}}
indent
Change the appearance of a C/C++ program by inserting or deleting whitespace.
• Format C/C++ source according to the style of Kernighan & Ritchie (K&R):
istats
istats cpu
istats fan
istats scan
launchctl
A command-line interface to Apple's launchd manager for launch daemons (system-
wide services) and launch agents (per-user programs).
launchd loads XML-based *.plist files placed in the appropriate locations, and runs
the corresponding commands according to their defined schedule.
• Activate a user-specific agent to be loaded into launchd whenever the user logs
in:
• Activate an agent which requires root privileges to run and/or should be loaded
whenever any user logs in (note the absence of ~ in the path):
• Show all loaded agents/daemons, with the PID if the process they specify is
currently running, and the exit code returned the last time they ran:
launchctl list
• Unload a currently loaded agent, e.g. to make changes (note: the plist file is
automatically loaded into launchd after a reboot and/or logging in):
• Manually run a known (loaded) agent/daemon, even if it is not the right time
(note: this command uses the agent's label, rather than the filename):
You cannot invoke launchd manually, use launchctl to interact with it.
• Run init:
/sbin/launchd
tldr launchctl
lipo
Tool for handling Mach-O Universal Binaries.
• Debug an executable:
lldb {{executable}}
lldb -p {{pid}}
• Wait for a new process to launch with a given name, and attach to it:
lldb -w -n {{process_name}}
locate
Find filenames quickly.
• Look for pattern in the database. Note: the database is recomputed periodically
(usually weekly or daily):
locate {{pattern}}
• Look for a file by its exact filename (a pattern containing no globbing characters is
interpreted as *pattern*):
locate */{{filename}}
• Recompute the database. You need to do it if you want to find recently added files:
sudo /usr/libexec/locate.updatedb
log
View, export, and configure logging systems.
log stream
• Stream logs sent to syslog from the process with a specific PID:
m battery status
m bluetooth off
m disk filesystems
m firewall disable
machine
Print machine type.
machine
mas
Command-line interface for the Mac App Store.
• Sign into the Mac App Store for the first time:
mas list
mas upgrade
md5
Calculate MD5 cryptographic checksums.
md5 {{filename}}
md5 -q {{filename}}
md5 -s {{string}}
mdfind
List files matching a given query.
mdfind {{query}}
mdls {{path/to/file}}
mdutil -s {{/}}
mdutil -a -i {{on|off}}
mdutil -E {{path/to/volume}}
mkfile
Create one or more empty files of any size.
• Create a file of a given size and unit (bytes, KB, MB, GB):
nettop
nettop -p {{process_id|process_name}}
nettop -P
nettop -l {{10}}
nettop -d -s {{5}}
• Display help:
nettop -h
networkQuality
Measure the network quality by connecting to the internet.
networkQuality
networkQuality -s
networkQuality -I {{en0}}
networkQuality -v
networksetup
Configuration tool for Network System Preferences.
networksetup -listallnetworkservices
• Get currently connected Wi-Fi network name (Wi-Fi device usually en0 or en1):
notifyd
notifyd -d
nvram -p
• [p]rint all the variables stored in the NVRAM using [x]ML format:
nvram -xp
sudo nvram -c
ocspd
open
Opens files, directories and applications.
open {{file.ext}}
open -a {{Application}}
• Run a graphical macOS app based on the bundle identifier (refer to osascript
for an easy way to get this):
open -b {{com.domain.application}}
open .
open -R {{path/to/file}}
• Open all the files of a given extension in the current directory with the associated
application:
open {{*.ext}}
opensnoop
Tool that tracks file opens on your system.
sudo opensnoop
osascript {{path/to/apple.scpt}}
photoanalysisd
photolibraryd
This handles all photo library requests.
photolibraryd
ping
Send ICMP ECHO_REQUEST packets to network hosts.
ping {{host}}
ping -n {{host}}
• Ping host and ring the bell when a packet is received (if your terminal supports
it):
ping -a {{host}}
• Ping host and prints the time a packet was received (this option is an Apple
addition):
pkgutil --pkgs
• List all the files for an installed package given its ID:
• Convert one or more plist files to XML format, overwriting the original files in-
place:
• Convert one or more plist files to binary format, overwriting the original files in-
place:
pmset -g
pmset -g batt
pmset displaysleepnow
• Create a Podfile for the current project with the default contents:
pod init
• Download and install all pods defined in the Podfile (that haven't been installed
before):
pod install
pod list
pod outdated
pod update
• Install a package:
port installed
• Compute 300px wide PNG thumbnails of all JPEGs in the current directory and put
them in a directory:
• Reset QuickLook:
qlmanage -r
readlink
Follow symlinks and get symlink information.
readlink {{path/to/symlink}}
reboot
Reboot the system.
• Reboot immediately:
sudo reboot
sudo reboot -q
rename
Rename a file or group of files with a regular expression.
Necessitates to be root.
rubocop
rubocop --show-cops
• Exclude a cop:
rubocop --auto-correct
SafeEjectGPU
Eject a GPU safely.
SafeEjectGPU Eject
SafeEjectGPU gpus
• Eject a GPU:
say -f {{filename.txt}}
say -v "?"
screencapture {{path/to/file.png}}
screencapture -C {{path/to/file.png}}
screencapture -P
screencapture -i {{path/to/file.png}}
screencapture -v {{path/to/file.mp4}}
scutil
Manage system configuration parameters.
scutil --dns
scutil --proxy
• Get hostname:
• Set hostname:
secd
security
Administer Keychains, keys, certificates and the Security framework.
security list-keychains
• Create a keychain:
• Set a certificate to use with a website or [s]ervice by its [c]ommon name (fails if
several certificates with the same common name exist):
• Add a certificate from file to a [k]eychain (if -k isn't specified, the default keychain
is used):
securityd
sed
Edit text in a scriptable manner.
• Replace the first occurrence of a string in a file, and print the result:
• Replace all occurrences of a string [i]n a file, overwriting the file (i.e. in-place):
• Print only text between n-th line till the next empty line:
• Replace separator / by any other character not used in the find or replace patterns,
e.g. #:
• [d]elete the line at the specific line number [i]n a file, overwriting the file:
shuf {{filename}}
shuf -i {{1-10}}
shutdown
Shutdown and reboot the system.
shutdown -h now
• Sleep immediately:
shutdown -s now
• Reboot immediately:
shutdown -r now
• Reboot in 5 minutes:
shutdown -r +{{5}}
shutdown -h {{1300}}
shutdown -r {{4205101130}}
sips
Apple Scriptable Image Processing System.
• Resample image so height and width aren't greater than specified size (notice the
capital Z):
• Resample all images in a directory to fit a width of 960px (honoring aspect ratio):
sntpd
• Overwrite existing state with the local clock (stratum 1), for running a master/
primary server, without synchronizing with another (higher stratum) server:
sntpd -L
sntpd -z {{path/to/state.bin}}
softwareupdate
A tool for updating macOS App Store apps via the command-line.
softwareupdate -l
softwareupdate -ia
softwareupdate -ir
softwareupdate -i {{update_name}}
spctl
Manage the security assessment policy subsystem.
spctl --master-disable
• Turn on Gatekeeper:
spctl --master-enable
spctl --list
split
Split a file into pieces.
• Split a file, each split having 10 lines (except the last split):
• Split a file by a regular expression. The matching line will be the first line of the
next output file:
• Split a file with 512 bytes in each split (except the last split; use 512k for kilobytes
and 512m for megabytes):
spotify pause
spotify next
• Change volume:
spotify status
stat
Display file status.
• Show file properties such as size, permissions, creation and access dates among
others:
stat {{file}}
stat -x {{file}}
• Print all available information (OS name, version number, and build):
sw_vers
sw_vers -productVersion
sw_vers -buildVersion
sysctl
Access kernel state information.
sysctl -a
sysctl -n hw.model
sysctl -n machdep.cpu.brand_string
• Show available CPU features (MMX, SSE, SSE2, SSE3, AES, etc):
sysctl -n machdep.cpu.features
sysctl -w {{section.tunable}}={{value}}
system_profiler
Report system hardware and software configuration.
• Display a full system profiler report which can be opened by System Profiler.app:
system_profiler SPHardwareDataType
systemsetup -setremotelogin on
• Make the machine never sleep and automatically restart on power failure or kernel
panic:
systemsetup -liststartupdisks
• Load all RTF files in the current directory, concatenates their contents, and writes
the result out as index.html with the HTML title set to "Several Files":
timed
tmutil
Utility for managing Time Machine backups. Most verbs require root privileges.
• Start a backup, if one is not running already, and release control of the shell:
• Stop a backup:
top
• Start top sorting processes by internal memory size (default order - process ID):
top -o mem
?
uname
Print details about the current machine and the operating system running on it.
Note: for additional information about the operating system, try the sw_vers
command.
uname
uname -mp
uname -srv
uname -n
uname -a
universalaccessd
Provides universal access services.
universalaccessd
uptime
Tell how long the system has been running and other information.
• Print current time, uptime, number of logged-in users and other information:
uptime
usernoted
Provides notification services.
usernoted
uuidgen
Generate new UUID (Universally Unique IDentifier) strings.
uuidgen
valet
A Laravel development environment that allows hosting sites via local tunnels on
http://<example>.test.
valet start
• Register the current working directory as a path that Valet should search for sites:
valet park
valet paths
valet share
vpnd
Listens for incoming VPN connections.
vpnd
vpnd -x
• Run the daemon in the foreground and print logs to the terminal:
vpnd -d
• Run the daemon in the foreground, print logs to the terminal, and quit after
validating arguments:
vpnd -n
vpnd -h
vpnd -i {{server_id}}
w
Show who is logged on and what they are doing.
Print user login, TTY, remote host, login time, idle time, current process.
w -h
w -i
wacaw
A little command-line tool for macOS that allows you to capture both still pictures and
video from an attached camera.
wacaw {{filename}}
• Record a video:
wacaw --to-clipboard
wacaw -L
wc
Count lines, words, or bytes.
wc -l {{path/to/file}}
wc -w {{path/to/file}}
wc -c {{path/to/file}}
wc -m {{path/to/file}}
• Use standard input to count lines, words and characters (bytes) in that order:
{{find .}} | wc
whatis
Tool that searches a set of database files containing short descriptions of system
commands for keywords.
whatis {{keyword}}
whence {{command}}
whence -v {{command}}
whence -c {{command}}
• Same as above, but show all occurrences on command path (equivalent to the
where builtin):
• Search only the PATH for {{command}}, ignoring builtins, aliases or shell functions
(equivalent to the where command):
whence -p {{command}}
wifi-password
Get the password of the Wi-Fi.
• Get the password for the Wi-Fi you are currently logged onto:
wifi-password
wifi-password {{ssid}}
wifi-password -q
xattr
Utility to work with extended filesystem attributes.
xattr -l {{file}}
xattr -c {{file}}
xcode-select --install
xcode-select -s {{path/to/Xcode.app/Contents/Developer}}
• Select a given Xcode instance and use its developer directory as the active one:
xcode-select -s {{path/to/Xcode.app}}
xcode-select -p
• Discard any user-specified developer directory so that it will be found via the
default search mechanism:
sudo xcode-select -r
xcodebuild
Build Xcode projects.
• Build workspace:
• Build project:
• Show SDKs:
xcodebuild -showsdks
xcrun
Run or locate development tools and properties.
• Display help:
xcrun --help
• Display version:
xcrun --version
xctool
Tool for building Xcode projects.
xed {{file1}}
xed -c {{filename1}}
xed -l 75 {{filename}}
xip
Create or expand compressed files in a secure xip archive.
Only archives signed by Apple are trusted, so this tool should not be used to create
archives.
• Enable opacity:
devfsadm -c disk
• Cleanup any dangling /dev links and scan for new device:
devfsadm -C -v
devfsadm -C -v -n
dmesg
Write the kernel messages to standard output.
dmesg
dmesg | less
prctl
Get or set the resource controls of running processes,.
prctl {{PID}}
prctl -P {{PID}}
prstat
prstat -s rss
prstat -t
prstat -m
prstat -c -n 5 -s cpu 1
snoop
Network packet sniffer.
snoop -d {{e1000g0}}
snoop -o {{filename}}
snoop -V -i {{filename}}
• Capture network packets that come from a hostname and go to a given port:
• Disable service:
svcs
svcs -vx
svcs apache
svcs -L apache
truss -f {{program}}
truss -p {{pid}}
truss -a -e {{program}}
• Count time, calls, and errors for each system call and report a summary on
program exit:
truss -c -p {{pid}}
assoc
assoc {{.txt}}
assoc {{.txt}}={{txtfile}}
attrib
Displays or changes file and directory attributes.
attrib
• Display the attributes of the files in the current directory and sub-directories:
attrib /S
• Display the attributes of the files and directories in the current directory and sub-
directories:
attrib /S /D
attrib +R {{document.txt}}
attrib -S -H {{document.txt}}
attrib +H {{path\to\directory}}
azcopy
A file transfer tool for uploading to Azure Cloud Storage Accounts.
azopy login
• Synchronize a local directory and delete files in the destination if they no longer
exist in the source:
azcopy --help
cd
Displays the name of or changes the current working directory.
cd {{path/to/directory}}
cd
cd ..
cd {{path/to/directory}} /d
chkdsk
Check file system and volume metadata for errors.
• Specify the drive letter (followed by a colon), mount point, or volume name to
check:
chkdsk {{volume}}
chkdsk {{volume}} /f
chkdsk {{volume}} /x
• Change the log file size to the specified size (only for NTFS):
chkdsk /l{{size}}
choco-apikey
Manage API keys for Chocolatey sources.
choco apikey
• Enable a feature:
• Disable a feature:
choco list
• Create a new package with specific 32-bit and 64-bit installer URLs:
choco outdated
Some subcommands such as choco install have their own usage documentation.
choco {{command}}
choco -?
choco {{command}} -?
choco --version
choice
Prompts the user to select one item from a list of single-character choices in a batch
program, and then returns the index of the selected choice.
choice /c {{ABC}}
choice
• Specify the number of seconds to pause before using the default choice specified
by /d:
• Specify a message to display before the list of choices. If /m is not specified, only
the choice prompt is displayed:
choice /?
cinst
This command is an alias of choco install.
cipher /e:{{path/to/file_or_directory}}
cipher /d:{{path/to/file_or_directory}}
cipher /w:{{path/to/file_or_directory}}
clip
Copy input content to the Windows clipboard.
{{dir}} | clip
cls
cmd
The Windows command interpreter.
cmd
• Execute a [c]ommand:
cmd /c "{{command}}"
• Execute a script:
cmd {{path/to/file.bat}}
cmd /k "{{command}}"
cmd /q
cmd /v:{{on|off}}
cmd /e:{{on|off}}
cmd /u
cmstp
A command-line tool for managing connection service profiles.
cmstp "{{path/to/profile}}"
cmstp /s "{{path/to/profile}}"
cmstp /u "{{path/to/profile}}"
cmstp /u /s "{{path/to/profile}}"
color
Set the console foreground and background colors.
color
color /?
• Set the console foreground and background to a specific color using hexadecimal
numbers (1-9,a-f):
color {{foreground_code}}{{background_code}}
comp
Compare the contents of two files or sets of files.
comp
del {{file_pattern}}
del {{file_pattern}} /p
del {{file_pattern}} /f
del {{file_pattern}} /s
del {{file_pattern}} /q
del /?
dir
dir {{path/to/directory}}
dir /A
dir {{path/to/directory}} /A
diskpart
Disk, volume and partition manager.
diskpart
list disk
• Select a volume:
active
• Exit diskpart:
exit
doskey
Manage macros, windows commands and command-lines.
doskey /macros
• Remove a macro:
doskey {{name}} =
doskey /history
driverquery
driverquery /si
driverquery /nh
driverquery /v
driverquery /?
eventcreate
Create custom entries in the event log.
exit
exit /b
exit {{exit_code}}
expand
Uncompress one or more Windows Cabinet files.
• Ignore the directory structure when uncompressing, and add them to a single
directory:
explorer
explorer .
explorer {{path/to/directory}}
fc
Compare the differences between two files or sets of files.
fc {{path/to/file_1}} {{path/to/file_2}}
fc /c {{path/to/file_1}} {{path/to/file_2}}
fc /u {{path/to/file_1}} {{path/to/file_2}}
fc /l {{path/to/file_1}} {{path/to/file_2}}
fc /b {{path/to/file_1}} {{path/to/file_2}}
fc /t {{path/to/file_1}} {{path/to/file_2}}
fc /w {{path/to/file_1}} {{path/to/file_2}}
find
Find a specified string in one or more files.
findstr "{{query}}" *
findstr /s "{{query}}" *
findstr /r "{{expression}}" *
findstr /n "{{query}}" *
findstr /m "{{query}}" *
finger
Return information about one or more users on a specified system.
finger {{user}}@{{host}}
finger @{{host}}
finger {{user}}@{{host}} -l
finger /?
fondue
A command-line installer for optional Windows features.
fondue /enable-feature:{{feature}}
forfiles
forfiles /p {{path/to/directory}}
forfiles /c "{{command}}"
forfiles /m {{glob_pattern}}
forfiles /s
forfiles /d {{+5}}
fsutil
Displays information about file system volumes.
• Display the current state of the file system auto-repair for all volumes:
ftp {{host}}
ftp -A {{host}}
ftp -n {{host}}
mget {{*.png}}
mput {{*.zip}}
mdelete {{*.txt}}
ftp --help
ftype
Display or modify file types used for file extension association.
ftype
ftype {{file_type}}
ftype {{file_type}}="{{path/to/executable_command}}"
Get-ChildItem
List items in a directory.
Get-ChildItem
Get-ChildItem -Directory
Get-ChildItem -File
Get-ChildItem -Hidden
• Display the content of the file and keep reading from it until Ctrl + C is pressed:
Get-FileHash {{path/to/file}}
Get-History
getmac
getmac /nh
getmac /v
getmac /?
gpupdate
A tool to check and apply Windows Group Policy settings.
gpupdate
gpupdate /target:{{computer|user}}
gpupdate /force
gpupdate /?
if
Performs conditional processing in batch scripts.
• Execute the first specified commands if the condition is true otherwise execute the
second specified commands:
• Check whether %errorlevel% is greater than or equal to the specified exit code:
• Check whether two strings are equal without respecting letter case:
• Open all files inside a directory except those containing a specific keyword:
• Perform a dry run to determine which files will be opened inside a directory
through Invoke-Item:
ipconfig
ipconfig /all
ipconfig /flushdns
iscc
Compiler for Inno Setup installers.
iscc {{path/to/file.iss}}
iscc /Q {{path/to/file.iss}}
logoff
logoff {{session_name|session_id}}
• Create a directory:
mkdir {{directory_name}}
mkdir {{path/to/sub_directory_name}}
mklink
Create symbolic links.
more {{path/to/file}}
more {{path/to/file}} /c
more {{path/to/file}} /e
more /?
mount
Mount Network File System (NFS) network shares.
mount \\{{computer_name}}\{{share_name}} *
• Mount a share with a read timeout in seconds (defaults to 0.8, can be 0.9 or 1 to
60):
msg *
msg /time:{{seconds}}
msiexec
Install, update, repair, or uninstall Windows programs using MSI and MSP package files.
nfsstat
nfsstat -z
nvm
Install, uninstall, or switch between Node.js versions.
Supports version numbers like "12.8" or "v16.13.1", and labels like "stable", "system", etc.
• List all available Node.js versions and highlight the default one:
nvm list
• Create a package:
• Create a release:
• Deploy a release:
• Compile a given source file into an executable with the same name:
pabcnetcclear {{path/to/file.pas}}
• Compile a given source file into an executable with the specified name:
• Compile a given source file into an executable with the same name along with/
without debug information:
• Allow units to be searched in a path while compiling a given source file into an
executable with the same name:
path
path {{path/to/directory(s)}}
path {{path/to/directory}};%path%
• Set command prompt to only search the current directory for executables:
path ;
pathping
A trace route tool combining features of ping and tracert.
pathping {{hostname}}
pathping {{hostname}} -n
• Specify the maximum number of hops to search for the target (the default is 30):
pathping {{hostname}} -4
pathping {{hostname}} -6
pathping /?
pipwin
A tool to install unofficial Python package binaries on Windows.
pipwin list
• Search packages:
• Install a package:
• Uninstall a package:
popd
powershell
Command-line shell and scripting language designed especially for system
administration.
powershell
powershell -NoExit
• Display help:
powershell -Help
print
Print a text file to a printer.
print {{path/to/file}}
psping {{hostname}}
psping {{hostname}}:{{port}}
• Ping the target over TCP 50 times and produce a histogram of the results:
psping /?
pushd
Place a directory on a stack so it can be accessed later.
pushd {{directory}}
pwlauncher
A command-line tool for managing the Windows To Go startup options.
pwlauncher
pwlauncher /{{enable|disable}}
query
Displays information about user sessions and process.
query session
query user
query process
rdpsign {{path/to/file.rdp}}
rdpsign {{path/to/file.rdp}} /q
rdpsign {{path/to/file.rdp}} /v
• Test the signing by displaying the output to stdout without updating the file:
rdpsign {{path/to/file.rdp}} /l
reg add
Add new keys and their values to the registry.
reg flags /?
• Set specified space-separated flags, and unset unmentioned flags, for a specific
key:
• Set specified flags for a specific key and its sub keys:
• Save a registry key, its sub keys and values to a specific file:
Some subcommands such as reg add have their own usage documentation.
reg {{command}}
reg /?
reg {{command}} /?
repair-bde
Attempt to repair or decrypt a damaged BitLocker-encrypted volume.
repair-bde {{C:}}
• Attempt to repair a specified volume using the provided recovery key file:
repair-bde /?
replace
Replace files.
• Replace the destination file with the one from the source directory:
• Wait for you to insert a disk before it replaces files (originally to allow inserting a
floppy disk):
• Replace only files in the destination directory which are older than the files in the
source directory:
replace /?
rmdir
Remove a directory and its contents.
rmdir {{path/to/directory}}
rmdir {{path/to/directory}} /s
rmdir {{path/to/directory}} /s /q
robocopy
Robust File and Folder Copy.
By default files will only be copied if the source and destination have different time
stamps or different file sizes.
• Copy all .jpg and .bmp files from one directory to another:
• Mirror/Sync a directory, deleting anything not in source and include all attributes
and permissions:
• Copy all files and subdirectories, excluding source files that are older than
destination files:
• Allow resuming if network connection is lost and limit retries to 5 and wait time to
15 sec:
robocopy /?
rpcinfo
List programs via RPC on remote computers.
rpcinfo
rpcinfo /p {{computer_name}}
If Scoop doesn't know where the bucket is located its repository location must be
specified.
• Install a package:
• Remove a package:
scoop update *
scoop list
• Remove old versions of all packages and clear the download cache:
scoop cleanup -k *
set
Display or set environment variables for the current instance of CMD.
set
set {{name}}={{value}}
set {{name}}
set /p {{name}}={{prompt_string}}
setx
Sets persistent environment variables.
sfc
sfc /scannow
sfc /verifyonly
sfc /scanfile={{path/to/file}}
sfc /verifyfile={{path/to/file}}
sfc /offbootdir={{path/to/directory}}
sfc /offwindir={{path/to/directory}}
showmount
Display information about NFS filesystems on Windows Server.
showmount -e
showmount -a
showmount -d
showmount -e {{server_address}}
shutdown
A tool for shutting down, restarting or logging off a machine.
shutdown /s
shutdown /s /f
shutdown /r /t 0
shutdown /h
shutdown /l
shutdown /s /t {{seconds}}
shutdown /a
shutdown /m {{\\hostname}}
subst
Associates a path with a virtual drive letter.
subst
• Add an association:
• Remove an association:
subst {{Z:}} /d
systeminfo
Display operating system configuration for a local or remote machine.
systeminfo
systeminfo /?
takeown
Take ownership of a file or directory.
takeown /f {{path/to/file}}
takeown /d {{path/to/directory}}
takeown /r /d {{path/to/directory}}
takeown /a /f {{path/to/file}}
taskkill
Terminate a process by its process ID or name.
taskkill /?
tasklist
Display a list of currently running processes on a local or remote machine.
tasklist
• Display running processes using the specified .exe or .dll file name:
tasklist /m {{module_pattern}}
tasklist /svc
time
Display or set the system time.
• Display the current system time and prompt to enter a new time (leave empty to
keep unchanged):
time
• Display the current system time without prompting for a new time:
time /t
title
Set the title of the command prompt window.
title {{new_title}}
tree
Display a graphical tree of the directory structure for a path.
tree
tree {{path/to/directory}}
tree {{path/to/directory}} /f
tree {{path/to/directory}} /a
tskill
Ends a process running in a session on a Remote Desktop Session Host.
tskill {{process_id}}
tskill {{process_name}}
type
Display the contents of a file.
type {{path/to/file}}
tzutil
A tool for displaying or configuring the system time zone.
tzutil /g
tzutil /l
tzutil /s {{timezone_id}}
vcvarsall
Setup the environment variables required for using the Microsoft Visual Studio tools
from the command line.
The path of vcvarsall for a certain Visual Studio installation can be found using
vswhere.
vcvarsall x64
• Setup the environment for cross-compiled native x86 from the x64 host:
vcvarsall x64_x86
• Setup the environment for cross-compiled native Arm x64 from the x64 host:
vcvarsall x64_arm64
ver
virtualboxvm
The VirtualBox virtual machine management CLI.
• Display the label and serial number for the current drive:
vol
vol {{D:}}
vswhere
Locate Visual Studio 2017 and newer installations.
• Find the directory of Clang bundled with Visual Studio bundled (clang-cl, clang-
tidy, etc):
Defaults to current work directory and paths in the PATH environment variable.
where {{file_pattern}}
• Display the location of file pattern including file size and date:
where /T {{file_pattern}}
• Display only the error code for the location of file pattern:
where /Q {{file_pattern}}
whoami
Display details about the current user.
whoami
whoami /groups
whoami /priv
whoami /upn
whoami /logonid
winget
Windows Package Manager CLI.
• Install a package:
• Fundamental grammar:
• Access specific fields such as process name, process ID and parent process ID:
• Kill a process:
wsl-open {{.}}
wsl-open {{https://example.com}}
wsl-open {{path/to/file}}
• Set wsl-open as the shell's web browser (open links with wsl-open):
wsl-open -w
• Display help:
wsl-open -h
wsl
Manage the Windows Subsystem for Linux from the command-line.
wsl {{shell_command}}
wsl --list
wsl --shutdown
xcopy
Copy files and directory trees.
xcopy /?