Setting Linux Date and Time

On Linux default installation, it usually has different time zone with your current location. Here are the steps how to configure the date and time so that your machine has an updated setting.

1. Backup your current configuration:

mv /etc/localtime /etc/localtime-old

 

2. Create a symbolic link from your current timezone to the linux locatime configuration:

ln -sf /usr/share/zoneinfo/Asia/Jakarta /etc/localtime

 

3. Synchronize the machine with the NTP server (example: ntp.kim.lipi.go.id):

rdate -s ntp.kim.lipi.go.id

 

4. Copy the current time to the Hardware Clock:

hwclock --systohc --utc

 

5. Without having to reboot the system, check your date and time setting by running this command

#date

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: