virtualbox 5.2.12

一台虚拟机是Debian 9,另一台是Ubuntu 18.04。

注意:

2台虚拟机系统里要安装ssh !

sudo apt install ssh

 

然后在virtualbox里设置:

设置
    网络-连接方式:内部网络
    界面名称:这里的名字保持一致
    高级-控制芯片:PCnet-FAST III
        -混杂模式:拒绝
        接入网线打勾

最后分别设置2台虚拟机

Debian 9:

sudo vi /etc/network/interfaces
增加:
#2018.6.14
auto enp0s3
iface enp0s3 inet static
address 192.168.0.1
netmask 255.255.255.0
gateway 192.168.0.0
重启:(不行就重启系统)
sudo systemctl restart network-manager.service

Ubuntu 18.04:

直接在图形界面里设置:

Network Connections-有线连接1
    -IPv4 Settings
        -Method:Manual
        -Addresses:
            Address:192.168.0.2
            Netmask:255.255.255.0
            Gateway:192.168.0.0

 

-- End --

相关文章:

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