mirror of
https://github.com/tldr-pages/tldr.git
synced 2025-08-04 14:35:42 +02:00
pages/linux/*: add option placeholders (#15884)
This commit is contained in:
parent
85563b861f
commit
9baf07a5f3
36 changed files with 119 additions and 119 deletions
|
@ -11,7 +11,7 @@
|
|||
|
||||
- Assume `stdin` is already connected to a `tty` and set a timeout for the login:
|
||||
|
||||
`agetty {{-t|--timeout}} {{timeout_in_seconds}} -`
|
||||
`agetty {{[-t|--timeout]}} {{timeout_in_seconds}} -`
|
||||
|
||||
- Assume the `tty` is [8]-bit, overriding the `TERM` environment variable set by `init`:
|
||||
|
||||
|
@ -19,12 +19,12 @@
|
|||
|
||||
- Skip the login (no login) and invoke, as root, another login program instead of `/bin/login`:
|
||||
|
||||
`agetty {{-n|--skip-login}} {{-l|--login-program}} {{login_program}} {{tty}}`
|
||||
`agetty {{[-n|--skip-login]}} {{[-l|--login-program]}} {{login_program}} {{tty}}`
|
||||
|
||||
- Do not display the pre-login (issue) file (`/etc/issue` by default) before writing the login prompt:
|
||||
|
||||
`agetty {{-i|--noissue}} -`
|
||||
`agetty {{[-i|--noissue]}} -`
|
||||
|
||||
- Change the root directory and write a specific fake host into the `utmp` file:
|
||||
|
||||
`agetty {{-r|--chroot}} {{/path/to/root_directory}} {{-H|--host}} {{fake_host}} -`
|
||||
`agetty {{[-r|--chroot]}} {{/path/to/root_directory}} {{[-H|--host]}} {{fake_host}} -`
|
||||
|
|
|
@ -5,20 +5,20 @@
|
|||
|
||||
- Register (command) a new reservation with a given key on a given device:
|
||||
|
||||
`blkpr {{-c|--command}} register {{-k|--key}} {{reservation_key}} {{path/to/device}}`
|
||||
`blkpr {{[-c|--command]}} register {{[-k|--key]}} {{reservation_key}} {{path/to/device}}`
|
||||
|
||||
- Set the type of an existing reservation to exclusive access:
|
||||
|
||||
`blkpr -c reserve {{-k|--key}} {{reservation_key}} {{-t|--type}} exclusive-access {{path/to/device}}`
|
||||
`blkpr -c reserve {{[-k|--key]}} {{reservation_key}} {{[-t|--type]}} exclusive-access {{path/to/device}}`
|
||||
|
||||
- Preempt the existing reservation with a given key and replace it with a new reservation:
|
||||
|
||||
`blkpr -c preempt {{-K|--oldkey}} {{old_key}} {{-k|--key}} {{new_key}} {{-t|--type}} write-exclusive {{path/to/device}}`
|
||||
`blkpr -c preempt {{[-K|--oldkey]}} {{old_key}} {{[-k|--key]}} {{new_key}} {{[-t|--type]}} write-exclusive {{path/to/device}}`
|
||||
|
||||
- Release a reservation with a given key and type on a given device:
|
||||
|
||||
`blkpr -c release {{-k|--key}} {{reservation_key}} {{-t|--type}} {{reservation_type}} {{path/to/device}}`
|
||||
`blkpr -c release {{[-k|--key]}} {{reservation_key}} {{[-t|--type]}} {{reservation_type}} {{path/to/device}}`
|
||||
|
||||
- Clear all reservations from a given device:
|
||||
|
||||
`blkpr -c clear {{-k|--key}} {{key}} {{path/to/device}}`
|
||||
`blkpr -c clear {{[-k|--key]}} {{key}} {{path/to/device}}`
|
||||
|
|
|
@ -11,11 +11,11 @@
|
|||
|
||||
- Create a copy with Unix-style line endings:
|
||||
|
||||
`dos2unix {{-n|--newfile}} {{path/to/file}} {{path/to/new_file}}`
|
||||
`dos2unix {{[-n|--newfile]}} {{path/to/file}} {{path/to/new_file}}`
|
||||
|
||||
- Display file information:
|
||||
|
||||
`dos2unix {{-i|--info}} {{path/to/file}}`
|
||||
`dos2unix {{[-i|--info]}} {{path/to/file}}`
|
||||
|
||||
- Keep/add/remove Byte Order Mark:
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
|
||||
- List all boot options with their numbers:
|
||||
|
||||
`efibootmgr {{-u|--unicode}}`
|
||||
`efibootmgr {{[-u|--unicode]}}`
|
||||
|
||||
- Add UEFI Shell v2 as a boot option:
|
||||
|
||||
|
@ -17,8 +17,8 @@
|
|||
|
||||
- Change the current boot order:
|
||||
|
||||
`sudo efibootmgr {{-o|--bootorder}} {{0002,0008,0001,0005}}`
|
||||
`sudo efibootmgr {{[-o|--bootorder]}} {{0002,0008,0001,0005}}`
|
||||
|
||||
- Delete a boot option:
|
||||
|
||||
`sudo efibootmgr {{-b|--bootnum}} {{0008}} {{-B|--delete-bootnum}}`
|
||||
`sudo efibootmgr {{[-b|--bootnum]}} {{0008}} {{[-B|--delete-bootnum]}}`
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
|
||||
- Update all packages, including dependencies:
|
||||
|
||||
`sudo emerge {{-avuDN|--ask --verbose --update --deep --newuse}} @world`
|
||||
`sudo emerge {{[-avuDN|--ask --verbose --update --deep --newuse]}} @world`
|
||||
|
||||
- Resume a failed updated, skipping the failing package:
|
||||
|
||||
|
@ -18,16 +18,16 @@
|
|||
|
||||
- Install a new package, with confirmation:
|
||||
|
||||
`sudo emerge {{-av|--ask --verbose}} {{package}}`
|
||||
`sudo emerge {{[-av|--ask --verbose]}} {{package}}`
|
||||
|
||||
- Remove a package and its dependencies with confirmation:
|
||||
|
||||
`sudo emerge {{-avc|--ask --verbose --depclean}} {{package}}`
|
||||
`sudo emerge {{[-avc|--ask --verbose --depclean]}} {{package}}`
|
||||
|
||||
- Remove orphaned packages (installed as dependencies but no longer required by any package):
|
||||
|
||||
`sudo emerge {{-avc|--ask --verbose --depclean}}`
|
||||
`sudo emerge {{[-avc|--ask --verbose --depclean]}}`
|
||||
|
||||
- Search the package database for a keyword:
|
||||
|
||||
`emerge {{-S|--searchdesc}} {{keyword}}`
|
||||
`emerge {{[-S|--searchdesc]}} {{keyword}}`
|
||||
|
|
|
@ -9,4 +9,4 @@
|
|||
|
||||
- Print file access events on the mount of the current directory, with timestamps, to `stdout`:
|
||||
|
||||
`sudo fatrace {{-c|--current-mount}} {{-t|--timestamp}}`
|
||||
`sudo fatrace {{[-c|--current-mount]}} {{[-t|--timestamp]}}`
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
|
||||
- Run `fuzzel` in dmenu mode:
|
||||
|
||||
`fuzzel {{-d|--dmenu}}`
|
||||
`fuzzel {{[-d|--dmenu]}}`
|
||||
|
||||
- Display a menu of the output of the `ls` command:
|
||||
|
||||
|
|
|
@ -34,4 +34,4 @@
|
|||
|
||||
- Display help:
|
||||
|
||||
`gcrane completion {{shell_name}} {{-h|--help}}`
|
||||
`gcrane completion {{shell_name}} {{[-h|--help]}}`
|
||||
|
|
|
@ -14,4 +14,4 @@
|
|||
|
||||
- Show the current setting of all booleans with explanations:
|
||||
|
||||
`sudo semanage boolean {{-l|--list}}`
|
||||
`sudo semanage boolean {{[-l|--list]}}`
|
||||
|
|
|
@ -5,4 +5,4 @@
|
|||
|
||||
- Create a password hash for GRUB 2 using PBKDF2 and print it to `stdout`:
|
||||
|
||||
`sudo grub2-mkpasswd-pbkdf2 {{-c|--iteration-count}} {{number_of_pbkdf2_iterations}} {{-s|--salt}} {{salt_length}}`
|
||||
`sudo grub2-mkpasswd-pbkdf2 {{[-c|--iteration-count]}} {{number_of_pbkdf2_iterations}} {{[-s|--salt]}} {{salt_length}}`
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
|
||||
- Force an operation:
|
||||
|
||||
`hyprpm {{-f|--force}} {{operation}}`
|
||||
`hyprpm {{[-f|--force]}} {{operation}}`
|
||||
|
||||
- List all installed plugins:
|
||||
|
||||
|
|
|
@ -5,32 +5,32 @@
|
|||
|
||||
- Display the routing table:
|
||||
|
||||
`ip route show`
|
||||
`ip {{[r|route]}} show`
|
||||
|
||||
- Display the main routing table (same as first example):
|
||||
|
||||
`ip route show {{main|254}}`
|
||||
`ip {{[r|route]}} show {{main|254}}`
|
||||
|
||||
- Display the local routing table:
|
||||
|
||||
`ip route show table {{local|255}}`
|
||||
`ip {{[r|route]}} show table {{local|255}}`
|
||||
|
||||
- Display all routing tables:
|
||||
|
||||
`ip route show table {{all|unspec|0}}`
|
||||
`ip {{[r|route]}} show table {{all|unspec|0}}`
|
||||
|
||||
- List routes from a given device only:
|
||||
|
||||
`ip route show dev {{eth0}}`
|
||||
`ip {{[r|route]}} show dev {{eth0}}`
|
||||
|
||||
- List routes within a given scope:
|
||||
|
||||
`ip route show scope link`
|
||||
`ip {{[r|route]}} show scope link`
|
||||
|
||||
- Display the routing cache:
|
||||
|
||||
`ip route show cache`
|
||||
`ip {{[r|route]}} show cache`
|
||||
|
||||
- Display only IPv6 or IPv4 routes:
|
||||
|
||||
`ip {{-6|-4}} route show`
|
||||
`ip {{-6|-4}} {{[r|route]}} show`
|
||||
|
|
|
@ -11,11 +11,11 @@
|
|||
|
||||
- Case-insensitively search only on blank and alphanumeric characters:
|
||||
|
||||
`look {{-f|--ignore-case}} {{-d|--alphanum}} {{prefix}} {{path/to/file}}`
|
||||
`look {{[-f|--ignore-case]}} {{[-d|--alphanum]}} {{prefix}} {{path/to/file}}`
|
||||
|
||||
- Specify a string termination character (space by default):
|
||||
|
||||
`look {{-t|--terminate}} {{,}}`
|
||||
`look {{[-t|--terminate]}} {{,}}`
|
||||
|
||||
- Search in `/usr/share/dict/words` (`--ignore-case` and `--alphanum` are assumed):
|
||||
|
||||
|
@ -23,4 +23,4 @@
|
|||
|
||||
- Search in `/usr/share/dict/web2` (`--ignore-case` and `--alphanum` are assumed):
|
||||
|
||||
`look {{-a|--alternative}} {{prefix}}`
|
||||
`look {{[-a|--alternative]}} {{prefix}}`
|
||||
|
|
|
@ -11,11 +11,11 @@
|
|||
|
||||
- Create a copy with Unix-style line endings:
|
||||
|
||||
`mac2unix {{-n|--newfile}} {{path/to/file}} {{path/to/new_file}}`
|
||||
`mac2unix {{[-n|--newfile]}} {{path/to/file}} {{path/to/new_file}}`
|
||||
|
||||
- Display file information:
|
||||
|
||||
`mac2unix {{-i|--info}} {{path/to/file}}`
|
||||
`mac2unix {{[-i|--info]}} {{path/to/file}}`
|
||||
|
||||
- Keep/add/remove Byte Order Mark:
|
||||
|
||||
|
|
|
@ -5,23 +5,23 @@
|
|||
|
||||
- Connect to ProtonVPN interactively:
|
||||
|
||||
`protonvpn {{c|connect}}`
|
||||
`protonvpn {{[c|connect]}}`
|
||||
|
||||
- Connect to ProtonVPN using the fastest server available:
|
||||
|
||||
`protonvpn {{c|connect}} {{-f|--fastest}}`
|
||||
`protonvpn {{[c|connect]}} {{[-f|--fastest]}}`
|
||||
|
||||
- Connect to ProtonVPN using a specific server with a specific protocol:
|
||||
|
||||
`protonvpn {{c|connect}} {{server_name}} -p {{udp|tcp}}`
|
||||
`protonvpn {{[c|connect]}} {{server_name}} -p {{udp|tcp}}`
|
||||
|
||||
- Connect to ProtonVPN using a random server with a specific protocol:
|
||||
|
||||
`protonvpn {{c|connect}} {{-r|--random}} -p {{udp|tcp}}`
|
||||
`protonvpn {{[c|connect]}} {{[-r|--random]}} -p {{udp|tcp}}`
|
||||
|
||||
- Connect to ProtonVPN using the fastest Tor-supporting server:
|
||||
|
||||
`protonvpn {{c|connect}} --tor`
|
||||
`protonvpn {{[c|connect]}} --tor`
|
||||
|
||||
- Display help:
|
||||
|
||||
|
|
|
@ -10,27 +10,27 @@
|
|||
|
||||
- Read objects from `pw-dump` JSON file:
|
||||
|
||||
`pw-dot {{-j|--json}} {{path/to/file.json}}`
|
||||
`pw-dot {{[-j|--json]}} {{path/to/file.json}}`
|
||||
|
||||
- Specify an [o]utput file, showing all object types:
|
||||
|
||||
`pw-dot --output {{path/to/file.dot}} {{-a|--all}}`
|
||||
`pw-dot --output {{path/to/file.dot}} {{[-a|--all]}}`
|
||||
|
||||
- Print `.dot` graph to `stdout`, showing all object properties:
|
||||
|
||||
`pw-dot --output - {{-d|--detail}}`
|
||||
`pw-dot --output - {{[-d|--detail]}}`
|
||||
|
||||
- Generate a graph from a [r]emote instance, showing only linked objects:
|
||||
|
||||
`pw-dot --remote {{remote_name}} {{-s|--smart}}`
|
||||
`pw-dot --remote {{remote_name}} {{[-s|--smart]}}`
|
||||
|
||||
- Lay the graph from left to right, instead of dot's default top to bottom:
|
||||
|
||||
`pw-dot {{-L|--lr}}`
|
||||
`pw-dot {{[-L|--lr]}}`
|
||||
|
||||
- Lay the graph using 90-degree angles in edges:
|
||||
|
||||
`pw-dot {{-9|--90}}`
|
||||
`pw-dot {{[-9|--90]}}`
|
||||
|
||||
- Display help:
|
||||
|
||||
|
|
|
@ -10,19 +10,19 @@
|
|||
|
||||
- Show metadata with ID 0 in `settings`:
|
||||
|
||||
`pw-metadata {{-n|--name}} {{settings}} {{0}}`
|
||||
`pw-metadata {{[-n|--name]}} {{settings}} {{0}}`
|
||||
|
||||
- List all available metadata objects:
|
||||
|
||||
`pw-metadata {{-l|--list}}`
|
||||
`pw-metadata {{[-l|--list]}}`
|
||||
|
||||
- Keep running and log the changes to the metadata:
|
||||
|
||||
`pw-metadata {{-m|--monitor}}`
|
||||
`pw-metadata {{[-m|--monitor]}}`
|
||||
|
||||
- Delete all metadata:
|
||||
|
||||
`pw-metadata {{-d|--delete}}`
|
||||
`pw-metadata {{[-d|--delete]}}`
|
||||
|
||||
- Set `log.level` to 1 in `settings`:
|
||||
|
||||
|
|
|
@ -10,4 +10,4 @@
|
|||
|
||||
- Run a command as another user and/or group:
|
||||
|
||||
`run0 {{-u|--user}} {{username|uid}} {{-g|--group}} {{group_name|gid}} {{command}}`
|
||||
`run0 {{[-u|--user]}} {{username|uid}} {{[-g|--group]}} {{group_name|gid}} {{command}}`
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
|
||||
- Sign an EFI binary with the created key and save the file to the database:
|
||||
|
||||
`sbctl sign {{-s|--save}} {{path/to/efi_binary}}`
|
||||
`sbctl sign {{[-s|--save]}} {{path/to/efi_binary}}`
|
||||
|
||||
- Re-sign all the saved files:
|
||||
|
||||
|
|
|
@ -6,12 +6,12 @@
|
|||
|
||||
- List all booleans settings:
|
||||
|
||||
`sudo semanage boolean {{-l|--list}}`
|
||||
`sudo semanage boolean {{[-l|--list]}}`
|
||||
|
||||
- List all user-defined boolean settings without headings:
|
||||
|
||||
`sudo semanage boolean {{-l|--list}} {{-C|--locallist}} {{-n|--noheading}}`
|
||||
`sudo semanage boolean {{[-l|--list]}} {{[-C|--locallist]}} {{[-n|--noheading]}}`
|
||||
|
||||
- Set or unset a boolean persistently:
|
||||
|
||||
`sudo semanage boolean {{-m|--modify}} {{-1|--on|-0|--off}} {{haproxy_connect_any}}`
|
||||
`sudo semanage boolean {{[-m|--modify]}} {{-1|--on|-0|--off}} {{haproxy_connect_any}}`
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
|
||||
- List all process types (a.k.a domains) that are in permissive mode:
|
||||
|
||||
`sudo semanage permissive {{-l|--list}}`
|
||||
`sudo semanage permissive {{[-l|--list]}}`
|
||||
|
||||
- Set or unset permissive mode for a domain:
|
||||
|
||||
|
|
|
@ -6,20 +6,20 @@
|
|||
|
||||
- List all port labeling rules:
|
||||
|
||||
`sudo semanage port {{-l|--list}}`
|
||||
`sudo semanage port {{[-l|--list]}}`
|
||||
|
||||
- List all user-defined port labeling rules without headings:
|
||||
|
||||
`sudo semanage port {{-l|--list}} {{-C|--locallist}} {{-n|--noheading}}`
|
||||
`sudo semanage port {{[-l|--list]}} {{[-C|--locallist]}} {{[-n|--noheading]}}`
|
||||
|
||||
- Add a user-defined rule that assigns a label to a protocol-port pair:
|
||||
|
||||
`sudo semanage port {{-a|--add}} {{-t|--type}} {{ssh_port_t}} {{-p|--proto}} {{tcp}} {{22000}}`
|
||||
`sudo semanage port {{[-a|--add]}} {{[-t|--type]}} {{ssh_port_t}} {{[-p|--proto]}} {{tcp}} {{22000}}`
|
||||
|
||||
- Add a user-defined rule that assigns a label to a protocol-port-range pair:
|
||||
|
||||
`sudo semanage port {{-a|--add}} {{-t|--type}} {{http_port_t}} {{-p|--proto}} {{tcp}} {{80-88}}`
|
||||
`sudo semanage port {{[-a|--add]}} {{[-t|--type]}} {{http_port_t}} {{[-p|--proto]}} {{tcp}} {{80-88}}`
|
||||
|
||||
- Delete a user-defined rule using its protocol-port pair:
|
||||
|
||||
`sudo semanage port {{-d|--delete}} {{-p|--proto}} {{udp}} {{11940}}`
|
||||
`sudo semanage port {{[-d|--delete]}} {{[-p|--proto]}} {{udp}} {{11940}}`
|
||||
|
|
|
@ -6,15 +6,15 @@
|
|||
|
||||
- Set or unset a SELinux boolean. Booleans allow the administrator to customize how policy rules affect confined process types (a.k.a domains):
|
||||
|
||||
`sudo semanage boolean {{-m|--modify}} {{-1|--on|-0|--off}} {{haproxy_connect_any}}`
|
||||
`sudo semanage boolean {{[-m|--modify]}} {{-1|--on|-0|--off}} {{haproxy_connect_any}}`
|
||||
|
||||
- Add a user-defined file context labeling rule. File contexts define what files confined domains are allowed to access:
|
||||
|
||||
`sudo semanage fcontext {{-a|--add}} {{-t|--type}} {{samba_share_t}} '/mnt/share(/.*)?'`
|
||||
`sudo semanage fcontext {{[-a|--add]}} {{[-t|--type]}} {{samba_share_t}} '/mnt/share(/.*)?'`
|
||||
|
||||
- Add a user-defined port labeling rule. Port labels define what ports confined domains are allowed to listen on:
|
||||
|
||||
`sudo semanage port {{-a|--add}} {{-t|--type}} {{ssh_port_t}} {{-p|--proto}} {{tcp}} {{22000}}`
|
||||
`sudo semanage port {{[-a|--add]}} {{[-t|--type]}} {{ssh_port_t}} {{[-p|--proto]}} {{tcp}} {{22000}}`
|
||||
|
||||
- Set or unset permissive mode for a confined domain. Per-domain permissive mode allows more granular control compared to `setenforce`:
|
||||
|
||||
|
@ -22,8 +22,8 @@
|
|||
|
||||
- Output local customizations in the default store:
|
||||
|
||||
`sudo semanage export {{-f|--output_file}} {{path/to/file}}`
|
||||
`sudo semanage export {{[-f|--output_file]}} {{path/to/file}}`
|
||||
|
||||
- Import a file generated by `semanage export` into local customizations (CAREFUL: may remove current customizations!):
|
||||
|
||||
`sudo semanage import {{-f|--input_file}} {{path/to/file}}`
|
||||
`sudo semanage import {{[-f|--input_file]}} {{path/to/file}}`
|
||||
|
|
|
@ -22,4 +22,4 @@
|
|||
|
||||
- Set or unset a boolean persistently (alternative method using `semanage-boolean`):
|
||||
|
||||
`sudo semanage boolean {{-m|--modify}} {{-1|--on|-0|--off}} {{haproxy_connect_any}}`
|
||||
`sudo semanage boolean {{[-m|--modify]}} {{-1|--on|-0|--off}} {{haproxy_connect_any}}`
|
||||
|
|
|
@ -9,15 +9,15 @@
|
|||
|
||||
- Display scancodes in hexadecimal:
|
||||
|
||||
`sudo showkey {{-s|--scancodes}}`
|
||||
`sudo showkey {{[-s|--scancodes]}}`
|
||||
|
||||
- Display keycodes in decimal (default):
|
||||
|
||||
`sudo showkey {{-k|--keycodes}}`
|
||||
`sudo showkey {{[-k|--keycodes]}}`
|
||||
|
||||
- Display keycodes in ASCII, decimal, and hexadecimal:
|
||||
|
||||
`sudo showkey {{-a|--ascii}}`
|
||||
`sudo showkey {{[-a|--ascii]}}`
|
||||
|
||||
- Exit the program:
|
||||
|
||||
|
|
|
@ -9,12 +9,12 @@
|
|||
|
||||
- Display the size of sections in a given object or executable file in [o]ctal:
|
||||
|
||||
`size {{-o|--radix=8}} {{path/to/file}}`
|
||||
`size {{[-o|--radix=8]}} {{path/to/file}}`
|
||||
|
||||
- Display the size of sections in a given object or executable file in [d]ecimal:
|
||||
|
||||
`size {{-d|--radix=10}} {{path/to/file}}`
|
||||
`size {{[-d|--radix=10]}} {{path/to/file}}`
|
||||
|
||||
- Display the size of sections in a given object or executable file in he[x]adecimal:
|
||||
|
||||
`size {{-x|--radix=16}} {{path/to/file}}`
|
||||
`size {{[-x|--radix=16]}} {{path/to/file}}`
|
||||
|
|
|
@ -5,32 +5,32 @@
|
|||
|
||||
- Show all TCP/UDP/RAW/UNIX sockets:
|
||||
|
||||
`ss -a {{-t|-u|-w|-x}}`
|
||||
`ss {{[-a|--all]}} {{-t|-u|-w|-x}}`
|
||||
|
||||
- Filter TCP sockets by states, only/exclude:
|
||||
|
||||
`ss {{state/exclude}} {{bucket/big/connected/synchronized/...}}`
|
||||
`ss {{state|exclude}} {{bucket|big|connected|synchronized|...}}`
|
||||
|
||||
- Show all TCP sockets connected to the local HTTPS port (443):
|
||||
|
||||
`ss -t src :{{443}}`
|
||||
`ss {{[-t|--tcp]}} src :{{443}}`
|
||||
|
||||
- Show all TCP sockets listening on the local 8080 port:
|
||||
|
||||
`ss -lt src :{{8080}}`
|
||||
`ss {{[-lt|--listening --tcp]}} src :{{8080}}`
|
||||
|
||||
- Show all TCP sockets along with processes connected to a remote SSH port:
|
||||
|
||||
`ss -pt dst :{{ssh}}`
|
||||
`ss {{[-pt|--processes --tcp]}} dst :{{ssh}}`
|
||||
|
||||
- Show all UDP sockets connected on specific source and destination ports:
|
||||
|
||||
`ss -u 'sport == :{{source_port}} and dport == :{{destination_port}}'`
|
||||
`ss {{[-u|--udp]}} 'sport == :{{source_port}} and dport == :{{destination_port}}'`
|
||||
|
||||
- Show all TCP IPv4 sockets locally connected on the subnet 192.168.0.0/16:
|
||||
|
||||
`ss -4t src {{192.168/16}}`
|
||||
`ss {{[-4t|--ipv4 --tcp]}} src {{192.168/16}}`
|
||||
|
||||
- Kill IPv4 or IPv6 Socket Connection with destination IP 192.168.1.17 and destination port 8080:
|
||||
|
||||
`ss --kill dst {{192.168.1.17}} dport = {{8080}}`
|
||||
`ss {{[-K|--kill]}} dst {{192.168.1.17}} dport = {{8080}}`
|
||||
|
|
|
@ -5,28 +5,28 @@
|
|||
|
||||
- Add constant network delay to outbound packages:
|
||||
|
||||
`tc qdisc add dev {{eth0}} root netem delay {{delay_in_milliseconds}}ms`
|
||||
`sudo tc {{[q|qdisc]}} {{[a|add]}} dev {{eth0}} root netem delay {{delay_in_milliseconds}}ms`
|
||||
|
||||
- Add normal distributed network delay to outbound packages:
|
||||
|
||||
`tc qdisc add dev {{eth0}} root netem delay {{mean_delay_ms}}ms {{delay_std_ms}}ms`
|
||||
`sudo tc {{[q|qdisc]}} {{[a|add]}} dev {{eth0}} root netem delay {{mean_delay_ms}}ms {{delay_std_ms}}ms`
|
||||
|
||||
- Add package corruption/loss/duplication to a portion of packages:
|
||||
|
||||
`tc qdisc add dev {{eth0}} root netem {{corruption|loss|duplication}} {{effect_percentage}}%`
|
||||
`sudo tc {{[q|qdisc]}} {{[a|add]}} dev {{eth0}} root netem {{corruption|loss|duplication}} {{effect_percentage}}%`
|
||||
|
||||
- Limit bandwidth, burst rate and max latency:
|
||||
|
||||
`tc qdisc add dev eth0 root tbf rate {{max_bandwidth_mb}}mbit burst {{max_burst_rate_kb}}kbit latency {{max_latency_before_drop_ms}}ms`
|
||||
`sudo tc {{[q|qdisc]}} {{[a|add]}} dev eth0 root tbf rate {{max_bandwidth_mb}}mbit burst {{max_burst_rate_kb}}kbit latency {{max_latency_before_drop_ms}}ms`
|
||||
|
||||
- Show active traffic control policies:
|
||||
|
||||
`tc qdisc show dev {{eth0}}`
|
||||
`tc {{[q|qdisc]}} {{[s|show]}} dev {{eth0}}`
|
||||
|
||||
- Delete all traffic control rules:
|
||||
|
||||
`tc qdisc del dev {{eth0}}`
|
||||
`sudo tc {{[q|qdisc]}} {{[d|delete]}} dev {{eth0}}`
|
||||
|
||||
- Change traffic control rule:
|
||||
|
||||
`tc qdisc change dev {{eth0}} root netem {{policy}} {{policy_parameters}}`
|
||||
`sudo tc {{[q|qdisc]}} {{[c|change]}} dev {{eth0}} root netem {{policy}} {{policy_parameters}}`
|
||||
|
|
|
@ -18,11 +18,11 @@
|
|||
|
||||
- Show configuration:
|
||||
|
||||
`sudo tlp-stat {{-c|--config}}`
|
||||
`sudo tlp-stat {{[-c|--config]}}`
|
||||
|
||||
- Monitor [p]ower supply `udev` [ev]ents:
|
||||
|
||||
`sudo tlp-stat {{-P|--pev}}`
|
||||
`sudo tlp-stat {{[-P|--pev]}}`
|
||||
|
||||
- Show [p]ower [sup]ply diagonistics:
|
||||
|
||||
|
@ -30,8 +30,8 @@
|
|||
|
||||
- Show [temp]eratures and fan speed:
|
||||
|
||||
`sudo tlp-stat {{-t|--temp}}`
|
||||
`sudo tlp-stat {{[-t|--temp]}}`
|
||||
|
||||
- Show general system information:
|
||||
|
||||
`sudo tlp-stat {{-s|--system}}`
|
||||
`sudo tlp-stat {{[-s|--system]}}`
|
||||
|
|
|
@ -5,24 +5,24 @@
|
|||
|
||||
- Print the volume label of a filesystem:
|
||||
|
||||
`tune.exfat {{-l|--print-label}} {{/dev/sdXY}}`
|
||||
`tune.exfat {{[-l|--print-label]}} {{/dev/sdXY}}`
|
||||
|
||||
- Set the volume label of a filesystem:
|
||||
|
||||
`tune.exfat {{-L|--set-label}} {{new_label}} {{/dev/sdXY}}`
|
||||
`tune.exfat {{[-L|--set-label]}} {{new_label}} {{/dev/sdXY}}`
|
||||
|
||||
- Print the volume GUID of a filesystem:
|
||||
|
||||
`tune.exfat {{-u|--print-guid}} {{/dev/sdXY}}`
|
||||
`tune.exfat {{[-u|--print-guid]}} {{/dev/sdXY}}`
|
||||
|
||||
- Set the volume GUID of a filesystem:
|
||||
|
||||
`tune.exfat {{-U|--set-guid}} {{new_guid}} {{/dev/sdXY}}`
|
||||
`tune.exfat {{[-U|--set-guid]}} {{new_guid}} {{/dev/sdXY}}`
|
||||
|
||||
- Print the volume serial of a filesystem:
|
||||
|
||||
`tune.exfat {{-i|--print-serial}} {{/dev/sdXY}}`
|
||||
`tune.exfat {{[-i|--print-serial]}} {{/dev/sdXY}}`
|
||||
|
||||
- Set the volume serial of a filesystem:
|
||||
|
||||
`tune.exfat {{-I|--set-serial}} {{new_serial}} {{/dev/sdXY}}`
|
||||
`tune.exfat {{[-I|--set-serial]}} {{new_serial}} {{/dev/sdXY}}`
|
||||
|
|
|
@ -11,11 +11,11 @@
|
|||
|
||||
- Create a copy with DOS-style line endings:
|
||||
|
||||
`unix2dos {{-n|--newfile}} {{path/to/file}} {{path/to/new_file}}`
|
||||
`unix2dos {{[-n|--newfile]}} {{path/to/file}} {{path/to/new_file}}`
|
||||
|
||||
- Display file information:
|
||||
|
||||
`unix2dos {{-i|--info}} {{path/to/file}}`
|
||||
`unix2dos {{[-i|--info]}} {{path/to/file}}`
|
||||
|
||||
- Keep/add/remove Byte Order Mark:
|
||||
|
||||
|
|
|
@ -11,11 +11,11 @@
|
|||
|
||||
- Create a copy with macOS-style line endings:
|
||||
|
||||
`unix2mac {{-n|--newfile}} {{path/to/file}} {{path/to/new_file}}`
|
||||
`unix2mac {{[-n|--newfile]}} {{path/to/file}} {{path/to/new_file}}`
|
||||
|
||||
- Display file information:
|
||||
|
||||
`unix2mac {{-i|--info}} {{path/to/file}}`
|
||||
`unix2mac {{[-i|--info]}} {{path/to/file}}`
|
||||
|
||||
- Keep/add/remove Byte Order Mark:
|
||||
|
||||
|
|
|
@ -27,4 +27,4 @@
|
|||
|
||||
- Display help:
|
||||
|
||||
`unopkg {{-h|--help}}`
|
||||
`unopkg {{[-h|--help]}}`
|
||||
|
|
|
@ -10,24 +10,24 @@
|
|||
|
||||
- Create a new user with the specified user ID:
|
||||
|
||||
`sudo useradd {{-u|--uid}} {{id}} {{username}}`
|
||||
`sudo useradd {{[-u|--uid]}} {{id}} {{username}}`
|
||||
|
||||
- Create a new user with the specified shell:
|
||||
|
||||
`sudo useradd {{-s|--shell}} {{path/to/shell}} {{username}}`
|
||||
`sudo useradd {{[-s|--shell]}} {{path/to/shell}} {{username}}`
|
||||
|
||||
- Create a new user belonging to additional groups (mind the lack of whitespace):
|
||||
|
||||
`sudo useradd {{-G|--groups}} {{group1,group2,...}} {{username}}`
|
||||
`sudo useradd {{[-G|--groups]}} {{group1,group2,...}} {{username}}`
|
||||
|
||||
- Create a new user with the default home directory:
|
||||
|
||||
`sudo useradd {{-m|--create-home}} {{username}}`
|
||||
`sudo useradd {{[-m|--create-home]}} {{username}}`
|
||||
|
||||
- Create a new user with the home directory filled by template directory files:
|
||||
|
||||
`sudo useradd {{-k|--skel}} {{path/to/template_directory}} {{-m|--create-home}} {{username}}`
|
||||
`sudo useradd {{[-k|--skel]}} {{path/to/template_directory}} {{[-m|--create-home]}} {{username}}`
|
||||
|
||||
- Create a new system user without the home directory:
|
||||
|
||||
`sudo useradd {{-r|--system}} {{username}}`
|
||||
`sudo useradd {{[-r|--system]}} {{username}}`
|
||||
|
|
|
@ -10,8 +10,8 @@
|
|||
|
||||
- Remove a user in other root directory:
|
||||
|
||||
`sudo userdel {{-R|--root}} {{path/to/other/root}} {{username}}`
|
||||
`sudo userdel {{[-R|--root]}} {{path/to/other/root}} {{username}}`
|
||||
|
||||
- Remove a user along with the home directory and mail spool:
|
||||
|
||||
`sudo userdel {{-r|--remove}} {{username}}`
|
||||
`sudo userdel {{[-r|--remove]}} {{username}}`
|
||||
|
|
|
@ -6,20 +6,20 @@
|
|||
|
||||
- Change a username:
|
||||
|
||||
`sudo usermod {{-l|--login}} {{new_username}} {{username}}`
|
||||
`sudo usermod {{[-l|--login]}} {{new_username}} {{username}}`
|
||||
|
||||
- Change a user ID:
|
||||
|
||||
`sudo usermod {{-u|--uid}} {{id}} {{username}}`
|
||||
`sudo usermod {{[-u|--uid]}} {{id}} {{username}}`
|
||||
|
||||
- Change a user shell:
|
||||
|
||||
`sudo usermod {{-s|--shell}} {{path/to/shell}} {{username}}`
|
||||
`sudo usermod {{[-s|--shell]}} {{path/to/shell}} {{username}}`
|
||||
|
||||
- Add a user to supplementary groups (mind the lack of whitespace):
|
||||
|
||||
`sudo usermod {{-a|--append}} {{-G|--groups}} {{group1,group2,...}} {{username}}`
|
||||
`sudo usermod {{[-a|--append]}} {{[-G|--groups]}} {{group1,group2,...}} {{username}}`
|
||||
|
||||
- Change a user home directory:
|
||||
|
||||
`sudo usermod {{-m|--move-home}} {{-d|--home}} {{path/to/new_home}} {{username}}`
|
||||
`sudo usermod {{[-m|--move-home]}} {{[-d|--home]}} {{path/to/new_home}} {{username}}`
|
||||
|
|
Loading…
Add table
Reference in a new issue