diff --git a/tldr/codex b/tldr/codex index 359198fc..ad58fdc3 100644 --- a/tldr/codex +++ b/tldr/codex @@ -29,7 +29,7 @@ source: https://github.com/tldr-pages/tldr.git `codex --full-context "{{your prompt}}"` -- Show the resource usage for the current session (run this command inside a session): +- [Interactive] Show the resource usage for the current session: `/cost` diff --git a/tldr/latexmk b/tldr/latexmk index 3d26e78f..b08970c5 100644 --- a/tldr/latexmk +++ b/tldr/latexmk @@ -29,10 +29,14 @@ source: https://github.com/tldr-pages/tldr.git `latexmk -f {{path/to/source.tex}}` -- Clean up temporary TEX files created for a specific TEX file: +- Clean up temporary files created for a specific TEX file: `latexmk -c {{path/to/source.tex}}` -- Clean up all temporary TEX files in the current directory: +- Clean up all temporary files in the current directory: `latexmk -c` + +- Clean up all files generated by LaTeX, leaving source files and non-generated assets: + +`latexmk -C` diff --git a/tldr/linux/virt-install b/tldr/linux/virt-install index 0915efc9..ae4e569d 100644 --- a/tldr/linux/virt-install +++ b/tldr/linux/virt-install @@ -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: . - 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}}"` diff --git a/tldr/linux/virt-sysprep b/tldr/linux/virt-sysprep index 46538d8f..5ae69c34 100644 --- a/tldr/linux/virt-sysprep +++ b/tldr/linux/virt-sysprep @@ -6,13 +6,19 @@ source: https://github.com/tldr-pages/tldr.git # virt-sysprep > Reset, unconfigure, or customize a virtual machine image. -> More information: . +> 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: . -- 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,...}}` diff --git a/tldr/linux/yad b/tldr/linux/yad new file mode 100644 index 00000000..8bda92e0 --- /dev/null +++ b/tldr/linux/yad @@ -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: . + +- 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}}"` diff --git a/tldr/mtr b/tldr/mtr index 79fc1d5a..68409ab1 100644 --- a/tldr/mtr +++ b/tldr/mtr @@ -20,7 +20,7 @@ source: https://github.com/tldr-pages/tldr.git `mtr {{[-w|--report-wide]}} {{example.com}}` -- Force IP IPv4 or IPV6: +- Force IPv4 or IPv6: `mtr -4 {{example.com}}`