Linux date time
Change your timezone you can use
Update the time and date from the internet
Alternative NTP
Install
If ntpd
is not installed use one of the following command to install ntpd
Configuration
You should at least set following parameter in /etc/ntp.conf
config file
For example, open /etc/ntp.conf
file using vi text editor
Locate server parameter and set it as follows
Save the file and restart the ntpd
service
You can synchronize the system clock to an NTP server immediately with following command
Manually setting the date
For setting the time and date manually use the following syntax
For example, to set the date to 2 Oct 2006 18:00:00
, type the following command as root user
OR
You can also simplify format using following syntax
To set time use the following syntax
where:
10
: Hour (hh)13
: Minute (mm)13
: Second (ss)
You can use %p
for the locale's equivalent of AM/PM