您的位置:首页 > 其它

Ubuntu查看及修改IP地址

2010-07-15 15:26 183 查看
在Ubuntu下查看IP的命令为ifconfig

设置固定IP地址

sudo vim /etc/network/interfaces
修改iface eth0 inet dhcp 为 iface eth0 inet static
并在这句后添加
address 192.168.1.1
netmask 255.255.255.0
gateway 192.168.1.254
dns-nameservers 8.8.8.8

保存退出后使用如下命令重启网络服务
/etc/init.d/networking restart
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: