8chars

a2dismod
Disable an Apache module on Debian-based OSes

More information: https://manpages.debian.org/latest/apache2/a2dismod.8.en.html.

- Disable a module: sudo a2dismod module

- Don't show informative messages: sudo a2dismod --quiet module

a2enconf
Enable an Apache configuration file on Debian-based OSes

More information: https://manpages.debian.org/latest/apache2/a2enconf.8.en.html.

- Enable a configuration file: sudo a2enconf configuration_file

- Don't show informative messages: sudo a2enconf --quiet configuration_file

a2ensite
Enable an Apache virtual host on Debian-based OSes

More information: https://manpages.debian.org/latest/apache2/a2ensite.8.en.html.

- Enable a virtual host: sudo a2ensite virtual_host

- Don't show informative messages: sudo a2ensite --quiet virtual_host

apt-file
Search for files in apt packages, including ones not yet installed

More information: https://manpages.debian.org/latest/apt-file/apt-file.1.html.

- Update the metadata database: sudo apt update

- Search for packages that contain the specified file or path: apt-file search|find part/of/filename

- List the contents of a specific package: apt-file show|list package_name

- Search for packages that match the regular expression given in pattern: apt-file search|find --regexp regular_expression

aptitude
Debian and Ubuntu package management utility

More information: https://manpages.debian.org/latest/aptitude/aptitude.8.html.

- Synchronize list of packages and versions available. This should be run first, before running subsequent aptitude commands: aptitude update

- Install a new package and its dependencies: aptitude install package

- Search for a package: aptitude search package

- Search for an installed package (?installed is an aptitude search term): aptitude search '?installed(package)'

- Remove a package and all packages depending on it: aptitude remove package

- Upgrade installed packages to the newest available versions: aptitude upgrade

- Upgrade installed packages (like aptitude upgrade) including removing obsolete packages and installing additional packages to meet new package dependencies: aptitude full-upgrade

- Put an installed package on hold to prevent it from being automatically upgraded: aptitude hold '?installed(package)'

apt-mark
Utility to change the status of installed packages

More information: https://manpages.debian.org/latest/apt/apt-mark.8.html.

- Mark a package as automatically installed: sudo apt-mark auto package_name

- Hold a package at its current version and prevent updates to it: sudo apt-mark hold package_name

- Allow a package to be updated again: sudo apt-mark unhold package_name

- Show manually installed packages: apt-mark showmanual

- Show held packages that aren't being updated: apt-mark showhold

arp-scan
Send ARP packets to hosts (specified as IP addresses or hostnames) to scan the local network

More information: https://github.com/royhills/arp-scan.

- Scan the current local network: arp-scan --localnet

- Scan an IP network with a custom bitmask: arp-scan 192.168.1.1/24

- Scan an IP network within a custom range: arp-scan 127.0.0.0-127.0.0.31

- Scan an IP network with a custom net mask: arp-scan 10.0.0.0:255.255.255.0

asciiart
Convert images to ASCII

More information: https://github.com/nodanaonlyzuul/asciiart.

- Read an image from a file and print in ASCII: asciiart path/to/image.jpg

- Read an image from a URL and print in ASCII: asciiart www.example.com/image.jpg

- Choose the output width (default is 100): asciiart -width 50 path/to/image.jpg

- Colorize the ASCII output: asciiart --color path/to/image.jpg

- Choose the output format (default format is text): asciiart --format text|html path/to/image.jpg

- Invert the character map: asciiart --invert-chars path/to/image.jpg

asterisk
Telephone and exchange (phone) server.Used for running the server itself, and managing an already running instance

More information: https://wiki.asterisk.org/wiki/display/AST/Home.

- [R]econnect to a running server, and turn on logging 3 levels of [v]erbosity: asterisk -r -vvv

- [R]econnect to a running server, run a single command, and return: asterisk -r -x "command"

- Show chan_SIP clients (phones): asterisk -r -x "sip show peers"

- Show active calls and channels: asterisk -r -x "core show channels"

- Show voicemail mailboxes: asterisk -r -x "voicemail show users"

- Terminate a channel: asterisk -r -x "hangup request channel_ID"

- Reload chan_SIP configuration: asterisk -r -x "sip reload"

balooctl
File indexing and searching framework for KDE Plasma

More information: https://wiki.archlinux.org/index.php/Baloo.

- Display help: balooctl

- Display the status of the indexer: balooctl status

- Enable/Disable the file indexer: balooctl enable|disable

- Clean the index database: balooctl purge

- Suspend the file indexer: balooctl suspend

- Resume the file indexer: balooctl resume

- Display the disk space used by Baloo: balooctl indexSize

- Check for any unindexed files and index them: balooctl check

bpftrace
High-level tracing language for Linux eBPF

More information: https://github.com/iovisor/bpftrace.

- Display bpftrace version: bpftrace -V

- List all available probes: sudo bpftrace -l

- Run a one-liner program (e.g. syscall count by program): sudo bpftrace -e 'tracepoint:raw_syscalls:sys_enter @[comm] = count; '

- Run a program from a file: sudo bpftrace path/to/file

- Trace a program by PID: sudo bpftrace -e 'tracepoint:raw_syscalls:sys_enter /pid == 123/ @[comm] = count; '

- Do a dry run and display the output in eBPF format: sudo bpftrace -d -e 'one_line_program'

