记录日常工作关于系统运维,虚拟化云计算,数据库,网络安全等各方面问题。
 
0

ubuntu设置ip与DNS

发表者:分类:Devops2012-10-10 06:51:02 阅读[2341]

ubuntu设置ip与DNS

查看IP

ifconfig



设置ip

vim /etc/network/interfaces


输入内容

auto lo

iface lo inet loopback

auto eth0

iface eth0 inet static

address 192.168.200.220

netmask 255.255.255.0

gateway 192.168.200.1



重启网络

/etc/init.d/networking restart




Ubuntu 修改IP地址

 

1、ubuntu系统修改IP地址:sudo gedit /etc/network/interfaces
auto eth0
iface eth0 inet static
address 219.218.122.168
netmask  255.255.255.0
gateway  219.218.122.254

2、ubuntu系统修改DNS: sudo gedit /etc/resolv.conf
nameserver 202.194.15.12

3、使网络生效:sudo /etc/init.d/networking restart
Ubuntu8.04虚拟机更换host主机后开机无法加载网卡,提示:No such device
删除缓存文件,重启后解决。
sudo rm /etc/udev/rules.d/70-persistent-net.rules
reboot





转载请标明出处【ubuntu设置ip与DNS】。

《www.micoder.cc》 虚拟化云计算,系统运维,安全技术服务.

网站已经关闭评论