您的位置:首页 > 其它

Ubuntu修改机器名和MAC地址

2013-11-06 11:30 387 查看
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地址未通过
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: