How to set the Linux clock
#


This is a quick time setting procedure

If you are logged in as a user (which you should be), "su" to root and enter the following to set the current time:
date -s "hh:mm:ss"

The time will be taken as 24-hour(military) time. Then type just the date command and see if it "took". Linux should respond with a full date and time.

Now, set the CMOS hardware clock to the system software current time:

hwclock --systohc


"hwclock" is a command in /sbin. It accepts commands from the terminal, as you see above, and is called from a halt script in init.d when the system is shutdown, to copy the system time into the hardware clock.

A list of zones available in your system can be found in /usr/share/zoneinfo/zone.tab . If your zone is not correct, you can append the correct zone to the time setting:

date -s "hh:mm:sszzz"

where "zzz" is the zone

Add new attachment

Only authorized users are allowed to upload new attachments.
« This page (revision-10) was last changed on 24-May-2017 15:30 by Hyve Support
G’day (anonymous guest) My Prefs
  • View Page Source
  • This clear IPSec security association,
    clear ipsec sa peer X.X.X.X
    

All Pages

Page views: 4349

Private Tomcat

Linux

MySQL

Email

SQL Server

ASP

JSP

C#

Web Mail

Windows Plesk

Linux Plesk

PHP

Gaming

ASP.NET

Persits ASPUpload

Wiki Help

Referring Pages:
...nobody

JSPWiki v2.8.1