Update cheatsheets

This commit is contained in:
ivuorinen
2025-03-08 00:14:59 +00:00
parent a812b3c467
commit f8bee5305f
111 changed files with 540 additions and 310 deletions

37
tldr/linux/apachectl Normal file
View File

@@ -0,0 +1,37 @@
---
syntax: markdown
tags: [tldr, linux]
source: https://github.com/tldr-pages/tldr.git
---
# apachectl
> Control an Apache HTTP server.
> More information: <https://manned.org/apachectl>.
- Start the server:
`sudo apachectl start`
- Restart the server:
`sudo apachectl restart`
- Stop the server:
`sudo apachectl stop`
- Test configuration file validity:
`apachectl configtest`
- Check server status (requires the lynx browser):
`apachectl status`
- Reload configuration without dropping connections:
`sudo apachectl graceful`
- Print full Apache configuration:
`apachectl -S`

View File

@@ -17,14 +17,14 @@ source: https://github.com/tldr-pages/tldr.git
`aur sync {{package}}`
- [l]ist packages available in your local repository:
- List packages available in your local repository:
`aur repo --list`
`aur repo {{[-l|--list]}}`
- [u]pgrade local repository packages:
- Upgrade local repository packages:
`aur sync --upgrades`
`aur sync {{[-u|--upgrades]}}`
- Install a package without viewing changes in Vim and do not confirm dependency installation:
`aur sync --noview --noconfirm {{package}}`
`aur sync --noview {{[-n|--noconfirm]}} {{package}}`

View File

@@ -10,16 +10,16 @@ source: https://github.com/tldr-pages/tldr.git
- List available cameras:
`cam --list`
`cam {{[-l|--list]}}`
- List controls of a camera:
`cam --camera {{camera_index}} --list-controls`
`cam {{[-c|--camera]}} {{camera_index}} --list-controls`
- Write frames to a folder:
`cam --camera {{camera_index}} --capture={{frames_to_capture}} --file`
`cam {{[-c|--camera]}} {{camera_index}} {{[-C|--capture=]}}{{frames_to_capture}} {{[-F|--file]}}`
- Display camera feed in a window:
`cam --camera {{camera_index}} --capture --sdl`
`cam {{[-c|--camera]}} {{camera_index}} {{[-C|--capture]}} {{[-S|--sdl]}}`

View File

@@ -30,8 +30,8 @@ source: https://github.com/tldr-pages/tldr.git
- Extract the last core dump of a program to a file:
`coredumpctl --output={{path/to/file}} dump {{program}}`
`coredumpctl --output {{path/to/file}} dump {{program}}`
- Skip debuginfod and pagination prompts and then print the backtrace when using `gdb`:
`coredumpctl debug --debugger-arguments="-iex 'set debuginfod enabled on' -iex 'set pagination off' -ex bt"`
`coredumpctl debug --debugger-arguments "-iex 'set debuginfod enabled on' -iex 'set pagination off' -ex bt"`

View File

@@ -14,7 +14,7 @@ source: https://github.com/tldr-pages/tldr.git
- Display all filesystems and their disk usage in human-readable form:
`df {{-h|--human-readable}}`
`df {{[-h|--human-readable]}}`
- Display the filesystem and its disk usage containing the given file or directory:
@@ -22,12 +22,12 @@ source: https://github.com/tldr-pages/tldr.git
- Include statistics on the number of free inodes:
`df {{-i|--inodes}}`
`df {{[-i|--inodes]}}`
- Display filesystems but exclude the specified types:
`df {{-x|--exclude-type}} {{squashfs}} {{-x|--exclude-type}} {{tmpfs}}`
`df {{[-x|--exclude-type]}} {{squashfs}} {{[-x|--exclude-type]}} {{tmpfs}}`
- Display filesystem types:
`df {{-T|--print-type}}`
`df {{[-T|--print-type]}}`

View File

@@ -10,8 +10,8 @@ source: https://github.com/tldr-pages/tldr.git
- Release all address leases:
`sudo dhcpcd --release`
`sudo dhcpcd {{[-k|--release]}}`
- Request the DHCP server for new leases:
`sudo dhcpcd --rebind`
`sudo dhcpcd {{[-n|--rebind]}}`

View File

@@ -10,8 +10,8 @@ source: https://github.com/tldr-pages/tldr.git
- Display all extractable information contained in the ELF file:
`eu-readelf --all {{path/to/file}}`
`eu-readelf {{[-a|--all]}} {{path/to/file}}`
- Display the contents of all NOTE segments/sections, or of a particular segment/section:
`eu-readelf --notes[={{.note.ABI-tag}}] {{path/to/file}}`
`eu-readelf {{[-n--notes]}} {{.note.ABI-tag}} {{path/to/file}}`

View File

