mirror of
https://github.com/ivuorinen/cheatsheet-tldr.git
synced 2026-02-12 01:47:36 +00:00
Update cheatsheets
This commit is contained in:
29
tldr/linux/beet
Normal file
29
tldr/linux/beet
Normal file
@@ -0,0 +1,29 @@
|
||||
---
|
||||
syntax: markdown
|
||||
tags: [tldr, linux]
|
||||
source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# beet
|
||||
|
||||
> Manage the beets media library.
|
||||
> More information: <https://beets.readthedocs.io/en/stable/reference/cli.html>.
|
||||
|
||||
- Add music from a specific directory to the library, attempting to get correct tags for it from MusicBrainz:
|
||||
|
||||
`beet import {{path/to/directory}}`
|
||||
|
||||
- Add a single song to the library, attempting to get correct tags for it from MusicBrainz:
|
||||
|
||||
`beet import {{[-s|--singletons]}} {{path/to/file}}`
|
||||
|
||||
- Query library:
|
||||
|
||||
`beet list {{query}}`
|
||||
|
||||
- Show entire library statistics:
|
||||
|
||||
`beet stats`
|
||||
|
||||
- Show statistics for a specific query:
|
||||
|
||||
`beet stats {{query}}`
|
||||
@@ -10,7 +10,7 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
- Walk the SNMP tree of host with public string querying all OIDs under `.1.3.6`:
|
||||
|
||||
`braa public@{{ip}}:{{.1.3.6.*}}`
|
||||
`braa public@{{ip_address}}:{{.1.3.6.*}}`
|
||||
|
||||
- Query the whole subnet `ip_range` for `system.sysLocation.0`:
|
||||
|
||||
@@ -18,4 +18,4 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
- Attempt to set the value of `system.sysLocation.0` to a specific workgroup:
|
||||
|
||||
`braa private@{{ip}}:{{.1.3.6.1.2.1.1.6.0}}=s'{{workgroup}}'`
|
||||
`braa private@{{ip_address}}:{{.1.3.6.1.2.1.1.6.0}}=s'{{workgroup}}'`
|
||||
|
||||
@@ -14,7 +14,7 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
- Run Docker daemon and configure it to listen to specific sockets (UNIX and TCP):
|
||||
|
||||
`dockerd {{[-H|--host]}} unix://{{path/to/tmp.sock}} {{[-H|--host]}} tcp://{{ip}}`
|
||||
`dockerd {{[-H|--host]}} unix://{{path/to/tmp.sock}} {{[-H|--host]}} tcp://{{ip_address}}`
|
||||
|
||||
- Run with specific daemon PID file:
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
- Remove the specified IP from the jail service's ban list:
|
||||
|
||||
`fail2ban-client set {{jail}} unbanip {{ip}}`
|
||||
`fail2ban-client set {{jail}} unbanip {{ip_address}}`
|
||||
|
||||
- Verify fail2ban server is alive:
|
||||
|
||||
|
||||
@@ -35,8 +35,8 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
- Add/Delete an IP address to an interface:
|
||||
|
||||
`sudo ip {{[a|address]}} {{add|delete}} {{ip}}/{{mask}} dev {{ethX}}`
|
||||
`sudo ip {{[a|address]}} {{add|delete}} {{ip_address}}/{{mask}} dev {{ethX}}`
|
||||
|
||||
- Add a default route:
|
||||
|
||||
`sudo ip {{[r|route]}} {{[a|add]}} default via {{ip}} dev {{ethX}}`
|
||||
`sudo ip {{[r|route]}} {{[a|add]}} default via {{ip_address}} dev {{ethX}}`
|
||||
|
||||
@@ -22,4 +22,4 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
- Add a route to a specific routing table:
|
||||
|
||||
`sudo ip {{[r|route]}} {{[a|add]}} {{destination_ip}} dev {{ethX}} {{[t|table]}} {{ip}}`
|
||||
`sudo ip {{[r|route]}} {{[a|add]}} {{destination_ip}} dev {{ethX}} {{[t|table]}} {{ip_address}}`
|
||||
|
||||
@@ -20,11 +20,11 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
- Append rule to chain policy for IP:
|
||||
|
||||
`sudo iptables {{[-A|--append]}} {{chain}} {{[-s|--source]}} {{ip}} {{[-j|--jump]}} {{rule}}`
|
||||
`sudo iptables {{[-A|--append]}} {{chain}} {{[-s|--source]}} {{ip_address}} {{[-j|--jump]}} {{rule}}`
|
||||
|
||||
- Append rule to chain policy for IP considering protocol and port:
|
||||
|
||||
`sudo iptables {{[-A|--append]}} {{chain}} {{[-s|--source]}} {{ip}} {{[-p|--protocol]}} {{tcp|udp|icmp|...}} --dport {{port}} {{[-j|--jump]}} {{rule}}`
|
||||
`sudo iptables {{[-A|--append]}} {{chain}} {{[-s|--source]}} {{ip_address}} {{[-p|--protocol]}} {{tcp|udp|icmp|...}} --dport {{port}} {{[-j|--jump]}} {{rule}}`
|
||||
|
||||
- Add a NAT rule to translate all traffic from the `192.168.0.0/24` subnet to the host's public IP:
|
||||
|
||||
|
||||
@@ -5,25 +5,9 @@ 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>.
|
||||
> Manage Cloud-Init settings.
|
||||
> More information: <https://pve.proxmox.com/pve-docs/qm.1.html#cli_qm_cloudinit_dump>.
|
||||
|
||||
- Configure cloudinit settings for a specific user and set password for the user:
|
||||
- Generate a cloudinit file for a specific configuration type:
|
||||
|
||||
`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 `cloudinit` is run on a virtual machine:
|
||||
|
||||
`qm {{[clou|cloudinit]}} {{vm_id}} -pre {{script}}`
|
||||
`qm {{[clou|cloudinit]}} {{[d|dump]}} {{virtual_machine_id}} {{meta|network|user}}`
|
||||
|
||||
@@ -23,3 +23,15 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
- Import a VMDK/`.qcow2`/raw disk image using a specific storage name:
|
||||
|
||||
`qm {{[di|disk]}} {{[i|import]}} {{vm_id}} {{path/to/disk}} {{storage_name}} --format {{qcow2|raw|vmdk}}`
|
||||
|
||||
- Rescan all storages and update disk sizes and unused disk images:
|
||||
|
||||
`qm {{[di|disk]}} {{[resc|rescan]}}`
|
||||
|
||||
- Perform a dry-run of a rescan and do not write any changes to configurations:
|
||||
|
||||
`qm {{[di|disk]}} {{[resc|rescan]}} --dryrun`
|
||||
|
||||
- Specify a virtual machine by its ID:
|
||||
|
||||
`qm {{[di|disk]}} {{[resc|rescan]}} --vmid {{100}}`
|
||||
|
||||
@@ -16,6 +16,10 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
`qm {{[g|guest]}} {{[p|passwd]}} {{vm_id}} {{username}}`
|
||||
|
||||
- Set an already hashed password for a specific user in a virtual machine interactively:
|
||||
|
||||
`qm {{[g|guest]}} {{[p|passwd]}} {{vm_id}} {{username}} --crypted 1`
|
||||
|
||||
- Execute a specific QEMU Guest Agent command:
|
||||
|
||||
`qm {{[g|guest]}} {{[c|cmd]}} {{virtual_machine_id}} {{fsfreeze-freeze|fsfreeze-status|fsfreeze-thaw|fstrim|get-fsinfo|...}}`
|
||||
@@ -23,3 +27,15 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
- Execute a specific command via a guest agent:
|
||||
|
||||
`qm {{[g|guest]}} exec {{vm_id}} {{command}} {{argument1 argument2 ...}}`
|
||||
|
||||
- Execute a specific command via a guest agent asynchronously:
|
||||
|
||||
`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 {{[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 {{[g|guest]}} exec {{vm_id}} {{argument1 argument2 ...}} --pass-stdin 1`
|
||||
|
||||
@@ -10,19 +10,19 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
- Connect to a remote host:
|
||||
|
||||
`rpcclient {{[-U|--user]}} {{domain}}\{{username}}%{{password}} {{ip}}`
|
||||
`rpcclient {{[-U|--user]}} {{domain}}\{{username}}%{{password}} {{ip_address}}`
|
||||
|
||||
- Connect to a remote host on a domain without a password:
|
||||
|
||||
`rpcclient {{[-U|--user]}} {{username}} {{[-W|--workgroup]}} {{domain}} {{[-N|--no-pass]}} {{ip}}`
|
||||
`rpcclient {{[-U|--user]}} {{username}} {{[-W|--workgroup]}} {{domain}} {{[-N|--no-pass]}} {{ip_address}}`
|
||||
|
||||
- Connect to a remote host, passing the password hash:
|
||||
|
||||
`rpcclient {{[-U|--user]}} {{domain}}\{{username}} --pw-nt-hash {{ip}}`
|
||||
`rpcclient {{[-U|--user]}} {{domain}}\{{username}} --pw-nt-hash {{ip_address}}`
|
||||
|
||||
- Execute shell commands on a remote host:
|
||||
|
||||
`rpcclient {{[-U|--user]}} {{domain}}\{{username}}%{{password}} {{[-c|--command]}} {{semicolon_separated_commands}} {{ip}}`
|
||||
`rpcclient {{[-U|--user]}} {{domain}}\{{username}}%{{password}} {{[-c|--command]}} {{semicolon_separated_commands}} {{ip_address}}`
|
||||
|
||||
- Display domain users:
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
# startx
|
||||
|
||||
> A front-end to `xinit` that provides a nice user interface for running a single session of the X Window System.
|
||||
> More information: <https://x.org/releases/X11R7.5/doc/man/man1/startx.1.html>.
|
||||
> More information: <https://www.x.org/releases/X11R7.6/doc/man/man1/startx.1.xhtml>.
|
||||
|
||||
- Start an X session:
|
||||
|
||||
|
||||
@@ -31,4 +31,4 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
- Connect to a Tor proxy running on a specific address and port:
|
||||
|
||||
`torsocks {{[-a|--address]}} {{ip}} {{[-P|--port]}} {{port}} {{command}}`
|
||||
`torsocks {{[-a|--address]}} {{ip_address}} {{[-P|--port]}} {{port}} {{command}}`
|
||||
|
||||
@@ -9,10 +9,10 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
> See also: `xdg-user-dir`.
|
||||
> More information: <https://manned.org/xdg-user-dirs-update>.
|
||||
|
||||
- Change XDG's DESKTOP directory to the specified directory (must be absolute):
|
||||
- Change XDG's DESKTOP directory to the specified directory:
|
||||
|
||||
`xdg-user-dirs-update --set DESKTOP "{{path/to/directory}}"`
|
||||
`xdg-user-dirs-update --set DESKTOP "/{{path/to/directory}}"`
|
||||
|
||||
- Write the result to the specified dry-run-file instead of the `user-dirs.dirs` file:
|
||||
|
||||
`xdg-user-dirs-update --dummy-output "{{path/to/dry_run_file}}" --set {{xdg_user_directory}} "{{path/to/directory}}"`
|
||||
`xdg-user-dirs-update --dummy-output "{{path/to/dry_run_file}}" --set {{xdg_user_directory}} "/{{path/to/directory}}"`
|
||||
|
||||
Reference in New Issue
Block a user