修改静态ip,记录
也可以两边都互相ping 一下ipv4的ip地址:
主机cmd的可以用 ipconfig查询:
ping自己在虚拟机修改的ip就行
虚拟机退出ctrl+C可以停止ping
修改后的 ifconfig文件192.168.161.10
[root@localhost NVI]# ifconfig
ens33: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.161.10 netmask 255.255.255.0 broadcast 192.168.161.255
inet6 fe80::34d0:84d4:ae71:d1d7 prefixlen 64 scopeid 0x20<link>
ether 00:0c:29:fb:f0:67 txqueuelen 1000 (Ethernet)
RX packets 497 bytes 42744 (41.7 KiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 333 bytes 42620 (41.6 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536
inet 127.0.0.1 netmask 255.0.0.0
inet6 ::1 prefixlen 128 scopeid 0x10<host>
loop txqueuelen 1000 (Local Loopback)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 0 bytes 0 (0.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
virbr0: flags=4099<UP,BROADCAST,MULTICAST> mtu 1500
inet 192.168.122.1 netmask 255.255.255.0 broadcast 192.168.122.255
ether 52:54:00:b3:98:f6 txqueuelen 1000 (Ethernet)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 0 bytes 0 (0.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
xshell
连接虚拟机
1。新建会话
2.填写名字、ip
3.填写要登录虚拟机的用户
4.填写虚拟机用户的密码
5.登录上了,
可以进行相应的操作
我这里ls了一下
齐活