mirror of
https://github.com/ivuorinen/cheatsheet-tldr.git
synced 2026-02-16 01:48:57 +00:00
Update cheatsheets
This commit is contained in:
@@ -14,4 +14,4 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
- Don't show informative messages:
|
||||
|
||||
`sudo a2disconf --quiet {{configuration_file}}`
|
||||
`sudo a2disconf {{[-q|--quiet]}} {{configuration_file}}`
|
||||
|
||||
@@ -14,4 +14,4 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
- Don't show informative messages:
|
||||
|
||||
`sudo a2dismod --quiet {{module}}`
|
||||
`sudo a2dismod {{[-q|--quiet]}} {{module}}`
|
||||
|
||||
@@ -14,4 +14,4 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
- Don't show informative messages:
|
||||
|
||||
`sudo a2dissite --quiet {{virtual_host}}`
|
||||
`sudo a2dissite {{[-q|--quiet]}} {{virtual_host}}`
|
||||
|
||||
@@ -14,4 +14,4 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
- Don't show informative messages:
|
||||
|
||||
`sudo a2enconf --quiet {{configuration_file}}`
|
||||
`sudo a2enconf {{[-q|--quiet]}} {{configuration_file}}`
|
||||
|
||||
@@ -14,4 +14,4 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
- Don't show informative messages:
|
||||
|
||||
`sudo a2enmod --quiet {{module}}`
|
||||
`sudo a2enmod {{[-q|--quiet]}} {{module}}`
|
||||
|
||||
@@ -14,4 +14,4 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
- Don't show informative messages:
|
||||
|
||||
`sudo a2ensite --quiet {{virtual_host}}`
|
||||
`sudo a2ensite {{[-q|--quiet]}} {{virtual_host}}`
|
||||
|
||||
@@ -15,4 +15,4 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
- Set policies to complain mode:
|
||||
|
||||
`sudo aa-complain --dir {{path/to/profiles}}`
|
||||
`sudo aa-complain {{[-d|--dir]}} {{path/to/profiles}}`
|
||||
|
||||
@@ -11,7 +11,7 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
- Enable profile:
|
||||
|
||||
`sudo aa-enforce --dir {{path/to/profile}}`
|
||||
`sudo aa-enforce {{[-d|--dir]}} {{path/to/profile}}`
|
||||
|
||||
- Enable profiles:
|
||||
|
||||
|
||||
@@ -39,4 +39,4 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
- Display help:
|
||||
|
||||
`abroot --help`
|
||||
`abroot {{[-h|--help]}}`
|
||||
|
||||
@@ -6,7 +6,7 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
# add-apt-repository
|
||||
|
||||
> Manage `apt` repository definitions.
|
||||
> More information: <https://manned.org/apt-add-repository>.
|
||||
> More information: <https://manned.org/add-apt-repository>.
|
||||
|
||||
- Add a new `apt` repository:
|
||||
|
||||
@@ -14,7 +14,7 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
- Remove an `apt` repository:
|
||||
|
||||
`add-apt-repository --remove {{repository_spec}}`
|
||||
`add-apt-repository {{[-r|--remove]}} {{repository_spec}}`
|
||||
|
||||
- Update the package cache after adding a repository:
|
||||
|
||||
@@ -22,4 +22,4 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
- Allow source packages to be downloaded from the repository:
|
||||
|
||||
`add-apt-repository --enable-source {{repository_spec}}`
|
||||
`add-apt-repository {{[-s|--enable-source]}} {{repository_spec}}`
|
||||
|
||||
@@ -11,16 +11,16 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
- Convert a specific installation file to Debian format (`.deb` extension):
|
||||
|
||||
`sudo alien --to-deb {{path/to/file}}`
|
||||
`sudo alien {{[-d|--to-deb]}} {{path/to/file}}`
|
||||
|
||||
- Convert a specific installation file to Red Hat format (`.rpm` extension):
|
||||
|
||||
`sudo alien --to-rpm {{path/to/file}}`
|
||||
`sudo alien {{[-r|--to-rpm]}} {{path/to/file}}`
|
||||
|
||||
- Convert a specific installation file to a Slackware installation file (`.tgz` extension):
|
||||
|
||||
`sudo alien --to-tgz {{path/to/file}}`
|
||||
`sudo alien {{[-t|--to-tgz]}} {{path/to/file}}`
|
||||
|
||||
- Convert a specific installation file to Debian format and install on the system:
|
||||
|
||||
`sudo alien --to-deb --install {{path/to/file}}`
|
||||
`sudo alien {{[-d|--to-deb]}} {{[-i|--install]}} {{path/to/file}}`
|
||||
|
||||
@@ -19,4 +19,4 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
- Quit alpine:
|
||||
|
||||
`q + y`
|
||||
`<q><y>`
|
||||
|
||||
@@ -5,39 +5,39 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# apt
|
||||
|
||||
> Package management utility for Debian based distributions.
|
||||
> Recommended replacement for `apt-get` when used interactively in Ubuntu versions 16.04 and later.
|
||||
> Package manager for Debian-based distributions.
|
||||
> Intended as a user-friendly alternative to `apt-get` for interactive use.
|
||||
> For equivalent commands in other package managers, see <https://wiki.archlinux.org/title/Pacman/Rosetta>.
|
||||
> More information: <https://manned.org/apt.8>.
|
||||
|
||||
- Update the list of available packages and versions (it's recommended to run this before other `apt` commands):
|
||||
- Update the list of available packages and versions (recommended before running other `apt` commands):
|
||||
|
||||
`sudo apt update`
|
||||
|
||||
- Search for a given package (use `apt search --name-only package` to search within package name only):
|
||||
- Search packages by name or description:
|
||||
|
||||
`apt search {{package}}`
|
||||
|
||||
- Show information for a package:
|
||||
- Search packages by name only (supports wildcards like `*`):
|
||||
|
||||
`apt list {{package}}`
|
||||
|
||||
- Show detailed information about a package:
|
||||
|
||||
`apt show {{package}}`
|
||||
|
||||
- Install a package, or update it to the latest available version:
|
||||
- Install a package, or update it to the latest version:
|
||||
|
||||
`sudo apt install {{package}}`
|
||||
|
||||
- Remove a package (using `purge` instead also removes its configuration files):
|
||||
- Remove a package (use `purge` instead to also remove configuration files):
|
||||
|
||||
`sudo apt remove {{package}}`
|
||||
|
||||
- Upgrade all installed packages to their newest available versions:
|
||||
- Upgrade all installed packages to their latest versions:
|
||||
|
||||
`sudo apt upgrade`
|
||||
|
||||
- List all packages:
|
||||
|
||||
`apt list`
|
||||
|
||||
- List installed packages:
|
||||
- List all installed packages:
|
||||
|
||||
`apt list {{[-i|--installed]}}`
|
||||
|
||||
@@ -5,21 +5,8 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# apt-add-repository
|
||||
|
||||
> Manage `apt` repository definitions.
|
||||
> More information: <https://manned.org/apt-add-repository.1>.
|
||||
> This command is an alias of `add-apt-repository`.
|
||||
|
||||
- Add a new `apt` repository:
|
||||
- View documentation for the original command:
|
||||
|
||||
`apt-add-repository {{repository_spec}}`
|
||||
|
||||
- Remove an `apt` repository:
|
||||
|
||||
`apt-add-repository {{[-r|--remove]}} {{repository_spec}}`
|
||||
|
||||
- Update the package cache after adding a repository:
|
||||
|
||||
`apt-add-repository --update {{repository_spec}}`
|
||||
|
||||
- Enable source packages:
|
||||
|
||||
`apt-add-repository {{[-s|--enable-source]}} {{repository_spec}}`
|
||||
`tldr add-apt-repository`
|
||||
|
||||
@@ -10,12 +10,12 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
- Extract a specific archive into the current directory:
|
||||
|
||||
`ark --batch {{path/to/archive}}`
|
||||
`ark {{[-b|--batch]}} {{path/to/archive}}`
|
||||
|
||||
- Extract an archive into a specific directory:
|
||||
|
||||
`ark --batch --destination {{path/to/directory}} {{path/to/archive}}`
|
||||
`ark {{[-b|--batch]}} {{[-o|--destination]}} {{path/to/directory}} {{path/to/archive}}`
|
||||
|
||||
- Create an archive if it does not exist and add specific files to it:
|
||||
|
||||
`ark --add-to {{path/to/archive}} {{path/to/file1 path/to/file2 ...}}`
|
||||
`ark {{[-t|--add-to]}} {{path/to/archive}} {{path/to/file1 path/to/file2 ...}}`
|
||||
|
||||
@@ -5,7 +5,7 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# auracle
|
||||
|
||||
> Command-line tool used to interact with Arch Linux's User Repository, commonly referred to as the AUR.
|
||||
> Interact with Arch Linux's User Repository, commonly referred to as the AUR.
|
||||
> More information: <https://github.com/falconindy/auracle>.
|
||||
|
||||
- Display AUR packages that match a regular expression:
|
||||
|
||||
@@ -14,8 +14,8 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
- Display help:
|
||||
|
||||
`caffeine --help`
|
||||
`caffeine {{[-h|--help]}}`
|
||||
|
||||
- Display version:
|
||||
|
||||
`caffeine --version`
|
||||
`caffeine {{[-V|--version]}}`
|
||||
|
||||
@@ -19,12 +19,12 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
- Open specific directories in tabs:
|
||||
|
||||
`caja --tabs {{path/to/directory1 path/to/directory2 ...}}`
|
||||
`caja {{[-t|--tabs]}} {{path/to/directory1 path/to/directory2 ...}}`
|
||||
|
||||
- Open a directory with a specific window size:
|
||||
|
||||
`caja --geometry={{600}}x{{400}} {{path/to/directory}}`
|
||||
`caja {{[-g|--geometry]}} {{600}}x{{400}} {{path/to/directory}}`
|
||||
|
||||
- Close all windows:
|
||||
|
||||
`caja --quit`
|
||||
`caja {{[-q|--quit]}}`
|
||||
|
||||
@@ -6,7 +6,7 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
# calcurse
|
||||
|
||||
> A text-based calendar and scheduling application for the command-line.
|
||||
> More information: <https://calcurse.org>.
|
||||
> More information: <https://github.com/lfos/calcurse/blob/pu/doc/calcurse.1.txt>.
|
||||
|
||||
- Start `calcurse` on interactive mode:
|
||||
|
||||
@@ -14,7 +14,7 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
- Print the appointments and events for the current day and exit:
|
||||
|
||||
`calcurse --appointment`
|
||||
`calcurse {{[-a|--appointment]}}`
|
||||
|
||||
- Remove all local calcurse items and import remote objects:
|
||||
|
||||
|
||||
@@ -14,19 +14,19 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
- Show the battery icon and set the update interval to 20 seconds:
|
||||
|
||||
`cbatticon --update-interval {{20}}`
|
||||
`cbatticon {{[-u|--update-interval]}} {{20}}`
|
||||
|
||||
- List available icon types:
|
||||
|
||||
`cbatticon --list-icon-types`
|
||||
`cbatticon {{[-t|--list-icon-types]}}`
|
||||
|
||||
- Show the battery icon with a specific icon type:
|
||||
|
||||
`cbatticon --icon-type {{standard|notification|symbolic}}`
|
||||
`cbatticon {{[-i|--icon-type]}} {{standard|notification|symbolic}}`
|
||||
|
||||
- List available power supplies:
|
||||
|
||||
`cbatticon --list-power-supplies`
|
||||
`cbatticon {{[-p|--list-power-supplies]}}`
|
||||
|
||||
- Show the battery icon for a specific battery:
|
||||
|
||||
@@ -34,4 +34,4 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
- Show the battery icon and which command to execute when the battery level reaches the set critical level:
|
||||
|
||||
`cbatticon --critical-level {{5}} --command-critical-level {{poweroff}}`
|
||||
`cbatticon {{[-r|--critical-level]}} {{5}} {{[-c|--command-critical-level]}} {{poweroff}}`
|
||||
|
||||
@@ -8,7 +8,7 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
> Move running tasks to `cgroups`.
|
||||
> More information: <https://manned.org/cgclassify>.
|
||||
|
||||
- Move the process with a specific PID to the control group student in the CPU hierarchy:
|
||||
- Move the process with a specific PID to the control [g]roup student in the CPU hierarchy:
|
||||
|
||||
`cgclassify -g {{cpu:student}} {{1234}}`
|
||||
|
||||
@@ -16,6 +16,6 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
`cgclassify {{1234}}`
|
||||
|
||||
- Move the process with a specific PID to the control group student in the CPU hierarchy. Note: The daemon of the service `cgred` does not change `cgroups` of the specific PID and its children (based on `/etc/cgrules.conf`):
|
||||
- Move the process with a specific PID to the control [g]roup student in the CPU hierarchy. Note: The daemon of the service `cgred` does not change `cgroups` of the specific PID and its children (based on `/etc/cgrules.conf`):
|
||||
|
||||
`cgclassify --sticky -g {{cpu:/student}} {{1234}}`
|
||||
|
||||
@@ -9,11 +9,11 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
> `cgroups` types can be `memory`, `cpu`, `net_cls`, etc.
|
||||
> More information: <https://manned.org/cgcreate>.
|
||||
|
||||
- Create a new group:
|
||||
- Create a new [g]roup:
|
||||
|
||||
`cgcreate -g {{group_type}}:{{group_name}}`
|
||||
|
||||
- Create a new group with multiple cgroup types:
|
||||
- Create a new [g]roup with multiple cgroup types:
|
||||
|
||||
`cgcreate -g {{group_type1}},{{group_type2}}:{{group_name}}`
|
||||
|
||||
|
||||
@@ -9,6 +9,6 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
> Multiple cgroup types (aka controllers) exist, such as `cpu`, `memory`, etc.
|
||||
> More information: <https://manned.org/cgexec>.
|
||||
|
||||
- Execute a process in a given cgroup with given controller:
|
||||
- Execute a process in a given c[g]roup with given controller:
|
||||
|
||||
`cgexec -g {{controller}}:{{cgroup_name}} {{process_name}}`
|
||||
|
||||
@@ -8,7 +8,7 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
> Change attributes of files or directories.
|
||||
> More information: <https://manned.org/chattr>.
|
||||
|
||||
- Make a file or directory immutable to changes and deletion, even by superuser:
|
||||
- Make a file or directory [i]mmutable to changes and deletion, even by superuser:
|
||||
|
||||
`chattr +i {{path/to/file_or_directory}}`
|
||||
|
||||
@@ -16,7 +16,7 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
`chattr -i {{path/to/file_or_directory}}`
|
||||
|
||||
- Recursively make an entire directory and contents immutable:
|
||||
- [R]ecursively make an entire directory and contents immutable:
|
||||
|
||||
`chattr -R +i {{path/to/directory}}`
|
||||
|
||||
@@ -24,6 +24,6 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
`chattr +F {{path/to/directory}}`
|
||||
|
||||
- Set a file to only allow appending:
|
||||
- Set a file to only allow [a]ppending:
|
||||
|
||||
`chattr +a {{path/to/file}}`
|
||||
|
||||
@@ -7,7 +7,7 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
> Report non-free packages installed on Debian-based OSes.
|
||||
> This command was formerly known as `vrms`.
|
||||
> More information: <https://debian.pages.debian.net/check-dfsg-status/>.
|
||||
> More information: <https://salsa.debian.org/debian/check-dfsg-status>.
|
||||
|
||||
- List non-free and contrib packages (and their description):
|
||||
|
||||
@@ -15,4 +15,4 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
- Only output the package names:
|
||||
|
||||
`check-dfsg-status --sparse`
|
||||
`check-dfsg-status {{[-s|--sparse]}}`
|
||||
|
||||
@@ -14,7 +14,7 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
- List packages for a specific locale:
|
||||
|
||||
`check-language-support --language {{en}}`
|
||||
`check-language-support {{[-l|--language]}} {{en}}`
|
||||
|
||||
- Display installed packages as well as missing ones:
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
> A utility that can edit windows registry, reset user password, promote users to administrator by modifying the Windows SAM.
|
||||
> Boot target machine with live cd like Kali Linux and run with elevated privileges.
|
||||
> More information: <https://pogostick.net/~pnh/ntpasswd>.
|
||||
> More information: <https://pogostick.net/~pnh/ntpasswd/MANUAL.txt>.
|
||||
|
||||
- List all users in the SAM file:
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
# cloud-init
|
||||
|
||||
> Command line tool for managing cloud instance initialization.
|
||||
> More information: <https://cloudinit.readthedocs.io>.
|
||||
> More information: <https://cloudinit.readthedocs.io/en/latest/reference/cli.html>.
|
||||
|
||||
- Display the status of the most recent cloud-init run:
|
||||
|
||||
|
||||
@@ -30,8 +30,8 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
- Extract the last core dump of a program to a file:
|
||||
|
||||
`coredumpctl --output {{path/to/file}} dump {{program}}`
|
||||
`coredumpctl {{[-o|--output]}} {{path/to/file}} dump {{program}}`
|
||||
|
||||
- Skip debuginfod and pagination prompts and then print the backtrace when using `gdb`:
|
||||
|
||||
`coredumpctl debug --debugger-arguments "-iex 'set debuginfod enabled on' -iex 'set pagination off' -ex bt"`
|
||||
`coredumpctl debug {{[-A|--debugger-arguments]}} "-iex 'set debuginfod enabled on' -iex 'set pagination off' -ex bt"`
|
||||
|
||||
@@ -6,28 +6,28 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
# cpulimit
|
||||
|
||||
> A tool to throttle the CPU usage of other processes.
|
||||
> More information: <https://cpulimit.sourceforge.net/>.
|
||||
> More information: <https://manned.org/cpulimit>.
|
||||
|
||||
- Limit an existing process with PID 1234 to only use 25% of the CPU:
|
||||
|
||||
`cpulimit --pid {{1234}} --limit {{25%}}`
|
||||
`cpulimit {{[-p|--pid]}} {{1234}} {{[-l|--limit]}} {{25%}}`
|
||||
|
||||
- Limit an existing program by its executable name:
|
||||
|
||||
`cpulimit --exe {{program}} --limit {{25}}`
|
||||
`cpulimit {{[-e|--exe]}} {{program}} {{[-l|--limit]}} {{25}}`
|
||||
|
||||
- Launch a given program and limit it to only use 50% of the CPU:
|
||||
|
||||
`cpulimit --limit {{50}} -- {{program argument1 argument2 ...}}`
|
||||
`cpulimit {{[-l|--limit]}} {{50}} -- {{program argument1 argument2 ...}}`
|
||||
|
||||
- Launch a program, limit its CPU usage to 50% and run cpulimit in the background:
|
||||
|
||||
`cpulimit --limit {{50}} --background -- {{program}}`
|
||||
`cpulimit {{[-l|--limit]}} {{50}} {{[-b|--background]}} -- {{program}}`
|
||||
|
||||
- Kill its process if the program's CPU usage goes over 50%:
|
||||
|
||||
`cpulimit --limit 50 --kill -- {{program}}`
|
||||
`cpulimit {{[-l|--limit]}} 50 {{[-k|--kill]}} -- {{program}}`
|
||||
|
||||
- Throttle both it and its child processes so that none go about 25% CPU:
|
||||
|
||||
`cpulimit --limit {{25}} --monitor-forks -- {{program}}`
|
||||
`cpulimit {{[-l|--limit]}} {{25}} {{[-m|--monitor-forks]}} -- {{program}}`
|
||||
|
||||
@@ -16,7 +16,7 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
`crond -n`
|
||||
|
||||
- Send job output from the daemon to the system log:
|
||||
- Send job output from the daemon to the [s]ystem log:
|
||||
|
||||
`crond -s`
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
- Use a keyfile instead of a passphrase:
|
||||
|
||||
`cryptsetup open --key-file {{path/to/file}} {{/dev/sdXY}} {{mapping_name}}`
|
||||
`cryptsetup open {{[-k|--key-file]}} {{path/to/file}} {{/dev/sdXY}} {{mapping_name}}`
|
||||
|
||||
- Allow the use of TRIM on the device:
|
||||
|
||||
@@ -28,4 +28,4 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
- Open a LUKS volume and make the decrypted mapping read-only:
|
||||
|
||||
`cryptsetup open --readonly {{/dev/sdXY}} {{mapping_name}}`
|
||||
`cryptsetup open {{[-r|--readonly]}} {{/dev/sdXY}} {{mapping_name}}`
|
||||
|
||||
@@ -12,6 +12,6 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
`e2freefrag {{/dev/sdXN}}`
|
||||
|
||||
- Specify chunk size in kilobytes to print how many free chunks are available:
|
||||
- Specify [c]hunk size in kilobytes to print how many free chunks are available:
|
||||
|
||||
`e2freefrag -c {{chunk_size_in_kb}} {{/dev/sdXN}}`
|
||||
|
||||
@@ -12,7 +12,7 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
`sudo e2fsck {{/dev/sdXN}}`
|
||||
|
||||
- Check filesystem and automatically repair any damaged blocks:
|
||||
- Check filesystem and automatically repair ([p]reen) any damaged blocks:
|
||||
|
||||
`sudo e2fsck -p {{/dev/sdXN}}`
|
||||
|
||||
|
||||
@@ -24,6 +24,6 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
`e2image -r {{/dev/sdXN}} {{path/to/image_file}}`
|
||||
|
||||
- Create a QCOW2 image file instead of a normal or raw image file:
|
||||
- Create a [Q]COW2 image file instead of a normal or raw image file:
|
||||
|
||||
`e2image -Q {{/dev/sdXN}} {{path/to/image_file}}`
|
||||
|
||||
@@ -21,7 +21,7 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
`e2undo {{path/to/undo_file}} {{/dev/sdXN}}`
|
||||
|
||||
- Perform an undo operation and display verbose information:
|
||||
- Perform an undo operation and display [v]erbose information:
|
||||
|
||||
`e2undo -v {{path/to/undo_file}} {{/dev/sdXN}}`
|
||||
|
||||
|
||||
@@ -18,8 +18,8 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
- Clean the distfiles of all uninstalled packages, but keep the distfiles of installed packages:
|
||||
|
||||
`sudo eclean --deep --package-names distfiles`
|
||||
`sudo eclean {{[-d|--deep]}} {{[-n|--package-names]}} distfiles`
|
||||
|
||||
- Clean the binary packages of all uninstalled packages, but keep the binaries of installed packages:
|
||||
|
||||
`sudo eclean --deep --package-names packages`
|
||||
`sudo eclean {{[-d|--deep]}} {{[-n|--package-names]}} packages`
|
||||
|
||||
@@ -10,20 +10,20 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
- List active global USE flags:
|
||||
|
||||
`euse --active --global`
|
||||
`euse {{[-a|--active]}} {{[-g|--global]}}`
|
||||
|
||||
- List active local USE flags:
|
||||
|
||||
`euse --active --local`
|
||||
`euse {{[-a|--active]}} {{[-l|--local]}}`
|
||||
|
||||
- Enable a global USE flag:
|
||||
|
||||
`sudo euse --enable {{use_flag}}`
|
||||
`sudo euse {{[-E|--enable]}} {{use_flag}}`
|
||||
|
||||
- Disable a global USE flag (put a '-' sign in front of the USE flag):
|
||||
|
||||
`sudo euse --disable {{use_flag}}`
|
||||
`sudo euse {{[-D|--disable]}} {{use_flag}}`
|
||||
|
||||
- Remove a global USE flag:
|
||||
|
||||
`sudo euse --prune {{use_flag}}`
|
||||
`sudo euse {{[-P|--prune]}} {{use_flag}}`
|
||||
|
||||
@@ -16,7 +16,7 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
`exiqgrep -i -f '<{{email@example.com}}>'`
|
||||
|
||||
- Match the recipient address:
|
||||
- Match the [r]ecipient address:
|
||||
|
||||
`exiqgrep -r '{{email@example.com}}'`
|
||||
|
||||
@@ -28,6 +28,6 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
`exiqgrep -f '^<>$'`
|
||||
|
||||
- Display the count of bounced messages:
|
||||
- Display the [c]ount of bounced messages:
|
||||
|
||||
`exiqgrep -c -f '^<>$'`
|
||||
|
||||
@@ -16,6 +16,6 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
`expect -c "{{commands}}"`
|
||||
|
||||
- Enter an interactive REPL (use `exit` or `<Ctrl d>` to exit):
|
||||
- Enter an [i]nteractive REPL (use `exit` or `<Ctrl d>` to exit):
|
||||
|
||||
`expect -i`
|
||||
|
||||
@@ -16,7 +16,7 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
`export -n {{VARIABLE}}`
|
||||
|
||||
- Export a function to child processes:
|
||||
- Export a [f]unction to child processes:
|
||||
|
||||
`export -f {{FUNCTION_NAME}}`
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
`sudo extrace {{command}}`
|
||||
|
||||
- Print the current working directory of each process:
|
||||
- Print the current working [d]irectory of each process:
|
||||
|
||||
`sudo extrace -d`
|
||||
|
||||
@@ -24,6 +24,6 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
`sudo extrace -l`
|
||||
|
||||
- Display the user running each process:
|
||||
- Display the [u]ser running each process:
|
||||
|
||||
`sudo extrace -u`
|
||||
|
||||
@@ -16,7 +16,7 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
`fakeroot -- {{command}} {{command_arguments}}`
|
||||
|
||||
- Run a command as fakeroot and save the environment to a file on exit:
|
||||
- Run a command as fakeroot and [s]ave the environment to a file on exit:
|
||||
|
||||
`fakeroot -s {{path/to/file}} -- {{command}} {{command_arguments}}`
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
> Screenshot utility with a GUI.
|
||||
> Supports basic image editing, such as text, shapes, colors, and imgur.
|
||||
> More information: <https://flameshot.org>.
|
||||
> More information: <https://flameshot.org/docs/advanced/commandline-options/>.
|
||||
|
||||
- Create a fullscreen screenshot:
|
||||
|
||||
|
||||
@@ -30,4 +30,4 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
- Display help:
|
||||
|
||||
`fprintd-verify --help`
|
||||
`fprintd-verify {{[-h|--help]}}`
|
||||
|
||||
@@ -16,6 +16,6 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
`sudo fsck -r {{/dev/sdXN}}`
|
||||
|
||||
- Check filesystem `/dev/sdXN`, reporting any damaged blocks and automatically repairing them:
|
||||
- Check filesystem `/dev/sdXN`, reporting any damaged blocks and [a]utomatically repairing them:
|
||||
|
||||
`sudo fsck -a {{/dev/sdXN}}`
|
||||
|
||||
@@ -14,20 +14,20 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
- Show more fields (`USER`, `PID`, `ACCESS` and `COMMAND`):
|
||||
|
||||
`fuser --verbose {{path/to/file_or_directory}}`
|
||||
`fuser {{[-v|--verbose]}} {{path/to/file_or_directory}}`
|
||||
|
||||
- Identify processes using a TCP socket:
|
||||
|
||||
`fuser --namespace tcp {{port}}`
|
||||
`fuser {{[-n|--namespace]}} tcp {{port}}`
|
||||
|
||||
- Kill all processes accessing a file or directory (sends the `SIGKILL` signal):
|
||||
|
||||
`fuser --kill {{path/to/file_or_directory}}`
|
||||
`fuser {{[-k|--kill]}} {{path/to/file_or_directory}}`
|
||||
|
||||
- Find which processes are accessing the filesystem containing a specific file or directory:
|
||||
|
||||
`fuser --mount {{path/to/file_or_directory}}`
|
||||
`fuser {{[-m|--mount]}} {{path/to/file_or_directory}}`
|
||||
|
||||
- Kill all processes with a TCP connection on a specific port:
|
||||
|
||||
`fuser --kill {{port}}/tcp`
|
||||
`fuser {{[-k|--kill]}} {{port}}/tcp`
|
||||
|
||||
@@ -6,7 +6,7 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
# gdebi
|
||||
|
||||
> Easily install `.deb` files.
|
||||
> More information: <https://www.commandlinux.com/man-page/man1/gdebi.1.html>.
|
||||
> More information: <https://manned.org/gdebi>.
|
||||
|
||||
- Install local `.deb` packages resolving and installing its dependencies:
|
||||
|
||||
@@ -14,15 +14,15 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
- Do not show progress information:
|
||||
|
||||
`gdebi {{path/to/package.deb}} --quiet`
|
||||
`gdebi {{path/to/package.deb}} {{[-q|--quiet]}}`
|
||||
|
||||
- Set an APT configuration option:
|
||||
|
||||
`gdebi {{path/to/package.deb}} --option={{APT_OPTS}}`
|
||||
`gdebi {{path/to/package.deb}} {{[-o|--option]}} {{APT_OPTS}}`
|
||||
|
||||
- Use alternative root dir:
|
||||
|
||||
`gdebi {{path/to/package.deb}} --root={{path/to/root_dir}}`
|
||||
`gdebi {{path/to/package.deb}} --root {{path/to/root_dir}}`
|
||||
|
||||
- Display version:
|
||||
|
||||
|
||||
@@ -14,27 +14,27 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
- Take a screenshot and save it to the named file location:
|
||||
|
||||
`gnome-screenshot --file {{path/to/file}}`
|
||||
`gnome-screenshot {{[-f|--file]}} {{path/to/file}}`
|
||||
|
||||
- Take a screenshot and save it to the clipboard:
|
||||
|
||||
`gnome-screenshot --clipboard`
|
||||
`gnome-screenshot {{[-c|--clipboard]}}`
|
||||
|
||||
- Take a screenshot after the specified number of seconds:
|
||||
|
||||
`gnome-screenshot --delay {{5}}`
|
||||
`gnome-screenshot {{[-d|--delay]}} {{5}}`
|
||||
|
||||
- Launch the GNOME Screenshot GUI:
|
||||
|
||||
`gnome-screenshot --interactive`
|
||||
`gnome-screenshot {{[-i|--interactive]}}`
|
||||
|
||||
- Take a screenshot of the current window and save it to the specified file location:
|
||||
|
||||
`gnome-screenshot --window --file {{path/to/file}}`
|
||||
`gnome-screenshot {{[-w|--window]}} {{[-f|--file]}} {{path/to/file}}`
|
||||
|
||||
- Take a screenshot after the specified number of seconds and save it to the clipboard:
|
||||
|
||||
`gnome-screenshot --delay {{10}} --clipboard`
|
||||
`gnome-screenshot {{[-d|--delay]}} {{10}} {{[-c|--clipboard]}}`
|
||||
|
||||
- Display the version:
|
||||
|
||||
|
||||
@@ -14,4 +14,4 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
- Show what modifications would be made when growing partition `n` in a disk image:
|
||||
|
||||
`growpart --dry-run {{/path/to/disk.img}} {{n}}`
|
||||
`growpart {{[-N|--dry-run]}} {{/path/to/disk.img}} {{n}}`
|
||||
|
||||
@@ -15,8 +15,8 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
- Install even if problems are detected:
|
||||
|
||||
`grub-bios-setup --force {{/dev/sdX}}`
|
||||
`grub-bios-setup {{[-f|--force]}} {{/dev/sdX}}`
|
||||
|
||||
- Install GRUB in a specific directory:
|
||||
|
||||
`grub-bios-setup --directory={{/boot/grub}} {{/dev/sdX}}`
|
||||
`grub-bios-setup {{[-d|--directory]}} {{/boot/grub}} {{/dev/sdX}}`
|
||||
|
||||
@@ -10,7 +10,7 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
- Set the screen temperature to 3000K:
|
||||
|
||||
`gummy --temperature {{3000}}`
|
||||
`gummy {{[-t|--temperature]}} {{3000}}`
|
||||
|
||||
- Set the screen backlight to 50%:
|
||||
|
||||
@@ -18,16 +18,16 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
- Set the screen pixel brightness to 45%:
|
||||
|
||||
`gummy --brightness {{45}}`
|
||||
`gummy {{[-b|--brightness]}} {{45}}`
|
||||
|
||||
- Increase current screen pixel brightness by 10%:
|
||||
|
||||
`gummy --brightness {{+10}}`
|
||||
`gummy {{[-b|--brightness]}} {{+10}}`
|
||||
|
||||
- Decrease current screen pixel brightness by 10%:
|
||||
|
||||
`gummy --brightness {{-10}}`
|
||||
`gummy {{[-b|--brightness]}} {{-10}}`
|
||||
|
||||
- Set the temperature and pixel brightness for the second screen:
|
||||
|
||||
`gummy --screen {{1}} --temperature {{3800}} --brightness {{65}}`
|
||||
`gummy {{[-s|--screen]}} {{1}} {{[-t|--temperature]}} {{3800}} {{[-b|--brightness]}} {{65}}`
|
||||
|
||||
@@ -13,6 +13,6 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
`gzexe {{path/to/executable}}`
|
||||
|
||||
- Decompress a compressed executable in-place (i.e. convert the shell script back to an uncompressed binary):
|
||||
- [d]ecompress a compressed executable in-place (i.e. convert the shell script back to an uncompressed binary):
|
||||
|
||||
`gzexe -d {{path/to/compressed_executable}}`
|
||||
|
||||
@@ -14,7 +14,7 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
- Check all Haskell files and generate a report:
|
||||
|
||||
`hlint {{path/to/directory}} --report`
|
||||
`hlint {{path/to/directory}} {{[-r|--report]}}`
|
||||
|
||||
- Automatically apply most suggestions:
|
||||
|
||||
|
||||
@@ -38,4 +38,4 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
- Display help:
|
||||
|
||||
`homectl --help`
|
||||
`homectl {{[-h|--help]}}`
|
||||
|
||||
@@ -10,11 +10,11 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
- List all genres:
|
||||
|
||||
`id3v2 --list-genres`
|
||||
`id3v2 {{-L|--list-genres}}`
|
||||
|
||||
- List all tags of specific files:
|
||||
|
||||
`id3v2 --list {{path/to/file1 path/to/file2 ...}}`
|
||||
`id3v2 {{[-l|--list]}} {{path/to/file1 path/to/file2 ...}}`
|
||||
|
||||
- Delete all `id3v2` or `id3v1` tags of specific files:
|
||||
|
||||
@@ -22,8 +22,8 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
- Display help:
|
||||
|
||||
`id3v2 --help`
|
||||
`id3v2 {{[-h|--help]}}`
|
||||
|
||||
- Display version:
|
||||
|
||||
`id3v2 --version`
|
||||
`id3v2 {{[-v|--version]}}`
|
||||
|
||||
@@ -10,20 +10,20 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
- Set output column count to a specific value:
|
||||
|
||||
`img2txt --width={{10}}`
|
||||
`img2txt {{[-W|--width]}} {{10}} {{path/to/image}}`
|
||||
|
||||
- Set output line count to a specific value:
|
||||
|
||||
`img2txt --height={{5}}`
|
||||
`img2txt {{[-H|--height]}} {{5}} {{path/to/image}}`
|
||||
|
||||
- Set output font width to a specific value:
|
||||
|
||||
`img2txt --font-width={{12}}`
|
||||
`img2txt {{[-x|--font-width]}} {{12}} {{path/to/image}}`
|
||||
|
||||
- Set output font height to a specific value:
|
||||
|
||||
`img2txt --font-height={{14}}`
|
||||
`img2txt {{[-y|--font-height]}} {{14}} {{path/to/image}}`
|
||||
|
||||
- Set image brightness to a specific value:
|
||||
|
||||
`img2txt --brightness={{2}}`
|
||||
`img2txt {{[-b|--brightness]}} {{2}} {{path/to/image}}`
|
||||
|
||||
@@ -14,28 +14,28 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
- Continuously watch a specific file for events without exiting:
|
||||
|
||||
`inotifywait --monitor {{path/to/file}}`
|
||||
`inotifywait {{[-m|--monitor]}} {{path/to/file}}`
|
||||
|
||||
- Watch a directory recursively for events:
|
||||
|
||||
`inotifywait --monitor --recursive {{path/to/directory}}`
|
||||
`inotifywait {{[-m|--monitor]}} {{[-r|--recursive]}} {{path/to/directory}}`
|
||||
|
||||
- Watch a directory for changes, excluding files, whose names match a regular expression:
|
||||
|
||||
`inotifywait --monitor --recursive --exclude "{{regular_expression}}" {{path/to/directory}}`
|
||||
`inotifywait {{[-m|--monitor]}} {{[-r|--recursive]}} --exclude "{{regular_expression}}" {{path/to/directory}}`
|
||||
|
||||
- Watch a file for changes, exiting when no event occurs for 30 seconds:
|
||||
|
||||
`inotifywait --monitor --timeout {{30}} {{path/to/file}}`
|
||||
`inotifywait {{[-m|--monitor]}} {{[-t|--timeout]}} {{30}} {{path/to/file}}`
|
||||
|
||||
- Only watch a file for file modification events:
|
||||
|
||||
`inotifywait --event {{modify}} {{path/to/file}}`
|
||||
`inotifywait {{[-e|--event]}} {{modify}} {{path/to/file}}`
|
||||
|
||||
- Watch a file printing only events, and no status messages:
|
||||
|
||||
`inotifywait --quiet {{path/to/file}}`
|
||||
`inotifywait {{[-q|--quiet]}} {{path/to/file}}`
|
||||
|
||||
- Run a command when a file is accessed:
|
||||
|
||||
`inotifywait --event {{access}} {{path/to/file}} && {{command}}`
|
||||
`inotifywait {{[-e|--event]}} {{access}} {{path/to/file}} && {{command}}`
|
||||
|
||||
@@ -7,7 +7,7 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
> Download pictures, videos, captions, and other metadata from Instagram.
|
||||
> Note: You will need to provide Instagram login information if you want high-quality media downloads.
|
||||
> More information: <https://instaloader.github.io>.
|
||||
> More information: <https://instaloader.github.io/cli-options.html>.
|
||||
|
||||
- Download a profile:
|
||||
|
||||
@@ -19,7 +19,7 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
- Download posts with geotags (if available), suppressing any user interaction:
|
||||
|
||||
`instaloader --quiet --geotags {{profile_name}}`
|
||||
`instaloader {{[-q|--quiet]}} {{[-G|--geotags]}} {{profile_name}}`
|
||||
|
||||
- Specify a user agent for HTTP requests:
|
||||
|
||||
@@ -27,16 +27,16 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
- Specify login info and download posts (useful for private profiles):
|
||||
|
||||
`instaloader --login {{username}} --password {{password}} {{profile_name}}`
|
||||
`instaloader {{[-l|--login]}} {{username}} {{[-p|--password]}} {{password}} {{profile_name}}`
|
||||
|
||||
- Skip a target if the first downloaded file has been found (useful for updating Instagram archives):
|
||||
|
||||
`instaloader --fast-update {{profile_name}}`
|
||||
`instaloader {{[-F|--fast-update]}} {{profile_name}}`
|
||||
|
||||
- Download stories and IGTV videos (login required):
|
||||
|
||||
`instaloader --login {{username}} --password {{password}} --stories --igtv {{profile_name}}`
|
||||
`instaloader {{[-l|--login]}} {{username}} {{[-p|--password]}} {{password}} {{[-s|--stories]}} --igtv {{profile_name}}`
|
||||
|
||||
- Download all types of posts (login required):
|
||||
|
||||
`instaloader --login {{username}} --password {{password}} --stories --igtv --highlights {{profile_name}}`
|
||||
`instaloader {{[-l|--login]}} {{username}} {{[-p|--password]}} {{password}} {[-s|--stories]}} --igtv --highlights {{profile_name}}`
|
||||
|
||||
@@ -10,16 +10,16 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
- Create a shared memory segment:
|
||||
|
||||
`ipcmk --shmem {{segment_size_in_bytes}}`
|
||||
`ipcmk {{[-M|--shmem]}} {{segment_size_in_bytes}}`
|
||||
|
||||
- Create a semaphore:
|
||||
|
||||
`ipcmk --semaphore {{element_size}}`
|
||||
`ipcmk {{[-S|--semaphore]}} {{element_size}}`
|
||||
|
||||
- Create a message queue:
|
||||
|
||||
`ipcmk --queue`
|
||||
`ipcmk {{[-Q|--queue]}}`
|
||||
|
||||
- Create a shared memory segment with specific permissions (default is 0644):
|
||||
|
||||
`ipcmk --shmem {{segment_size_in_bytes}} {{octal_permissions}}`
|
||||
`ipcmk {{[-M|--shmem]}} {{segment_size_in_bytes}} {{octal_permissions}}`
|
||||
|
||||
@@ -31,7 +31,7 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
- Retrieve an MX record of a domain:
|
||||
|
||||
`resolvectl --legend={{no}} --type={{MX}} query {{domain}}`
|
||||
`resolvectl --legend {{no}} {{[-t|--type]}} {{MX}} query {{domain}}`
|
||||
|
||||
- Resolve an SRV record, for example _xmpp-server._tcp gmail.com:
|
||||
|
||||
|
||||
@@ -14,19 +14,19 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
- Print `uevents` sent out by the kernel:
|
||||
|
||||
`sudo udevadm monitor --kernel`
|
||||
`sudo udevadm monitor {{[-k|--kernel]}}`
|
||||
|
||||
- Print device events after being processed by `udev`:
|
||||
|
||||
`sudo udevadm monitor --udev`
|
||||
`sudo udevadm monitor {{[-u|--udev]}}`
|
||||
|
||||
- List attributes of device `/dev/sda`:
|
||||
|
||||
`sudo udevadm info --attribute-walk {{/dev/sda}}`
|
||||
`sudo udevadm info {{[-a|--attribute-walk]}} {{/dev/sda}}`
|
||||
|
||||
- Reload all `udev` rules:
|
||||
|
||||
`sudo udevadm control --reload`
|
||||
`sudo udevadm control {{[-R|--reload]}}`
|
||||
|
||||
- Trigger all `udev` rules to run:
|
||||
|
||||
|
||||
29
tldr/linux/vlock
Normal file
29
tldr/linux/vlock
Normal file
@@ -0,0 +1,29 @@
|
||||
---
|
||||
syntax: markdown
|
||||
tags: [tldr, linux]
|
||||
source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# vlock
|
||||
|
||||
> Lock virtual console.
|
||||
> More information: <https://manned.org/vlock>.
|
||||
|
||||
- Lock current virtual console session:
|
||||
|
||||
`vlock`
|
||||
|
||||
- Lock current virtual console session via flag:
|
||||
|
||||
`vlock {{[-c|--current]}}`
|
||||
|
||||
- Lock all virtual console sessions:
|
||||
|
||||
`vlock {{[-a|--all]}}`
|
||||
|
||||
- Show help:
|
||||
|
||||
`vlock {{[-h|--help]}}`
|
||||
|
||||
- Show version:
|
||||
|
||||
`vlock {{[-v|--version]}}`
|
||||
Reference in New Issue
Block a user