calcurse
A text-based calendar and scheduling application for the command-line

More information: https://calcurse.org.

- Start calcurse on interactive mode: calcurse

- Print the appointments and events for the current day and exit: calcurse --appointment

- Remove all local calcurse items and import remote objects: calcurse-caldav --init=keep-remote

- Remove all remote objects and push local calcurse items: calcurse-caldav --init=keep-local

- Copy local objects to the CalDAV server and vice versa: calcurse-caldav --init=two-way

collectd
System statistics collection daemon

More information: https://collectd.org/.

- Show usage help, including the program version: collectd -h

- Test the configuration file and then exit: collectd -t

- Test plugin data collection functionality and then exit: collectd -T

- Start collectd: collectd

- Specify a custom configuration file location: collectd -C path/to/file

- Specify a custom PID file location: collectd -P path/to/file

- Don't fork into the background: collectd -f

compsize
Calculate the compression ratio of a set of files on a btrfs filesystem.See also btrfs filesystem for recompressing a file by defragmenting it

More information: https://github.com/kilobyte/compsize.

- Calculate the current compression ratio for a file or directory: sudo compsize path/to/file_or_directory

- Don't traverse filesystem boundaries: sudo compsize --one-file-system path/to/file_or_directory

- Show raw byte counts instead of human-readable sizes: sudo compsize --bytes path/to/file_or_directory

cpulimit
A tool to throttle the CPU usage of other processes

More information: http://cpulimit.sourceforge.net/.

- Limit an existing process with PID 1234 to only use 25% of the CPU: cpulimit --pid 1234 --limit 25%

- Limit an existing program by its executable name: cpulimit --exe program --limit 25

- Launch a given program and limit it to only use 50% of the CPU: cpulimit --limit 50 -- program arg1 arg2 ...

- Launch a program, limit its CPU usage to 50% and run cpulimit in the background: cpulimit --limit 50 --background -- program

- Kill its process if the program's CPU usage goes over 50%: cpulimit --limit 50 --kill -- program

- Throttle both it and its child processes so that none go about 25% CPU: cpulimit --limit 25 --monitor-forks -- program

datamash
Tool to perform basic numeric, textual and statistical operations on input textual data files

More information: http://www.gnu.org/software/datamash/.

- Get max, min, mean and median of a single column of numbers: seq 3 | datamash max 1 min 1 mean 1 median 1

- Get the mean of a single column of float numbers (floats must use "," and not "."): echo -e '1.0\n2.5\n3.1\n4.3\n5.6\n5.7' | tr '.' ',' | datamash mean 1

- Get the mean of a single column of numbers with a given decimal precision: echo -e '1\n2\n3\n4\n5\n5' | datamash -R number_of_decimals_wanted mean 1

- Get the mean of a single column of numbers ignoring "Na" and "NaN" (literal) strings: echo -e '1\n2\nNa\n3\nNaN' | datamash --narm mean 1

ddrescue
Data recovery tool that reads data from damaged block devices

More information: https://www.gnu.org/software/ddrescue/.

- Take an image of a device, creating a log file: sudo ddrescue /dev/sdb path/to/image.dd path/to/log.txt

- Clone Disk A to Disk B, creating a log file: sudo ddrescue --force --no-scrape /dev/sdX /dev/sdY path/to/log.txt

dnsrecon
DNS enumeration tool

More information: https://github.com/darkoperator/dnsrecon.

- Scan a domain and save the results to a SQLite database: dnsrecon --domain example.com --db path/to/database.sqlite

- Scan a domain, specifying the nameserver and performing a zone transfer: dnsrecon --domain example.com --name_server nameserver.example.com --type axfr

- Scan a domain, using a brute-force attack and a dictionary of subdomains and hostnames: dnsrecon --domain example.com --dictionary path/to/dictionary.txt --type brt

- Scan a domain, performing a reverse lookup of IP ranges from the SPF record and saving the results to a JSON file: dnsrecon --domain example.com -s --json

- Scan a domain, performing a Google enumeration and saving the results to a CSV file: dnsrecon --domain example.com -g --csv

- Scan a domain, performing DNS cache snooping: dnsrecon --domain example.com --type snoop --name_server nameserver.example.com --dictionary path/to/dictionary.txt

- Scan a domain, performing zone walking: dnsrecon --domain example.com --type zonewalk

dos2unix
Change DOS-style line endings to Unix-style.Replaces CRLF with CR

More information: https://manned.org/dos2unix.

- Change the line endings of a file: dos2unix filename

- Create a copy with Unix-style line endings: dos2unix -n filename new_filename

dpkg-deb
Pack, unpack and provide information about Debian archives

More information: https://manpages.debian.org/buster/dpkg/dpkg-deb.1.en.html.

- Display information about a package: dpkg-deb --info path/to/file.deb

- Display the package's name and version on one line: dpkg-deb --show path/to/file.deb

- List the package's contents: dpkg-deb --contents path/to/file.deb

- Extract package's contents into a directory: dpkg-deb --extract path/to/file.deb path/to/directory

- Create a package from a specified directory: dpkg-deb --build path/to/directory

dumpe2fs
Print the super block and blocks group information for ext2/ext3/ext4 filesystems.Unmount the partition before running this command using umount device

More information: https://manned.org/dumpe2fs.

- Display ext2, ext3 and ext4 filesystem information: dumpe2fs /dev/sdXN

