mirror of
https://github.com/ivuorinen/cheatsheet-tldr.git
synced 2026-03-02 15:54:45 +00:00
Update cheatsheets
This commit is contained in:
@@ -28,9 +28,9 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
`sudo aide {{[-c|--config]}} {{path/to/config_file}}`
|
||||
|
||||
- Use REGEX to limit AIDE to a specific string:
|
||||
- Use `regex` to limit AIDE to a specific string:
|
||||
|
||||
`sudo aide {{[-l|--limit]}} {{REGEX}}`
|
||||
`sudo aide {{[-l|--limit]}} {{regex}}`
|
||||
|
||||
- Send reporter results to a URL:
|
||||
|
||||
|
||||
@@ -20,6 +20,6 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
`apt-file {{show|list}} {{package}}`
|
||||
|
||||
- Search for packages that match the `regular_expression`:
|
||||
- Search for packages that match the `regex`:
|
||||
|
||||
`apt-file {{search|find}} {{[-x|--regexp]}} {{regular_expression}}`
|
||||
`apt-file {{search|find}} {{[-x|--regexp]}} {{regex}}`
|
||||
|
||||
@@ -10,7 +10,7 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
- Search for packages from the official repositories and AUR:
|
||||
|
||||
`aura --aursync --both --search {{keyword|regular_expression}}`
|
||||
`aura --aursync --both --search {{keyword|regex}}`
|
||||
|
||||
- Install a package from the AUR:
|
||||
|
||||
|
||||
@@ -8,9 +8,9 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
> 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:
|
||||
- Display AUR packages that match a `regex`:
|
||||
|
||||
`auracle search '{{regular_expression}}'`
|
||||
`auracle search '{{regex}}'`
|
||||
|
||||
- Display information about one or more AUR packages:
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
`sudo btrfs {{[rest|restore]}} {{[-D|--dry-run]}} {{path/to/btrfs_device}} {{path/to/target_directory}}`
|
||||
|
||||
- Restore files matching a given regex ([c]ase-insensitive) files to be restored from a btrfs filesystem (all parent directories of target file(s) must match as well):
|
||||
- Restore files matching a given `regex` ([c]ase-insensitive) files to be restored from a btrfs filesystem (all parent directories of target file(s) must match as well):
|
||||
|
||||
`sudo btrfs {{[rest|restore]}} --path-regex {{regex}} -c {{path/to/btrfs_device}} {{path/to/target_directory}}`
|
||||
|
||||
|
||||
@@ -25,6 +25,6 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
`csplit {{path/to/file}} 5 {{[-f|--prefix]}} {{prefix}}`
|
||||
|
||||
- Split a file at a line matching a regular expression:
|
||||
- Split a file at a line matching a `regex`:
|
||||
|
||||
`csplit {{path/to/file}} /{{regular_expression}}/`
|
||||
`csplit {{path/to/file}} /{{regex}}/`
|
||||
|
||||
@@ -13,7 +13,7 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
`esearch -db pubmed -query "{{selective serotonin reuptake inhibitor}}"`
|
||||
|
||||
- Search the protein database using a query and regexp:
|
||||
- Search the protein database using a query and `regex`:
|
||||
|
||||
`esearch -db {{protein}} -query {{'Escherichia*'}}`
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
> Note: This page refers to the command from the `rename` Debian package.
|
||||
> More information: <https://manned.org/file-rename>.
|
||||
|
||||
- Rename files using a Perl Common Regular Expression (substitute 'foo' with 'bar' wherever found):
|
||||
- Rename files using a Perl Common `regex` (substitute 'foo' with 'bar' wherever found):
|
||||
|
||||
`rename {{'s/foo/bar/'}} {{*}}`
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
`guix package {{[-r|--remove]}} {{package}}`
|
||||
|
||||
- Search the package database for a regular expression:
|
||||
- Search the package database for a `regex`:
|
||||
|
||||
`guix package {{[-s|--search]}} "{{search_pattern}}"`
|
||||
|
||||
|
||||
41
tldr/linux/hddtemp
Normal file
41
tldr/linux/hddtemp
Normal file
@@ -0,0 +1,41 @@
|
||||
---
|
||||
syntax: markdown
|
||||
tags: [tldr, linux]
|
||||
source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# hddtemp
|
||||
|
||||
> Display temperature of HDD via S.M.A.R.T.
|
||||
> More information: <https://manned.org/hddtemp>.
|
||||
|
||||
- Display temperature of a specific drive:
|
||||
|
||||
`hddtemp {{type}}:{{/dev/sdX}}`
|
||||
|
||||
- Display temperature of a SATA drive assigned to `sda`:
|
||||
|
||||
`hddtemp SATA:/dev/sda`
|
||||
|
||||
- Log temperatures to syslog every `n` seconds:
|
||||
|
||||
`hddtemp {{[-S|--syslog]}} {{nseconds}} {{type}}:{{/dev/sdX}}`
|
||||
|
||||
- Print only numeric value of temperature without unit:
|
||||
|
||||
`hddtemp {{[-n|--numeric]}} {{type}}:{{/dev/sdX}}`
|
||||
|
||||
- Define the unit used to denote temperature:
|
||||
|
||||
`hddtemp {{[-u|--unit]}} {{C|F}} {{type}}:{{/dev/sdX}}`
|
||||
|
||||
- Wake ATA drive before attempting to read temperature:
|
||||
|
||||
`hddtemp {{[-w|--wake-up]}} {{type}}:{{/dev/sdX}}`
|
||||
|
||||
- Enter debug mode to show S.M.A.R.T. fields and their values:
|
||||
|
||||
`hddtemp {{[-D|--debug]}} {{type}}:{{/dev/sdX}}`
|
||||
|
||||
- Suppress compatibility check for drive types:
|
||||
|
||||
`hddtemp {{[-q|--quiet]}} {{type}}:{{/dev/sdX}}`
|
||||
@@ -20,9 +20,9 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
`inotifywait {{[-m|--monitor]}} {{[-r|--recursive]}} {{path/to/directory}}`
|
||||
|
||||
- Watch a directory for changes, excluding files, whose names match a regular expression:
|
||||
- Watch a directory for changes, excluding files, whose names match a `regex`:
|
||||
|
||||
`inotifywait {{[-m|--monitor]}} {{[-r|--recursive]}} --exclude "{{regular_expression}}" {{path/to/directory}}`
|
||||
`inotifywait {{[-m|--monitor]}} {{[-r|--recursive]}} --exclude "{{regex}}" {{path/to/directory}}`
|
||||
|
||||
- Watch a file for changes, exiting when no event occurs for 30 seconds:
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
`logread -l {{n}}`
|
||||
|
||||
- Filter messages by (Keyword/Regular Expression):
|
||||
- Filter messages by (Keyword/`regex`):
|
||||
|
||||
`logread -e {{pattern}}`
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
`mate-search-tool --start --named={{string}} --path={{path/to/directory}}`
|
||||
|
||||
- Search files with name matching a specific regular expression:
|
||||
- Search files with name matching a specific `regex`:
|
||||
|
||||
`mate-search-tool --start --regex={{string}} --path={{path/to/directory}}`
|
||||
|
||||
|
||||
@@ -24,6 +24,6 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
`mksquashfs {{path/to/file_or_directory1 path/to/file_or_directory2 ...}} {{filesystem.squashfs}} -wildcards -e "{{*.gz}}"`
|
||||
|
||||
- Create or append files and directories to a squashfs filesystem, [e]xcluding those matching a regular expression:
|
||||
- Create or append files and directories to a squashfs filesystem, [e]xcluding those matching a `regex`:
|
||||
|
||||
`mksquashfs {{path/to/file_or_directory1 path/to/file_or_directory2 ...}} {{filesystem.squashfs}} -regex -e "{{regular_expression}}"`
|
||||
`mksquashfs {{path/to/file_or_directory1 path/to/file_or_directory2 ...}} {{filesystem.squashfs}} -regex -e "{{regex}}"`
|
||||
|
||||
@@ -21,7 +21,7 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
`nala purge {{package}}`
|
||||
|
||||
- Search package names and descriptions using a word, regex (default) or glob:
|
||||
- Search package names and descriptions using a word, `regex` (default) or glob:
|
||||
|
||||
`nala search "{{pattern}}"`
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
`nl {{[-b|--body-numbering]}} {{a|n}} {{path/to/file}}`
|
||||
|
||||
- Number only the body lines that match a basic regular expression (BRE) [p]attern:
|
||||
- Number only the body lines that match a basic `regex` (BRE) [p]attern:
|
||||
|
||||
`nl {{[-b|--body-numbering]}} p'FooBar[0-9]' {{path/to/file}}`
|
||||
|
||||
|
||||
@@ -6,6 +6,7 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
# nmcli
|
||||
|
||||
> Manage the network configuration using NetworkManager.
|
||||
> See also: `nmtui`.
|
||||
> More information: <https://networkmanager.pages.freedesktop.org/NetworkManager/NetworkManager/nmcli.html>.
|
||||
|
||||
- View documentation for managing network interfaces and establishing new Wi-Fi connections:
|
||||
|
||||
@@ -23,3 +23,7 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
- Print the password and QR code for the current Wi-Fi network:
|
||||
|
||||
`nmcli {{[d|device]}} {{[w|wifi]}} {{[s|show-password]}}`
|
||||
|
||||
- Print detailed information about a device:
|
||||
|
||||
`nmcli {{[d|device]}} {{[sh|show]}} {{wlan0}}`
|
||||
|
||||
@@ -7,6 +7,7 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
> Text user interface for controlling NetworkManager.
|
||||
> Use `<ArrowKeys>` to navigate, `<Enter>` to select an option.
|
||||
> See also: `nmcli`.
|
||||
> More information: <https://networkmanager.pages.freedesktop.org/NetworkManager/NetworkManager/nmtui.html>.
|
||||
|
||||
- Open the user interface:
|
||||
|
||||
@@ -22,7 +22,7 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
`sudo pacman -Rs {{package}}`
|
||||
|
||||
- Search ([s]) the package database for a regular expression or keyword:
|
||||
- Search ([s]) the package database for a `regex` or keyword:
|
||||
|
||||
`pacman -Ss "{{search_pattern}}"`
|
||||
|
||||
|
||||
@@ -17,9 +17,9 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
`pacman -F {{filename}}`
|
||||
|
||||
- Find the package that owns a specific [F]ile, using a regular e[x]pression:
|
||||
- Find the package that owns a specific [F]ile, using a `rege[x]`:
|
||||
|
||||
`pacman -Fx '{{regular_expression}}'`
|
||||
`pacman -Fx '{{regex}}'`
|
||||
|
||||
- List only the package names:
|
||||
|
||||
|
||||
@@ -21,7 +21,7 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
`sudo pacman -Syu --noconfirm {{package}}`
|
||||
|
||||
- [s]earch the package database for a regular expression or keyword:
|
||||
- [s]earch the package database for a `regex` or keyword:
|
||||
|
||||
`pacman -Ss "{{search_pattern}}"`
|
||||
|
||||
|
||||
@@ -18,24 +18,24 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
- Access a specific container's shell:
|
||||
|
||||
`pct enter {{100}}`
|
||||
`pct {{[en|enter]}} {{100}}`
|
||||
|
||||
- Create a container from template:
|
||||
|
||||
`pct create {{100}} {{/var/lib/vz/template/cache/distro-name.tar.zst}} -hostname {{hostname}} -password {{password}} --rootfs {{local-lvm}} --on-boot`
|
||||
`pct {{[cr|create]}} {{100}} {{/var/lib/vz/template/cache/distro-name.tar.zst}} -hostname {{hostname}} -password {{password}} --rootfs {{local-lvm}} --on-boot`
|
||||
|
||||
- Resize the container's disk to 20G:
|
||||
|
||||
`pct resize {{100}} {{rootfs|mpX}} {{20G}}`
|
||||
`pct {{[resi|resize]]} {{100}} {{rootfs|mpX}} {{20G}}`
|
||||
|
||||
- Show the configuration of a container, specifying its ID:
|
||||
|
||||
`pct config {{100}}`
|
||||
`pct {{[conf|config]}} {{100}}`
|
||||
|
||||
- Snapshot a specific container with description:
|
||||
|
||||
`pct snapshot {{100}} {{my-snapshot}} --description {{My snapshot description}}`
|
||||
`pct {{[sn|snapshot]}} {{100}} {{my-snapshot}} --description {{My snapshot description}}`
|
||||
|
||||
- Destroy a container and remove all related resources:
|
||||
|
||||
`pct destroy {{100}} --purge`
|
||||
`pct {{[des|destroy]}} {{100}} --purge`
|
||||
|
||||
@@ -9,7 +9,7 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
> Note: This page refers to the command from the `perl-rename` Arch Linux package.
|
||||
> More information: <https://manned.org/rename>.
|
||||
|
||||
- Rename files using a Perl Common Regular Expression (substitute 'foo' with 'bar' wherever found):
|
||||
- Rename files using a Perl Common `regex` (substitute 'foo' with 'bar' wherever found):
|
||||
|
||||
`rename {{'s/foo/bar/'}} {{*}}`
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
> Note: This page refers to the command from the `prename` Fedora package.
|
||||
> More information: <https://manned.org/prename>.
|
||||
|
||||
- Rename files using a Perl Common Regular Expression (substitute 'foo' with 'bar' wherever found):
|
||||
- Rename files using a Perl Common `regex` (substitute 'foo' with 'bar' wherever found):
|
||||
|
||||
`rename {{'s/foo/bar/'}} {{*}}`
|
||||
|
||||
|
||||
@@ -15,11 +15,11 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
- 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 create {{100}} -ide0 {{local-lvm:4}} -net0 {{e1000}} -cdrom {{local:iso/proxmox-mailgateway_2.1.iso}}`
|
||||
`qm {{[cr|create]}} {{100}} -ide0 {{local-lvm:4}} -net0 {{e1000}} -cdrom {{local:iso/proxmox-mailgateway_2.1.iso}}`
|
||||
|
||||
- Show the configuration of a virtual machine, specifying its ID:
|
||||
|
||||
`qm config {{100}}`
|
||||
`qm {{[co|config]}} {{100}}`
|
||||
|
||||
- Start a specific virtual machine:
|
||||
|
||||
@@ -27,8 +27,8 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
- Send a shutdown request, then wait until the virtual machine is stopped:
|
||||
|
||||
`qm shutdown {{100}} && qm wait {{100}}`
|
||||
`qm {{[shu|shutdown]}} {{100}} && qm {{[w|wait]}} {{100}}`
|
||||
|
||||
- Destroy a virtual machine and remove all related resources:
|
||||
|
||||
`qm destroy {{100}} --purge`
|
||||
`qm {{[des|destroy]}} {{100}} --purge`
|
||||
|
||||
@@ -11,4 +11,4 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
- Clean up resources:
|
||||
|
||||
`qm cleanup {{vm_id}} {{clean-shutdown}} {{guest-requested}}`
|
||||
`qm {{[cl|cleanup]}} {{vm_id}} {{clean-shutdown}} {{guest-requested}}`
|
||||
|
||||
29
tldr/linux/qm-cloudinit
Normal file
29
tldr/linux/qm-cloudinit
Normal file
@@ -0,0 +1,29 @@
|
||||
---
|
||||
syntax: markdown
|
||||
tags: [tldr, linux]
|
||||
source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# qm cloudinit
|
||||
|
||||
> Configure cloudinit settings for virtual machines managed by Proxmox Virtual Environment (PVE).
|
||||
> More information: <https://pve.proxmox.com/pve-docs/qm.1.html>.
|
||||
|
||||
- Configure cloudinit settings for a specific user and set password for the user:
|
||||
|
||||
`qm {{[clou|cloudinit]}} {{vm_id}} -user={{user}} -password={{password}}`
|
||||
|
||||
- Configure cloudinit settings for a specific user and set password for the user with a specific SSH key:
|
||||
|
||||
`qm {{[clou|cloudinit]}} {{vm_id}} -user={{user}} -password={{password}} -sshkey={{ssh_key}}`
|
||||
|
||||
- Set the hostname for a specific virtual machine:
|
||||
|
||||
`qm {{[clou|cloudinit]}} {{vm_id}} -hostname={{hostname}}`
|
||||
|
||||
- Configure the network interface settings for a specific virtual machine:
|
||||
|
||||
`qm {{[clou|cloudinit]}} {{vm_id}} -ipconfig {{ipconfig}}`
|
||||
|
||||
- Configure a shell script to execute before `cloud-ini` is run on a virtual machine:
|
||||
|
||||
`qm {{[clou|cloudinit]}} {{vm_id}} -pre {{script}}`
|
||||
@@ -10,4 +10,4 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
- Generate a cloudinit file for a specific configuration type:
|
||||
|
||||
`qm cloudinit dump {{virtual_machine_id}} {{meta|network|user}}`
|
||||
`qm {{[clou|cloudinit]}} dump {{virtual_machine_id}} {{meta|network|user}}`
|
||||
|
||||
@@ -10,12 +10,12 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
- Display the virtual machine configuration:
|
||||
|
||||
`qm config {{vm_id}}`
|
||||
`qm {{[co|config]}} {{vm_id}}`
|
||||
|
||||
- Display the current configuration values instead of pending values for the virtual machine:
|
||||
|
||||
`qm config --current {{true}} {{vm_id}}`
|
||||
`qm {{[co|config]}} --current {{true}} {{vm_id}}`
|
||||
|
||||
- Fetch the configuration values from the given snapshot:
|
||||
|
||||
`qm config --snapshot {{snapshot_name}} {{vm_id}}`
|
||||
`qm {{[co|config]}} --snapshot {{snapshot_name}} {{vm_id}}`
|
||||
|
||||
@@ -10,20 +10,20 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
- Create a virtual machine:
|
||||
|
||||
`qm create {{100}}`
|
||||
`qm {{[cr|create]}} {{100}}`
|
||||
|
||||
- Automatically start the machine after creation:
|
||||
|
||||
`qm create {{100}} --start 1`
|
||||
`qm {{[cr|create]}} {{100}} --start 1`
|
||||
|
||||
- Specify the type of operating system on the machine:
|
||||
|
||||
`qm create {{100}} --ostype {{win10}}`
|
||||
`qm {{[cr|create]}} {{100}} --ostype {{win10}}`
|
||||
|
||||
- Replace an existing machine (requires archiving it):
|
||||
|
||||
`qm create {{100}} --archive {{path/to/backup_file.tar}} --force 1`
|
||||
`qm {{[cr|create]}} {{100}} --archive {{path/to/backup_file.tar}} --force 1`
|
||||
|
||||
- Specify a script that is executed automatically depending on the state of the virtual machine:
|
||||
|
||||
`qm create {{100}} --hookscript {{path/to/script.pl}}`
|
||||
`qm {{[cr|create]}} {{100}} --hookscript {{path/to/script.pl}}`
|
||||
|
||||
@@ -10,8 +10,8 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
- Delete a snapshot:
|
||||
|
||||
`qm delsnapshot {{vm_id}} {{snapshot_name}}`
|
||||
`qm {{[del|delsnapshot]}} {{vm_id}} {{snapshot_name}}`
|
||||
|
||||
- Delete a snapshot from a configuration file (even if removing the disk snapshot fails):
|
||||
|
||||
`qm delsnapshot {{vm_id}} {{snapshot_name}} --force 1`
|
||||
`qm {{[del|delsnapshot]}} {{vm_id}} {{snapshot_name}} --force 1`
|
||||
|
||||
@@ -10,16 +10,16 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
- Destroy a specific virtual machine:
|
||||
|
||||
`qm destroy {{vm_id}}`
|
||||
`qm {{[des|destroy]}} {{vm_id}}`
|
||||
|
||||
- Destroy all disks that are not explicitly referenced in a specific virtual machine's configuration:
|
||||
|
||||
`qm destroy {{vm_id}} --destroy-unreferenced-disks`
|
||||
`qm {{[des|destroy]}} {{vm_id}} --destroy-unreferenced-disks`
|
||||
|
||||
- Destroy a virtual machine and remove from all locations (inventory, backup jobs, high availability managers, etc.):
|
||||
|
||||
`qm destroy {{vm_id}} --purge`
|
||||
`qm {{[des|destroy]}} {{vm_id}} --purge`
|
||||
|
||||
- Destroy a specific virtual machine ignoring locks and forcing destroy:
|
||||
|
||||
`sudo qm destroy {{vm_id}} --skiplock`
|
||||
`sudo qm {{[des|destroy]}} {{vm_id}} --skiplock`
|
||||
|
||||
@@ -11,4 +11,4 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
- Import a VMDK/qcow2/raw disk image using a specific storage name:
|
||||
|
||||
`qm disk import {{vm_id}} {{path/to/disk}} {{storage_name}} --format {{qcow2|raw|vmdk}}`
|
||||
`qm {{[di|disk]}} import {{vm_id}} {{path/to/disk}} {{storage_name}} --format {{qcow2|raw|vmdk}}`
|
||||
|
||||
@@ -10,8 +10,8 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
- Move a virtual disk:
|
||||
|
||||
`qm disk move {{vm_id}} {{destination}} {{index}}`
|
||||
`qm {{[di|disk]}} move {{vm_id}} {{destination}} {{index}}`
|
||||
|
||||
- Delete the previous copy of the virtual disk:
|
||||
|
||||
`qm disk move -delete {{vm_id}} {{destination}} {{index}}`
|
||||
`qm {{[di|disk]}} move -delete {{vm_id}} {{destination}} {{index}}`
|
||||
|
||||
@@ -10,4 +10,4 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
- Add `n` gigabytes to a virtual disk:
|
||||
|
||||
`qm disk resize {{vm_id}} {{disk_name}} +{{n}}G`
|
||||
`qm {{[di|disk]}} resize {{vm_id}} {{disk_name}} +{{n}}G`
|
||||
|
||||
@@ -10,4 +10,4 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
- Execute a specific QEMU Guest Agent command:
|
||||
|
||||
`qm guest cmd {{virtual_machine_id}} {{fsfreeze-freeze|fsfreeze-status|fsfreeze-thaw|fstrim|get-fsinfo|...}}`
|
||||
`qm {{[g|guest]}} cmd {{virtual_machine_id}} {{fsfreeze-freeze|fsfreeze-status|fsfreeze-thaw|fstrim|get-fsinfo|...}}`
|
||||
|
||||
@@ -10,16 +10,16 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
- Execute a specific command via a guest agent:
|
||||
|
||||
`qm guest exec {{vm_id}} {{command}} {{argument1 argument2 ...}}`
|
||||
`qm {{[g|guest]}} exec {{vm_id}} {{command}} {{argument1 argument2 ...}}`
|
||||
|
||||
- Execute a specific command via a guest agent asynchronously:
|
||||
|
||||
`qm guest exec {{vm_id}} {{argument1 argument2 ...}} --synchronous 0`
|
||||
`qm {{[g|guest]}} exec {{vm_id}} {{argument1 argument2 ...}} --synchronous 0`
|
||||
|
||||
- Execute a specific command via a guest agent with a specified timeout of 10 seconds:
|
||||
|
||||
`qm guest exec {{vm_id}} {{argument1 argument2...}} --timeout {{10}}`
|
||||
`qm {{[g|guest]}} exec {{vm_id}} {{argument1 argument2...}} --timeout {{10}}`
|
||||
|
||||
- Execute a specific command via a guest agent and forward input from `stdin` until EOF to the guest agent:
|
||||
|
||||
`qm guest exec {{vm_id}} {{argument1 argument2 ...}} --pass-stdin 1`
|
||||
`qm {{[g|guest]}} exec {{vm_id}} {{argument1 argument2 ...}} --pass-stdin 1`
|
||||
|
||||
@@ -10,4 +10,4 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
- Print the status of a specific PID:
|
||||
|
||||
`qm guest exec-status {{vm_id}} {{pid}}`
|
||||
`qm {{[g|guest]}} exec-status {{vm_id}} {{pid}}`
|
||||
|
||||
@@ -10,8 +10,8 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
- Set a password for a specific user in a virtual machine interactively:
|
||||
|
||||
`qm guest passwd {{vm_id}} {{username}}`
|
||||
`qm {{[g|guest]}} passwd {{vm_id}} {{username}}`
|
||||
|
||||
- Set an already hashed password for a specific user in a virtual machine interactively:
|
||||
|
||||
`qm guest passwd {{vm_id}} {{username}} --crypted 1`
|
||||
`qm {{[g|guest]}} passwd {{vm_id}} {{username}} --crypted 1`
|
||||
|
||||
@@ -10,8 +10,8 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
- Display help for a specific command:
|
||||
|
||||
`qm help {{command}}`
|
||||
`qm {{[h|help]}} {{command}}`
|
||||
|
||||
- Display help for a specific command with detailed information:
|
||||
|
||||
`qm help {{command}} --verbose {{true|false}}`
|
||||
`qm {{[h|help]}} {{command}} --verbose {{true|false}}`
|
||||
|
||||
@@ -10,4 +10,4 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
- List all snapshots of a specific virtual machine:
|
||||
|
||||
`qm listsnapshot {{vm_id}}`
|
||||
`qm {{[lists|listsnapshot]}} {{vm_id}}`
|
||||
|
||||
@@ -11,20 +11,20 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
- Migrate a specific virtual machine:
|
||||
|
||||
`qm migrate {{vm_id}} {{target}}`
|
||||
`qm {{[mi|migrate]}} {{vm_id}} {{target}}`
|
||||
|
||||
- Override the current I/O bandwidth limit with 10 KiB/s:
|
||||
|
||||
`qm migrate {{vm_id}} {{target}} --bwlimit 10`
|
||||
`qm {{[mi|migrate]}} {{vm_id}} {{target}} --bwlimit 10`
|
||||
|
||||
- Allow migration of virtual machines using local devices (root only):
|
||||
|
||||
`qm migrate {{vm_id}} {{target}} --force true`
|
||||
`qm {{[mi|migrate]}} {{vm_id}} {{target}} --force true`
|
||||
|
||||
- Use online/live migration if a virtual machine is running:
|
||||
|
||||
`qm migrate {{vm_id}} {{target}} --online true`
|
||||
`qm {{[mi|migrate]}} {{vm_id}} {{target}} --online true`
|
||||
|
||||
- Enable live storage migration for local disks:
|
||||
|
||||
`qm migrate {{vm_id}} {{target}} --with-local-disks true`
|
||||
`qm {{[mi|migrate]}} {{vm_id}} {{target}} --with-local-disks true`
|
||||
|
||||
@@ -10,4 +10,4 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
- Enter the QEMU Monitor interface of a specific virtual machine:
|
||||
|
||||
`qm monitor {{vm_id}}`
|
||||
`qm {{[mo|monitor]}} {{vm_id}}`
|
||||
|
||||
@@ -11,4 +11,4 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
- Command used by `qmigrate` during data migration from a VM to another host:
|
||||
|
||||
`qm mtunnel`
|
||||
`qm {{[mt|mtunnel]}}`
|
||||
|
||||
@@ -10,4 +10,4 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
- Stop embedded nbd server:
|
||||
|
||||
`qm nbdstop {{VM_ID}}`
|
||||
`qm {{[n|nbdstop]}} {{VM_ID}}`
|
||||
|
||||
@@ -10,4 +10,4 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
- Get the virtual machine configuration of a specific virtual machine:
|
||||
|
||||
`qm pending {{vm_id}}`
|
||||
`qm {{[p|pending]}} {{vm_id}}`
|
||||
|
||||
@@ -10,8 +10,8 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
- Reboot a virtual machine:
|
||||
|
||||
`qm reboot {{vm_id}}`
|
||||
`qm {{[reb|reboot]}} {{vm_id}}`
|
||||
|
||||
- Reboot a virtual machine after wait for at most 10 seconds:
|
||||
|
||||
`qm reboot --timeout {{10}} {{vm_id}}`
|
||||
`qm {{[reb|reboot]}} --timeout {{10}} {{vm_id}}`
|
||||
|
||||
@@ -10,8 +10,8 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
- Resume a specific virtual machine:
|
||||
|
||||
`qm resume {{vm_id}}`
|
||||
`qm {{[resu|resume]}} {{vm_id}}`
|
||||
|
||||
- Resume a specific virtual machine ignoring locks (requires root):
|
||||
|
||||
`sudo qm resume {{vm_id}} --skiplock true`
|
||||
`sudo qm {{[resu|resume]}} {{vm_id}} --skiplock true`
|
||||
|
||||
@@ -10,4 +10,4 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
- Rollback the state of a specific VM to a specified snapshot:
|
||||
|
||||
`qm rollback {{vm_id}} {{snap_name}}`
|
||||
`qm {{[ro|rollback]}} {{vm_id}} {{snap_name}}`
|
||||
|
||||
@@ -10,8 +10,8 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
- Send the specified key event to a specific virtual machine:
|
||||
|
||||
`qm sendkey {{vm_id}} {{key}}`
|
||||
`qm {{[sen|sendkey]}} {{vm_id}} {{key}}`
|
||||
|
||||
- Allow root user to send key event and ignore locks:
|
||||
|
||||
`qm sendkey --skiplock {{true}} {{vm_id}} {{key}}`
|
||||
`qm {{[sen|sendkey]}} --skiplock {{true}} {{vm_id}} {{key}}`
|
||||
|
||||
@@ -10,12 +10,12 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
- Show command-line for a specific virtual machine:
|
||||
|
||||
`qm showcmd {{vm_id}}`
|
||||
`qm {{[sho|showcmd]}} {{vm_id}}`
|
||||
|
||||
- Put each option on a new line to enhance human readability:
|
||||
|
||||
`qm showcmd --pretty {{true}} {{vm_id}}`
|
||||
`qm {{[sho|showcmd]}} --pretty {{true}} {{vm_id}}`
|
||||
|
||||
- Fetch configuration values from a specific snapshot:
|
||||
|
||||
`qm showcmd --snapshot {{string}} {{vm_id}}`
|
||||
`qm {{[sho|showcmd]}} --snapshot {{string}} {{vm_id}}`
|
||||
|
||||
@@ -10,20 +10,20 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
- Shutdown a virtual machine:
|
||||
|
||||
`qm shutdown {{VM_ID}}`
|
||||
`qm {{[shu|shutdown]}} {{VM_ID}}`
|
||||
|
||||
- Shutdown a virtual machine after wait for at most 10 seconds:
|
||||
|
||||
`qm shutdown --timeout {{10}} {{VM_ID}}`
|
||||
`qm {{[shu|shutdown]}} --timeout {{10}} {{VM_ID}}`
|
||||
|
||||
- Shutdown a virtual machine and do not deactivate storage volumes:
|
||||
|
||||
`qm shutdown --keepActive {{true}} {{VM_ID}}`
|
||||
`qm {{[shu|shutdown]}} --keepActive {{true}} {{VM_ID}}`
|
||||
|
||||
- Shutdown a virtual machine and skip lock (only root can use this option):
|
||||
|
||||
`qm shutdown --skiplock {{true}} {{VM_ID}}`
|
||||
`qm {{[shu|shutdown]}} --skiplock {{true}} {{VM_ID}}`
|
||||
|
||||
- Stop and shutdown a virtual machine:
|
||||
|
||||
`qm shutdown --forceStop {{true}} {{VM_ID}}`
|
||||
`qm {{[shu|shutdown]}} --forceStop {{true}} {{VM_ID}}`
|
||||
|
||||
@@ -10,12 +10,12 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
- Create a snapshot of a specific virtual machine:
|
||||
|
||||
`qm snapshot {{vm_id}} {{snapshot_name}}`
|
||||
`qm {{[sn|snapshot]}} {{vm_id}} {{snapshot_name}}`
|
||||
|
||||
- Create a snapshot with a specific description:
|
||||
|
||||
`qm snapshot {{vm_id}} {{snapshot_name}} --description {{description}}`
|
||||
`qm {{[sn|snapshot]}} {{vm_id}} {{snapshot_name}} --description {{description}}`
|
||||
|
||||
- Create a snapshot including the vmstate:
|
||||
|
||||
`qm snapshot {{vm_id}} {{snapshot_name}} --description {{description}} --vmstate 1`
|
||||
`qm {{[sn|snapshot]}} {{vm_id}} {{snapshot_name}} --description {{description}} --vmstate 1`
|
||||
|
||||
@@ -10,8 +10,8 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
- Display the status of a specific virtual machine:
|
||||
|
||||
`qm status {{vm_id}}`
|
||||
`qm {{[stat|status]}} {{vm_id}}`
|
||||
|
||||
- Display detailed status of a specific virtual machine:
|
||||
|
||||
`qm status --verbose {{true}} {{vm_id}}`
|
||||
`qm {{[stat|status]}} --verbose {{true}} {{vm_id}}`
|
||||
|
||||
@@ -11,12 +11,12 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
- Suspend a virtual machine by ID:
|
||||
|
||||
`qm suspend {{vm_id}} {{integer}}`
|
||||
`qm {{[su|suspend]}} {{vm_id}} {{integer}}`
|
||||
|
||||
- Skip the lock check when suspending the VM:
|
||||
|
||||
`qm suspend {{vm_id}} {{integer}} --skiplock`
|
||||
`qm {{[su|suspend]}} {{vm_id}} {{integer}} --skiplock`
|
||||
|
||||
- Skip the lock check for storage when suspending the VM:
|
||||
|
||||
`qm suspend {{vm_id}} {{integer}} --skiplockstorage`
|
||||
`qm {{[su|suspend]}} {{vm_id}} {{integer}} --skiplockstorage`
|
||||
|
||||
@@ -10,4 +10,4 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
- Create a template out of a specific virtual machine:
|
||||
|
||||
`qm template {{vm_id}}`
|
||||
`qm {{[tem|template]}} {{vm_id}}`
|
||||
|
||||
@@ -10,4 +10,4 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
- Unlock a specific virtual machine:
|
||||
|
||||
`qm unlock {{vm_id}}`
|
||||
`qm {{[u|unlock]}} {{vm_id}}`
|
||||
|
||||
@@ -10,4 +10,4 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
- Proxy a specific virtual machine:
|
||||
|
||||
`qm vncproxy {{vm_id}}`
|
||||
`qm {{[v|vncproxy]}} {{vm_id}}`
|
||||
|
||||
@@ -10,12 +10,12 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
- Wait until the virtual machine is stopped:
|
||||
|
||||
`qm wait {{vm_id}}`
|
||||
`qm {{[w|wait]}} {{vm_id}}`
|
||||
|
||||
- Wait until the virtual machine is stopped with a 10 second timeout:
|
||||
|
||||
`qm wait --timeout {{10}} {{vm_id}}`
|
||||
`qm {{[w|wait]}} --timeout {{10}} {{vm_id}}`
|
||||
|
||||
- Send a shutdown request, then wait until the virtual machine is stopped with a 10 second timeout:
|
||||
|
||||
`qm shutdown {{vm_id}} && qm wait --timeout {{10}} {{vm_id}}`
|
||||
`qm {{[shu|shutdown]}} {{vm_id}} && qm {{[w|wait]}} --timeout {{10}} {{vm_id}}`
|
||||
|
||||
@@ -12,7 +12,7 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
`rnm -ss {{old}} -rs {{new}} {{path/to/directory}}`
|
||||
|
||||
- Use a fixed (literal) search and replace string instead of regex:
|
||||
- Use a fixed (literal) search and replace string instead of `regex`:
|
||||
|
||||
`rnm -ssf {{old}} -rs {{new}} {{path/to/files}}`
|
||||
|
||||
|
||||
@@ -9,15 +9,15 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
> See also: `awk`, `ed`.
|
||||
> More information: <https://www.gnu.org/software/sed/manual/sed.html>.
|
||||
|
||||
- Replace `apple` with `mango` on all lines using basic regex, print to `stdout`:
|
||||
- Replace `apple` with `mango` on all lines using basic `regex`, print to `stdout`:
|
||||
|
||||
`{{command}} | sed 's/apple/mango/g'`
|
||||
|
||||
- Replace `apple` with `APPLE` on all lines using extended regex, print to `stdout`:
|
||||
- Replace `apple` with `APPLE` on all lines using extended `regex`, print to `stdout`:
|
||||
|
||||
`{{command}} | sed {{[-E|--regexp-extended]}} 's/(apple)/\U\1/g'`
|
||||
|
||||
- Use basic regex to replace `apple` with `mango` and `orange` with `lime` in-place in a file (overwriting original file):
|
||||
- Use basic `regex` to replace `apple` with `mango` and `orange` with `lime` in-place in a file (overwriting original file):
|
||||
|
||||
`sed {{[-i|--in-place]}} -e 's/apple/mango/g' -e 's/orange/lime/g' {{path/to/file}}`
|
||||
|
||||
|
||||
@@ -17,11 +17,11 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
`sudo semanage fcontext {{[-l|--list]}} {{[-C|--locallist]}} {{[-n|--noheading]}}`
|
||||
|
||||
- Add a user-defined rule that labels any path which matches a PCRE regex:
|
||||
- Add a user-defined rule that labels any path which matches a PCRE `regex`:
|
||||
|
||||
`sudo semanage fcontext {{[-a|--add]}} {{[-t|--type]}} {{samba_share_t}} {{'/mnt/share(/.*)?'}}`
|
||||
|
||||
- Delete a user-defined rule using its PCRE regex:
|
||||
- Delete a user-defined rule using its PCRE `regex`:
|
||||
|
||||
`sudo semanage fcontext {{[-d|--delete]}} {{'/mnt/share(/.*)?'}}`
|
||||
|
||||
|
||||
@@ -24,6 +24,6 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
`zstdcat {{archive.tar.zst}} | sqfstar {{filesystem.squashfs}} "{{*.gz}}"`
|
||||
|
||||
- Create a squashfs filesystem from a tar archive compressed with `lz4`, excluding files matching a regular expression:
|
||||
- Create a squashfs filesystem from a tar archive compressed with `lz4`, excluding files matching a `regex`:
|
||||
|
||||
`lz4cat {{archive.tar.lz4}} | sqfstar {{filesystem.squashfs}} -regex "{{regular_expression}}"`
|
||||
`lz4cat {{archive.tar.lz4}} | sqfstar {{filesystem.squashfs}} -regex "{{regex}}"`
|
||||
|
||||
@@ -20,7 +20,7 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
`whatis --wildcard {{net*}}`
|
||||
|
||||
- Search man page descriptions with a regular expression:
|
||||
- Search man page descriptions with a `regex`:
|
||||
|
||||
`whatis --regex '{{wish[0-9]\.[0-9]}}'`
|
||||
|
||||
|
||||
@@ -9,9 +9,9 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
> See also: `xbps`.
|
||||
> More information: <https://manned.org/xbps-query.1>.
|
||||
|
||||
- Search for a package in remote repositories using a regular expression or a keyword (if `--regex` is omitted):
|
||||
- Search for a package in remote repositories using a `regex` or a keyword (if `--regex` is omitted):
|
||||
|
||||
`xbps-query {{[-s|--search]}} {{regular_expression|keyword}} --repository --regex`
|
||||
`xbps-query {{[-s|--search]}} {{regex|keyword}} --repository --regex`
|
||||
|
||||
- Show information about an installed package:
|
||||
|
||||
|
||||
Reference in New Issue
Block a user