Update cheatsheets

This commit is contained in:
ivuorinen
2025-07-10 00:21:00 +00:00
parent b467fadfef
commit a75032eb46
30 changed files with 577 additions and 25 deletions

35
tldr/linux/dnf-builddep Normal file
View File

@@ -0,0 +1,35 @@
---
syntax: markdown
tags: [tldr, linux]
source: https://github.com/tldr-pages/tldr.git
---
# dnf builddep
> Install dependencies to build a given package.
> Not default to `dnf` but supported via `dnf-plugins-core`.
> See also: `dnf`.
> More information: <https://dnf-plugins-core.readthedocs.io/en/latest/builddep.html>.
- Install dependencies for a given package:
`dnf builddep {{path/to/specification.spec}}`
- Install dependencies for a given package but ignore unavailable:
`dnf builddep --skip-unavailable {{path/to/specification.spec}}`
- Define the RPM macro to a given expression:
`dnf builddep {{[-D|--define]}} '{{expression}}'`
- Define an argument for a `.spec` file path:
`dnf builddep --spec {{argument}}`
- Define an argument for a `.rpm` file path:
`dnf builddep --srpm {{argument}}`
- Display help:
`dnf builddep --help-cmd`

31
tldr/linux/dnf-changelog Normal file
View File

@@ -0,0 +1,31 @@
---
syntax: markdown
tags: [tldr, linux]
source: https://github.com/tldr-pages/tldr.git
---
# dnf changelog
> View the changelogs for a given package.
> Not default to `dnf` but supported via `dnf-plugins-core`.
> See also: `dnf`.
> More information: <https://dnf-plugins-core.readthedocs.io/en/latest/changelog.html>.
- View all changelogs for a given package:
`dnf changelog {{package}}`
- View all changelogs for a given package after a specified date:
`dnf changelog --since {{date}} {{package}}`
- View the last `n` number of changelogs for a given package:
`dnf changelog --count {{number}} {{package}}`
- Show only new items for upgradeable packages:
`dnf changelog --upgrades {{package}}`
- Display help:
`dnf changelog --help-cmd`

View File

@@ -6,6 +6,8 @@ source: https://github.com/tldr-pages/tldr.git
# dnf config-manager
> Manage DNF configuration options and repositories on Fedora-based systems.
> Not default to `dnf` but supported via `dnf-plugins-core`.
> See also: `dnf`.
> More information: <https://dnf-plugins-core.readthedocs.io/en/latest/config_manager.html>.
- Add (and enable) a repository from a URL:

View File

@@ -15,19 +15,19 @@ source: https://github.com/tldr-pages/tldr.git
- Permanently move the interface into the block zone, effectively blocking all communication:
`firewall-cmd --permanent --zone={{block}} --change-interface={{enp1s0}}`
`firewall-cmd --permanent --zone {{block}} --change-interface {{enp1s0}}`
- Permanently open the port for a service in the specified zone (like port 443 when in the `public` zone):
`firewall-cmd --permanent --zone={{public}} --add-service={{https}}`
`firewall-cmd --permanent --zone {{public}} --add-service {{https}}`
- Permanently close the port for a service in the specified zone (like port 80 when in the `public` zone):
`firewall-cmd --permanent --zone={{public}} --remove-service={{http}}`
`firewall-cmd --permanent --zone {{public}} --remove-service {{http}}`
- Permanently forward a port for incoming packets in the specified zone (like port 443 to 8443 when entering the `public` zone):
`firewall-cmd --permanent --zone={{public}} --add-rich-rule='rule family="{{ipv4|ipv6}}" forward-port port="{{443}}" protocol="{{udp|tcp}}" to-port="{{8443}}"'`
`firewall-cmd --permanent --zone {{public}} --add-rich-rule 'rule family "{{ipv4|ipv6}}" forward-port port "{{443}}" protocol "{{udp|tcp}}" to-port "{{8443}}"'`
- Reload firewalld to lose any runtime changes and force the permanent configuration to take effect immediately:

22
tldr/linux/i2cdetect Normal file
View File

@@ -0,0 +1,22 @@
---
syntax: markdown
tags: [tldr, linux]
source: https://github.com/tldr-pages/tldr.git
---
# i2cdetect
> Scan I2C buses.
> See also: `i2cdump`, `i2cget`, `i2cset`.
> More information: <https://manned.org/i2cdetect>.
- List active I2C buses:
`i2cdetect -l`
- Scan devices on an I2C bus:
`i2cdetect {{i2c_bus}}`
- Scan devices on an I2C bus without asking for confirmation:
`i2cdetect -y {{i2c_bus}}`

27
tldr/linux/i2cdump Normal file
View File

@@ -0,0 +1,27 @@
---
syntax: markdown
tags: [tldr, linux]
source: https://github.com/tldr-pages/tldr.git
---
# i2cdump
> Dump I2C device registers.
> See also: `i2cdetect`, `i2cget`, `i2cset`.
> Note: All addresses should be specified in hexadecimal.
> More information: <https://manned.org/i2cdump>.
- Dump all registers of an I2C device:
`i2cdump {{i2cbus}} {{device_address}}`
- Dump all registers of an I2C device without asking for confirmation:
`i2cdump -y {{i2cbus}} {{device_address}}`
- Dump all registers of an I2C device using a specific mode:
`i2cdump {{i2cbus}} {{device_address}} {{b|w|c|s|i}}`
- Dump registers from `start` to `end` of an I2C device:
`i2cdump -r {{start}}-{{end}} {{i2cbus}} {{device_address}}`

23
tldr/linux/i2cget Normal file
View File

@@ -0,0 +1,23 @@
---
syntax: markdown
tags: [tldr, linux]
source: https://github.com/tldr-pages/tldr.git
---
# i2cget
> Read from an register of an I2C device.
> See also: `i2cdetect`, `i2cdump`, `i2cset`.
> Note: All addresses should be specified in hexadecimal.
> More information: <https://manned.org/i2cget>.
- Read from a register of an I2C device:
`i2cget {{i2cbus}} {{device_address}} {{register_address}}`
- Read from a register of an I2C device without asking for confirmation:
`i2cget -y {{i2cbus}} {{device_address}} {{register_address}}`
- Read from a register of an I2C device using a specific mode:
`i2cget {{i2cbus}} {{device_address}} {{register_address}} {{b|w|c|s|i}}`

23
tldr/linux/i2cset Normal file
View File

@@ -0,0 +1,23 @@
---
syntax: markdown
tags: [tldr, linux]
source: https://github.com/tldr-pages/tldr.git
---
# i2cset
> Set the value of a register of an I2C device.
> See also: `i2cdetect`, `i2cdump`, `i2cget`.
> Note: All addresses should be specified in hexadecimal.
> More information: <https://manned.org/i2cset>.
- Write to a register of an I2C device:
`i2cset {{i2cbus}} {{device_address}} {{register_address}} {{value}}`
- Write to a register of an I2C device without asking for confirmation:
`i2cset -y {{i2cbus}} {{device_address}} {{register_address}} {{value}}`
- Write to a register of an I2C device using a specific mode:
`i2cset {{i2cbus}} {{device_address}} {{register_address}} {{value}} {{b|w|c|s|i}}`

13
tldr/linux/yumdownloader Normal file
View File

@@ -0,0 +1,13 @@
---
syntax: markdown
tags: [tldr, linux]
source: https://github.com/tldr-pages/tldr.git
---
# yumdownloader
> Historical YUM package downloader for Fedora installations; now deprecated.
> This command is an alias of `dnf download`.
- View documentation for the original command:
`tldr dnf download`