- Display the blocks which are reserved as bad in the filesystem: dumpe2fs -b /dev/sdXN

- Force display filesystem information even with non-recognisable feature flags: dumpe2fs -f /dev/sdXN

- Only display the superblock information and not any of the block group descriptor detail information: dumpe2fs -h /dev/sdXN

- Print the detailed group information block numbers in hexadecimal format: dumpe2fs -x /dev/sdXN

dunstify
A notification tool that is an extension of notify-send, but has

More features based around dunst.Works with all options that work for notify-send

More information: https://wiki.archlinux.org/title/Dunst#Dunstify.

- Show a notification with a given title and message: dunstify "Title" "Message"

- Show a notification with specified urgency: dunstify "Title" "Message" -u low|normal|critical

- Specify a message ID (overwrites any previous messages with the same ID): dunstify "Title" "Message" -r 123

- To see other possible options: notify-send --help

e4defrag
Defragment an ext4 filesystem

More information: https://manned.org/e4defrag.

- Defragment the filesystem: e4defrag /dev/sdXN

- See how fragmented a filesystem is: e4defrag -c /dev/sdXN

- Print errors and the fragmentation count before and after each file: e4defrag -v /dev/sdXN

faketime
Fake the system time for a given command

More information: https://manpages.ubuntu.com/manpages/trusty/man1/faketime.1.html.

- Fake the time to this evening, before printing the result of date: faketime 'today 23:30' date

- Open a new bash shell, which uses yesterday as the current date: faketime 'yesterday' bash

- Simulate how a program would act next Friday night: faketime 'next Friday 1 am' path/to/program

fatlabel
Sets or gets the label of a FAT32 partition

More information: https://manned.org/fatlabel.

- Get the label of a FAT32 partition: fatlabel /dev/sda1

- Set the label of a FAT32 partition: fatlabel /dev/sdc3 "new_label"

fc-cache
Scan font directories to build font cache files

More information: https://manned.org/fc-cache.

- Generate font cache files: 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-match
Match available fonts

More information: https://manned.org/fc-match.

- Return a sorted list of best matching fonts: fc-match -s 'DejaVu Serif'

filefrag
Report how badly fragmented a particular file might be

More information: https://manned.org/filefrag.

- Display a report for a specific file: filefrag path/to/file

- Display a report for space-separated list of files: filefrag path/to/file1 path/to/file2

- Display a report using a 1024 byte blocksize: filefrag -b path/to/file

- Sync the file before requesting the mapping: filefrag -s path/to/files

- Display mapping of extended attributes: filefrag -x path/to/files

- Display a report with verbose information: filefrag -v path/to/files

firejail
Securely sandboxes processes to containers using built-in Linux capabilities

More information: https://manned.org/firejail.

- Integrate firejail with your desktop environment: sudo firecfg

- Open a restricted Mozilla Firefox: firejail firefox

- Start a restricted Apache server on a known interface and address: firejail --net=eth0 --ip=192.168.1.244 /etc/init.d/apache2 start

- List running sandboxes: firejail --list

- List network activity from running sandboxes: firejail --netstats

- Shutdown a running sandbox: firejail --shutdown=7777

flashrom
Read, write, verify and erase flash chips

More information: https://manned.org/flashrom.

- Probe the chip, ensuring the wiring is correct: flashrom --programmer programmer

- Read flash and save it to a file: flashrom -p programmer --read path/to/file

- Write a file to the flash: flashrom -p programmer --write path/to/file

- Verify the flash against a file: flashrom -p programmer --verify path/to/file

- Probe the chip using Raspberry Pi: flashrom -p linux_spi:dev=/dev/spidev0.0

genfstab
Arch Linux install script to generate output suitable for addition to an fstab file

More information: https://man.archlinux.org/man/extra/arch-install-scripts/genfstab.8.

- Display an fstab compatible output based on a volume label: genfstab -L path/to/mount_point

- Display an fstab compatible output based on a volume UUID: genfstab -U path/to/mount_point

- A usual way to generate an fstab file, requires root permissions: genfstab -U /mnt >> /mnt/etc/fstab

- Append a volume into an fstab file to mount it automatically: genfstab -U path/to/mount_point | sudo tee -a /etc/fstab

groupadd
Add user groups to the system

More information: https://manned.org/groupadd.

- Create a new Linux group: groupadd group_name

- Create new group with a specific groupid: groupadd group_name -g group_id

groupdel
Delete existing user groups from the system

More information: https://manned.org/groupdel.

- Delete an existing group: groupdel group_name

groupmod
Modify existing user groups in the system

More information: https://manned.org/groupmod.

- Change the group name: groupmod -n new_group_name old_group_name

- Change the group id: groupmod -g new_group_id old_group_name

hardinfo
Show hardware information in GUI window.

- Start hardinfo: hardinfo

- Print report to standard output: hardinfo -r

- Save report to HTML file: hardinfo -r -f html > hardinfo.html

hostname
Show or set the system's host name.

- Show current host name: hostname

- Show the network address of the host name: hostname -i

- Show all network addresses of the host: hostname -I

- Show the FQDN (Fully Qualified Domain Name): hostname --fqdn

- Set current host name: hostname new_hostname

ip route
IP Routing table management subcommand

More information: https://manned.org/ip-route.

- Display the routing table: ip route show|list

- Add a default route using gateway forwarding: sudo ip route add default via gateway_ip

