{"id":3823,"date":"2021-01-13T18:07:59","date_gmt":"2021-01-14T00:07:59","guid":{"rendered":"http:\/\/www.incredigeek.com\/home\/?p=3823"},"modified":"2022-07-18T15:25:05","modified_gmt":"2022-07-18T20:25:05","slug":"enable-automatic-update-for-ubuntu-20-04","status":"publish","type":"post","link":"https:\/\/www.incredigeek.com\/home\/enable-automatic-update-for-ubuntu-20-04\/","title":{"rendered":"Enable Automatic Update for Ubuntu Server 22.04"},"content":{"rendered":"\n<p><em>These steps should work for multiple versions of Ubuntu Server.<\/em><\/p>\n\n\n\n<p>Thankfully enabling automatic updates in Ubuntu is super easy.<\/p>\n\n\n\n<p>First make sure that the &#8220;unattended-upgrades&#8221; package is installed<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">sudo apt install unattended-upgrades<\/pre>\n\n\n\n<p>It was already installed on my Ubuntu 20.04 server instance.  <br>Next run dpkg to reconfigure and enable updates<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">sudo dpkg-reconfigure unattended-upgrades<\/pre>\n\n\n\n<p>You should get the following prompt.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><a href=\"https:\/\/www.incredigeek.com\/home\/wp-content\/uploads\/2021\/01\/image-2.png\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"393\" src=\"https:\/\/www.incredigeek.com\/home\/wp-content\/uploads\/2021\/01\/image-2-1024x393.png\" alt=\"\" class=\"wp-image-3824\" srcset=\"https:\/\/www.incredigeek.com\/home\/wp-content\/uploads\/2021\/01\/image-2-1024x393.png 1024w, https:\/\/www.incredigeek.com\/home\/wp-content\/uploads\/2021\/01\/image-2-300x115.png 300w, https:\/\/www.incredigeek.com\/home\/wp-content\/uploads\/2021\/01\/image-2-768x295.png 768w, https:\/\/www.incredigeek.com\/home\/wp-content\/uploads\/2021\/01\/image-2-500x192.png 500w, https:\/\/www.incredigeek.com\/home\/wp-content\/uploads\/2021\/01\/image-2.png 1202w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/a><figcaption>Configuring automatic updates<\/figcaption><\/figure>\n\n\n\n<p>Hit &#8220;Yes&#8221; to enable.<\/p>\n\n\n\n<p>Your system should now automatically install updates.  however, if it needs to reboot it may not.  You can configure the reboot options in <\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">sudo vi \/etc\/apt\/apt.conf.d\/50unattended-upgrades<\/pre>\n\n\n\n<p>Scroll down to the Reboot lines and uncomment<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">\/\/ Automatically reboot *WITHOUT CONFIRMATION* if\n\/\/  the file \/var\/run\/reboot-required is found after the upgrade\nUnattended-Upgrade::Automatic-Reboot \"true\";  \/\/ <strong>&lt;- Uncomment line<\/strong>\n\n\/\/ If automatic reboot is enabled and needed, reboot at the specific\n\/\/ time instead of immediately\n\/\/ Default: \"now\"\nUnattended-Upgrade::Automatic-Reboot-Time \"02:00\";  \/\/ <strong>&lt;- Uncomment line<\/strong><\/pre>\n\n\n\n<p>Save the file.  Your system should now automatically install stable updates.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Disable automatic update<\/h2>\n\n\n\n<p>You can disable the automatic updates by running the dpkg command again.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">sudo dpkg-reconfigure unattended-upgrades<\/pre>\n\n\n\n<p>and selecting &#8220;No&#8221;<\/p>\n\n\n\n<p>Automatic updates should now be off.<\/p>\n\n\n\n<p><\/p>\n\n\n\n<p>More information can be found at the following link.<\/p>\n\n\n\n<p><a href=\"https:\/\/www.cyberciti.biz\/faq\/set-up-automatic-unattended-updates-for-ubuntu-20-04\/\">https:\/\/www.cyberciti.biz\/faq\/set-up-automatic-unattended-updates-for-ubuntu-20-04\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>These steps should work for multiple versions of Ubuntu Server. Thankfully enabling automatic updates in Ubuntu is super easy. First make sure that the &#8220;unattended-upgrades&#8221; package is installed sudo apt install unattended-upgrades It was already installed on my Ubuntu 20.04 &hellip; <a href=\"https:\/\/www.incredigeek.com\/home\/enable-automatic-update-for-ubuntu-20-04\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3,28],"tags":[1086,1313,322,1155,1154,244,7,49,1156,248],"class_list":["post-3823","post","type-post","status-publish","format-standard","hentry","category-linux","category-ubuntu","tag-20-04","tag-22-04","tag-apt","tag-auto-update","tag-automatic-updated","tag-automation","tag-linux-2","tag-ubuntu-2","tag-unattended-updates","tag-update"],"_links":{"self":[{"href":"https:\/\/www.incredigeek.com\/home\/wp-json\/wp\/v2\/posts\/3823","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.incredigeek.com\/home\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.incredigeek.com\/home\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.incredigeek.com\/home\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.incredigeek.com\/home\/wp-json\/wp\/v2\/comments?post=3823"}],"version-history":[{"count":3,"href":"https:\/\/www.incredigeek.com\/home\/wp-json\/wp\/v2\/posts\/3823\/revisions"}],"predecessor-version":[{"id":4506,"href":"https:\/\/www.incredigeek.com\/home\/wp-json\/wp\/v2\/posts\/3823\/revisions\/4506"}],"wp:attachment":[{"href":"https:\/\/www.incredigeek.com\/home\/wp-json\/wp\/v2\/media?parent=3823"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.incredigeek.com\/home\/wp-json\/wp\/v2\/categories?post=3823"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.incredigeek.com\/home\/wp-json\/wp\/v2\/tags?post=3823"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}