virtualbox centos网络设置

设置网卡

在未开启虚拟机时设置网卡1、网卡2如下图所示
Linux Centos 网络配置
Linux Centos 网络配置
正常情况下,在终端输入ifconfig可以看到正常的eth1的IP地址,但有可能不存在,接下来就要看配置文件

配置文件

命令行输入 ls /etc/sysconfig/network-scripts/
查看是否有 ifcfg-eth1,若没有,则编写该配置文件
vim /etc/sysconfig/network-scripts/ifcfg-eth1
Linux Centos 网络配置
上图中UUID可通过命令 nmcli con查询
然后重启网络服务 sudo service network restart
此时用ifconfig 便可查询到ip地址了

相关文章:

  • 2021-04-24
  • 2021-07-23
  • 2021-10-09
  • 2021-11-25
  • 2021-07-06
猜你喜欢
  • 2022-01-01
  • 2021-07-23
  • 2021-06-03
  • 2021-12-26
  • 2021-06-03
  • 2021-08-02
  • 2021-05-03
相关资源
相似解决方案