您的位置:首页 > 运维架构 > Linux

Set static IP for Linux

2014-08-30 20:38 211 查看
Get your ifconfig name for example (eth0, eth1, eth15). Here we use eth15 as exmple

Add the following content to the file /etc/network/interfaces

$: sudo vi /etc/network/interfaces

address 192.168.1.100

netmask 255.255.255.0

network 192.168.1.0

broadcast 192.168.1.255

gateway 192.168.1.1

Restart network

$: sudo /etc/init.d/networking restart

You can see that your IP is changed to 192.168.1.100.

Also we need to restart networking every time we restart the OS.But I haven't got the method.
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  Linux Static IP