mirror of
https://github.com/ivuorinen/cheatsheet-tldr.git
synced 2026-02-18 06:49:49 +00:00
Update cheatsheets
This commit is contained in:
8
tldr/arp
8
tldr/arp
@@ -10,12 +10,16 @@ source: https://github.com/tldr-pages/tldr.git
|
|||||||
|
|
||||||
- Show the current ARP table:
|
- Show the current ARP table:
|
||||||
|
|
||||||
|
`arp`
|
||||||
|
|
||||||
|
- Show [a]lternative BSD style output format with on fixed columns:
|
||||||
|
|
||||||
`arp -a`
|
`arp -a`
|
||||||
|
|
||||||
- [d]elete a specific entry:
|
- [d]elete a specific entry:
|
||||||
|
|
||||||
`arp -d {{address}}`
|
`sudo arp -d {{address}}`
|
||||||
|
|
||||||
- [s]et up a new entry in the ARP table:
|
- [s]et up a new entry in the ARP table:
|
||||||
|
|
||||||
`arp -s {{address}} {{mac_address}}`
|
`sudo arp -s {{address}} {{mac_address}}`
|
||||||
|
|||||||
@@ -12,9 +12,9 @@ source: https://github.com/tldr-pages/tldr.git
|
|||||||
|
|
||||||
`cadaver {{http://dav.example.com/}}`
|
`cadaver {{http://dav.example.com/}}`
|
||||||
|
|
||||||
- Connect to a server using a specific port and open the collection `/foo/bar/`:
|
- Connect to a server using a specific port and open a collection:
|
||||||
|
|
||||||
`cadaver {{http://dav.example.com:8022/foo/bar/}}`
|
`cadaver {{http://dav.example.com:8022/path/to/collection/}}`
|
||||||
|
|
||||||
- Connect to a server using SSL:
|
- Connect to a server using SSL:
|
||||||
|
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ source: https://github.com/tldr-pages/tldr.git
|
|||||||
# doas
|
# doas
|
||||||
|
|
||||||
> Execute a command as another user.
|
> Execute a command as another user.
|
||||||
|
> See also: `sudo`, `pkexec`, `run0`.
|
||||||
> More information: <https://man.openbsd.org/doas>.
|
> More information: <https://man.openbsd.org/doas>.
|
||||||
|
|
||||||
- Run a command as root:
|
- Run a command as root:
|
||||||
|
|||||||
@@ -12,23 +12,23 @@ source: https://github.com/tldr-pages/tldr.git
|
|||||||
|
|
||||||
- Update the list of available packages and versions (it's recommended to run this before other `apt-get` commands):
|
- Update the list of available packages and versions (it's recommended to run this before other `apt-get` commands):
|
||||||
|
|
||||||
`apt-get update`
|
`sudo apt-get update`
|
||||||
|
|
||||||
- Install a package, or update it to the latest available version:
|
- Install a package, or update it to the latest available version:
|
||||||
|
|
||||||
`apt-get install {{package}}`
|
`sudo apt-get install {{package}}`
|
||||||
|
|
||||||
- Remove a package:
|
- Remove a package:
|
||||||
|
|
||||||
`apt-get remove {{package}}`
|
`sudo apt-get remove {{package}}`
|
||||||
|
|
||||||
- Remove a package and its configuration files:
|
- Remove a package and its configuration files:
|
||||||
|
|
||||||
`apt-get purge {{package}}`
|
`sudo apt-get purge {{package}}`
|
||||||
|
|
||||||
- Upgrade all installed packages to their newest available versions:
|
- Upgrade all installed packages to their newest available versions:
|
||||||
|
|
||||||
`apt-get upgrade`
|
`sudo apt-get upgrade`
|
||||||
|
|
||||||
- Clean the local repository - removing package files (`.deb`) from interrupted downloads that can no longer be downloaded:
|
- Clean the local repository - removing package files (`.deb`) from interrupted downloads that can no longer be downloaded:
|
||||||
|
|
||||||
@@ -36,8 +36,8 @@ source: https://github.com/tldr-pages/tldr.git
|
|||||||
|
|
||||||
- Remove all packages that are no longer needed:
|
- Remove all packages that are no longer needed:
|
||||||
|
|
||||||
`apt-get autoremove`
|
`sudo apt-get autoremove`
|
||||||
|
|
||||||
- Upgrade installed packages (like `upgrade`), but remove obsolete packages and install additional packages to meet new dependencies:
|
- Upgrade installed packages (like `upgrade`), but remove obsolete packages and install additional packages to meet new dependencies:
|
||||||
|
|
||||||
`apt-get dist-upgrade`
|
`sudo apt-get dist-upgrade`
|
||||||
|
|||||||
@@ -10,11 +10,11 @@ source: https://github.com/tldr-pages/tldr.git
|
|||||||
|
|
||||||
- Synchronize list of packages and versions available. This should be run first, before running subsequent `aptitude` commands:
|
- Synchronize list of packages and versions available. This should be run first, before running subsequent `aptitude` commands:
|
||||||
|
|
||||||
`aptitude update`
|
`sudo aptitude update`
|
||||||
|
|
||||||
- Install a new package and its dependencies:
|
- Install a new package and its dependencies:
|
||||||
|
|
||||||
`aptitude install {{package}}`
|
`sudo aptitude install {{package}}`
|
||||||
|
|
||||||
- Search for a package:
|
- Search for a package:
|
||||||
|
|
||||||
@@ -26,16 +26,16 @@ source: https://github.com/tldr-pages/tldr.git
|
|||||||
|
|
||||||
- Remove a package and all packages depending on it:
|
- Remove a package and all packages depending on it:
|
||||||
|
|
||||||
`aptitude remove {{package}}`
|
`sudo aptitude remove {{package}}`
|
||||||
|
|
||||||
- Upgrade installed packages to the newest available versions:
|
- Upgrade installed packages to the newest available versions:
|
||||||
|
|
||||||
`aptitude upgrade`
|
`sudo aptitude upgrade`
|
||||||
|
|
||||||
- Upgrade installed packages (like `aptitude upgrade`) including removing obsolete packages and installing additional packages to meet new package dependencies:
|
- Upgrade installed packages (like `aptitude upgrade`) including removing obsolete packages and installing additional packages to meet new package dependencies:
|
||||||
|
|
||||||
`aptitude full-upgrade`
|
`sudo aptitude full-upgrade`
|
||||||
|
|
||||||
- Put an installed package on hold to prevent it from being automatically upgraded:
|
- Put an installed package on hold to prevent it from being automatically upgraded:
|
||||||
|
|
||||||
`aptitude hold '?installed({{package}})'`
|
`sudo aptitude hold '?installed({{package}})'`
|
||||||
|
|||||||
@@ -11,11 +11,11 @@ source: https://github.com/tldr-pages/tldr.git
|
|||||||
|
|
||||||
- Make a bootable USB drive from an isohybrid file (such as `archlinux-xxx.iso`) and show the progress:
|
- Make a bootable USB drive from an isohybrid file (such as `archlinux-xxx.iso`) and show the progress:
|
||||||
|
|
||||||
`dd if={{path/to/file.iso}} of={{/dev/usb_drive}} status=progress`
|
`sudo dd if={{path/to/file.iso}} of={{/dev/usb_drive}} status=progress`
|
||||||
|
|
||||||
- Clone a drive to another drive with 4 MiB block size and flush writes before the command terminates:
|
- Clone a drive to another drive with 4 MiB block size and flush writes before the command terminates:
|
||||||
|
|
||||||
`dd bs=4M conv=fsync if={{/dev/source_drive}} of={{/dev/dest_drive}}`
|
`sudo dd bs=4M conv=fsync if={{/dev/source_drive}} of={{/dev/dest_drive}}`
|
||||||
|
|
||||||
- Generate a file with a specific number of random bytes by using kernel random driver:
|
- Generate a file with a specific number of random bytes by using kernel random driver:
|
||||||
|
|
||||||
@@ -31,4 +31,4 @@ source: https://github.com/tldr-pages/tldr.git
|
|||||||
|
|
||||||
- Check the progress of an ongoing `dd` operation (run this command from another shell):
|
- Check the progress of an ongoing `dd` operation (run this command from another shell):
|
||||||
|
|
||||||
`kill -USR1 $(pgrep {{[-x|--exact]}} dd)`
|
`progress`
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ source: https://github.com/tldr-pages/tldr.git
|
|||||||
# dmesg
|
# dmesg
|
||||||
|
|
||||||
> Write the kernel messages to `stdout`.
|
> Write the kernel messages to `stdout`.
|
||||||
|
> See also: `journalctl`.
|
||||||
> More information: <https://manned.org/dmesg>.
|
> More information: <https://manned.org/dmesg>.
|
||||||
|
|
||||||
- Show kernel messages:
|
- Show kernel messages:
|
||||||
|
|||||||
@@ -12,11 +12,11 @@ source: https://github.com/tldr-pages/tldr.git
|
|||||||
|
|
||||||
- Install a package:
|
- Install a package:
|
||||||
|
|
||||||
`dpkg {{[-i|--install]}} {{path/to/file.deb}}`
|
`sudo dpkg {{[-i|--install]}} {{path/to/file.deb}}`
|
||||||
|
|
||||||
- Remove a package:
|
- Remove a package:
|
||||||
|
|
||||||
`dpkg {{[-r|--remove]}} {{package}}`
|
`sudo dpkg {{[-r|--remove]}} {{package}}`
|
||||||
|
|
||||||
- List installed packages:
|
- List installed packages:
|
||||||
|
|
||||||
@@ -36,4 +36,4 @@ source: https://github.com/tldr-pages/tldr.git
|
|||||||
|
|
||||||
- Purge an installed or already removed package, including configuration:
|
- Purge an installed or already removed package, including configuration:
|
||||||
|
|
||||||
`dpkg {{[-P|--purge]}} {{package}}`
|
`sudo dpkg {{[-P|--purge]}} {{package}}`
|
||||||
|
|||||||
@@ -10,12 +10,12 @@ source: https://github.com/tldr-pages/tldr.git
|
|||||||
|
|
||||||
- Display the current time as reported by the hardware clock:
|
- Display the current time as reported by the hardware clock:
|
||||||
|
|
||||||
`hwclock`
|
`sudo hwclock`
|
||||||
|
|
||||||
- Write the current software clock time to the hardware clock (sometimes used during system setup):
|
- Write the current software clock time to the hardware clock (sometimes used during system setup):
|
||||||
|
|
||||||
`hwclock {{[-w|--systohc]}}`
|
`sudo hwclock {{[-w|--systohc]}}`
|
||||||
|
|
||||||
- Write the current hardware clock time to the software clock:
|
- Write the current hardware clock time to the software clock:
|
||||||
|
|
||||||
`hwclock {{[-s|--hctosys]}}`
|
`sudo hwclock {{[-s|--hctosys]}}`
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ source: https://github.com/tldr-pages/tldr.git
|
|||||||
# journalctl
|
# journalctl
|
||||||
|
|
||||||
> Query the systemd journal.
|
> Query the systemd journal.
|
||||||
|
> See also: `dmesg`.
|
||||||
> More information: <https://www.freedesktop.org/software/systemd/man/journalctl.html>.
|
> More information: <https://www.freedesktop.org/software/systemd/man/journalctl.html>.
|
||||||
|
|
||||||
- Show all messages with priority level 3 (errors) from this boot:
|
- Show all messages with priority level 3 (errors) from this boot:
|
||||||
|
|||||||
21
tldr/linux/koji-buildinfo
Normal file
21
tldr/linux/koji-buildinfo
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
---
|
||||||
|
syntax: markdown
|
||||||
|
tags: [tldr, linux]
|
||||||
|
source: https://github.com/tldr-pages/tldr.git
|
||||||
|
---
|
||||||
|
# koji buildinfo
|
||||||
|
|
||||||
|
> Print basic information about a build.
|
||||||
|
> More information: <https://docs.pagure.org/koji>.
|
||||||
|
|
||||||
|
- Print basic information:
|
||||||
|
|
||||||
|
`koji buildinfo {{BuildID_or_NVR1 BuildID_or_NRV2 ...}}`
|
||||||
|
|
||||||
|
- Print basic information with changelog:
|
||||||
|
|
||||||
|
`koji buildinfo {{BuildID_or_NVR1 BuildID_or_NRV2 ...}} --changelog`
|
||||||
|
|
||||||
|
- Display help:
|
||||||
|
|
||||||
|
`koji buildinfo --help`
|
||||||
29
tldr/linux/koji-download-build
Normal file
29
tldr/linux/koji-download-build
Normal file
@@ -0,0 +1,29 @@
|
|||||||
|
---
|
||||||
|
syntax: markdown
|
||||||
|
tags: [tldr, linux]
|
||||||
|
source: https://github.com/tldr-pages/tldr.git
|
||||||
|
---
|
||||||
|
# koji download-build
|
||||||
|
|
||||||
|
> Download a built package.
|
||||||
|
> More information: <https://docs.pagure.org/koji>.
|
||||||
|
|
||||||
|
- Download all RPMs from a specific build:
|
||||||
|
|
||||||
|
`koji download-build {{BuildID|RPM|NVR}}`
|
||||||
|
|
||||||
|
- Download RPMs signed with the given key:
|
||||||
|
|
||||||
|
`koji download-build {{BuildID|RPM|NVR}} --key {{key}}`
|
||||||
|
|
||||||
|
- Only download RPMs for given arch:
|
||||||
|
|
||||||
|
`koji download-build {{BuildID|RPM|NVR}} --arch {{x86_64,aarch64,noarch,...}}`
|
||||||
|
|
||||||
|
- Download the given RPM:
|
||||||
|
|
||||||
|
`koji download-build {{RPM}} --rpm`
|
||||||
|
|
||||||
|
- Display help:
|
||||||
|
|
||||||
|
`koji download-build --help`
|
||||||
25
tldr/linux/koji-tag-build
Normal file
25
tldr/linux/koji-tag-build
Normal file
@@ -0,0 +1,25 @@
|
|||||||
|
---
|
||||||
|
syntax: markdown
|
||||||
|
tags: [tldr, linux]
|
||||||
|
source: https://github.com/tldr-pages/tldr.git
|
||||||
|
---
|
||||||
|
# koji tag-build
|
||||||
|
|
||||||
|
> Apply a tag to one or more builds.
|
||||||
|
> More information: <https://docs.pagure.org/koji>.
|
||||||
|
|
||||||
|
- Apply a tag to one or more builds:
|
||||||
|
|
||||||
|
`koji tag-build {{tag}} {{NVR1 NVR2 ...}}`
|
||||||
|
|
||||||
|
- Don't wait on task:
|
||||||
|
|
||||||
|
`koji tag-build {{tag}} {{NVR1 NVR2 ...}} --nowait`
|
||||||
|
|
||||||
|
- Force operation:
|
||||||
|
|
||||||
|
`koji tag-build {{tag}} {{NVR1 NVR2 ...}} --force`
|
||||||
|
|
||||||
|
- Display help:
|
||||||
|
|
||||||
|
`koji tag-build --help`
|
||||||
@@ -18,11 +18,11 @@ source: https://github.com/tldr-pages/tldr.git
|
|||||||
|
|
||||||
- List verbose information about USB devices:
|
- List verbose information about USB devices:
|
||||||
|
|
||||||
`lsusb {{[-v|--verbose]}}`
|
`sudo lsusb {{[-v|--verbose]}}`
|
||||||
|
|
||||||
- List detailed information about a USB device:
|
- List detailed information about a USB device:
|
||||||
|
|
||||||
`lsusb {{[-v|--verbose]}} -s {{bus}}:{{device number}}`
|
`sudo lsusb {{[-v|--verbose]}} -s {{bus}}:{{device number}}`
|
||||||
|
|
||||||
- List devices with a specified vendor and product ID only:
|
- List devices with a specified vendor and product ID only:
|
||||||
|
|
||||||
|
|||||||
@@ -11,28 +11,28 @@ source: https://github.com/tldr-pages/tldr.git
|
|||||||
|
|
||||||
- Display information about logical volumes:
|
- Display information about logical volumes:
|
||||||
|
|
||||||
`lvs`
|
`sudo lvs`
|
||||||
|
|
||||||
- Display all logical volumes:
|
- Display all logical volumes:
|
||||||
|
|
||||||
`lvs {{[-a|--all]}}`
|
`sudo lvs {{[-a|--all]}}`
|
||||||
|
|
||||||
- Change default display to show more details:
|
- Change default display to show more details:
|
||||||
|
|
||||||
`lvs {{[-v|--verbose]}}`
|
`sudo lvs {{[-v|--verbose]}}`
|
||||||
|
|
||||||
- Display only specific fields:
|
- Display only specific fields:
|
||||||
|
|
||||||
`lvs {{[-o|--options]}} {{field_name_1}},{{field_name_2}}`
|
`sudo lvs {{[-o|--options]}} {{field_name_1}},{{field_name_2}}`
|
||||||
|
|
||||||
- Append field to default display:
|
- Append field to default display:
|
||||||
|
|
||||||
`lvs {{[-o|--options]}} +{{field_name}}`
|
`sudo lvs {{[-o|--options]}} +{{field_name}}`
|
||||||
|
|
||||||
- Suppress heading line:
|
- Suppress heading line:
|
||||||
|
|
||||||
`lvs --noheadings`
|
`sudo lvs --noheadings`
|
||||||
|
|
||||||
- Use a separator to separate fields:
|
- Use a separator to separate fields:
|
||||||
|
|
||||||
`lvs --separator {{=}}`
|
`sudo lvs --separator {{=}}`
|
||||||
|
|||||||
@@ -7,6 +7,7 @@ source: https://github.com/tldr-pages/tldr.git
|
|||||||
|
|
||||||
> Execute commands as another user.
|
> Execute commands as another user.
|
||||||
> Asks for password in a GUI if available.
|
> Asks for password in a GUI if available.
|
||||||
|
> See also: `sudo`, `run0`, `doas`.
|
||||||
> More information: <https://polkit.pages.freedesktop.org/polkit/pkexec.1.html>.
|
> More information: <https://polkit.pages.freedesktop.org/polkit/pkexec.1.html>.
|
||||||
|
|
||||||
- Run command as root:
|
- Run command as root:
|
||||||
|
|||||||
@@ -11,28 +11,28 @@ source: https://github.com/tldr-pages/tldr.git
|
|||||||
|
|
||||||
- Display information about physical volumes:
|
- Display information about physical volumes:
|
||||||
|
|
||||||
`pvs`
|
`sudo pvs`
|
||||||
|
|
||||||
- Display non-physical volumes:
|
- Display non-physical volumes:
|
||||||
|
|
||||||
`pvs {{[-a|--all]}}`
|
`sudo pvs {{[-a|--all]}}`
|
||||||
|
|
||||||
- Change default display to show more details:
|
- Change default display to show more details:
|
||||||
|
|
||||||
`pvs {{[-v|--verbose]}}`
|
`sudo pvs {{[-v|--verbose]}}`
|
||||||
|
|
||||||
- Display only specific fields:
|
- Display only specific fields:
|
||||||
|
|
||||||
`pvs {{[-o|--options]}} {{field_name_1}},{{field_name_2}}`
|
`sudo pvs {{[-o|--options]}} {{field_name_1}},{{field_name_2}}`
|
||||||
|
|
||||||
- Append field to default display:
|
- Append field to default display:
|
||||||
|
|
||||||
`pvs {{[-o|--options]}} +{{field_name}}`
|
`sudo pvs {{[-o|--options]}} +{{field_name}}`
|
||||||
|
|
||||||
- Suppress heading line:
|
- Suppress heading line:
|
||||||
|
|
||||||
`pvs --noheadings`
|
`sudo pvs --noheadings`
|
||||||
|
|
||||||
- Use separator to separate fields:
|
- Use separator to separate fields:
|
||||||
|
|
||||||
`pvs --separator {{special_character}}`
|
`sudo pvs --separator {{special_character}}`
|
||||||
|
|||||||
@@ -7,6 +7,7 @@ source: https://github.com/tldr-pages/tldr.git
|
|||||||
|
|
||||||
> Elevate privileges interactively.
|
> Elevate privileges interactively.
|
||||||
> Similar to `sudo`, but it's not a SUID binary, authentication takes place via polkit, and commands are invoked from a `systemd` service.
|
> Similar to `sudo`, but it's not a SUID binary, authentication takes place via polkit, and commands are invoked from a `systemd` service.
|
||||||
|
> See also: `sudo`, `pkexec`, `doas`.
|
||||||
> More information: <https://www.freedesktop.org/software/systemd/man/run0.html>.
|
> More information: <https://www.freedesktop.org/software/systemd/man/run0.html>.
|
||||||
|
|
||||||
- Run a command as root:
|
- Run a command as root:
|
||||||
|
|||||||
@@ -10,19 +10,19 @@ source: https://github.com/tldr-pages/tldr.git
|
|||||||
|
|
||||||
- Start tracing a specific process by its PID:
|
- Start tracing a specific process by its PID:
|
||||||
|
|
||||||
`strace {{[-p|--attach]}} {{pid}}`
|
`sudo strace {{[-p|--attach]}} {{pid}}`
|
||||||
|
|
||||||
- Trace a process and filter output by system call [e]xpression:
|
- Trace a process and filter output by system call [e]xpression:
|
||||||
|
|
||||||
`strace {{[-p|--attach]}} {{pid}} -e {{system_call,system_call2,...}}`
|
`sudo strace {{[-p|--attach]}} {{pid}} -e {{system_call,system_call2,...}}`
|
||||||
|
|
||||||
- Count time, calls, and errors for each system call and report a summary on program exit:
|
- Count time, calls, and errors for each system call and report a summary on program exit:
|
||||||
|
|
||||||
`strace {{[-p|--attach]}} {{pid}} {{[-c|--summary-only]}}`
|
`sudo strace {{[-p|--attach]}} {{pid}} {{[-c|--summary-only]}}`
|
||||||
|
|
||||||
- Show the time spent in every system call and specify the maximum string size to print:
|
- Show the time spent in every system call and specify the maximum string size to print:
|
||||||
|
|
||||||
`strace {{[-p|--attach]}} {{pid}} {{[-T|--syscall-times]}} {{[-s|--string-limit]}} {{32}}`
|
`sudo strace {{[-p|--attach]}} {{pid}} {{[-T|--syscall-times]}} {{[-s|--string-limit]}} {{32}}`
|
||||||
|
|
||||||
- Start tracing a program by executing it:
|
- Start tracing a program by executing it:
|
||||||
|
|
||||||
|
|||||||
@@ -11,32 +11,32 @@ source: https://github.com/tldr-pages/tldr.git
|
|||||||
|
|
||||||
- Enable `ufw`:
|
- Enable `ufw`:
|
||||||
|
|
||||||
`ufw enable`
|
`sudo ufw enable`
|
||||||
|
|
||||||
- Disable `ufw`:
|
- Disable `ufw`:
|
||||||
|
|
||||||
`ufw disable`
|
`sudo ufw disable`
|
||||||
|
|
||||||
- Show `ufw` rules, along with their numbers:
|
- Show `ufw` rules, along with their numbers:
|
||||||
|
|
||||||
`ufw status numbered`
|
`sudo ufw status numbered`
|
||||||
|
|
||||||
- Allow incoming traffic on port 5432 on this host with a comment identifying the service:
|
- Allow incoming traffic on port 5432 on this host with a comment identifying the service:
|
||||||
|
|
||||||
`ufw allow 5432 comment "{{Service}}"`
|
`sudo ufw allow 5432 comment "{{Service}}"`
|
||||||
|
|
||||||
- Allow only TCP traffic from 192.168.0.4 to any address on this host, on port 22:
|
- Allow only TCP traffic from 192.168.0.4 to any address on this host, on port 22:
|
||||||
|
|
||||||
`ufw allow proto tcp from 192.168.0.4 to any port 22`
|
`sudo ufw allow proto tcp from 192.168.0.4 to any port 22`
|
||||||
|
|
||||||
- Deny traffic on port 80 on this host:
|
- Deny traffic on port 80 on this host:
|
||||||
|
|
||||||
`ufw deny 80`
|
`sudo ufw deny 80`
|
||||||
|
|
||||||
- Deny all UDP traffic to ports in range 8412:8500:
|
- Deny all UDP traffic to ports in range 8412:8500:
|
||||||
|
|
||||||
`ufw deny proto udp from any to any port 8412:8500`
|
`sudo ufw deny proto udp from any to any port 8412:8500`
|
||||||
|
|
||||||
- Delete a particular rule. The rule number can be retrieved from the `ufw status numbered` command:
|
- Delete a particular rule. The rule number can be retrieved from the `ufw status numbered` command:
|
||||||
|
|
||||||
`ufw delete {{rule_number}}`
|
`sudo ufw delete {{rule_number}}`
|
||||||
|
|||||||
@@ -11,28 +11,28 @@ source: https://github.com/tldr-pages/tldr.git
|
|||||||
|
|
||||||
- Display information about volume groups:
|
- Display information about volume groups:
|
||||||
|
|
||||||
`vgs`
|
`sudo vgs`
|
||||||
|
|
||||||
- Display all volume groups:
|
- Display all volume groups:
|
||||||
|
|
||||||
`vgs {{[-a|--all]}}`
|
`sudo vgs {{[-a|--all]}}`
|
||||||
|
|
||||||
- Change default display to show more details:
|
- Change default display to show more details:
|
||||||
|
|
||||||
`vgs {{[-v|--verbose]}}`
|
`sudo vgs {{[-v|--verbose]}}`
|
||||||
|
|
||||||
- Display only specific fields:
|
- Display only specific fields:
|
||||||
|
|
||||||
`vgs {{[-o|--options]}} {{field_name_1}},{{field_name_2}}`
|
`sudo vgs {{[-o|--options]}} {{field_name_1}},{{field_name_2}}`
|
||||||
|
|
||||||
- Append field to default display:
|
- Append field to default display:
|
||||||
|
|
||||||
`vgs {{[-o|--options]}} +{{field_name}}`
|
`sudo vgs {{[-o|--options]}} +{{field_name}}`
|
||||||
|
|
||||||
- Suppress heading line:
|
- Suppress heading line:
|
||||||
|
|
||||||
`vgs --noheadings`
|
`sudo vgs --noheadings`
|
||||||
|
|
||||||
- Use separator to separate fields:
|
- Use separator to separate fields:
|
||||||
|
|
||||||
`vgs --separator =`
|
`sudo vgs --separator =`
|
||||||
|
|||||||
@@ -11,19 +11,19 @@ source: https://github.com/tldr-pages/tldr.git
|
|||||||
|
|
||||||
- Synchronize list of packages and versions available:
|
- Synchronize list of packages and versions available:
|
||||||
|
|
||||||
`zypper {{[ref|refresh]}}`
|
`sudo zypper {{[ref|refresh]}}`
|
||||||
|
|
||||||
- Install a new package:
|
- Install a new package:
|
||||||
|
|
||||||
`zypper {{[in|install]}} {{package}}`
|
`sudo zypper {{[in|install]}} {{package}}`
|
||||||
|
|
||||||
- Remove a package:
|
- Remove a package:
|
||||||
|
|
||||||
`zypper {{[rm|remove]}} {{package}}`
|
`sudo zypper {{[rm|remove]}} {{package}}`
|
||||||
|
|
||||||
- Upgrade installed packages to the newest available versions:
|
- Upgrade installed packages to the newest available versions:
|
||||||
|
|
||||||
`zypper {{[up|update]}}`
|
`sudo zypper {{[up|update]}}`
|
||||||
|
|
||||||
- Search package via keyword:
|
- Search package via keyword:
|
||||||
|
|
||||||
|
|||||||
4
tldr/mlr
4
tldr/mlr
@@ -14,7 +14,7 @@ source: https://github.com/tldr-pages/tldr.git
|
|||||||
|
|
||||||
- Receive JSON data and pretty print the output:
|
- Receive JSON data and pretty print the output:
|
||||||
|
|
||||||
`echo '{"hello":"world"}' | mlr --ijson --opprint cat`
|
`{{echo '{"key":"value"}'}} | mlr --ijson --opprint cat`
|
||||||
|
|
||||||
- Sort alphabetically on a field:
|
- Sort alphabetically on a field:
|
||||||
|
|
||||||
@@ -30,7 +30,7 @@ source: https://github.com/tldr-pages/tldr.git
|
|||||||
|
|
||||||
- Receive JSON and format the output as vertical JSON:
|
- Receive JSON and format the output as vertical JSON:
|
||||||
|
|
||||||
`echo '{"hello":"world", "foo":"bar"}' | mlr --ijson --ojson --jvstack cat`
|
`{{echo '{"key1":"value1", "key2":"value2"}'}} | mlr --ijson --ojson --jvstack cat`
|
||||||
|
|
||||||
- Filter lines of a compressed CSV file treating numbers as [S]trings:
|
- Filter lines of a compressed CSV file treating numbers as [S]trings:
|
||||||
|
|
||||||
|
|||||||
@@ -14,12 +14,12 @@ source: https://github.com/tldr-pages/tldr.git
|
|||||||
|
|
||||||
- Log in to a private registry with a specific scope:
|
- Log in to a private registry with a specific scope:
|
||||||
|
|
||||||
`npm login --scope {{@mycorp}} --registry {{https://registry.mycorp.com}}`
|
`npm login --scope {{@organization}} --registry {{https://registry.example.com}}`
|
||||||
|
|
||||||
- Log out from a specific scope and remove the auth token:
|
- Log out from a specific scope and remove the auth token:
|
||||||
|
|
||||||
`npm logout --scope {{@mycorp}}`
|
`npm logout --scope {{@organization}}`
|
||||||
|
|
||||||
- Create a scoped package during initialization:
|
- Create a scoped package during initialization:
|
||||||
|
|
||||||
`npm init --scope {{@foo}} {{[-y|--yes]}}`
|
`npm init --scope {{@organization}} {{[-y|--yes]}}`
|
||||||
|
|||||||
@@ -14,8 +14,8 @@ source: https://github.com/tldr-pages/tldr.git
|
|||||||
|
|
||||||
- Run a specific command:
|
- Run a specific command:
|
||||||
|
|
||||||
`robo {{foo}}`
|
`robo {{command}}`
|
||||||
|
|
||||||
- Simulate running a specific command:
|
- Simulate running a specific command:
|
||||||
|
|
||||||
`robo --simulate {{foo}}`
|
`robo --simulate {{command}}`
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ source: https://github.com/tldr-pages/tldr.git
|
|||||||
# sudo
|
# sudo
|
||||||
|
|
||||||
> Execute a single command as the superuser or another user.
|
> Execute a single command as the superuser or another user.
|
||||||
|
> See also: `pkexec`, `run0`, `doas`.
|
||||||
> More information: <https://www.sudo.ws/sudo.html>.
|
> More information: <https://www.sudo.ws/sudo.html>.
|
||||||
|
|
||||||
- Run a command as the superuser:
|
- Run a command as the superuser:
|
||||||
|
|||||||
@@ -12,11 +12,11 @@ source: https://github.com/tldr-pages/tldr.git
|
|||||||
|
|
||||||
- Download the contents of a URL to a file using multiple threads (default behavior differs from `wget`):
|
- Download the contents of a URL to a file using multiple threads (default behavior differs from `wget`):
|
||||||
|
|
||||||
`wget2 {{https://example.com/foo}}`
|
`wget2 {{https://example.com/resource}}`
|
||||||
|
|
||||||
- Limit the number of threads used for downloading (default is 5 threads):
|
- Limit the number of threads used for downloading (default is 5 threads):
|
||||||
|
|
||||||
`wget2 --max-threads {{10}} {{https://example.com/foo}}`
|
`wget2 --max-threads {{10}} {{https://example.com/resource}}`
|
||||||
|
|
||||||
- Download a single web page and all its resources (scripts, stylesheets, images, etc.):
|
- Download a single web page and all its resources (scripts, stylesheets, images, etc.):
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user