linux 配置文件修改ip地址(1)
linux 配置文件修改ip地址方法一: /etc/init.d/network(ing) restart方法二: service network restart重启网络服务/etc/network/interfaces如下:# interfaces(5) file used by ifup(8) and ifdown(8)auto loiface lo inet loopback...
·
linux 配置文件修改ip地址(1)
1. 修改
编辑文件/etc/network/interfaces:
sudo vi /etc/network/interfaces
并用下面的行来替换有关eth0的行:# The primary network interface
auto eth0
iface eth0 inet static
address 192.168.0.2
gateway 192.168.0.1
netmask 255.255.255.0
#network 192.168.0.0
#broadcast 192.168.0.255
将上面的ip地址等信息换成需要的即可
2. 重启网络服务器
方法一: /etc/init.d/network(ing) restart
方法二: service network restart 重启网络服务
重启网络服务或重启服务器,使配置生效
通过ping 192.168.28.12 验证服务器小网IP配置是否成功
3. 修改后,若重启网络ip不生效,则重启机器即可
更多推荐
已为社区贡献4条内容
所有评论(0)