【linux】配置静态IP地址

1.输入命令:

sudo vi /etc/network/interfaces

2、追加以下内容:

iface eth0 inet static
address 192.168.1.122
netmask 255.255.255.0
gateway 192.168.1.1
dns-nameservers 202.106.0.20

3、重启网络服务,输入以下命令:

ifconfig eth0 down
ifconfig eth0 up

猜你喜欢

转载自blog.csdn.net/qq_43248127/article/details/94321332
今日推荐