- Add a default route using eth0: sudo ip route add default dev eth0

- Add a static route: sudo ip route add destination_ip via gateway_ip dev eth0

- Delete a static route: sudo ip route del destination_ip dev eth0

- Change or replace a static route: sudo ip route change|replace destination_ip via gateway_ip dev eth0

- Show which route will be used by the kernel to reach an IP address: ip route get destination_ip

iptables
Program that allows configuration of tables, chains and rules provided by the Linux kernel firewall

More information: https://www.netfilter.org/projects/iptables/.

- View chains, rules, and packet/byte counters for the filter table: sudo iptables -vnL

- Set chain policy rule: sudo iptables -P chain rule

- Append rule to chain policy for IP: sudo iptables -A chain -s ip -j rule

- Append rule to chain policy for IP considering protocol and port: sudo iptables -A chain -s ip -p protocol --dport port -j rule

- Delete chain rule: sudo iptables -D chain rule_line_number

- Save iptables configuration of a given table to a file: sudo iptables-save -t tablename > path/to/iptables_file

- Restore iptables configuration from a file: sudo iptables-restore < path/to/iptables_file

iwconfig
Configure and show the parameters of a wireless network interface

More information: https://manned.org/iwconfig.

- Show the parameters and statistics of all the interfaces: iwconfig

- Show the parameters and statistics of the specified interface: iwconfig interface

- Set the ESSID (network name) of the specified interface (e.g. eth0 or wlp2s0): iwconfig interface new_network_name

- Set the operating mode of the specified interface: iwconfig interface mode ad hoc|Managed|Master|Repeater|Secondary|Monitor|Auto

jpegtran
Perform lossless transformation of JPEG files

More information: https://manned.org/jpegtran.

- Mirror an image horizontally or vertically: jpegtran -flip horizontal|vertical path/to/image.jpg > path/to/output.jpg

- Rotate an image 90, 180 or 270 degrees clockwise: jpegtran -rotate 90|180|270 path/to/image.jpg > path/to/output.jpg

- Transpose the image across the upper-left to lower right axis: jpegtran -transpose path/to/image.jpg > path/to/output.jpg

- Transverse the image across the upper right to lower left axis: jpegtran -transverse path/to/image.jpg > path/to/output.jpg

- Convert the image to grayscale: jpegtran -grayscale path/to/image.jpg > path/to/output.jpg

- Crop the image to a rectangular region of width W and height H from the upper-left corner, saving the output to a specific file: jpegtran -crop WxH -outfile path/to/output.jpg path/to/image.jpg

- Crop the image to a rectangular region of width W and height H, starting at point X and Y from the upper-left corner: jpegtran -crop WxH+X+Y path/to/image.jpg > path/to/output.jpg

larasail
A CLI tool for managing Laravel on Digital Ocean servers

More information: https://github.com/thedevdojo/larasail.

- 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 setup php71

- Add a new Laravel site: larasail host domain path/to/site_directory

- Retrieve the Larasail user password: larasail pass

- Retrieve the Larasail MySQL password: larasail mysqlpass

lastcomm
Show last commands executed

More information: https://manpages.debian.org/stable/acct/lastcomm.1.en.html.

- Print information about all the commands in the acct (record file): lastcomm

- Display commands executed by a given user: lastcomm --user user

- Display information about a given command executed on the system: lastcomm --command command

- Display information about commands executed on a given terminal: lastcomm --tty terminal_name

ldconfig
Configure symlinks and cache for shared library dependencies

More information: https://manned.org/ldconfig.

- Update symlinks and rebuild the cache (usually run when a new library is installed): sudo ldconfig

- Update the symlinks for a given directory: sudo ldconfig -n path/to/directory

- Print the libraries in the cache and check whether a given library is present: ldconfig -p | grep library_name

logwatch
Summarizes many different logs for common services (e.g. apache, pam_unix, sshd, etc.) in a single report

More information: https://manned.org/logwatch.

- Analyze logs for a range of dates at a certain level of detail: logwatch --range yesterday|today|all|help --detail low|medium|others'

- Restrict report to only include information for a selected service: logwatch --range all --service apache|pam_unix|etc

lrzuntar
A wrapper for lrunzip to simplify decompression of directories.See also: lrztar, lrzip

More information: https://manned.org/lrzuntar.

- Decompress from a file to the current directory: lrzuntar path/to/archive.tar.lrz

- Decompress from a file to the current directory using a specific number of processor threads: lrzuntar -p 8 path/to/archive.tar.lrz

- Decompress from a file to the current directory and silently overwrite items that already exist: lrzuntar -f archive.tar.lrz

- Specify the output path: lrzuntar -O path/to/directory archive.tar.lrz

- Delete the compressed file after decompression: lrzuntar -D path/to/archive.tar.lrz

lslogins
Show information about users on a Linux system

More information: https://man7.org/linux/man-pages/man1/lslogins.1.html.

- Display users in the system: lslogins

- Display users belonging to a specific group: lslogins --groups=groups

- Display user accounts: lslogins --user-accs

- Display last logins: lslogins --last

- Display system accounts: lslogins --system-accs

- Display supplementary groups: lslogins --supp-groups

lvcreate
Creates a logical volume in an existing volume group. A volume group is a collection of logical and physical volumes.See also: lvm

More information: https://man7.org/linux/man-pages/man8/lvcreate.8.html.

