Linux网络基础配置 以太网卡ethernet 通过lspci命令可以查看网卡硬件信息 ifconfig(interfaceconfig) ifconfig -a查看所有接口 ifconfig etho查看特定接口 ifup eth0启用接口 ifdown eth0禁用接口 网卡配置文件 /etc/sysconfig/network-scripts/ifcfg-eth0 DNS配置文件 /etc/resolv.conf 主机名配置文件 /etc/sysconfig/network 静态主机名配置文件 /etc/hosts 测试网络联通性: ping 192.168.1.1 测试DNS解析: hst www.linuxcast.net dig www.linuxcast.net 显示路由表: ip route 追踪到达目标地址的网络路径 traceroute www.linuxcast.net 使用mtr进行网络质量测试(把 ping 和 traceroute 两个命令的功能合二为一的mtr命令) mtr www.linuxcast.net ubuntu/debian下 安装 dig sudo apt-get install dnsutils 安装 mtr sudo apt-get install mtr |