@@ -10,7 +10,7 @@ source: https://github.com/tldr-pages/tldr.git
- Preload a file into cache:
`fadvise {{-a|--advice}} willneed {{path/to/file}}`
`fadvise {{[-a|--advice]}} willneed {{path/to/file}}`
- Suggest dropping a file from cache:

View File

@@ -14,8 +14,8 @@ source: https://github.com/tldr-pages/tldr.git
- View network interface statistics since last boot:
`ifstat {{-a|--ignore}}`
`ifstat {{[-a|--ignore]}}`
- View error rate:
`ifstat {{-e|--errors}}`
`ifstat {{[-e|--errors]}}`

View File

@@ -14,28 +14,28 @@ source: https://github.com/tldr-pages/tldr.git
- Print a full description of CPU, memory, disk, network, and process information and filter sensitive information:
`inxi --expanded --filter`
`inxi {{[-ez|--expanded --filter]}}`
- Print a summary of CPU information:
`inxi --cpu`
`inxi {{[-C|--cpu]}}`
- Print a summary of graphics information:
`inxi --graphics`
`inxi {{[-G|--graphics]}}`
- Print a summary of system RAM:
`inxi --memory`
`inxi {{[-m|--memory]}}`
- Print a summary of system audio:
`inxi --audio`
`inxi {{[-A|--audio]}}`
- Print available sensor data:
`inxi --sensors`
`inxi {{[-s|--sensors]}}`
- Print information about the distribution's repositories:
`inxi --repos`
`inxi {{[-r|--repos]}}`

View File

@@ -11,32 +11,32 @@ source: https://github.com/tldr-pages/tldr.git
- List interfaces with detailed info:
`ip address`
`ip {{[a|address]}}`
- List interfaces with brief network layer info:
`ip -brief address`
`ip {{[-br a|-brief address]}}`
- List interfaces with brief link layer info:
`ip -brief link`
`ip {{[-br l|-brief link]}}`
- Display the routing table:
`ip route`
`ip {{[r|route]}}`
- Show neighbors (ARP table):
`ip neighbour`
`ip {{[n|neighbour]}}`
- Make an interface up/down:
`ip link set {{interface}} {{up|down}}`
`ip {{[l|link]}} set {{interface}} {{up|down}}`
- Add/Delete an IP address to an interface:
`ip addr add/del {{ip}}/{{mask}} dev {{interface}}`
`ip {{[a|address]}} add/del {{ip}}/{{mask}} dev {{interface}}`
- Add a default route:
`ip route add default via {{ip}} dev {{interface}}`
`ip {{[r|route]}} add default via {{ip}} dev {{interface}}`

View File

@@ -10,24 +10,24 @@ source: https://github.com/tldr-pages/tldr.git
- List network interfaces and their associated IP addresses:
`ip address`
`ip {{[a|address]}}`
- Filter to show only active network interfaces:
`ip address show up`
`ip {{[a|address]}} show up`
- Display information about a specific network interface:
`ip address show dev {{eth0}}`
`ip {{[a|address]}} show dev {{eth0}}`
- Add an IP address to a network interface:
`ip address add {{ip_address}} dev {{eth0}}`
`ip {{[a|address]}} add {{ip_address}} dev {{eth0}}`
- Remove an IP address from a network interface:
`ip address delete {{ip_address}} dev {{eth0}}`
`ip {{[a|address]}} delete {{ip_address}} dev {{eth0}}`
- Delete all IP addresses in a given scope from a network interface:
`ip address flush dev {{eth0}} scope {{global|host|link}}`
`ip {{[a|address]}} flush dev {{eth0}} scope {{global|host|link}}`

View File

@@ -10,24 +10,24 @@ source: https://github.com/tldr-pages/tldr.git
- Show information about all network interfaces:
`ip link`
`ip {{[l|link]}}`
- Show information about a specific network interface:
`ip link show {{ethN}}`
`ip {{[l|link]}} show {{ethN}}`
- Bring a network interface up or down:
`ip link set {{ethN}} {{up|down}}`
`ip {{[l|link]}} set {{ethN}} {{up|down}}`
- Give a meaningful name to a network interface:
`ip link set {{ethN}} alias "{{LAN Interface}}"`
`ip {{[l|link]}} set {{ethN}} alias "{{LAN Interface}}"`
- Change the MAC address of a network interface:
`ip link set {{ethN}} address {{ff:ff:ff:ff:ff:ff}}`
`ip {{[l|link]}} set {{ethN}} address {{ff:ff:ff:ff:ff:ff}}`
- Change the MTU size for a network interface to use jumbo frames:
`ip link set {{ethN}} mtu {{9000}}`
`ip {{[l|link]}} set {{ethN}} mtu {{9000}}`

View File

@@ -10,16 +10,16 @@ source: https://github.com/tldr-pages/tldr.git
- List multicast addresses and how many programs are subscribed to them:
`ip maddress`
`ip {{[m|maddress]}}`
- List device specific addresses:
`ip maddress show dev {{eth0}}`
`ip {{[m|maddress]}} show dev {{eth0}}`
- Join a multicast group statically:
`sudo ip maddress add {{33:33:00:00:00:02}} dev {{eth0}}`
`sudo ip {{[m|maddress]}} add {{33:33:00:00:00:02}} dev {{eth0}}`
- Leave a static multicast group:
`sudo ip maddress delete {{33:33:00:00:00:02}} dev {{eth0}}`
`sudo ip {{[m|maddress]}} delete {{33:33:00:00:00:02}} dev {{eth0}}`

View File

@@ -10,20 +10,20 @@ source: https://github.com/tldr-pages/tldr.git
- Display the neighbour/ARP table entries:
`ip neighbour`
`ip {{[n|neighbour]}}`
- Remove entries in the neighbour table on device `eth0`:
`sudo ip neighbour flush dev {{eth0}}`
`sudo ip {{[n|neighbour]}} flush dev {{eth0}}`
- Perform a neighbour lookup and return a neighbour entry:
`ip neighbour get {{lookup_ip}} dev {{eth0}}`
`ip {{[n|neighbour]}} get {{lookup_ip}} dev {{eth0}}`
- Add or delete an ARP entry for the neighbour IP address to `eth0`:
`sudo ip neighbour {{add|del}} {{ip_address}} lladdr {{mac_address}} dev {{eth0}} nud reachable`
`sudo ip {{[n|neighbour]}} {{add|del}} {{ip_address}} lladdr {{mac_address}} dev {{eth0}} nud reachable`
- Change or replace an ARP entry for the neighbour IP address to `eth0`:
`sudo ip neighbour {{change|replace}} {{ip_address}} lladdr {{new_mac_address}} dev {{eth0}}`
`sudo ip {{[n|neighbour]}} {{change|replace}} {{ip_address}} lladdr {{new_mac_address}} dev {{eth0}}`

View File

@@ -10,28 +10,28 @@ source: https://github.com/tldr-pages/tldr.git
- Display the routing table:
`ip route {{show|list}}`
`ip {{[r|route]}} {{show|list}}`
- Add a default route using gateway forwarding:
`sudo ip route add default via {{gateway_ip}}`
`sudo ip {{[r|route]}} add default via {{gateway_ip}}`
- Add a default route using `eth0`:
`sudo ip route add default dev {{eth0}}`
`sudo ip {{[r|route]}} add default dev {{eth0}}`
- Add a static route:
`sudo ip route add {{destination_ip}} via {{gateway_ip}} dev {{eth0}}`
`sudo ip {{[r|route]}} add {{destination_ip}} via {{gateway_ip}} dev {{eth0}}`
- Delete a static route:
`sudo ip route del {{destination_ip}} dev {{eth0}}`
`sudo ip {{[r|route]}} del {{destination_ip}} dev {{eth0}}`
- Change or replace a static route:
`sudo ip route {{change|replace}} {{destination_ip}} via {{gateway_ip}} dev {{eth0}}`
`sudo ip {{[r|route]}} {{change|replace}} {{destination_ip}} via {{gateway_ip}} dev {{eth0}}`
- Show which route will be used by the kernel to reach an IP address:
`ip route get {{destination_ip}}`
`ip {{[r|route]}} get {{destination_ip}}`

View File

@@ -10,24 +10,24 @@ source: https://github.com/tldr-pages/tldr.git
- Print route to a destination:
`ip route get {{1.1.1.1}}`
`ip {{[r|route]}} get {{1.1.1.1}}`
- Print route to a destination from a specific source address:
`ip route get {{destination}} from {{source}}`
`ip {{[r|route]}} get {{destination}} from {{source}}`
- Print route to a destination for packets arriving on a specific interface:
`ip route get {{destination}} iif {{eth0}}`
`ip {{[r|route]}} get {{destination}} iif {{eth0}}`
- Print route to a destination, forcing output through a specific interface:
`ip route get {{destination}} oif {{eth1}}`
`ip {{[r|route]}} get {{destination}} oif {{eth1}}`
- Print route to a destination with a specified Type of Service (ToS):
`ip route get {{destination}} tos {{0x10}}`
`ip {{[r|route]}} get {{destination}} tos {{0x10}}`
- Print route to a destination using a specific VRF (Virtual Routing and Forwarding) instance:
`ip route get {{destination}} vrf {{myvrf}}`
`ip {{[r|route]}} get {{destination}} vrf {{myvrf}}`

View File

