Linux

Time control

4

, , . tzselect. . , , , . :

:

  1. TZ=Europe/Moscow -
  2. export TZ .
  3. , .

TZ (timezone) - cat /etc/timezone

: Europe/Moscow

timedatectl:

  1. timedatectl list-timezones -
  2. sudo timedatectl set-timezone Europe/Moscow

4 :

2 , , , . , . . , .. . , .

, - date, hwclock , . - sudo hwclock

, ESXI vmware . , Virtualbox, ( ) . .

, , , , Kerberos, , , . hwclock .

sudo hwclock --set --date=[_] dd/mm/yyyy hh:mm

. . , sudo hwclock -w.

sudo hwclock -w

, NTP.

, . NTP , UDP 123 . , NTP Pool Project . https://www.ntppool.org/ru/, .

, :

server 0.ru.pool.ntp.org
server 1.ru.pool.ntp.org
server 2.ru.pool.ntp.org
server 3.ru.pool.ntp.org	

, :

sudo ntpdate [_]

:sudo ntpdate 0.ru.pool.ntp.org

ntpdate

, , .

ntpd . .

sudo apt-get install ntp -y

/etc/ntp.conf. , , - sudo nano /etc/ntp.conf.

, - sudo service ntp restart.

: ntpdq -pn

ntpdq -pn

.


50% Merion Academy