linux如何修改配置文件设置静态IP
作者:互联网
进入修改配置文件命令
sudo vi /etc/network/interfaces
在文件中添加以下内容
auto eth0
iface eth0 inet static #iface是interface(接口)的缩写
address 192.168.0.33
netmask 255.255.255.0
gateway 192.168.0.1
broadcast 192.168.0.255
dns-nameservers 8.8.8.8
重启网络:
sudo service network-manager restart
sudo /etc/init.d/networking restart
sudo reboot
标签:iface,network,配置文件,IP,sudo,192.168,linux,eth0 来源: https://blog.csdn.net/m0_53994544/article/details/112167943