Debian Minimal故障排查可按以下步驟進行:
收集信息
tail -f /var/log/syslog
、dmesg
、journalctl
。lshw
、dmidecode
。基礎檢查
sudo apt update && sudo apt upgrade
。服務與進程排查
systemctl status <服務名>
,重啟異常服務systemctl restart <服務名>
。top
、htop
、ps aux
。網絡診斷
ping 8.8.8.8
,檢查IP配置ip addr show
。ufw status
、iptables -L
。/etc/network/interfaces
、/etc/resolv.conf
。軟件包與文件系統
sudo apt install -f
。fsck
(需從Live CD/USB操作)。內核與驅動
dmesg | grep error
,確認驅動兼容性。sudo apt-get install --reinstall linux-image-$(uname -r)
。高級工具與社區支持
strace
跟蹤程序執行:strace <命令>
。注意:操作前備份重要數據,避免誤刪系統文件。