- Create a logical volume of 10 gigabytes in the volume group vg1: lvcreate -L 10G vg1

- Create a 1500 megabyte linear logical volume named mylv in the volume group vg1: lvcreate -L 1500 -n mylv vg1

- Create a logical volume called mylv that uses 60% of the total space in volume group vg1: lvcreate -l 60%VG -n mylv vg1

- Create a logical volume called mylv that uses all the unallocated space in the volume group vg1: lvcreate -l 100%FREE -n mylv vg1

lvextend
Increase the size of a logical volume.See also: lvm

More information: https://man7.org/linux/man-pages/man8/lvextend.8.html.

- Increase a volume's size to 120 GB: lvextend --size 120G logical_volume

- Increase a volume's size by 40 GB as well as the underlying filesystem: lvextend --size +40G -r logical_volume

- Increase a volume's size to 100% of the free physical volume space: lvextend --size 100%FREE logical_volume

lvreduce
Reduce the size of a logical volume.See also: lvm

More information: https://man7.org/linux/man-pages/man8/lvreduce.8.html.

- Reduce a volume's size to 120 GB: lvreduce --size 120G logical_volume

- Reduce a volume's size by 40 GB as well as the underlying filesystem: lvreduce --size -40G -r logical_volume

lvremove
Remove one or

More logical volumes.See also: lvm

More information: https://man7.org/linux/man-pages/man8/lvremove.8.html.

- Remove a logical volume in a volume group: sudo lvremove volume_group/logical_volume

- Remove all logical volumes in a volume group: sudo lvremove volume_group

lvresize
Change the size of a logical volume.See also: lvm

More information: https://man7.org/linux/man-pages/man8/lvresize.8.html.

- Change the size of a logical volume to 120 GB: lvresize --size 120G volume_group/logical_volume

- Extend the size of a logical volume as well as the underlying filesystem by 120 GB: lvresize --size +120G --resizefs volume_group/logical_volume

- Extend the size of a logical volume to 100% of the free physical volume space: lvresize --size 100%FREE volume_group/logical_volume

- Reduce the size of a logical volume as well as the underlying filesystem by 120 GB: lvresize --size -120G --resizefs volume_group/logical_volume

mac2unix
Change macOS-style line endings to Unix-style.Replaces LF with CR

More information: https://waterlan.home.xs4all.nl/dos2unix.html.

- Change the line endings of a file: mac2unix filename

- Create a copy with Unix-style line endings: mac2unix -n filename new_filename

microcom
A minimalistic terminal program, used to access remote devices via a serial, CAN or telnet connection from the console

More information: https://manned.org/microcom.

- Open a serial port using the specified baud rate: microcom --port path/to/serial_port --speed baud_rate

- Establish a telnet connection to the specified host: microcom --telnet hostname:port

mimetype
Automatically determine the MIME type of a file

More information: https://manned.org/mimetype.

- Print the MIME type of a given file: mimetype path/to/file

- Display only the MIME type, and not the filename: mimetype --brief path/to/file

- Display a description of the MIME type: mimetype --describe path/to/file

- Determine the MIME type of stdin (does not check a filename): some_command | mimetype --stdin

- Display debug information about how the MIME type was determined: mimetype --debug path/to/file

- Display all the possible MIME types of a given file in confidence order: mimetype --all path/to/file

- Explicitly specify the 2-letter language code of the output: mimetype --language path/to/file

mkfs.fat
Creates an MS-DOS filesystem inside a partition

More information: https://manned.org/mkfs.fat.

- Create a fat filesystem inside partition 1 on device b (sdb1): mkfs.fat /dev/sdb1

- Create filesystem with a volume-name: mkfs.fat -n volume_name /dev/sdb1

- Create filesystem with a volume-id: mkfs.fat -i volume_id /dev/sdb1

- Use 5 instead of 2 file allocation tables: mkfs.fat -f 5 /dev/sdb1

modprobe
Add or remove modules from the Linux kernel

More information: https://manned.org/modprobe.

- Pretend to load a module into the kernel, but don't actually do it: sudo modprobe --dry-run module_name

- Load a module into the kernel: sudo modprobe module_name

- Remove a module from the kernel: sudo modprobe --remove module_name

- Remove a module and those that depend on it from the kernel: sudo modprobe --remove-dependencies module_name

- Show a kernel module's dependencies: sudo modprobe --show-depends module_name

nautilus
Default file explorer for GNOME desktop environment.Also known as GNOME Files

More information: https://manned.org/nautilus.

- Launch Nautilus: nautilus

- Launch Nautilus as root user: sudo nautilus

- Launch Nautilus and display a specific directory: nautilus path/to/directory

- Launch Nautilus with a specific file or directory selected: nautilus --select path/to/file_or_directory

- Launch Nautilus in a separated window: nautilus --new-window

- Close all Nautilus instances: nautilus --quit

- Display help: nautilus --help

numlockx
Control the number lock key status in X11 sessions

More information: http://www.mike-devlin.com/linux/README-numlockx.htm.

- Show the current number lock status: numlockx status

- Turn the number lock on: numlockx on

- Turn the number lock off: numlockx off

- Toggle the current state: numlockx toggle

openvpn3
OpenVPN 3 Linux client

More information: https://community.openvpn.net/openvpn/wiki/OpenVPN3Linux.

