您的位置:首页 > 其它

Ubuntu设置固定IP

2015-03-17 16:19 162 查看
使用root权限更改interfaces文件。

#gedit /etc/network/interfaces


设置所选网卡(eth0)为static

iface eth0 inet static
设置IP地址、掩码、网关

address 192.168.0.111
netmask 255.255.255.0
gateway 192.168.0.1


完整例子:

/etc/network/interfaces

auto lo
iface lo inet loopback

auto eth0
iface eth0 inet static

address 192.168.0.111 netmask 255.255.255.0 gateway 192.168.0.1


参考《network interface configuration
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: