1. 查看网卡名

$ ifconfig

得到要设置静态 ip 的网卡名,例如,我这里是 enp0s25

2. 进入目录 /etc/sysconfig/network-scripts/ ,打开相应的配置文件 ifcfg-enp0s25 ,修改如下,

CentOS7 设置静态 ip

 

3. 重启即可。

 

Ubuntu 设置静态 ip,参见: https://www.cnblogs.com/gaowengang/p/12494267.html

 

(完)

 

相关文章:

  • 2021-12-11
  • 2021-09-04
  • 2021-12-30
  • 2021-11-09
猜你喜欢
  • 2021-11-29
  • 2021-11-19
  • 2022-01-09
  • 2021-06-27
  • 2021-10-22
  • 2021-06-01
相关资源
相似解决方案