- Start a new VPN session: openvpn3 session-start --config path/to/config.conf

- List established sessions: openvpn3 sessions-list

- Disconnect the currently established session started with given configuration: openvpn3 session-manage --config path/to/config.conf --disconnect

- Import VPN configuration: openvpn3 config-import --config path/to/config.conf

- List imported configurations: openvpn3 configs-list

paccache
A pacman cache cleaning utility.

- Remove all but the 3 most recent package versions from the pacman cache: paccache -r

- Set the number of package versions to keep: paccache -rk num_versions

- Perform a dry-run and show the number of candidate packages for deletion: paccache -d

- Move candidate packages to a directory instead of deleting them: paccache -m path/to/directory

pacstrap
Arch Linux install script to install packages to the specified new root directory

More information: https://man.archlinux.org/man/pacstrap.8.

- Install the base package, Linux kernel and firmware for common hardware: pacstrap path/to/new/root base linux linux-firmware

- Install the base package, Linux LTS kernel and base-devel build tools: pacstrap path/to/new/root base base-devel linux-lts

- Install packages without copy the host's mirrorlist to the target: pacstrap -M path/to/new/root packages

- Use an alternate configuration file for Pacman: pacstrap -C path/to/pacman.conf path/to/new/root packages

- Install packages using the package cache on the host instead of on the target: pacstrap -c path/to/new/root packages

- Install packages without copy the host's pacman keyring to the target: pacstrap -G path/to/new/root packages

- Install packages in interactive mode (prompts for confirmation): pacstrap -i path/to/new/root packages

- Install packages using package files: pacstrap -U path/to/new/root path/to/package1 path/to/package2

photorec
Deleted file recovery tool.It is recommended to write recovered files to a disk separate to the one being recovered from

More information: https://www.cgsecurity.org/wiki/PhotoRec.

- Run PhotoRec on a specific device: sudo photorec /dev/sdb

- Run PhotoRec on a disk image (image.dd): sudo photorec path/to/image.dd

phpenmod
Enable PHP extensions on Debian-based OSes.

- Enable the JSON extension for every SAPI of every PHP version: sudo phpenmod json

- Enable the JSON extension for PHP 7.3 with the cli SAPI: sudo phpenmod -v 7.3 -s cli json

phpquery
PHP extension manager for Debian-based OSes.

- List available PHP versions: sudo phpquery -V

- List available SAPIs for PHP 7.3: sudo phpquery -v 7.3 -S

- List enabled extensions for PHP 7.3 with the cli SAPI: sudo phpquery -v 7.3 -s cli -M

- Check if the JSON extension is enabled for PHP 7.3 with the apache2 SAPI: sudo phpquery -v 7.3 -s apache2 -m json

physlock
Lock all consoles and virtual terminals

More information: http://github.com/muennich/physlock.

- Lock every console (require current user or root to unlock): physlock

- Mute kernel messages on console while locked: physlock -m

- Disable SysRq mechanism while locked: physlock -s

- Display a message before the password prompt: physlock -p "Locked!"

- Fork and detach physlock (useful for suspend or hibernate scripts): physlock -d

poweroff
Power off the system

More information: https://www.man7.org/linux/man-pages/man8/poweroff.8.html.

- Power off the system: poweroff

- Halt the system (same as halt): poweroff --halt

- Reboot the system (same as reboot): poweroff --reboot

- Shut down immediately without contacting the system manager: poweroff --force --force

- Write the wtmp shutdown entry without shutting down the system: poweroff --wtmp-only

powertop
Optimize battery power usage.

- Calibrate power usage measurements: sudo powertop --calibrate

- Generate HTML power usage report in the current directory: sudo powertop --html=power_report.html

- Tune to optimal settings: sudo powertop --auto-tune

progress
Display/Monitor the progress of running coreutils

More information: https://github.com/Xfennec/progress.

- Show the progress of running coreutils: progress

- Show the progress of running coreutils in quiet mode: progress -q

- Launch and monitor a single long-running command: command & progress -mp $!

pvcreate
Initialize a disk or partition for use as a physical volume.See also: lvm

More information: https://man7.org/linux/man-pages/man8/pvcreate.8.html.

- Initialize the /dev/sda1 volume for use by LVM: pvcreate /dev/sda1

- Force the creation without any confirmation prompts: pvcreate --force /dev/sda1

rdesktop
Remote Desktop Protocol client.It can be used to connect the remote computer using the RDP protocol.

- Connect to a remote computer (default port is 3389): rdesktop -u username -p password host:port

- Simple Examples: rdesktop -u Administrator -p passwd123 192.168.1.111:3389

- Connect to a remote computer with full screen (press Ctrl + Alt + Enter to exist): rdesktop -u username -p password -f host:port

- Use the customed resolution (use the letter 'x' between the number): rdesktop -u username -p password -g 1366x768 host:port

- Connect to a remote computer using domain user: rdesktop -u username -p password -d domainname host:port

- Use the 16-bit color (speed up): rdesktop -u username -p password -a 16 host:port

repquota
Display a summary of existing file quotas for a filesystem.

- Report stats for all quotas in use: sudo repquota -all

- Report quota stats for all users, even those who aren't using any of their quota: sudo repquota -v filesystem

- Report on quotas for users only: repquota --user filesystem

- Report on quotas for groups only: sudo repquota --group filesystem

- Report on used quota and limits in a human-readable format: sudo repquota --human-readable filesystem

