{"id":2517,"date":"2016-08-15T17:30:19","date_gmt":"2016-08-15T21:30:19","guid":{"rendered":"https:\/\/www.globo.tech\/learning-center\/?p=2517"},"modified":"2018-01-12T14:16:04","modified_gmt":"2018-01-12T19:16:04","slug":"update-ubuntu-server-apt-get","status":"publish","type":"post","link":"https:\/\/www.globo.tech\/learning-center\/update-ubuntu-server-apt-get\/","title":{"rendered":"How to update an Ubuntu server using apt-get"},"content":{"rendered":"<h1>How to update an Ubuntu server using apt-get<\/h1>\n<p>Security in the cloud is paramount, and so it&#8217;s important to keep your server up to date. If you don&#8217;t regularly apply the latest security fixes and patches to your machine, then you run the risk of your server being compromised due to an easily preventable exploit.<\/p>\n<p>When you&#8217;re running Ubuntu, the primary method to keep your server updated is by using apt-get, a package manager included with Ubuntu. apt-get makes it easy to grab the latest updates to any installed package.<\/p>\n<h2>Getting Started<\/h2>\n<p>Confirm that you have the following before you follow this guide:<br \/>\n\u2022 1 Node (<a href=\"https:\/\/www.globo.tech\/cloud-server-pricing\" target=\"_blank\">Cloud Server<\/a> or <a href=\"http:\/\/www.globo.tech\/dedicated-server-hosting\" target=\"_blank\">Dedicated Server<\/a>) running Ubuntu.<\/p>\n<p>Additionally, it&#8217;s important to remember to backup your server and data on a regular basis, especially before making any substantial updates or upgrades to your system.<\/p>\n<h2>Tutorial<\/h2>\n<p><strong>Basic commands<\/strong><\/p>\n<p>apt-get has a number of subcommands that you may find useful during server administration tasks. The following are the most common ones that you&#8217;ll use.<\/p>\n<p><em>apt-get update<\/em><br \/>\nThis command will inform your system of the latest packages extant in the repository. It downloads all lists of packages from any repositories installed on your system and then uses them to update your local copy. This will give your system information on the newest versions of packages and their dependencies.<\/p>\n<p><em>apt-get upgrade<\/em><br \/>\nThis command is the simplest way to update your system. It will check your package lists and download any detected new versions of packages existing on the machine. One caveat is that you have to have used apt-get update first.<\/p>\n<p><em>apt-get dist-upgrade<\/em><br \/>\nSimilar to the above, except this command will also intelligently handle dependencies. It has the ability to remove obsolete packages and add new ones. <\/p>\n<p>Before you upgrade, apt-get will show all the packages that will be upgraded and ask for a confirmation. Simply press Y to confirm. If you&#8217;d like to see the full history of upgraded packages, point your text editor to \/var\/log\/apt\/history.log.<\/p>\n<p><strong>How to update OS version from a Ubuntu server using apt-get<\/strong><\/p>\n<p>First, you must make sure that your server packages are up to date. You can do this by running the command apt-get update &#038;&#038; apt-get upgrade.<\/p>\n<p><em>do-release-upgrade<\/em><br \/>\nThis command will start the upgrade process of the server. Conveniently for those running the system update over an ssh session, the server will provide you a new ssh port and connection in case you lose the initial connection.<\/p>\n<p><em>reboot<\/em><br \/>\nOnce the update process is ended, you will be prompted to reboot your server in order to apply the new kernel and any final modifications. <\/p>\n<!-- AddThis Advanced Settings generic via filter on the_content --><!-- AddThis Share Buttons generic via filter on the_content -->","protected":false},"excerpt":{"rendered":"<p>How to update an Ubuntu server using apt-get Security in the cloud is paramount, and so it&#8217;s important to keep your server up to date. If you don&#8217;t regularly apply the latest security fixes and patches to your machine, then you run the risk of your server being compromised due to an easily preventable exploit.<!-- AddThis Advanced Settings generic via filter on get_the_excerpt --><!-- AddThis Share Buttons generic via filter on get_the_excerpt --><\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[73],"tags":[],"class_list":["post-2517","post","type-post","status-publish","format-standard","hentry","category-security"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.0 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>How to update an Ubuntu server using apt-get - Globo.Tech<\/title>\n<meta name=\"description\" content=\"This tutorial will show you how to easily update your Ubuntu server using apt-get. Read now &amp; Keep you server up to date!\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.globo.tech\/learning-center\/update-ubuntu-server-apt-get\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to update an Ubuntu server using apt-get - Globo.Tech\" \/>\n<meta property=\"og:description\" content=\"This tutorial will show you how to easily update your Ubuntu server using apt-get. Read now &amp; Keep you server up to date!\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.globo.tech\/learning-center\/update-ubuntu-server-apt-get\/\" \/>\n<meta property=\"og:site_name\" content=\"Globo.Tech\" \/>\n<meta property=\"article:published_time\" content=\"2016-08-15T21:30:19+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2018-01-12T19:16:04+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.globo.tech\/learning-center\/wp-content\/uploads\/2016\/09\/GloboTech-Logo.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1920\" \/>\n\t<meta property=\"og:image:height\" content=\"963\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"GloboTech Communications\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"GloboTech Communications\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.globo.tech\/learning-center\/update-ubuntu-server-apt-get\/\",\"url\":\"https:\/\/www.globo.tech\/learning-center\/update-ubuntu-server-apt-get\/\",\"name\":\"How to update an Ubuntu server using apt-get - Globo.Tech\",\"isPartOf\":{\"@id\":\"https:\/\/www.globo.tech\/learning-center\/#website\"},\"datePublished\":\"2016-08-15T21:30:19+00:00\",\"dateModified\":\"2018-01-12T19:16:04+00:00\",\"author\":{\"@id\":\"https:\/\/www.globo.tech\/learning-center\/#\/schema\/person\/e17784b37f4a4f49b7bc611847912e87\"},\"description\":\"This tutorial will show you how to easily update your Ubuntu server using apt-get. Read now & Keep you server up to date!\",\"breadcrumb\":{\"@id\":\"https:\/\/www.globo.tech\/learning-center\/update-ubuntu-server-apt-get\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.globo.tech\/learning-center\/update-ubuntu-server-apt-get\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.globo.tech\/learning-center\/update-ubuntu-server-apt-get\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.globo.tech\/learning-center\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to update an Ubuntu server using apt-get\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.globo.tech\/learning-center\/#website\",\"url\":\"https:\/\/www.globo.tech\/learning-center\/\",\"name\":\"Globo.Tech\",\"description\":\"Welcome to the Official Globo.Tech Learning Center\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.globo.tech\/learning-center\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.globo.tech\/learning-center\/#\/schema\/person\/e17784b37f4a4f49b7bc611847912e87\",\"name\":\"GloboTech Communications\",\"sameAs\":[\"http:\/\/www.gtcomm.net\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to update an Ubuntu server using apt-get - Globo.Tech","description":"This tutorial will show you how to easily update your Ubuntu server using apt-get. Read now & Keep you server up to date!","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.globo.tech\/learning-center\/update-ubuntu-server-apt-get\/","og_locale":"en_US","og_type":"article","og_title":"How to update an Ubuntu server using apt-get - Globo.Tech","og_description":"This tutorial will show you how to easily update your Ubuntu server using apt-get. Read now & Keep you server up to date!","og_url":"https:\/\/www.globo.tech\/learning-center\/update-ubuntu-server-apt-get\/","og_site_name":"Globo.Tech","article_published_time":"2016-08-15T21:30:19+00:00","article_modified_time":"2018-01-12T19:16:04+00:00","og_image":[{"width":1920,"height":963,"url":"https:\/\/www.globo.tech\/learning-center\/wp-content\/uploads\/2016\/09\/GloboTech-Logo.png","type":"image\/png"}],"author":"GloboTech Communications","twitter_misc":{"Written by":"GloboTech Communications","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.globo.tech\/learning-center\/update-ubuntu-server-apt-get\/","url":"https:\/\/www.globo.tech\/learning-center\/update-ubuntu-server-apt-get\/","name":"How to update an Ubuntu server using apt-get - Globo.Tech","isPartOf":{"@id":"https:\/\/www.globo.tech\/learning-center\/#website"},"datePublished":"2016-08-15T21:30:19+00:00","dateModified":"2018-01-12T19:16:04+00:00","author":{"@id":"https:\/\/www.globo.tech\/learning-center\/#\/schema\/person\/e17784b37f4a4f49b7bc611847912e87"},"description":"This tutorial will show you how to easily update your Ubuntu server using apt-get. Read now & Keep you server up to date!","breadcrumb":{"@id":"https:\/\/www.globo.tech\/learning-center\/update-ubuntu-server-apt-get\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.globo.tech\/learning-center\/update-ubuntu-server-apt-get\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.globo.tech\/learning-center\/update-ubuntu-server-apt-get\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.globo.tech\/learning-center\/"},{"@type":"ListItem","position":2,"name":"How to update an Ubuntu server using apt-get"}]},{"@type":"WebSite","@id":"https:\/\/www.globo.tech\/learning-center\/#website","url":"https:\/\/www.globo.tech\/learning-center\/","name":"Globo.Tech","description":"Welcome to the Official Globo.Tech Learning Center","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.globo.tech\/learning-center\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/www.globo.tech\/learning-center\/#\/schema\/person\/e17784b37f4a4f49b7bc611847912e87","name":"GloboTech Communications","sameAs":["http:\/\/www.gtcomm.net"]}]}},"_links":{"self":[{"href":"https:\/\/www.globo.tech\/learning-center\/wp-json\/wp\/v2\/posts\/2517","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.globo.tech\/learning-center\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.globo.tech\/learning-center\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.globo.tech\/learning-center\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/www.globo.tech\/learning-center\/wp-json\/wp\/v2\/comments?post=2517"}],"version-history":[{"count":5,"href":"https:\/\/www.globo.tech\/learning-center\/wp-json\/wp\/v2\/posts\/2517\/revisions"}],"predecessor-version":[{"id":4094,"href":"https:\/\/www.globo.tech\/learning-center\/wp-json\/wp\/v2\/posts\/2517\/revisions\/4094"}],"wp:attachment":[{"href":"https:\/\/www.globo.tech\/learning-center\/wp-json\/wp\/v2\/media?parent=2517"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.globo.tech\/learning-center\/wp-json\/wp\/v2\/categories?post=2517"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.globo.tech\/learning-center\/wp-json\/wp\/v2\/tags?post=2517"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}