Ubuntu修改机器名和MAC地址

ubuntu 13.04

修改机器名
打开文件 /etc/hostname 写入机器名
然后执行命令

$ sudo hostname -F /etc/hostname

查看当前网卡信息
ifconfig -a

在虚拟机中,除了修改虚拟机的网卡的MAC地址外,还要在系统里面去修改

/etc/udev/rules.d/70-persistent-net.rules

删除原来的 eth0 的配置,然后将 eth1 修改为 eth0

设置IP地址或者DHCP
/etc/network/interfaces

auto eth0
iface eth0 inet static
address 192.168.1.1
netmask 255.255.255.0
gateway 192.168.1.253
dns-nameservers 8.8.8.8 114.114.114.144


auto eth0
iface eth0 inet dhcp

=================

修改机器名ok,mac地址未通过

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章