mirror of
https://github.com/ivuorinen/cheatsheet-tldr.git
synced 2026-02-18 08:49:50 +00:00
Update cheatsheets
This commit is contained in:
@@ -6,6 +6,7 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
# virt-install
|
||||
|
||||
> Create virtual machines with libvirt and begin OS installation.
|
||||
> Note: You may need to pass `--connect URI` to the commands or set up the URI in `$XDG_CONFIG_HOME/libvirt/libvirt.conf`.
|
||||
> More information: <https://manned.org/virt-install>.
|
||||
|
||||
- Create a virtual machine with 1 GB RAM and 12 GB storage and start a Debian installation:
|
||||
@@ -24,6 +25,6 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
`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):
|
||||
- Create a virtual machine and kickstart an automated deployment based on Fedora 43 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}}"`
|
||||
`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/43/Everything/x86_64/os/}} {{[-x|--extra-args]}} "{{inst.ks=https://example.com/path/to/kickstart.ks}}"`
|
||||
|
||||
@@ -6,13 +6,19 @@ 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>.
|
||||
> This command can be used on a virtual machine or directly on a virtual machine disk image.
|
||||
> Note: You may need to pass `--connect URI` to the commands or set up the URI in `$XDG_CONFIG_HOME/libvirt/libvirt.conf`.
|
||||
> More information: <https://libguestfs.org/virt-sysprep.1.html>.
|
||||
|
||||
- List all supported operations (enabled operations are indicated with asterisks):
|
||||
- List all supported operations (default enabled operations are indicated with asterisks):
|
||||
|
||||
`virt-sysprep --list-operations`
|
||||
|
||||
- Remove sensitive system data from a virtual machine image:
|
||||
- Run only the specified operations:
|
||||
|
||||
`sudo virt-sysprep {{[-d|--domain]}} {{vm_name}} --operations {{operation1,operation2,...}}`
|
||||
|
||||
- Remove sensitive system data from a virtual machine image (operations marked as default):
|
||||
|
||||
`sudo virt-sysprep {{[-a|--add]}} {{path/to/image.qcow2}}`
|
||||
|
||||
@@ -20,14 +26,18 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
`sudo virt-sysprep {{[-d|--domain]}} {{vm_name}} {{[-n|--dry-run]}}`
|
||||
|
||||
- Run only the specified operations:
|
||||
- Reset NetworkManager network configurations, persistent MAC mappings, and the hostname to avoid network conflicts:
|
||||
|
||||
`sudo virt-sysprep {{[-d|--domain]}} {{vm_name}} --operations {{operation1,operation2,...}}`
|
||||
`sudo virt-sysprep {{[-d|--domain]}} {{vm_name}} --operations machine-id,net-hwaddr,net-hostname,net-nmconn,customize --hostname {{new_hostname}}`
|
||||
|
||||
- Generate a new `/etc/machine-id` file and enable customizations to be able to change the host name to avoid network conflicts:
|
||||
- Set the root password for a disk image:
|
||||
|
||||
`sudo virt-sysprep {{[-d|--domain]}} {{vm_name}} --enable {{customizations}} --hostname {{host_name}} --operation {{machine-id}}`
|
||||
`sudo virt-sysprep {{[-a|--add]}} {{path/to/image.qcow2}} --operations customize --root-password password:{{new_password}}`
|
||||
|
||||
- Display help:
|
||||
- Inject a new user with a defined password and add them to the sudo group:
|
||||
|
||||
`virt-sysprep {{[-he|--help]}}`
|
||||
`sudo virt-sysprep {{[-a|--add]}} {{path/to/image.qcow2}} --run-command 'useradd -m {{username}} && echo {{username}}:{{password}} | chpasswd && usermod -aG sudo {{username}}'`
|
||||
|
||||
- Install specific package(s) on a disk image (use `--update` to upgrade all installed packages to latest):
|
||||
|
||||
`sudo virt-sysprep {{[-a|--add]}} {{path/to/image.qcow2}} --operations customize --network --install {{package_name1,package_name2,...}}`
|
||||
|
||||
34
tldr/linux/yad
Normal file
34
tldr/linux/yad
Normal file
@@ -0,0 +1,34 @@
|
||||
---
|
||||
syntax: markdown
|
||||
tags: [tldr, linux]
|
||||
source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# yad
|
||||
|
||||
> Display GTK+ dialogs from shell scripts.
|
||||
> See also: `zenity`.
|
||||
> More information: <https://manned.org/yad>.
|
||||
|
||||
- Display the contents of a file in a text information dialog:
|
||||
|
||||
`yad --text-info --filename {{path/to/file}}`
|
||||
|
||||
- Open a text entry dialog and return the input to `stdout`:
|
||||
|
||||
`yad --entry --text "{{message}}"`
|
||||
|
||||
- Open a file picker with a specific title:
|
||||
|
||||
`yad --file --title "{{title_message}}"`
|
||||
|
||||
- Open a date picker dialog with a specific title:
|
||||
|
||||
`yad --calendar --title "{{title_message}}"`
|
||||
|
||||
- Display a list dialog with multiple columns and data:
|
||||
|
||||
`yad --list --column "{{col1}}" --column "{{col2}}" {{col1_row1 col2_row1 col1_row2 col2_row2 ...}}`
|
||||
|
||||
- Open a pulsating progress bar that automatically closes at 100%:
|
||||
|
||||
`{{command}} | yad --progress --pulsate --auto-close --text "{{message}}"`
|
||||
Reference in New Issue
Block a user