更改Linux的IP使其和Window10在同一个网段(Linux和Window可以相互访问)

主要工具

更改步骤

更改VM Play虚拟机Linux的方式为桥连接

  • 启动RedHat7虚拟机
  • 点击Player->管理->虚拟机设置->网络适配器->网络连接->更改为桥连接模式->配置适配器->Intel(R) Dual Band Wireless-AC 33165

Linux虚拟机更改

  • window10
    * win+R
    * cmd
    * ipconfig
    * 查看ip地址(子网掩码,默认网关)
  • RedHat7
    * root用户登录(su -)
    * cd /etc/sysconfig/network-scripts/ifcfg-ens33(不同的版本可能不同,一般是以ifcfg-开头)
    * vim ifcfg-enss

详细配置

  IPADDR=192.148.0.111
  NETMASK=255.255.255.0
  GATEWAY=192.168.0.1
  ONBOOT=yes
  TYPE=Ethernet
  BOOTPROTO=static
posted @ 2020-05-17 19:07  smallcodes  阅读(742)  评论(0)    收藏  举报