mirror of
https://github.com/ivuorinen/cheatsheet-tldr.git
synced 2026-02-17 22:49:45 +00:00
Update cheatsheets
This commit is contained in:
41
tldr/linux/fs_cli
Normal file
41
tldr/linux/fs_cli
Normal file
@@ -0,0 +1,41 @@
|
||||
---
|
||||
syntax: markdown
|
||||
tags: [tldr, linux]
|
||||
source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# fs_cli
|
||||
|
||||
> Connect to and control a running FreeSWITCH server using the FreeSWITCH Command Line Interface (ESL client).
|
||||
> More information: <https://developer.signalwire.com/freeswitch/FreeSWITCH-Explained/Client-and-Developer-Interfaces/1048948/>.
|
||||
|
||||
- Connect to the local FreeSWITCH instance with an interactive session:
|
||||
|
||||
`fs_cli`
|
||||
|
||||
- Connect to a remote FreeSWITCH server:
|
||||
|
||||
`fs_cli {{[-H|--host]}} {{host}} {{[-P|--port]}} {{port}} {{[-p|--password]}} {{password}}`
|
||||
|
||||
- Execute a single FreeSWITCH command and exit:
|
||||
|
||||
`fs_cli {{[-x|--execute]}} "{{command}}"`
|
||||
|
||||
- Show FreeSWITCH system status:
|
||||
|
||||
`fs_cli {{[-x|--execute]}} "status"`
|
||||
|
||||
- Reload FreeSWITCH XML configuration:
|
||||
|
||||
`fs_cli {{[-x|--execute]}} "reloadxml"`
|
||||
|
||||
- Check if a module is loaded:
|
||||
|
||||
`fs_cli {{[-x|--execute]}} "module_exists {{module_name}}"`
|
||||
|
||||
- Show active calls:
|
||||
|
||||
`fs_cli {{[-x|--execute]}} "show calls"`
|
||||
|
||||
- Retry connection on failure:
|
||||
|
||||
`fs_cli {{[-r|--retry]}}`
|
||||
@@ -21,7 +21,7 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
`lid {{[-i|--ignore-case]}} {{token}}`
|
||||
|
||||
- Find tokens matching an extended regular expression:
|
||||
- Find tokens matching an extended `regex`:
|
||||
|
||||
`lid {{[-r|--regexp]}} "{{pattern}}"`
|
||||
|
||||
|
||||
@@ -27,3 +27,7 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
- Only detect hardware virtualization:
|
||||
|
||||
`systemd-detect-virt {{[-v|--vm]}}`
|
||||
|
||||
- Detect whether in a `chroot` environment:
|
||||
|
||||
`systemd-detect-virt {{[-r|--chroot]}}`
|
||||
|
||||
17
tldr/linux/virt-clone
Normal file
17
tldr/linux/virt-clone
Normal file
@@ -0,0 +1,17 @@
|
||||
---
|
||||
syntax: markdown
|
||||
tags: [tldr, linux]
|
||||
source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# virt-clone
|
||||
|
||||
> Clone a libvirt virtual machine.
|
||||
> More information: <https://manned.org/virt-clone>.
|
||||
|
||||
- Clone a virtual machine and automatically generate a new name, storage path, and MAC address:
|
||||
|
||||
`virt-clone {{[-o|--original]}} {{vm_name}} --auto-clone`
|
||||
|
||||
- Clone a virtual machine and specify the new name, storage path, and MAC address:
|
||||
|
||||
`virt-clone {{[-o|--original]}} {{vm_name}} {{[-n|--name]}} {{new_vm_name}} {{[-f|--file]}} {{path/to/new_storage}} {{[-m|--mac]}} {{ff:ff:ff:ff:ff:ff|RANDOM}}`
|
||||
29
tldr/linux/virt-install
Normal file
29
tldr/linux/virt-install
Normal file
@@ -0,0 +1,29 @@
|
||||
---
|
||||
syntax: markdown
|
||||
tags: [tldr, linux]
|
||||
source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# virt-install
|
||||
|
||||
> Create virtual machines with libvirt and begin OS installation.
|
||||
> More information: <https://manned.org/virt-install>.
|
||||
|
||||
- Create a virtual machine with 1 GB RAM and 12 GB storage and start a Debian installation:
|
||||
|
||||
`virt-install {{[-n|--name]}} {{vm_name}} --memory {{1024}} --disk path={{path/to/image.qcow2}},size={{12}} {{[-c|--cdrom]}} {{path/to/debian.iso}}`
|
||||
|
||||
- Create a x86-64, KVM-accelerated, UEFI-based virtual machine with the Q35 chipset, 4 GiB RAM, 16 GiB RAW storage, and start a Fedora installation:
|
||||
|
||||
`virt-install {{[-n|--name]}} {{vm_name}} --arch {{x86_64}} --virt-type {{kvm}} --machine {{q35}} --boot {{uefi}} --memory {{4096}} --disk path={{path/to/image.raw}},size={{16}} {{[-c|--cdrom]}} {{path/to/fedora.iso}}`
|
||||
|
||||
- Create a diskless live virtual machine without an emulated sound device or a USB controller. Don't start an installation and don't autoconnect to console but attach a cdrom to it (might be useful for when using a live CD like tails):
|
||||
|
||||
`virt-install {{[-n|--name]}} {{vm_name}} --memory {{512}} --disk {{none}} --controller {{type=usb,model=none}} --sound {{none}} --autoconsole {{none}} --install {{no_install=yes}} {{[-c|--cdrom]}} {{path/to/tails.iso}}`
|
||||
|
||||
- Create a virtual machine with 16 GiB RAM, 250 GiB storage, 8 cores with hyperthreading, a specific CPU topology, and a CPU model that shares most features with the host CPU:
|
||||
|
||||
`virt-install {{[-n|--name]}} {{vm_name}} --cpu {{host-model}},topology.sockets={{1}},topology.cores={{4}},topology.threads={{2}} --memory {{16384}} --disk path={{path/to/image.qcow2}},size={{250}} {{[-c|--cdrom]}} {{path/to/debian.iso}}`
|
||||
|
||||
- Create a virtual machine and kickstart an automated deployment based on Fedora 35 using only remote resources (no ISO required):
|
||||
|
||||
`virt-install {{[-n|--name]}} {{vm_name}} --memory {{2048}} --disk path={{path/to/image.qcow2}},size={{20}} {{[-l|--location]}} {{https://download.fedoraproject.org/pub/fedora/linux/releases/35/Everything/x86_64/os/}} {{[-x|--extra-args]}} "{{inst.ks=https://path/to/valid_kickstart.org}}"`
|
||||
25
tldr/linux/virt-qemu-run
Normal file
25
tldr/linux/virt-qemu-run
Normal file
@@ -0,0 +1,25 @@
|
||||
---
|
||||
syntax: markdown
|
||||
tags: [tldr, linux]
|
||||
source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# virt-qemu-run
|
||||
|
||||
> Experimental tool to run a QEMU Guest VM independent of `libvirtd`.
|
||||
> More information: <https://libvirt.org/manpages/virt-qemu-run.html>.
|
||||
|
||||
- Run a QEMU virtual machine:
|
||||
|
||||
`virt-qemu-run {{path/to/guest.xml}}`
|
||||
|
||||
- Run a QEMU virtual machine and store the state in a specific directory:
|
||||
|
||||
`virt-qemu-run {{[-r|--root]}} {{path/to/directory}} {{path/to/guest.xml}}`
|
||||
|
||||
- Run a QEMU virtual machine and display verbose information about the startup:
|
||||
|
||||
`virt-qemu-run {{[-v|--verbose]}} {{path/to/guest.xml}}`
|
||||
|
||||
- Display help:
|
||||
|
||||
`virt-qemu-run {{[-h|--help]}}`
|
||||
18
tldr/linux/virt-sparsify
Normal file
18
tldr/linux/virt-sparsify
Normal file
@@ -0,0 +1,18 @@
|
||||
---
|
||||
syntax: markdown
|
||||
tags: [tldr, linux]
|
||||
source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# virt-sparsify
|
||||
|
||||
> Make virtual machine drive images thin-provisioned.
|
||||
> Note: Use only for offline machines to avoid data corruption.
|
||||
> More information: <https://manned.org/virt-sparsify>.
|
||||
|
||||
- Create a sparsified compressed image without snapshots from an unsparsified one:
|
||||
|
||||
`virt-sparsify --compress {{path/to/image.qcow2}} {{path/to/image_new.qcow2}}`
|
||||
|
||||
- Sparsify an image in-place:
|
||||
|
||||
`virt-sparsify --in-place {{path/to/image.img}}`
|
||||
33
tldr/linux/virt-sysprep
Normal file
33
tldr/linux/virt-sysprep
Normal file
@@ -0,0 +1,33 @@
|
||||
---
|
||||
syntax: markdown
|
||||
tags: [tldr, linux]
|
||||
source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# virt-sysprep
|
||||
|
||||
> Reset, unconfigure, or customize a virtual machine image.
|
||||
> More information: <https://manned.org/virt-sysprep>.
|
||||
|
||||
- List all supported operations (enabled operations are indicated with asterisks):
|
||||
|
||||
`virt-sysprep --list-operations`
|
||||
|
||||
- Remove sensitive system data from a virtual machine image:
|
||||
|
||||
`sudo virt-sysprep {{[-a|--add]}} {{path/to/image.qcow2}}`
|
||||
|
||||
- Specify a virtual machine by its name and run all enabled operations but don't actually apply the changes:
|
||||
|
||||
`sudo virt-sysprep {{[-d|--domain]}} {{vm_name}} {{[-n|--dry-run]}}`
|
||||
|
||||
- Run only the specified operations:
|
||||
|
||||
`sudo virt-sysprep {{[-d|--domain]}} {{vm_name}} --operations {{operation1,operation2,...}}`
|
||||
|
||||
- Generate a new `/etc/machine-id` file and enable customizations to be able to change the host name to avoid network conflicts:
|
||||
|
||||
`sudo virt-sysprep {{[-d|--domain]}} {{vm_name}} --enable {{customizations}} --hostname {{host_name}} --operation {{machine-id}}`
|
||||
|
||||
- Display help:
|
||||
|
||||
`virt-sysprep {{[-he|--help]}}`
|
||||
Reference in New Issue
Block a user