5.1 查看 CPU、内存、IO 信息
⚫ more /proc/cpuinfo
⚫ more /proc/meminfo
⚫ more /proc/ioports 或者 top(ctrl +c 退出)
5.2 查看历史命令
⚫ history 查看所有历史命令
⚫ history 10 查看最近的 10 条历史命令
5.3 查看资源的命令
⚫ 内存:free –m
⚫ 查看硬盘:df -h -> du -sh * 配合着一起使用
⚫ 查看磁盘空间大小:df –h
⚫ 查看文件或文件夹所占空间大小:du -sh /tmp
⚫ 查看本机 IP:ifconfig
5.4 关闭防火墙
centos7 以下:service iptables stop
centos7 以上:systemctl stop firewalld
5.5 进程查看
⚫ 查看实时进程:top (相当于 windows 的任务管理器)
⚫ 查看进程:ps -ef
⚫ 杀死进程:kill 或 killall
◼ kill pid 如:kill 4912 kill -9 4912 表示强杀
◼ killall pname 如:killall apache
5.6 查看端口是否被占用
netstat -anp | grep 80