0535.html 2.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. <!DOCTYPE html>
  2. <html lang="en" xmlns="http://www.w3.org/1999/xhtml">
  3. <head>
  4. <title>Setup Automatic Updates on Debian</title>
  5. <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  6. <meta charset="UTF-8">
  7. <meta name="keywords" content="Automatic Updates on Linux,Unattended Upgrades on Debian,Unattended Upgrades,Automatic Updates,Debian,Linux,Updates,Automation,Debian 11,Linux Tutorial,Debian 10,Automatic Upgrades,Unattended Updates,How To,Tutorial,i12bretro">
  8. <meta name="author" content="i12bretro">
  9. <meta name="description" content="Setup Automatic Updates on Debian">
  10. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  11. <link rel="icon" type="image/x-icon" href="includes/favicon.ico">
  12. <script type="text/javascript" src="https://code.jquery.com/jquery-3.5.1.min.js"></script>
  13. <script type="text/javascript" src="includes/js/steps.js"></script>
  14. <link href="css/steps.css" rel="stylesheet" type="text/css" />
  15. </head>
  16. <body>
  17. <div id="gridContainer">
  18. <div class="topMargin"></div>
  19. <div id="listName" class="topMargin">
  20. <h1>Setup Automatic Updates on Debian</h1>
  21. </div>
  22. <div></div>
  23. <div id="content">
  24. <ol>
  25. <li>Log into the Debian device</li>
  26. <li>Run the following commands in a terminal:
  27. <div class="codeBlock"># update software repositories<br />
  28. sudo apt update<br />
  29. # install software updates<br />
  30. sudo apt upgrade -y<br />
  31. # install unattended-upgrades<br />
  32. sudo apt install unattended-upgrades -y<br />
  33. # edit unattended-upgrades config<br />
  34. sudo nano /etc/apt/apt.conf.d/50unattended-upgrades</div>
  35. </li>
  36. <li>Update the unattended-upgrades conf as needed
  37. <p><em>Uncomment the ::Mail line and edit the email address to receive email notifications</em><br />
  38. <br />
  39. Unattended-Upgrade::Mail &quot;i12bretro@i12bretro.local&quot;;<br />
  40. <br />
  41. <em>Uncomment and set the value to true to automatically remove unused dependencies</em><br />
  42. <br />
  43. Unattended-Upgrade::Remove-Unused-Dependencies &quot;true&quot;;</p>
  44. </li>
  45. <li>Press CTRL+O, Enter, CTRL+X to write the changes</li>
  46. <li>Continue with the following commands
  47. <div class="codeBlock"># at the prompt, select Yes to enable automatic updates<br />
  48. sudo dpkg-reconfigure --priority=low unattended-upgrades<br />
  49. # enable and start the unattended upgrades service<br />
  50. sudo systemctl enable unattended-upgrades --now</div>
  51. </li>
  52. <li>That&#39;s it, updates will now be installed automatically. Logs can be found in /var/log/unattended-upgrades</li>
  53. <li>To run updates on demand, simply run the following command
  54. <div class="codeBlock">sudo unattended-upgrade -d</div>
  55. </li>
  56. </ol>
  57. </div>
  58. </div>
  59. </body>
  60. </html>