1.
1.
注意此处不要放在C盘
完成创建
2.修改主机名
[root@localhost ~]# hostname
localhost.localdomain
[root@localhost ~]# hostnamectl set-hostname server.local
[root@localhost ~]# hostname
server.local
3.网络连接模式设置为仅主机,NAT模式,桥接模式
在设置界面设置需要的网络模式
NAT模式中,只需输入cd /etc/sysconfig/network-scripts
vim或者vi ifcfg-ens33进入进行配置,
将BOOTPROTO=dhcp 为获取动态地址 ,然后重启虚拟机
桥接模式:输入: cd /etc/sysconfig/network-scripts 回车
配置完成后需要重启网卡: 输入 systemctl restart network 重启网卡
4.
ping: wwww.baidu.com: Name or service not known
[root@localhost ~]# ping www.baidu.com
PING www.baidu.com (36.152.44.95) 56(84) bytes of data.
64 bytes from www.baidu.com (36.152.44.95): icmp_seq=1 ttl=128 time=91.6 ms
64 bytes from www.baidu.com (36.152.44.95): icmp_seq=2 ttl=128 time=53.9 ms
64 bytes from www.baidu.com (36.152.44.95): icmp_seq=3 ttl=128 time=55.8 ms
64 bytes from www.baidu.com (36.152.44.95): icmp_seq=5 ttl=128 time=66.2 ms
64 bytes from www.baidu.com (36.152.44.95): icmp_seq=6 ttl=128 time=55.6 ms
64 bytes from www.baidu.com (36.152.44.95): icmp_seq=7 ttl=128 time=38.6 ms
^C
--- www.baidu.com ping statistics ---
7 packets transmitted, 6 received, 14.2857% packet loss, time 6071ms
rtt min/avg/max/mdev = 38.608/60.275/91.593/16.169 ms
在NAT模式下可以PING通百度网站
5.破解密码
重启虚拟机
1.进入界面选择第一行确定 点e
2.选择linux16那一行在8的后面加 空格rd.break 按ctrl+x离开
3.mount -o remount,rw /sysroot
4.chroot /sysroot
5.passwd
输入密码
再次确定密码
6.touch /.autorelabel
然后退出进入即可