img img

Linux date config (Centos, Ubuntu, Fedora)

If you want your date and time to automatically synchronize on Linux derivatives such as CentOS, Red Hat, Ubuntu, and Fedora, you can achieve this by installing NTP as shown below:

 

yum install ntp
chkconfig ntpd on
ntpdate pool.ntp.org
service ntpd start



For instant remote updates (no automatic synchronization):
/usr/bin/rdate -s time-a.timefreq.bldrdoc.gov
 
 
To manually set the date and time:
date -s “11/23/2013 22:46:17”
 
 
Timezone settings (for Debian, Ubuntu):
dpkg-reconfigure tzdata
 
 
For Red Hat, Fedora:
ln -s /usr/share/zoneinfo/Europe/Istanbul /etc/localtime
tzselect
If you want to use the BIOS clock as your server time:
hwclock –systohc