1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73
| lsb_release -a #查看系统版本信息的命令 cat /etc/redhat-release uname -a hostnamectl uptime cat /proc/version #查看系统版本信息的命令 cat /proc/sys/fs/inotify/max_user_watches #最大文件监控数 # The limit can be increased to its maximum by editing /etc/sysctl.conf (except on Arch Linux, read below) and adding this line to the end of the file: # fs.inotify.max_user_watches=524288 # The new value can then be loaded in by running sudo sysctl -p. # While 524,288 is the maximum number of files that can be watched, if you're in an environment that is particularly memory constrained, you may wish to lower the number. Each file watch takes up 1080 bytes, so assuming that all 524,288 watches are consumed, that results in an upper bound of around 540 MiB.
ls /proc[pid] #查看进程信息 watch -n 1 "nstat | grep Tcp" #查看机器网络变化信息, 排错可用 df -lhT #查看文件系统类型
du -h --max-depth=1 #查看当前目录文件夹大小
who
who -Hu #查看谁可以访问
grep sh$ /etc/passwd #查看谁有shell访问权限
# 查看是否物理机 dmidecode -s system-manufacturer dmidecode -s system-product-name lshw -c system | grep product | head -1 cat /sys/class/dmi/id/product_name cat /sys/class/dmi/id/sys_vendo
# 查看硬件信息 lscpu or cat /proc/cpuinfo lsmem or cat /proc/meminfo ifconfig -a ethtool <devname> lshw lspci dmidecode
# 查看进程和服务 pstree -pa 1 ps -ef ps auxf systemctl
# 网路 netstat -tulpn netstat -anp lsof -i ss iptables -L -n cat /etc/resolv.conf ss -ln | head -n1 ;ss -ln | grep 8000
# 内核 [https://www.oreilly.com/library/view/red-hat-enterprise/9781785283550/ch10s05.html](https://www.oreilly.com/library/view/red-hat-enterprise/9781785283550/ch10s05.html) uname -r cat /proc/cmdline lsmod modinfo <module> sysctl -a cat /boot/grub2/grub.cfg
# 日志 dmesg tail -f /var/log/messages journalctl
strace# 追踪
lspci -k | grep -A 2 -i "VGA" #查看显卡
|