@@ -10,32 +10,32 @@ source: https://github.com/tldr-pages/tldr.git
- Display the routing policy:
`ip rule {{show|list}}`
`ip {{[ru|rule]}} {{show|list}}`
- Add a new rule based on packet source addresses:
`sudo ip rule add from {{192.168.178.2/32}}`
`sudo ip {{[ru|rule]}} add from {{192.168.178.2/32}}`
- Add a new rule based on packet destination addresses:
`sudo ip rule add to {{192.168.178.2/32}}`
`sudo ip {{[ru|rule]}} add to {{192.168.178.2/32}}`
- Delete a rule based on packet source addresses:
`sudo ip rule delete from {{192.168.178.2/32}}`
`sudo ip {{[ru|rule]}} delete from {{192.168.178.2/32}}`
- Delete a rule based on packet destination addresses:
`sudo ip rule delete to {{192.168.178.2/32}}`
`sudo ip {{[ru|rule]}} delete to {{192.168.178.2/32}}`
- Flush all deleted rules:
`ip rule flush`
`ip {{[ru|rule]}} flush`
- Save all rules to a file:
`ip rule save > {{path/to/ip_rules.dat}}`
`ip {{[ru|rule]}} save > {{path/to/ip_rules.dat}}`
- Restore all rules from a file:
`ip rule restore < {{path/to/ip_rules.dat}}`
`ip {{[ru|rule]}} restore < {{path/to/ip_rules.dat}}`

33
tldr/linux/iwinfo Normal file
View File

@@ -0,0 +1,33 @@
---
syntax: markdown
tags: [tldr, linux]
source: https://github.com/tldr-pages/tldr.git
---
# iwinfo
> Retrieve information about wireless interfaces on OpenWrt.
> More information: <https://openwrt.org/docs/guide-developer/ubus/iwinfo>.
- List all available wireless interfaces:
`iwinfo`
- Display detailed information on a specific wireless interface:
`iwinfo {{interface}} info`
- Scan for nearby wireless networks visible to the interface:
`iwinfo {{interface}} scan`
- List connected devices:
`iwinfo {{interface}} assoclist`
- List channels supported by the interface:
`iwinfo {{interface}} freqlist`
- List available transmit power levels for the interface:
`iwinfo {{interface}} txpowerlist`

View File

@@ -8,21 +8,21 @@ source: https://github.com/tldr-pages/tldr.git
> Query the systemd journal.
> More information: <https://manned.org/journalctl>.
- Show all messages with priority level 3 (errors) from this [b]oot:
- Show all messages with priority level 3 (errors) from this boot:
`journalctl -b --priority=3`
`journalctl {{[-b|--boot]}} {{[-p|--priority]}} 3`
- Delete journal logs which are older than 2 days:
`journalctl --vacuum-time=2d`
`journalctl --vacuum-time 2d`
- Show only the last N li[n]es and [f]ollow new messages (like `tail -f` for traditional syslog):
- Show only the last N lines and follow new messages (like `tail -f` for traditional syslog):
`journalctl --lines {{N}} --follow`
`journalctl {{[-n|--lines]}} {{N}} {{[-f|--follow]}}`
- Show all messages by a specific [u]nit:
- Show all messages by a specific unit:
`journalctl --unit {{unit}}`
`journalctl {{[-u|--unit]}} {{unit}}`
- Show logs for a given unit since the last time it started:
@@ -30,7 +30,7 @@ source: https://github.com/tldr-pages/tldr.git
- Filter messages within a time range (either timestamp or placeholders like "yesterday"):
`journalctl --since {{now|today|yesterday|tomorrow}} --until "{{YYYY-MM-DD HH:MM:SS}}"`
`journalctl {{[-S|--since]}} {{now|today|yesterday|tomorrow}} {{[-U|--until]}} "{{YYYY-MM-DD HH:MM:SS}}"`
- Show all messages by a specific process:

View File

@@ -26,7 +26,7 @@ source: https://github.com/tldr-pages/tldr.git
- Resume compilation from a specific dependency:
`kdesrc-build --resume-from={{dependency_component}} {{component_name}}`
`kdesrc-build --resume-from {{dependency_component}} {{component_name}}`
- Run a component with a specified executable name:

View File

@@ -10,12 +10,12 @@ source: https://github.com/tldr-pages/tldr.git
- List all entries in the `Passwords` folder of `kdewallet`:
`kwallet-query {{kdewallet}} {{-l|--list-entries}}`
`kwallet-query {{kdewallet}} {{[-l|--list-entries]}}`
- List all entries in a specific folder:
`kwallet-query {{kdewallet}} {{-l|--list-entries}} {{-f|--folder}} {{folder_name}}`
`kwallet-query {{kdewallet}} {{[-l|--list-entries]}} {{[-f|--folder]}} {{folder_name}}`
- List all available folders:
`kwallet-query {{kdewallet}} {{-l|--list-entries}} {{-f|--folder}} ""`
`kwallet-query {{kdewallet}} {{[-l|--list-entries]}} {{[-f|--folder]}} ""`

View File