- Report on all quotas for users and groups in a human-readable format: sudo repquota -augs

rolldice
Roll virtual dice

More information: https://manned.org/rolldice.

- Roll a single 20 sided dice: rolldice d20

- Roll two six sided dice and drop the lowest roll: rolldice 2d6s1

- Roll two 20 sided dice and add a modifier value: rolldice 2d20+5

- Roll a 20 sided dice two times: rolldice 2xd20

rpmbuild
RPM Package Build tool

More information: https://docs.fedoraproject.org/en-US/quick-docs/creating-rpm-packages/.

- Build binary and source packages: rpmbuild -ba path/to/spec_file

- Build a binary package without source package: rpmbuild -bb path/to/spec_file

- Specify additional variables when building a package: rpmbuild -bb path/to/spec_file --define "variable1 value1" --define "variable2 value2"

rtorrent
Download torrents over the command-line

More information: https://github.com/rakshasa/rtorrent.

- Add a torrent file or magnet to be downloaded: rtorrent torrent_or_magnet

- Start the download: S

- View details about downloading torrent: ->

- Close rtorrent safely: Q

sacctmgr
View, setup, and manage Slurm accounts

More information: https://slurm.schedmd.com/sacctmgr.html.

- Show current configuration: sacctmgr show configuration

- Add a cluster to the slurm database: sacctmgr add cluster cluster_name

- Add an account to the slurm database: sacctmgr add account account_name cluster=cluster_of_account

- Show details of user/association/cluster/account: sacctmgr show user/association/cluster/account

scontrol
View information about and modify jobs

More information: https://slurm.schedmd.com/scontrol.html.

- Show information for job: scontrol show job job_id

- Suspend a comma-separated list of running jobs: scontrol suspend job_id

- Resume a comma-separated list of suspended jobs: scontrol resume job_id

- Hold a comma-separated list of queued jobs (Use release command to permit the jobs to be scheduled): scontrol hold job_id

- Release a comma-separated list of suspended job: scontrol release job_id

semanage
SELinux Policy Management tool

More information: https://manned.org/semanage.

- Output local customizations: semanage -S store -o path/to/output_file

- Take a set of commands from a specified file and load them in a single transaction: semanage -S store -i path/to/input_file

- Manage booleans. Booleans allow the administrator to modify the confinement of processes based on the current configuration: semanage boolean -S store --delete|--modify|--list|--noheading|--deleteall -on|-off -F boolean|boolean_file

- Manage policy modules: semanage module -S store --add|--delete|--list|--modify --enable|--disable module_name

- Disable/Enable dontaudit rules in policy: semanage dontaudit -S store on|off

shutdown
Shutdown and reboot the system.

- Power off (halt) immediately: shutdown -h now

- Reboot immediately: shutdown -r now

- Reboot in 5 minutes: shutdown -r +5 &

- Shutdown at 1:00 pm (Uses 24h clock): shutdown -h 13:00

- Cancel a pending shutdown/reboot operation: shutdown -c

snmpwalk
SNMP query tool

More information: https://manned.org/snmpwalk.

- Query the system information of a remote host using SNMPv1 and a community string: snmpwalk -v1 -c community ip

- Query system information on a remote host by OID using SNMPv2 on a specified port: snmpwalk -v2c -c community ip:port oid

- Query system information on a remote host by OID using SNMPv3 and authentication without encryption: snmpwalk -v3 -l authNoPriv -u username -a MD5|SHA -A passphrase ip oid

- Query system information on a remote host by OID using SNMPv3, authentication, and encryption: snmpwalk -v3 -l authPriv -u username -a MD5|SHA -A auth_passphrase -x DES|AES -X enc_passphrase ip oid

- Query system information on a remote host by OID using SNMPv3 without authentication or encryption: snmpwalk -v3 -l noAuthNoPriv -u username ip oid

sshuttle
Transparent proxy server that tunnels traffic over an SSH connection.Doesn't require root or any special setup on the remote SSH server, though root access on the local machine is prompted for.

- Forward all IPv4 TCP traffic via a remote SSH server: sshuttle --remote=username@sshserver 0.0.0.0/0

- Also forward all DNS traffic to the server's default DNS resolver: sshuttle --dns --remote=username@sshserver 0.0.0.0/0

- Forward all traffic except that which is bound for a specific subnet: sshuttle --remote=username@sshserver 0.0.0.0/0 --exclude 192.168.0.1/24

- Use the tproxy method to forward all IPv4 and IPv6 traffic: sshuttle --method=tproxy --remote=username@sshserver 0.0.0.0/0 ::/0 --exclude=your_local_ip_address --exclude=ssh_server_ip_address

steghide
Steganography tool for JPEG, BMP, WAV and AU file formats

More information: https://github.com/StefanoDeVuono/steghide.

- Embed data in a PNG, prompting for a passphrase: steghide embed --coverfile path/to/image.png --embedfile path/to/data.txt

- Extract data from a WAV audio file: steghide extract --stegofile path/to/sound.wav

- Display file information, trying to detect an embedded file: steghide info path/to/file.jpg

- Embed data in a JPEG image, using maximum compression: steghide embed --coverfile path/to/image.jpg --embedfile path/to/data.txt --compress 9

- Get the list of supported encryption algorithms and modes: steghide encinfo

