如何设置虚拟机的时间和主机保持一致
linux机版本:centos7
虚拟机工具版本:vmware12
1.查看虚拟时间
[shaozhiqi@hadoop104 ~]$ date
Wed Jun 26 17:37:17 PDT 2019
2.在vmware选择对应虚拟机右键
3.点击设置后,选择选项
4.在虚拟中输入如下命令
[shaozhiqi@hadoop104 ~]$ sudo cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
5.重启虚拟机
[shaozhiqi@hadoop104 ~]$ reboot
6.开机验证
[shaozhiqi@hadoop104 ~]$ date
Thu Jun 27 20:24:41 CST 2019
[shaozhiqi@hadoop104 ~]$