@@ -14,11 +14,11 @@ source: https://github.com/tldr-pages/tldr.git
- List all available locales:
`locale --all-locales`
`locale {{[-a|--all-locales]}}`
- Display all available locales and the associated metadata:
`locale --all-locales --verbose`
`locale {{[-a|--all-locales]}} {{[-v|--verbose]}}`
- Display the current date format:

View File

@@ -22,7 +22,7 @@ source: https://github.com/tldr-pages/tldr.git
- Print a specific property of a user:
`loginctl show-user {{username}} --property={{property_name}}`
`loginctl show-user {{username}} --property {{property_name}}`
- Execute a `loginctl` operation on a remote host:

View File

@@ -14,11 +14,11 @@ source: https://github.com/tldr-pages/tldr.git
- List all files kept open by a specific program:
`lsfd {{-Q|--filter}} 'PID == {{process_ID}}'`
`lsfd {{[-Q|--filter]}} 'PID == {{process_ID}}'`
- Check what program has a specific file open:
`lsfd {{-Q|--filter}} "NAME == '{{/path/to/file}}'"`
`lsfd {{[-Q|--filter]}} "NAME == '{{/path/to/file}}'"`
- List open IPv4 or IPv6 sockets:

13
tldr/linux/lxc-attach Normal file
View File

@@ -0,0 +1,13 @@
---
syntax: markdown
tags: [tldr, linux]
source: https://github.com/tldr-pages/tldr.git
---
# lxc-attach
> Attach to a container.
> More information: <https://linuxcontainers.org/lxc/getting-started/>.
- Attach to a container:
`sudo lxc-attach {{container_name}}`

View File

@@ -0,0 +1,17 @@
---
syntax: markdown
tags: [tldr, linux]
source: https://github.com/tldr-pages/tldr.git
---
# lxc-checkconfig
> Check a kernel for LXC support.
> More information: <https://linuxcontainers.org/lxc/getting-started/>.
- Check the current kernel for LXC support:
`lxc-checkconfig`
- Check any kernel for LXC support:
`CONFIG={{/path/to/configuration}} lxc-checkconfig`

13
tldr/linux/lxc-destroy Normal file
View File

@@ -0,0 +1,13 @@
---
syntax: markdown
tags: [tldr, linux]
source: https://github.com/tldr-pages/tldr.git
---
# lxc-destroy
> Delete a container.
> More information: <https://linuxcontainers.org/lxc/getting-started/>.
- Delete a container:
`sudo lxc-destroy {{container_name}}`

13
tldr/linux/lxc-info Normal file
View File

@@ -0,0 +1,13 @@
---
syntax: markdown
tags: [tldr, linux]
source: https://github.com/tldr-pages/tldr.git
---
# lxc-info
> Get info on a container.
> More information: <https://linuxcontainers.org/lxc/getting-started/>.
- Query information from a container:
`sudo lxc-info {{container_name}}`

View File

@@ -8,18 +8,22 @@ source: https://github.com/tldr-pages/tldr.git
> List Linux containers.
> More information: <https://linuxcontainers.org/lxc/manpages/man1/lxc-ls.1.html>.
- List all containers:
`sudo lxc-ls`
- List active containers (including frozen and running):
`lxc-ls --active`
`sudo lxc-ls --active`
- List only frozen containers:
`lxc-ls --frozen`
`sudo lxc-ls --frozen`
- List only stopped containers:
`lxc-ls --stopped`
`sudo lxc-ls --stopped`
- List containers in a fancy, column-based output:
`lxc-ls --fancy`
`sudo lxc-ls --fancy`

13
tldr/linux/lxc-start Normal file
View File

@@ -0,0 +1,13 @@
---
syntax: markdown
tags: [tldr, linux]
source: https://github.com/tldr-pages/tldr.git
---
# lxc-start
> Start a container.
> More information: <https://linuxcontainers.org/lxc/getting-started/>.
- Start a container:
`sudo lxc-start {{container_name}}`

13
tldr/linux/lxc-stop Normal file
View File

@@ -0,0 +1,13 @@
---
syntax: markdown
tags: [tldr, linux]
source: https://github.com/tldr-pages/tldr.git
---
# lxc-stop
> Stop a container.
> More information: <https://linuxcontainers.org/lxc/getting-started/>.
- Stop a container:
`sudo lxc-stop {{container_name}}`

View File

@@ -15,11 +15,11 @@ source: https://github.com/tldr-pages/tldr.git
- Make a package and install its dependencies:
`makepkg --syncdeps`
`makepkg {{[-s|--syncdeps]}}`
- Make a package, install its dependencies then install it to the system:
`makepkg --syncdeps --install`
`makepkg {{[-s|--syncdeps]}} {{[-i|--install]}}`
- Make a package, but skip checking the source's hashes:
@@ -27,7 +27,7 @@ source: https://github.com/tldr-pages/tldr.git
- Clean up work directories after a successful build:
`makepkg --clean`
`makepkg {{[-c|--clean]}}`
- Verify the hashes of the sources:

View File

@@ -6,7 +6,7 @@ source: https://github.com/tldr-pages/tldr.git
# mkfs
> Build a Linux filesystem on a hard disk partition.
> This command is deprecated in favor of filesystem specific mkfs.<type> utils.
> This command is deprecated in favor of filesystem specific mkfs.type utils.
> More information: <https://manned.org/mkfs>.
- Build a Linux ext2 filesystem on a partition:

View File

@@ -14,4 +14,4 @@ source: https://github.com/tldr-pages/tldr.git
- Create a `bcachefs` filesystem with a volume label:
`sudo mkfs.bcachefs {{-L|--fs_label}} {{volume_label}} {{/dev/sdX1}}`
`sudo mkfs.bcachefs {{[-L|--fs_label]}} {{volume_label}} {{/dev/sdX1}}`

33
tldr/linux/netplan Normal file
View File

@@ -0,0 +1,33 @@
---
syntax: markdown
tags: [tldr, linux]
source: https://github.com/tldr-pages/tldr.git
---
# netplan
> Network configuration utility using YAML.
> More information: <https://netplan.io/>.
- Apply a network configuration and make it persistent:
`sudo netplan apply`
- Generate backend configuration files:
`sudo netplan generate`
- Configure a network interface to use DHCP:
`sudo netplan set ethernets.{{interface_name}}.dhcp4=true`
- Try configuration changes without applying them permanently:
`sudo netplan try --timeout={{seconds}}`
- Return to previous working configuration after failed apply:
`sudo netplan --debug apply`
- Display the current netplan configuration status:
`netplan status`

View File

@@ -14,15 +14,15 @@ source: https://github.com/tldr-pages/tldr.git
- Print what packages depend on a specific package:
`pactree --reverse {{package}}`
`pactree {{[-r|--reverse]}} {{package}}`
- Dump dependencies one per line, skipping duplicates:
`pactree --unique {{package}}`
`pactree {{[-u|--unique]}} {{package}}`
- Include optional dependencies of a specific package and colorize the output:
`pactree --optional --color {{package}}`
`pactree {{[-co|--color --optional]}} {{package}}`
- Display help:

View File

@@ -5,8 +5,8 @@ source: https://github.com/tldr-pages/tldr.git
---
# pihole
> Terminal interface for the Pi-hole ad-blocking DNS server.
> More information: <https://docs.pi-hole.net/core/pihole-command/>.
> Manage the Pi-hole ad-blocking DNS server.
> More information: <https://docs.pi-hole.net/main/pihole-command>.
- Check the Pi-hole daemon's status:
@@ -14,28 +14,28 @@ source: https://github.com/tldr-pages/tldr.git
- Update Pi-hole and Gravity:
`pihole -up`
- Monitor detailed system status:
`pihole chronometer`
`pihole {{[-up|updatePihole]}}`
- Start or stop the daemon:
`pihole {{enable|disable}}`
- Restart the daemon (not the server itself):
- Update the lists and flush the cache without restarting the DNS server:
`pihole restartdns`
`pihole reloaddns`
- Whitelist or blacklist a domain:
- Update the list of ad-serving domains:
`pihole {{whitelist|blacklist}} {{example.com}}`
`pihole {{[-g|updateGravity]}}`
- Allow or deny the specified domain:
`pihole {{allowlist|denylist}} {{example.com}}`
- Search the lists for a domain:
`pihole query {{example.com}}`
`pihole {{[-q|query]}} {{example.com}}`
- Open a real-time log of connections:
`pihole tail`
`pihole {{[-t|tail]}}`

View File

@@ -15,7 +15,7 @@ source: https://github.com/tldr-pages/tldr.git
- Clone a package repository over HTTPS:
`pkgctl repo clone --protocol=https {{pkgname}}`
`pkgctl repo clone --protocol https {{pkgname}}`
- Create a new GitLab package repository and clone it after creation (requires valid GitLab API authentication):

View File

@@ -16,9 +16,9 @@ source: https://github.com/tldr-pages/tldr.git
`plasmashell --replace & disown`
- Display [h]elp on command-line options:
- Display help on command-line options:
`plasmashell --help`
`plasmashell {{[-h|--help]}}`
- Display help, including Qt options:

View File

@@ -14,4 +14,4 @@ source: https://github.com/tldr-pages/tldr.git
- Print Proxmox subpackage versions:
`pveversion {{-v|--verbose}}`
`pveversion {{[-v|--verbose]}}`

View File