- Embed encrypted data in a JPEG image, e.g. with Blowfish in CBC mode: steghide embed --coverfile path/to/image.jpg --embedfile path/to/data.txt --encryption blowfish|... cbc|...

tlp-stat
A tool to generate TLP status reports.See also tlp

More information: https://linrunner.de/tlp/usage/tlp-stat.

- Generate status report with configuration and all active settings: sudo tlp-stat

- Show battery information: sudo tlp-stat -b

- Show configuration: sudo tlp-stat -c

unix2dos
Change Unix-style line endings to DOS-style.Replaces CR with CRLF

More information: https://waterlan.home.xs4all.nl/dos2unix.html.

- Change the line endings of a file: unix2dos filename

- Create a copy with DOS-style line endings: unix2dos -n filename new_filename

unix2mac
Change Unix-style line endings to macOS-style.Replaces CR with LF

More information: https://waterlan.home.xs4all.nl/dos2unix.html.

- Change the line endings of a file: unix2mac filename

- Create a copy with macOS-style line endings: unix2mac -n filename new_filename

unshadow
Utility provided by the John the Ripper project to obtain the traditional Unix password file if the system uses shadow passwords

More information: https://www.openwall.com/john/.

- Combine the /etc/shadow and /etc/passwd of the current system: sudo unshadow /etc/passwd /etc/shadow

- Combine two arbitrary shadow and password files: sudo unshadow path/to/passwd path/to/shadow

updatedb
Create or update the database used by locate.It is usually run daily by cron

More information: https://manned.org/updatedb.

- Refresh database content: sudo updatedb

- Display file names as soon as they are found: sudo updatedb --verbose

utmpdump
Dump and load btmp, utmp and wtmp accounting files.

- Dump the /var/log/wtmp file to the standard output as plain text: utmpdump /var/log/wtmp

- Load a previously dumped file into /var/log/wtmp: utmpdump -r dumpfile > /var/log/wtmp

vgchange
Change the attributes of a Logical Volume Manager (LVM) volume group.See also: lvm

More information: https://manned.org/vgchange.

- Change the activation status of logical volumes in all volume groups: sudo vgchange --activate y|n

- Change the activation status of logical volumes in the specified volume group (determine with vgscan): sudo vgchange --activate y|n volume_group

vgcreate
Create volume groups combining multiple mass-storage devices.See also: lvm

More information: https://man7.org/linux/man-pages/man8/vgcreate.8.html.

- Create a new volume group called vg1 using the /dev/sda1 device: vgcreate vg1 /dev/sda1

- Create a new volume group called vg1 using multiple devices: vgcreate vg1 /dev/sda1 /dev/sdb1 /dev/sdc1

viewnior
Simple and elegant image viewer.

- View an image: viewnior path/to/image.ext

- View in fullscreen mode: viewnior --fullscreen path/to/image.ext

- View fullscreen in slideshow mode: viewnior --slideshow path/to/image.ext

wg-quick
Quickly set up WireGuard tunnels based on config files

More information: https://www.wireguard.com/quickstart/.

- Set up a VPN tunnel: wg-quick up interface_name

- Delete a VPN tunnel: wg-quick down interface_name

whiptail
Display text-based dialog boxes from shell scripts.

- Display a simple message: whiptail --title "title" --msgbox "message" height_in_chars width_in_chars

- Display a boolean choice, returning the result through the exit code: whiptail --title "title" --yesno "message" height_in_chars width_in_chars

- Customise the text on the yes / no buttons: whiptail --title "title" --yes-button "text" --no-button "text" --yesno "message" height_in_chars width_in_chars

- Display a text input box: result_variable_name="$(whiptail --title "title" --inputbox "message" height_in_chars width_in_chars default_text 3>&1 1>&2 2>&3)"

- Display a password input box: result_variable_name="$(whiptail --title "title" --passwordbox "message" height_in_chars width_in_chars 3>&1 1>&2 2>&3)"

- Display a multiple-choice menu: result_variable_name=$(whiptail --title "title" --menu "message" height_in_chars width_in_chars menu_display_height "value_1" "display_text_1" "value_n" "display_text_n" ..... 3>&1 1>&2 2>&3)

xdg-mime
Query and manage MIME types according to the XDG standard

More information: https://portland.freedesktop.org/doc/xdg-mime.html.

- Display the MIME type of a file: xdg-mime query filetype path/to/file

- Display the default application for opening PNGs: xdg-mime query default image/png

- Display the default application for opening a specific file: xdg-mime query default $(xdg-mime query filetype path/to/file)

- Set imv as the default application for opening PNG and JPEG images: xdg-mime default imv.desktop image/png image/jpeg

xdg-open
Opens a file or URL in the user's preferred application

More information: https://man.archlinux.org/man/xdg-open.1.

- Open the current directory in the default file explorer: xdg-open.

- Open a URL in the default browser: xdg-open https://example.com

- Open an image in the default image viewer: xdg-open path/to/image

- Open a PDF in the default PDF viewer: xdg-open path/to/pdf

- Display help: xdg-open --help

xvfb-run
Run a command in a virtual X server environment

More information: https://www.x.org/wiki/.

- Run the specified command in a virtual X server: xvfb-run command

- Try to get a free server number, if the default (99) is not available: xvfb-run --auto-servernum command

- Pass arguments to the Xvfb server: xvfb-run --server-args "-screen 0 1024x768x24" command