Centos8 怎么重启

[root@ebs-59586 ~]# vim /etc/sysconfig/network-scripts/ifcfg-eth0# 申明网卡eth0 DEVICE=eth0 BOOTPROTO=staticIPADDR=21x.xx.xxx.2xxNETMASK=255.255.255.0GATEWAY=2xx.xx.2xx.1TYPE=Ether...

[root@ebs-59586 ~]# vim /etc/sysconfig/network-scripts/ifcfg-eth0

# 申明网卡eth0 
DEVICE=eth0 
BOOTPROTO=static
IPADDR=21x.xx.xxx.2xx
NETMASK=255.255.255.0
GATEWAY=2xx.xx.2xx.1
TYPE=Ethernet
NM_CONTROLLED=no
ONBOOT=yes
# 重启网卡服务
[root@ebs-59586 ~]# nmcli c reload "System eth0" / nmcli c up "System eth0"
# 如果不生效
[root@ebs-59586 ~]# nmcli device reapply eth0
[root@ebs-59586 ~]# nmcli device connect eth0

  • 发表于 2021-12-31 17:50
  • 阅读 ( 2122 )
  • 分类:服务器

0 条评论

请先 登录 后评论
东北大表哥
东北大表哥

自由职业

160 篇文章

作家榜 »

  1. 东北大表哥 160 文章
  2. 小鹄 1 文章
  3. 阿天 0 文章
  4. 新百胜在线 0 文章
  5. 刘明明 0 文章
  6. 个的德3 0 文章
  7. 铂天先生 0 文章
  8. 王达 0 文章