linux:ntp
Differences
This shows you the differences between two versions of the page.
| Next revision | Previous revision | ||
| linux:ntp [2020/09/28 14:41] – created bstafford | linux:ntp [2022/11/23 12:49] (current) – external edit 127.0.0.1 | ||
|---|---|---|---|
| Line 3: | Line 3: | ||
| Show time and timezones | Show time and timezones | ||
| - | </code> | + | < |
| List available timezones | List available timezones | ||
| - | </code> | + | < |
| Set timezone | Set timezone | ||
| - | </code> | + | < |
| + | To view the current time and date, run the following command. | ||
| + | < | ||
| + | To set the time manually, use the following command (substitute letters to numbers as appropriate). | ||
| + | < | ||
| + | To tell the machine to sync with a time server to get the latest time, use the following command. | ||
| + | < | ||
| + | The time daeomon on CentOS is called ntpd. To install the ntpd daemon, run the following as root. | ||
| + | < | ||
| + | To ensure it runs on start up, run the following as root. | ||
| + | < | ||
| + | To manually start ntpd, run the following as root. | ||
| + | < | ||
| + | If the machine is a Linux VM in VirtualBox running on a Windows host and you want to set the time to some date in the future, you will need to prevent the VM automatically correcting the time. Shut the VM down and run this command in the Windows host. | ||
| + | < | ||
linux/ntp.1601304089.txt.gz · Last modified: (external edit)
