| pipeline is good!-> xargs,tee |
hostnamectl set-hostnamehostnamenmcliifconfig check ip address MAC address etcip adder show show all ip addressyum, dnfapttop:实时显示系统的进程和资源使用情况。htop:类似于top,但界面更友好(需要单独安装)。uptime:查看系统运行时间和平均负载。proc/cpuinfo:查看CPU信息和逻辑cores。free -h:以人类可读格式显示内存使用情况。vmstat:查看内存、CPU,process,i/o等资源的详细信息。vm是指virtual memory。proc/memoinfo:有各种fields指示了memo各种信息。df -h:以人类可读格式显示文件系统磁盘使用情况。du -sh <目录>:查看指定目录的大小。iostat:显示CPU和磁盘I/O统计信息(需要安装sysstat)。iotop:实时监控各进程的磁盘I/O使用情况。netstat -tuln:查看当前的网络连接和监听的端口。ss -tuln:类似netstat,但速度更快。lsof -i:显示使用特定端口的进程。ping <主机名/IP>:检查主机是否在线。traceroute <主机名/IP>:追踪数据包到目标主机的路径。curl -I <URL>:查看URL的HTTP响应头,验证服务是否可访问。ifconfig 或 ip addr show:查看网络接口信息。ethtool <网络接口>:查看或修改网络接口的配置(需要root权限)。ip link show:显示网络链路状态。firewalld:查看防火墙状态(CentOS/RHEL)。ufw status:查看防火墙状态(Ubuntu)。iptables -L:查看防火墙规则。ps aux:显示所有进程的详细信息。ps -ef:另一个格式显示所有进程信息。pstree:以树状结构显示进程关系。pgrep <进程名>:根据名称查找进程ID。pidof <进程名>:返回进程ID。lsof -p <PID>:查看某个进程打开的文件。nice / renice:修改进程的优先级。kill:关闭进程。systemctl status <服务名>:查看服务状态(适用于systemd)。systemctl restart <服务名>:重启服务。service <服务名> status:查看服务状态(适用于SysV)。journalctl:查看systemd日志。tail -f /var/log/syslog 或 tail -f /var/log/messages:实时查看系统日志。dmesg:查看系统引导和内核消息日志。tail -f /var/log/<服务名>.log:实时查看某服务的日志文件。lscpu:显示CPU信息。lsblk:显示块设备信息(磁盘和分区)。lshw:显示详细的硬件信息(需要root权限)。smartctl -a /dev/sdX:查看硬盘SMART信息(需要安装smartmontools)。sar:收集、报告和保存系统活动信息(需要安装sysstat)。sysctl:runtime收集CPU的参数。strace <command>:追踪一个命令的系统调用,用于调试。perf top:查看系统实时性能(CPU使用等)。top:查看具体哪个进程占用CPU高。ps -eo pid,ppid,cmd,%mem,%cpu --sort=-%cpu | head:按CPU使用率排序的进程列表。free -h:确认内存总量和使用量。ps aux --sort=-%mem | head:按内存使用率排序的进程列表。iotop:查看I/O使用量高的进程。iostat -x:查看详细的I/O统计。nmcli network manager cliifconfig, ip adder -> NIC checknslookup, dig, host -> DNS namewhois -> get domain name infonetstat check latencyping 检查网络连通性。traceroute report network path between source and destination for every hop/jump point,很多时候原因可能是路由表配置错误netstat、ss(socket state):gether info about TCP connections on the systemnmap scan networkwireshark, tcpdump packet sniffernetcat, nc scan network, connection checkingiperf, iftop check the maximum throughput of an interface! some time it is NIC problem