This is a short tutorial on changing the server time in CentOS. At work, I use CentOS servers with versions 6.4, 6.5 and 7.0. To change the server date and time to July 25, 2016, the syntax is
Run this command:
Verify that the date has changed.
$ date Wed Jul 25 22:10:49 EDT 2016
The date has been changed. However, it will revert after a reboot. To make the datetime change permanent, follow these steps.
First, login as root.
sudo su -
Next, run these steps.
rm /etc/localtime ln -s /usr/share/zoneinfo/GMT /etc/localtime date 072522172010 hwclock --systohc
After a reboot, you will notice that the date and time have been permanently updated.
- Disabling SELinux in CentOS 7
- VirtualBox: How to access guest (CentOS) webserver from the host (Mac OS X) on NAT
- Change the server date and time in CentOS
- Install Ruby on Rails from source
- Patching glibc CVE-2015-7547 Vulnerability
If you have any questions, please contact me at arulbOsutkNiqlzziyties@gNqmaizl.bkcom. You can also post questions in our Facebook group. Thank you.