在Debian系统中,ifconfig
命令可用于网络接口配置与故障排查,但需注意:
net-tools
包(sudo apt-get install net-tools
)。ifconfig -a
(显示所有接口,包括未启动的)。sudo ifconfig eth0 up/down
。sudo ifconfig eth0 192.168.1.100 netmask 255.255.255.0
。ip
命令(如ip addr show
、ip link set eth0 up
),功能更强大且为现代Debian默认工具。route -n
或ip route
。nslookup google.com
。iptables -L
。/etc/network/interfaces
,需确保配置正确。若问题仍未解决,可通过journalctl -u networking
查看网络服务日志。