@@ -10,7 +10,7 @@ source: https://github.com/tldr-pages/tldr.git
- List all audio output and input ports with their IDs:
`pw-link --output --input --ids`
`pw-link {{[-oiI|--output --input --ids]}}`
- Create a link between an output and an input port:
@@ -18,12 +18,12 @@ source: https://github.com/tldr-pages/tldr.git
- Disconnect two ports:
`pw-link --disconnect {{output_port_name}} {{input_port_name}}`
`pw-link {{[-d|--disconnect]}} {{output_port_name}} {{input_port_name}}`
- List all links with their IDs:
`pw-link --links --ids`
`pw-link {{[-lI|--links --ids]}}`
- Display help:
`pw-link -h`
`pw-link {{[-h|--help]}}`

View File

@@ -14,11 +14,11 @@ source: https://github.com/tldr-pages/tldr.git
- Add all package binaries in the current directory and remove the old database file:
`repo-add --remove {{path/to/database.db.tar.gz}} {{*.pkg.tar.zst}}`
`repo-add {{[-R|--remove]}} {{path/to/database.db.tar.gz}} {{*.pkg.tar.zst}}`
- Add all package binaries in the current directory in silent mode except for warning and error messages:
`repo-add --quiet {{path/to/database.db.tar.gz}} {{*.pkg.tar.zst}}`
`repo-add {{[-q|--quiet]}} {{path/to/database.db.tar.gz}} {{*.pkg.tar.zst}}`
- Add all package binaries in the current directory without showing color:

View File

@@ -15,20 +15,20 @@ source: https://github.com/tldr-pages/tldr.git
- Remove specific files ignoring nonexistent ones:
`rm --force {{path/to/file1 path/to/file2 ...}}`
`rm {{[-f|--force]}} {{path/to/file1 path/to/file2 ...}}`
- Remove specific files interactively prompting before each removal:
`rm --interactive {{path/to/file1 path/to/file2 ...}}`
`rm {{[-i|--interactive]}} {{path/to/file1 path/to/file2 ...}}`
- Remove specific files printing info about each removal:
`rm --verbose {{path/to/file1 path/to/file2 ...}}`
`rm {{[-v|--verbose]}} {{path/to/file1 path/to/file2 ...}}`
- Remove specific files and directories recursively:
`rm --recursive {{path/to/file_or_directory1 path/to/file_or_directory2 ...}}`
`rm {{[-r|--recursive]}} {{path/to/file_or_directory1 path/to/file_or_directory2 ...}}`
- Remove empty directories (this is considered the safe method):
`rm --dir {{path/to/directory}}`
`rm {{[-d|--dir]}} {{path/to/directory}}`

View File

@@ -10,7 +10,7 @@ source: https://github.com/tldr-pages/tldr.git
- Back up the partition layout to a file:
`sudo sfdisk {{-d|--dump}} {{path/to/device}} > {{path/to/file.dump}}`
`sudo sfdisk {{[-d|--dump]}} {{path/to/device}} > {{path/to/file.dump}}`
- Restore a partition layout:
@@ -26,4 +26,4 @@ source: https://github.com/tldr-pages/tldr.git
- Display help:
`sfdisk {{-h|--help}}`
`sfdisk {{[-h|--help]}}`

View File

@@ -15,12 +15,12 @@ source: https://github.com/tldr-pages/tldr.git
- Test the default speakers with a sine wave:
`speaker-test {{-t|--test}} sine {{-f|--frequency}} {{frequency}}`
`speaker-test {{[-t|--test]}} sine {{[-f|--frequency]}} {{frequency}}`
- Test the default speakers with a predefined WAV file:
`speaker-test {{-t|--test}} wav`
`speaker-test {{[-t|--test]}} wav`
- Test the default speakers with a WAV file:
`speaker-test {{-t|--test}} wav {{-w|--wavfile}} {{path/to/file}}`
`speaker-test {{[-t|--test]}} wav {{[-w|--wavfile]}} {{path/to/file}}`

View File

@@ -15,8 +15,8 @@ source: https://github.com/tldr-pages/tldr.git
- Set the label of a swap area:
`swaplabel --label {{new_label}} {{path/to/file}}`
`swaplabel {{[-L|--label]}} {{new_label}} {{path/to/file}}`
- Set the UUID of a swap area (you can generate a UUID using `uuidgen`):
`swaplabel --uuid {{new_uuid}} {{path/to/file}}`
`swaplabel {{[-U|--uuid]}} {{new_uuid}} {{path/to/file}}`

View File

@@ -10,32 +10,32 @@ source: https://github.com/tldr-pages/tldr.git
- Print all information:
`uname --all`
`uname {{[-a|--all]}}`
- Print the current kernel name:
`uname --kernel-name`
`uname {{[-s|--kernel-name]}}`
- Print the current network node host name:
`uname --nodename`
`uname {{[-n|--nodename]}}`
- Print the current kernel release:
`uname --kernel-release`
`uname {{[-r|--kernel-release]}}`
- Print the current kernel version:
`uname --kernel-version`
`uname {{[-v|--kernel-version]}}`
- Print the current machine hardware name:
`uname --machine`
`uname {{[-m|--machine]}}`
- Print the current processor type:
`uname --processor`
`uname {{[-p|--processsor]}}`
- Print the current operating system name:
`uname --operating-system`
`uname {{[-o|--operating-system]}}`

