ubuntu14.04安装完系统网卡名不为eth格式进行网卡名的修改

在安装14.04 server版之后会网卡名的显示会有些乱

root@controller:~# vim /etc/default/grub 
GRUB_CMDLINE_LINUX="net.ifnames=0 biosdevname=0" #这一行加入这些内容
root@controller:~# update-grub 在执行这条语句
然后在/etc/network/initerfaces添加配置网卡即可
auto eth0
iface eth0 inet static
address 192.168.1.171
netmask 255.255.255.0
gateway 192.168.1.1
dns-nameservers 202.197.64.6 222.246.129.80

auto eth1
iface eth1 inet static
address 10.0.0.171
netmask 255.255.255.0

这里顺带还说下Ubuntu下面的换源的方法:首先在163镜像源下载相应文件 163镜像源帮助文档

root@ubuntu:~# cd /etc/apt/ #切换到此目录
cp sources.list     sources.list.pri #备份
mv sources.list.trusty     sources.list #替换
在执行
  apt-get   update
  apt-get   upgrade
  apt-get   dist-upgrade

评论

暂无评论