NOTE
Common Linux Commands
[toc] 1. Processes 1.1. top top 1.2. vmstat vmstat 1.3. ps ps 1.4. pstree pstree 1.5. ulimit ulimit 1.6. systemd systemd 1.7. pidstat pidstat 1.8. perf perf 2. Memory 2.1. free free 3. Disk 3.1. df df 3.2. iostat iostat 3.3. lsof lsof 3.4. strace str
This is a historical learning note and may contain outdated or incomplete understanding.
1. Processes
1.1. top
1.2. vmstat
1.3. ps
1.4. pstree
1.5. ulimit
1.6. systemd
1.7. pidstat
1.8. perf
2. Memory
2.1. free
3. Disk
3.1. df
3.2. iostat
3.3. lsof
3.4. strace
3.5. chroot
3.6. Text
- The cat command can display an entire file at once. If the file is relatively large, it is not very convenient to use.
- The more command can pause when the screen fills. Press Space to page forward and b to page backward.
- The less command can also display files page by page. The differences from more are:
- It supports scrolling with the up/down keys and searching.
- It does not need to read the entire file at the beginning, so it opens large files faster than more or vim.
- The head command is used to view the first n lines of a file.
- The tail command is used to view the last n lines of a file. With the
-foption, it is very convenient for viewing online logs because it can print newly added log lines.- tail -f grep –color -A xxx -B xxx
3.7. Copying
3.7.1. scp
3.7.2. rsync
4. Networking
4.1. ifstat
4.2. netstat
4.3. ifconfig
4.4. Test Host Connectivity
- curl tests HTTP.
curl https://www.baidu.com:443
- telnet tests TCP.
telnet www.baidu.com 80
4.5. traceroute
4.6. dig
4.7. nslookup
4.8. nethogs
4.9. sar
4.10. Packet Capture
5. References
- Troubleshooting Linux Performance Bottlenecks - CSDN
- Detailed Explanation of CPU Information in the Linux top Command - CNBlogs
- Tool Reference — Linux Tools Quick Tutorial
- Detailed Explanation of Linux ulimit | Otokaze’s Blog
- Summary of the Maximum Number of File Handles in Linux - ITeye
- Comparison of cat, less, more, head, and tail Commands - CSDN
- Difference Between buffer and cache Shown by vmstat - CSDN
- 008 Detailed Explanation of the top Command, Linux Basic Commands (4) - Bilibili
Discussion
Sign in with GitHub to comment. Discussions are stored as GitHub Issues.View on GitHub