View File

@@ -18,7 +18,7 @@ source: https://github.com/tldr-pages/tldr.git
- Bind a USB device to `usbip` on the server:
`sudo usbip bind --busid={{bus_id}}`
`sudo usbip bind --busid {{bus_id}}`
- Load the kernel module required by `usbip` on the client:
@@ -26,7 +26,7 @@ source: https://github.com/tldr-pages/tldr.git
- Attach to the `usbip` device on the client (bus ID is the same as on the server):
`sudo usbip attach -r {{ip_address}} --busid={{bus_id}}`
`sudo usbip attach -r {{ip_address}} --busid {{bus_id}}`
- List attached devices:
@@ -34,8 +34,8 @@ source: https://github.com/tldr-pages/tldr.git
- Detach from a device:
`sudo usbip detach --port={{port}}`
`sudo usbip detach --port {{port}}`
- Unbind a device:
`usbip unbind --busid={{bus_id}}`
`usbip unbind --busid {{bus_id}}`

View File

@@ -18,24 +18,24 @@ source: https://github.com/tldr-pages/tldr.git
- List supported video formats and resolutions of a specific video device:
`v4l2-ctl --list-formats-ext --device {{path/to/video_device}}`
`v4l2-ctl --list-formats-ext {{[-d|--device]}} {{path/to/video_device}}`
- Get all details of a video device:
`v4l2-ctl --all --device {{path/to/video_device}}`
`v4l2-ctl --all {{[-d|--device]}} {{path/to/video_device}}`
- Capture a JPEG photo with a specific resolution from video device:
`v4l2-ctl --device {{path/to/video_device}} --set-fmt-video=width={{width}},height={{height}},pixelformat=MJPG --stream-mmap --stream-to={{path/to/output.jpg}} --stream-count=1`
`v4l2-ctl {{[-d|--device]}} {{path/to/video_device}} --set-fmt-video=width={{width}},height={{height}},pixelformat=MJPG --stream-mmap --stream-to={{path/to/output.jpg}} --stream-count=1`
- Capture a raw video stream from video device:
`v4l2-ctl --device {{path/to/video_device}} --set-fmt-video=width={{width}},height={{height}},pixelformat={{format}} --stream-mmap --stream-to={{path/to/output}} --stream-count={{number_of_frames_to_capture}}`
`v4l2-ctl {{[-d|--device]}} {{path/to/video_device}} --set-fmt-video=width={{width}},height={{height}},pixelformat={{format}} --stream-mmap --stream-to={{path/to/output}} --stream-count={{number_of_frames_to_capture}}`
- List all video device's controls and their values:
`v4l2-ctl --list-ctrls --device {{path/to/video_device}}`
`v4l2-ctl {{[-l|--list-ctrls]}} {{[-d|--device]}} {{path/to/video_device}}`
- Set the value of a video device control:
`v4l2-ctl --device {{path/to/video_device}} --set-ctrl={{control_name}}={{value}}`
`v4l2-ctl {{[-d|--device]}} {{path/to/video_device}} {{[-c|--set-ctrl]}} {{control_name}}={{value}}`

View File

@@ -14,7 +14,7 @@ source: https://github.com/tldr-pages/tldr.git
- Send a message to users that belong to a specific group:
`wall --group {{group_name}} {{message}}`
`wall {{[-g|--group]}} {{group_name}} {{message}}`
- Send a message from a file:
@@ -22,4 +22,4 @@ source: https://github.com/tldr-pages/tldr.git
- Send a message with timeout (default 300):
`wall --timeout {{seconds}} {{file}}`
`wall {{[-t|--timeout]}} {{seconds}} {{file}}`

View File

@@ -30,4 +30,4 @@ source: https://github.com/tldr-pages/tldr.git
- Turn on verbose output:
`wol --verbose {{mac_address}}`
`wol {{[-v|--verbose]}} {{mac_address}}`

View File

@@ -10,7 +10,7 @@ source: https://github.com/tldr-pages/tldr.git
- Display the current state of the system (known screens, resolutions, ...):
`xrandr --query`
`xrandr {{[-q|--query]}}`
- Disable disconnected outputs and enable connected ones with default settings:
@@ -34,4 +34,4 @@ source: https://github.com/tldr-pages/tldr.git
- Display the current state of any X server:
`xrandr --display :{{0}} --query`
`xrandr {{[-d|--display]}} :{{0}} {{[-q|--query]}}`