Setting Linux Time
Programs for working with time and date are:
- clock - This is a soft link to hwclock.
- date(1) - Print or set the system date and time.
- hwclock(8) - Sets the hardware clock based on values entered on the command line.
- setclock(8) - Sets the BIOS hardware clock based on the time and setup of the system clock.
- timeconfig(8) - A program used to configure the system configuration file "/etc/sysconfig/clock" which includes the type of clock and timezone.
An Example:
While logged in as root do the following:
- Type "date".
- You should see some variation of"
"Wed Nov 24, 9:29:17 EST 1999"
- To change the time type(as an example):
date -s 10:10
- The system response will be:
"Wed Nov 24, 10:10:02 EST 1999"
- Then if you want to set the hardware(BIOS) clock so the system will keep the time when it reboots type:
clock -w
or
setclock
| |
No comments:
Post a Comment