gerenboke

查看网卡配置文件:

[root@www ~]# cat  /etc/sysconfig/network-scripts/ifcfg-eth0

 

开机网卡自启动:

[root@www ~]# sed  -i  \'s#ONBOOT=no#ONBOOT=yes#g\'  /etc/sysconfig/network-scripts/ifcfg-eth0 

[root@www ~]# grep ONBOOT  /etc/sysconfig/network-scripts/ifcfg-eth0

ONBOOT = yes

 

重启网卡命令如下:

[root@www ~]# ifdown eth0 && ifup eth0

注意:尽量不要使用/etc/init.d/network restart重启网卡,因为这条命令会影响所有的网卡。

 

查看IP设置的命令如下:

[root@www ~]# ifconfig  eth0

 

查看默认网关设置的命令如下:

[root@www ~]# route -n

查看DNS设置的命令如下:

[root@www ~]# cat  /etc/resolv.conf

 

分类:

技术点:

相关文章:

  • 2022-01-03
  • 2022-02-16
  • 2021-11-22
  • 2021-09-12
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-12-23
  • 2021-11-23
  • 2022-01-06
  • 2021-10-12
相关资源
相似解决方案