forked from tldr-pages/tldr
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
22 changed files
with
547 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# free | ||
|
||
> Display amount of free and used memory in the system. | ||
> More information: <https://manned.org/free>. | ||
- Display system memory: | ||
|
||
`free` | ||
|
||
- Display memory in Bytes/KB/MB/GB: | ||
|
||
`free -{{b|k|m|g}}` | ||
|
||
- Display memory in human-readable units: | ||
|
||
`free -h` | ||
|
||
- Refresh the output every 2 seconds: | ||
|
||
`free -s {{2}}` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# halt | ||
|
||
> Halt the system. | ||
> More information: <https://manned.org/halt.8>. | ||
- Halt the system: | ||
|
||
`halt` | ||
|
||
- Power off the system (same as `poweroff`): | ||
|
||
`halt --poweroff` | ||
|
||
- Reboot the system (same as `reboot`): | ||
|
||
`halt --reboot` | ||
|
||
- Halt immediately without contacting the system manager: | ||
|
||
`halt --force` | ||
|
||
- Write the wtmp shutdown entry without halting the system: | ||
|
||
`halt --wtmp-only` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# head | ||
|
||
> Output the first part of files. | ||
> More information: <https://www.gnu.org/software/coreutils/head>. | ||
- Output the first few lines of a file: | ||
|
||
`head --lines {{count}} {{path/to/file}}` | ||
|
||
- Output the first few bytes of a file: | ||
|
||
`head --bytes {{count}} {{path/to/file}}` | ||
|
||
- Output everything but the last few lines of a file: | ||
|
||
`head --lines -{{count}} {{path/to/file}}` | ||
|
||
- Output everything but the last few bytes of a file: | ||
|
||
`head --bytes -{{count}} {{path/to/file}}` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
# iftop | ||
|
||
> Show bandwidth usage on an interface by host. | ||
> More information: <https://manned.org/iftop>. | ||
- Show the bandwidth usage: | ||
|
||
`sudo iftop` | ||
|
||
- Show the bandwidth usage of a given interface: | ||
|
||
`sudo iftop -i {{interface}}` | ||
|
||
- Show the bandwidth usage with port information: | ||
|
||
`sudo iftop -P` | ||
|
||
- Do not show bar graphs of traffic: | ||
|
||
`sudo iftop -b` | ||
|
||
- Do not look up hostnames: | ||
|
||
`sudo iftop -n` | ||
|
||
- Display help: | ||
|
||
`?` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
# iptables | ||
|
||
> Configure tables, chains and rules of the Linux kernel IPv4 firewall. | ||
> Use `ip6tables` to set rules for IPv6 traffic. See also: `iptables-save`, `iptables-restore`. | ||
> More information: <https://manned.org/iptables>. | ||
- View chains, rules, packet/byte counters and line numbers for the filter table: | ||
|
||
`sudo iptables --verbose --numeric --list --line-numbers` | ||
|
||
- Set chain [P]olicy rule: | ||
|
||
`sudo iptables --policy {{chain}} {{rule}}` | ||
|
||
- [A]ppend rule to chain policy for IP: | ||
|
||
`sudo iptables --append {{chain}} --source {{ip}} --jump {{rule}}` | ||
|
||
- [A]ppend rule to chain policy for IP considering [p]rotocol and port: | ||
|
||
`sudo iptables --append {{chain}} --source {{ip}} --protocol {{tcp|udp|icmp|...}} --dport {{port}} --jump {{rule}}` | ||
|
||
- Add a NAT rule to translate all traffic from the `192.168.0.0/24` subnet to the host's public IP: | ||
|
||
`sudo iptables --table {{nat}} --append {{POSTROUTING}} --source {{192.168.0.0/24}} --jump {{MASQUERADE}}` | ||
|
||
- [D]elete chain rule: | ||
|
||
`sudo iptables --delete {{chain}} {{rule_line_number}}` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
# kill | ||
|
||
> Sends a signal to a process, usually related to stopping the process. | ||
> All signals except for SIGKILL and SIGSTOP can be intercepted by the process to perform a clean exit. | ||
> More information: <https://manned.org/kill>. | ||
- Terminate a program using the default SIGTERM (terminate) signal: | ||
|
||
`kill {{process_id}}` | ||
|
||
- List signal values and their corresponding names (to be used without the `SIG` prefix): | ||
|
||
`kill {{-L|--table}}` | ||
|
||
- Terminate a background job: | ||
|
||
`kill %{{job_id}}` | ||
|
||
- Terminate a program using the SIGHUP (hang up) signal. Many daemons will reload instead of terminating: | ||
|
||
`kill -{{1|HUP}} {{process_id}}` | ||
|
||
- Terminate a program using the SIGINT (interrupt) signal. This is typically initiated by the user pressing `Ctrl + C`: | ||
|
||
`kill -{{2|INT}} {{process_id}}` | ||
|
||
- Signal the operating system to immediately terminate a program (which gets no chance to capture the signal): | ||
|
||
`kill -{{9|KILL}} {{process_id}}` | ||
|
||
- Signal the operating system to pause a program until a SIGCONT ("continue") signal is received: | ||
|
||
`kill -{{17|STOP}} {{process_id}}` | ||
|
||
- Send a `SIGUSR1` signal to all processes with the given GID (group id): | ||
|
||
`kill -{{SIGUSR1}} -{{group_id}}` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# locate | ||
|
||
> Find filenames quickly. | ||
> More information: <https://manned.org/locate>. | ||
- Look for pattern in the database. Note: the database is recomputed periodically (usually weekly or daily): | ||
|
||
`locate {{pattern}}` | ||
|
||
- Look for a file by its exact filename (a pattern containing no globbing characters is interpreted as `*pattern*`): | ||
|
||
`locate '*/{{filename}}'` | ||
|
||
- Recompute the database. You need to do it if you want to find recently added files: | ||
|
||
`sudo updatedb` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# lscpu | ||
|
||
> Display information about the CPU architecture. | ||
> More information: <https://manned.org/lscpu>. | ||
- Display information about all CPUs: | ||
|
||
`lscpu` | ||
|
||
- Display information in a table: | ||
|
||
`lscpu --extended` | ||
|
||
- Display only information about offline CPUs in a table: | ||
|
||
`lscpu --extended --offline` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# lshw | ||
|
||
> List detailed information about hardware configurations as root user. | ||
> More information: <https://manned.org/lshw>. | ||
- Launch the GUI: | ||
|
||
`sudo lshw -X` | ||
|
||
- List all hardware in tabular format: | ||
|
||
`sudo lshw -short` | ||
|
||
- List all disks and storage controllers in tabular format: | ||
|
||
`sudo lshw -class disk -class storage -short` | ||
|
||
- Save all network interfaces to an HTML file: | ||
|
||
`sudo lshw -class network -html > {{interfaces.html}}` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# lspci | ||
|
||
> List all PCI devices. | ||
> More information: <https://manned.org/lspci>. | ||
- Show a brief list of devices: | ||
|
||
`lspci` | ||
|
||
- Display additional info: | ||
|
||
`lspci -v` | ||
|
||
- Display drivers and modules handling each device: | ||
|
||
`lspci -k` | ||
|
||
- Show a specific device: | ||
|
||
`lspci -s {{00:18.3}}` | ||
|
||
- Dump info in a readable form: | ||
|
||
`lspci -vm` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# lsusb | ||
|
||
> Display information about USB buses and devices connected to them. | ||
> More information: <https://manned.org/lsusb>. | ||
- List all the USB devices available: | ||
|
||
`lsusb` | ||
|
||
- List the USB hierarchy as a tree: | ||
|
||
`lsusb -t` | ||
|
||
- List verbose information about USB devices: | ||
|
||
`lsusb --verbose` | ||
|
||
- List detailed information about a USB device: | ||
|
||
`lsusb --verbose -s {{bus}}:{{device number}}` | ||
|
||
- List devices with a specified vendor and product ID only: | ||
|
||
`lsusb -d {{vendor}}:{{product}}` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
# man | ||
|
||
> Format and display manual pages. | ||
> More information: <https://manned.org/man>. | ||
- Display the man page for a command: | ||
|
||
`man {{command}}` | ||
|
||
- Open the man page for a command in a browser: | ||
|
||
`man --html {{command}}` | ||
|
||
- Display the man page for a command from section 7: | ||
|
||
`man {{7}} {{command}}` | ||
|
||
- List all available sections for a command: | ||
|
||
`man --whatis {{command}}` | ||
|
||
- Display the path searched for manpages: | ||
|
||
`man --path` | ||
|
||
- Display the location of a manpage rather than the manpage itself: | ||
|
||
`man --where {{command}}` | ||
|
||
- Display the man page using a specific locale: | ||
|
||
`man --locale {{locale}} {{command}}` | ||
|
||
- Search for manpages containing a search string: | ||
|
||
`man --apropos "{{search_string}}"` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,16 @@ | ||
# pwd | ||
|
||
> แสดงชื่อของไดเรกทอรีที่ทำงานอยู่ | ||
> ข้อมูลเพิ่มเติม: <https://www.gnu.org/software/coreutils/pwd> | ||
> Print name of current/working directory. | ||
> More information: <https://www.gnu.org/software/coreutils/pwd>. | ||
- แสดงชื่อของไดเรกทอรีที่ทำงานอยู่: | ||
- Print the current directory: | ||
|
||
`pwd` | ||
|
||
- แสดงชื่อของไดเรกทอรีที่ทำงานอยู่ โดยไม่รวม symlinks: | ||
- Print the current directory, and resolve all symlinks (i.e. show the "physical" path): | ||
|
||
`pwd --physical` | ||
|
||
- แสดงชื่อของไดเรกทอรีที่ทำงานอยู่ โดยใช้ PWD จาก environment ถึงแม้ว่าจะรวม symlinks: | ||
- Print the current logical directory: | ||
|
||
`pwd --logical` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# reboot | ||
|
||
> Reboot the system. | ||
> More information: <https://manned.org/reboot.8>. | ||
- Reboot the system: | ||
|
||
`reboot` | ||
|
||
- Power off the system (same as `poweroff`): | ||
|
||
`reboot --poweroff` | ||
|
||
- Halt (terminates all processes and shuts down the CPU) the system (same as `halt`): | ||
|
||
`reboot --halt` | ||
|
||
- Reboot immediately without contacting the system manager: | ||
|
||
`reboot --force` | ||
|
||
- Write the wtmp shutdown entry without rebooting the system: | ||
|
||
`reboot --wtmp-only` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
# rm | ||
|
||
> Remove files or directories. | ||
> See also: `rmdir`. | ||
> More information: <https://www.gnu.org/software/coreutils/rm>. | ||
- Remove specific files: | ||
|
||
`rm {{path/to/file1 path/to/file2 ...}}` | ||
|
||
- Remove specific files ignoring nonexistent ones: | ||
|
||
`rm --force {{path/to/file1 path/to/file2 ...}}` | ||
|
||
- Remove specific files interactively prompting before each removal: | ||
|
||
`rm --interactive {{path/to/file1 path/to/file2 ...}}` | ||
|
||
- Remove specific files printing info about each removal: | ||
|
||
`rm --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 ...}}` |
Oops, something went wrong.