{"id":5812,"date":"2025-04-18T19:00:56","date_gmt":"2025-04-18T17:00:56","guid":{"rendered":"https:\/\/www.zis.it\/wp\/?p=5812"},"modified":"2025-08-05T19:17:21","modified_gmt":"2025-08-05T17:17:21","slug":"linux-debian-aggiornare-orologio-computer","status":"publish","type":"post","link":"https:\/\/www.zis.it\/wp\/?p=5812","title":{"rendered":"Linux Debian &#8211; aggiornare orologio computer"},"content":{"rendered":"<p>Per aggiornare l&#8217;orologio del computer \u00e8 necessario il servizio ntp.<\/p>\n<p>Da terminale digitare:<br \/>\n<span style=\"font-family: courier new, courier, monospace;\">sudo apt-get update<br \/>\nsudo apt-get install ntp<\/span><\/p>\n<p>Modifica il file&nbsp;\/etc\/ntp.conf<br \/>\n<span style=\"font-family: courier new, courier, monospace;\">sudo nano \/etc\/ntp.conf<\/span><\/p>\n<p>e incolla i server NTP a cui sincronizzarsi:<\/p>\n<p><span style=\"font-family: courier new, courier, monospace;\">server 0.debian.pool.ntp.org iburst<\/span><br \/>\n<span style=\"font-family: courier new, courier, monospace;\">server 1.debian.pool.ntp.org iburst<\/span><br \/>\n<span style=\"font-family: courier new, courier, monospace;\">server 2.debian.pool.ntp.org iburst<\/span><br \/>\n<span style=\"font-family: courier new, courier, monospace;\">server 3.debian.pool.ntp.org iburst<\/span><\/p>\n<p>per riavviare il servizio:<br \/>\n<span style=\"font-family: courier new, courier, monospace;\">sudo systemctl restart ntp<\/span><\/p>\n<p>per attivarlo al bbot:<br \/>\n<span style=\"font-family: courier new, courier, monospace;\">sudo systemctl enable ntp<\/span><\/p>\n<p>per eseguire un check:<br \/>\n<span style=\"font-family: courier new, courier, monospace;\">sudo systemctl status ntp<\/span><\/p>\n<hr>\n<p>&nbsp;<\/p>\n<p>Altro metodo \u00e8 l&#8217;uso di rdate, che allinea l&#8217;orario del sistema con un server NTP (Network Time Protocol):<\/p>\n<p><span style=\"font-family: courier new, courier, monospace;\">sudo rdate -s time.ien.it<\/span><\/p>\n<p>In questo caso il server NTP\u00e8 quello dello IEN (Istituto Elettrotecnico Nazionale).<br \/>\nUsa cron per eseguire periodicamente il comando, oppure crea un comando batch da lanciare ad ogni avvio del computer.<\/p>\n<hr>\n<p>&nbsp;<\/p>\n<p><strong>Aggiornare l&#8217;orario della motherboard<\/strong><\/p>\n<p>Per vedere l\u2019orario impostato nell\u2019orologio hardware:<br \/>\n<span style=\"font-family: courier new, courier, monospace;\">sudo hwclock<\/span><\/p>\n<p>Per impostare l\u2019orologio hardware con l\u2019orario di sistema:<br \/>\n<span style=\"font-family: courier new, courier, monospace;\">sudo hwclock &#8211;systohc<\/span><\/p>\n<p>Per impostare manualmente l\u2019orario dell\u2019orologio hardware:<br \/>\n<span style=\"font-family: courier new, courier, monospace;\">sudo hwclock &#8211;set &#8211;date=&#8217;01\/20\/2025 12:30:00&#8242;<\/span><\/p>\n<p>Per sincronizzare l\u2019orologio hardware con un server NTP:<br \/>\n<span style=\"font-family: courier new, courier, monospace;\">sudo hwclock &#8211;systohc &#8211;utc<\/span><\/p>\n<p>&nbsp;<\/p>\n<h3>Immagini collegate:<\/h3>","protected":false},"excerpt":{"rendered":"<p>Per aggiornare l&#8217;orologio del computer \u00e8 necessario il servizio ntp. Da terminale digitare: sudo apt-get update sudo apt-get install ntp [&hellip;]<\/p>\n","protected":false},"author":5,"featured_media":3971,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"default","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","ast-disable-related-posts":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"default","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ngg_post_thumbnail":0,"footnotes":""},"categories":[120,122],"tags":[],"class_list":["post-5812","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-linux","category-tutorial"],"_links":{"self":[{"href":"https:\/\/www.zis.it\/wp\/index.php?rest_route=\/wp\/v2\/posts\/5812","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.zis.it\/wp\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.zis.it\/wp\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.zis.it\/wp\/index.php?rest_route=\/wp\/v2\/users\/5"}],"replies":[{"embeddable":true,"href":"https:\/\/www.zis.it\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=5812"}],"version-history":[{"count":4,"href":"https:\/\/www.zis.it\/wp\/index.php?rest_route=\/wp\/v2\/posts\/5812\/revisions"}],"predecessor-version":[{"id":6013,"href":"https:\/\/www.zis.it\/wp\/index.php?rest_route=\/wp\/v2\/posts\/5812\/revisions\/6013"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.zis.it\/wp\/index.php?rest_route=\/wp\/v2\/media\/3971"}],"wp:attachment":[{"href":"https:\/\/www.zis.it\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=5812"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.zis.it\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=5812"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.zis.it\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=5812"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}