ubuntu 自动获取ip
VIM的使用方法 http://www.cnblogs.com/linuxprobe/p/5496985.html 查看网卡 ifconfig -a 查看网关(gateway网关) netstat -rn 查看DNS cat /etc/resolv.conf 配置网卡1口: sudo vim /etc/network/interfaces 编辑,输入i,编辑完成后,按esc,在按:wq 保存退出 auto lo iface lo inet loopback auto em1 iface em1 inet static address 192.168.1.7 netmask 255.255.255.0 gateway 192.168.1.1 配置dns (重起也好使) vim /etc/resolvconf/resolv.conf.d/head nameserver 8.8.8.8 nameserver 114.114.114.114 resolvconf -u 重启网卡: sudo /etc/init.d/network restart 或: ifdown em1 关闭em1 ifup em1 开启em1
搜索关键词:查看网卡、查看网关、查看dns、配置网卡、配置dns、重启网卡