Categories
linux OS Quick Tips

Change/update time on Linux

Sets whether the hardware clock is stored as UTC or local time.

/etc/sysconfig/clock

Symlink /etc/localtime to /usr/share/zoneinfo/… to set your timezone.

To set the current system date/time.

date MMDDhhmm

To set the hardware clock.

/sbin/hwclock --systohc