{"id":12899,"date":"2019-03-29T01:51:29","date_gmt":"2019-03-29T01:51:29","guid":{"rendered":"http:\/\/www.appservgrid.com\/paw92\/?p=12899"},"modified":"2019-03-29T01:51:29","modified_gmt":"2019-03-29T01:51:29","slug":"installation-of-ubuntu-16-04-server-edition-and-initial-ubuntu-server-setup","status":"publish","type":"post","link":"https:\/\/www.appservgrid.com\/paw92\/index.php\/2019\/03\/29\/installation-of-ubuntu-16-04-server-edition-and-initial-ubuntu-server-setup\/","title":{"rendered":"Installation of Ubuntu 16.04 Server Edition and Initial Ubuntu Server Setup"},"content":{"rendered":"<p><strong>Ubuntu Server 16.04<\/strong>, also named\u00a0<strong>Xenial Xerus<\/strong>, has been released by Canonical and it\u2019s now ready for installation.<\/p>\n<p>The details about this new LTS version can be found on the previous article:\u00a0<a href=\"https:\/\/www.tecmint.com\/upgrade-ubuntu-15-10-to-ubuntu-16-04\/\" target=\"_blank\" rel=\"noopener\">How to upgrade Ubuntu 15.10 to 16.04<\/a>.<\/p>\n<p>This topic will guide you on how you can install\u00a0<strong>Ubuntu 16.04 Server Edition<\/strong>\u00a0with\u00a0<strong>Long Time Support<\/strong>\u00a0on your machine.<\/p>\n<p>If you\u2019re looking for Desktop Edition, read our previous article:\u00a0<a href=\"https:\/\/www.tecmint.com\/ubuntu-16-04-installation-guide\/\" target=\"_blank\" rel=\"noopener\">Installation of Ubuntu 16.04 Desktop<\/a><\/p>\n<h4>Requirements<\/h4>\n<ol>\n<li><a href=\"http:\/\/releases.ubuntu.com\/16.04\/\" target=\"_blank\" rel=\"noopener\">Ubuntu 16.04 Server ISO Image<\/a><\/li>\n<\/ol>\n<h3>Install Ubuntu 16.04 Server Edition<\/h3>\n<p><strong>1.<\/strong>\u00a0On the first step visit the above link and download the latest version of\u00a0<strong>Ubuntu Server ISO<\/strong>\u00a0image on your computer.<\/p>\n<p>Once the image download completes, burn it to a CD or create a bootable USB disk using Unbootin (for BIOS machines) or\u00a0<strong>Rufus<\/strong>\u00a0(for\u00a0<strong>UEFI<\/strong>\u00a0machines).<\/p>\n<p><strong>2.<\/strong>\u00a0Place the bootable media intro the appropriate drive, start-up the machine and instruct the\u00a0<strong>BIOS\/UEFI<\/strong>\u00a0by pressing a special function key (<strong>F2<\/strong>,\u00a0<strong>F11<\/strong>,\u00a0<strong>F12<\/strong>) to boot-up from the inserted USB\/CD drive.<\/p>\n<p>In a few seconds you will be presented with the first screen of Ubuntu installer. Select your language to perform the installation and hit\u00a0<strong>Enter<\/strong>\u00a0key to move to the next screen.<\/p>\n<div id=\"attachment_20196\" class=\"wp-caption aligncenter\">\n<p><a href=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2016\/04\/Choose-Ubuntu-16.04-Server-Installation-Language.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-20196\" src=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2016\/04\/Choose-Ubuntu-16.04-Server-Installation-Language.png\" alt=\"Choose Ubuntu 16.04 Server Installation Language\" width=\"640\" height=\"480\" aria-describedby=\"caption-attachment-20196\" data-lazy-loaded=\"true\" \/><\/a><\/p>\n<p id=\"caption-attachment-20196\" class=\"wp-caption-text\">Choose Ubuntu 16.04 Server Installation Language<\/p>\n<\/div>\n<p><strong>3.<\/strong>\u00a0Next, select the first option,\u00a0<strong>Install Ubuntu Server<\/strong>\u00a0and press\u00a0<strong>Enter<\/strong>\u00a0key to continue.<\/p>\n<div id=\"attachment_20197\" class=\"wp-caption aligncenter\">\n<p><a href=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2016\/04\/Install-Ubuntu-16.04-Server.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-20197\" src=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2016\/04\/Install-Ubuntu-16.04-Server.png\" alt=\"Install Ubuntu 16.04 Server\" width=\"640\" height=\"480\" aria-describedby=\"caption-attachment-20197\" data-lazy-loaded=\"true\" \/><\/a><\/p>\n<p id=\"caption-attachment-20197\" class=\"wp-caption-text\">Install Ubuntu 16.04 Server<\/p>\n<\/div>\n<p><strong>4.<\/strong>\u00a0Select the language you with to install the system and press\u00a0<strong>Enter<\/strong>\u00a0again to continue further.<\/p>\n<div id=\"attachment_20198\" class=\"wp-caption aligncenter\">\n<p><a href=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2016\/04\/Select-Language-for-Ubuntu-16.04-Server.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-20198\" src=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2016\/04\/Select-Language-for-Ubuntu-16.04-Server.png\" sizes=\"auto, (max-width: 800px) 100vw, 800px\" srcset=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2016\/04\/Select-Language-for-Ubuntu-16.04-Server.png 800w, https:\/\/www.tecmint.com\/wp-content\/uploads\/2016\/04\/Select-Language-for-Ubuntu-16.04-Server-768x576.png 768w\" alt=\"Select Language for Ubuntu 16.04 Server\" width=\"800\" height=\"600\" aria-describedby=\"caption-attachment-20198\" data-lazy-loaded=\"true\" \/><\/a><\/p>\n<p id=\"caption-attachment-20198\" class=\"wp-caption-text\">Select Language for Ubuntu 16.04 Server<\/p>\n<\/div>\n<p><strong>5.<\/strong>\u00a0On the next series of screen choose your physical location from the presented list. If your location is different than the ones offered on the first screen, select other and hit\u00a0<strong>Enter<\/strong>\u00a0key, then select the location based on your continent and country. This location will be also used by the timezone system variable. Use the below screenshots as a guide.<\/p>\n<div id=\"attachment_20199\" class=\"wp-caption aligncenter\">\n<p><a href=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2016\/04\/Choose-Location-for-Ubuntu-16.04-Server.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-20199\" src=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2016\/04\/Choose-Location-for-Ubuntu-16.04-Server.png\" sizes=\"auto, (max-width: 800px) 100vw, 800px\" srcset=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2016\/04\/Choose-Location-for-Ubuntu-16.04-Server.png 800w, https:\/\/www.tecmint.com\/wp-content\/uploads\/2016\/04\/Choose-Location-for-Ubuntu-16.04-Server-768x576.png 768w\" alt=\"Choose Location for Ubuntu 16.04 Server\" width=\"800\" height=\"600\" aria-describedby=\"caption-attachment-20199\" data-lazy-loaded=\"true\" \/><\/a><\/p>\n<p id=\"caption-attachment-20199\" class=\"wp-caption-text\">Choose Location for Ubuntu 16.04 Server<\/p>\n<\/div>\n<div id=\"attachment_20200\" class=\"wp-caption aligncenter\">\n<p><a href=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2016\/04\/Select-Country-Region-1.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-20200\" src=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2016\/04\/Select-Country-Region-1.png\" sizes=\"auto, (max-width: 800px) 100vw, 800px\" srcset=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2016\/04\/Select-Country-Region-1.png 800w, https:\/\/www.tecmint.com\/wp-content\/uploads\/2016\/04\/Select-Country-Region-1-768x576.png 768w\" alt=\"Select Country Region\" width=\"800\" height=\"600\" aria-describedby=\"caption-attachment-20200\" data-lazy-loaded=\"true\" \/><\/a><\/p>\n<p id=\"caption-attachment-20200\" class=\"wp-caption-text\">Select Country Region<\/p>\n<\/div>\n<div id=\"attachment_20201\" class=\"wp-caption aligncenter\">\n<p><a href=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2016\/04\/Select-Area-Location.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-20201\" src=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2016\/04\/Select-Area-Location.png\" sizes=\"auto, (max-width: 800px) 100vw, 800px\" srcset=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2016\/04\/Select-Area-Location.png 800w, https:\/\/www.tecmint.com\/wp-content\/uploads\/2016\/04\/Select-Area-Location-768x576.png 768w\" alt=\"Select Area Location\" width=\"800\" height=\"600\" aria-describedby=\"caption-attachment-20201\" data-lazy-loaded=\"true\" \/><\/a><\/p>\n<p id=\"caption-attachment-20201\" class=\"wp-caption-text\">Select Area Location<\/p>\n<\/div>\n<p><strong>6.<\/strong>\u00a0Assign the locales and keyboard settings for your system as illustrated below and hit\u00a0<strong>Enter<\/strong>\u00a0to continue the installation setup.<\/p>\n<div id=\"attachment_20202\" class=\"wp-caption aligncenter\">\n<p><a href=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2016\/04\/Configure-Locales.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-20202\" src=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2016\/04\/Configure-Locales.png\" sizes=\"auto, (max-width: 800px) 100vw, 800px\" srcset=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2016\/04\/Configure-Locales.png 800w, https:\/\/www.tecmint.com\/wp-content\/uploads\/2016\/04\/Configure-Locales-768x576.png 768w\" alt=\"Configure Locales\" width=\"800\" height=\"600\" aria-describedby=\"caption-attachment-20202\" data-lazy-loaded=\"true\" \/><\/a><\/p>\n<p id=\"caption-attachment-20202\" class=\"wp-caption-text\">Configure Locales<\/p>\n<\/div>\n<div id=\"attachment_20203\" class=\"wp-caption aligncenter\">\n<p><a href=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2016\/04\/Configure-Keyboard-Layout.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-20203\" src=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2016\/04\/Configure-Keyboard-Layout.png\" sizes=\"auto, (max-width: 800px) 100vw, 800px\" srcset=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2016\/04\/Configure-Keyboard-Layout.png 800w, https:\/\/www.tecmint.com\/wp-content\/uploads\/2016\/04\/Configure-Keyboard-Layout-768x576.png 768w\" alt=\"Configure Keyboard Layout\" width=\"800\" height=\"600\" aria-describedby=\"caption-attachment-20203\" data-lazy-loaded=\"true\" \/><\/a><\/p>\n<p id=\"caption-attachment-20203\" class=\"wp-caption-text\">Configure Keyboard Layout<\/p>\n<\/div>\n<p><strong>7.<\/strong>\u00a0The installer will load a series of additional components required for the next steps and will automatically configure your network settings in case you have a DHCP server on the LAN.<\/p>\n<p>Because this installation is intended for a server it\u2019s a good idea to\u00a0<a href=\"https:\/\/www.tecmint.com\/set-add-static-ip-address-in-linux\/\" target=\"_blank\" rel=\"noopener\">setup a static IP address<\/a>\u00a0for your network interface.<\/p>\n<div class=\"google-auto-placed ap_container\">\n<p>To do this you can interrupt the automatic network configuration process by pressing on\u00a0<strong>Cancel<\/strong>\u00a0or once the installer reaches hostname phase you can hit on\u00a0<strong>Go Back<\/strong>\u00a0and choose to\u00a0<strong>Configure network manually<\/strong>.<\/p>\n<div id=\"attachment_20204\" class=\"wp-caption aligncenter\">\n<p><a href=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2016\/04\/Set-Ubuntu-16.04-Hostname.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-20204\" src=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2016\/04\/Set-Ubuntu-16.04-Hostname.png\" sizes=\"auto, (max-width: 800px) 100vw, 800px\" srcset=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2016\/04\/Set-Ubuntu-16.04-Hostname.png 800w, https:\/\/www.tecmint.com\/wp-content\/uploads\/2016\/04\/Set-Ubuntu-16.04-Hostname-768x576.png 768w\" alt=\"Set Ubuntu 16.04 Hostname\" width=\"800\" height=\"600\" aria-describedby=\"caption-attachment-20204\" data-lazy-loaded=\"true\" \/><\/a><\/p>\n<p id=\"caption-attachment-20204\" class=\"wp-caption-text\">Set Ubuntu 16.04 Hostname<\/p>\n<\/div>\n<div id=\"attachment_20205\" class=\"wp-caption aligncenter\">\n<p><a href=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2016\/04\/Configure-Network.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-20205\" src=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2016\/04\/Configure-Network.png\" sizes=\"auto, (max-width: 800px) 100vw, 800px\" srcset=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2016\/04\/Configure-Network.png 800w, https:\/\/www.tecmint.com\/wp-content\/uploads\/2016\/04\/Configure-Network-768x576.png 768w\" alt=\"Configure Network Manually\" width=\"800\" height=\"600\" aria-describedby=\"caption-attachment-20205\" data-lazy-loaded=\"true\" \/><\/a><\/p>\n<p id=\"caption-attachment-20205\" class=\"wp-caption-text\">Configure Network Manually<\/p>\n<\/div>\n<p><strong>8.<\/strong>\u00a0Enter your network settings accordingly (IP Address, netmask, gateway and at least two DNS nameservers) as illustrated on the below images.<\/p>\n<div id=\"attachment_20206\" class=\"wp-caption aligncenter\">\n<p><a href=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2016\/04\/Set-Static-IP-Address.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-20206\" src=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2016\/04\/Set-Static-IP-Address.png\" sizes=\"auto, (max-width: 800px) 100vw, 800px\" srcset=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2016\/04\/Set-Static-IP-Address.png 800w, https:\/\/www.tecmint.com\/wp-content\/uploads\/2016\/04\/Set-Static-IP-Address-768x576.png 768w\" alt=\"Set Static IP Address on Ubuntu 16.04\" width=\"800\" height=\"600\" aria-describedby=\"caption-attachment-20206\" data-lazy-loaded=\"true\" \/><\/a><\/p>\n<p id=\"caption-attachment-20206\" class=\"wp-caption-text\">Set Static IP Address on Ubuntu 16.04<\/p>\n<\/div>\n<div id=\"attachment_20207\" class=\"wp-caption aligncenter\">\n<p><a href=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2016\/04\/Configure-Network-Mask.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-20207\" src=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2016\/04\/Configure-Network-Mask.png\" sizes=\"auto, (max-width: 800px) 100vw, 800px\" srcset=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2016\/04\/Configure-Network-Mask.png 800w, https:\/\/www.tecmint.com\/wp-content\/uploads\/2016\/04\/Configure-Network-Mask-768x576.png 768w\" alt=\"Configure Network Mask for Ubuntu 16.04\" width=\"800\" height=\"600\" aria-describedby=\"caption-attachment-20207\" data-lazy-loaded=\"true\" \/><\/a><\/p>\n<p id=\"caption-attachment-20207\" class=\"wp-caption-text\">Configure Network Mask for Ubuntu 16.04<\/p>\n<\/div>\n<div id=\"attachment_20208\" class=\"wp-caption aligncenter\">\n<p><a href=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2016\/04\/Configure-Network-Gateway.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-20208\" src=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2016\/04\/Configure-Network-Gateway.png\" sizes=\"auto, (max-width: 800px) 100vw, 800px\" srcset=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2016\/04\/Configure-Network-Gateway.png 800w, https:\/\/www.tecmint.com\/wp-content\/uploads\/2016\/04\/Configure-Network-Gateway-768x576.png 768w\" alt=\"Configure Network Gateway for Ubuntu 16.04\" width=\"800\" height=\"600\" aria-describedby=\"caption-attachment-20208\" data-lazy-loaded=\"true\" \/><\/a><\/p>\n<p id=\"caption-attachment-20208\" class=\"wp-caption-text\">Configure Network Gateway for Ubuntu 16.04<\/p>\n<\/div>\n<div id=\"attachment_20209\" class=\"wp-caption aligncenter\">\n<p><a href=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2016\/04\/Configure-Network-DNS.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-20209\" src=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2016\/04\/Configure-Network-DNS.png\" sizes=\"auto, (max-width: 800px) 100vw, 800px\" srcset=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2016\/04\/Configure-Network-DNS.png 800w, https:\/\/www.tecmint.com\/wp-content\/uploads\/2016\/04\/Configure-Network-DNS-768x576.png 768w\" alt=\"Configure Network DNS on Ubuntu 16.04\" width=\"800\" height=\"600\" aria-describedby=\"caption-attachment-20209\" data-lazy-loaded=\"true\" \/><\/a><\/p>\n<p id=\"caption-attachment-20209\" class=\"wp-caption-text\">Configure Network DNS on Ubuntu 16.04<\/p>\n<\/div>\n<p><strong>9.<\/strong>\u00a0On the next step setup a descriptive hostname for your machine and a domain (not necessary required) and hit on\u00a0<strong>Continue<\/strong>\u00a0to move to the next screen. This step concludes the network settings.<\/p>\n<div id=\"attachment_20210\" class=\"wp-caption aligncenter\">\n<p><a href=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2016\/04\/Set-Ubuntu-16.04-Server-Hostname.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-20210\" src=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2016\/04\/Set-Ubuntu-16.04-Server-Hostname.png\" sizes=\"auto, (max-width: 800px) 100vw, 800px\" srcset=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2016\/04\/Set-Ubuntu-16.04-Server-Hostname.png 800w, https:\/\/www.tecmint.com\/wp-content\/uploads\/2016\/04\/Set-Ubuntu-16.04-Server-Hostname-768x576.png 768w\" alt=\"Set Ubuntu 16.04 Server Hostname\" width=\"800\" height=\"600\" aria-describedby=\"caption-attachment-20210\" data-lazy-loaded=\"true\" \/><\/a><\/p>\n<p id=\"caption-attachment-20210\" class=\"wp-caption-text\">Set Ubuntu 16.04 Server Hostname<\/p>\n<\/div>\n<div id=\"attachment_20211\" class=\"wp-caption aligncenter\">\n<p><a href=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2016\/04\/Set-Ubuntu-16.04-Domain-Name.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-20211\" src=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2016\/04\/Set-Ubuntu-16.04-Domain-Name.png\" sizes=\"auto, (max-width: 800px) 100vw, 800px\" srcset=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2016\/04\/Set-Ubuntu-16.04-Domain-Name.png 800w, https:\/\/www.tecmint.com\/wp-content\/uploads\/2016\/04\/Set-Ubuntu-16.04-Domain-Name-768x576.png 768w\" alt=\"Set Ubuntu 16.04 Domain Name\" width=\"800\" height=\"600\" aria-describedby=\"caption-attachment-20211\" data-lazy-loaded=\"true\" \/><\/a><\/p>\n<p id=\"caption-attachment-20211\" class=\"wp-caption-text\">Set Ubuntu 16.04 Domain Name<\/p>\n<p><strong>10.<\/strong>\u00a0On this step the installer prompts you to setup a username and a password for your system. This username will be granted by the system with\u00a0<strong>sudo<\/strong>\u00a0powers, so, technically, this user will be the supreme administrator next to root account (which is disabled by default).<\/p>\n<p>Thus, choose an inspired username, maybe hard to guess for security reasons, with a strong password and hit on\u00a0<strong>Continue<\/strong>. Choose not to encrypt your home directory and press\u00a0<strong>Enter<\/strong>\u00a0to continue further.<\/p>\n<div id=\"attachment_20212\" class=\"wp-caption aligncenter\">\n<p><a href=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2016\/04\/Setup-User-and-Password.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-20212\" src=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2016\/04\/Setup-User-and-Password.png\" sizes=\"auto, (max-width: 800px) 100vw, 800px\" srcset=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2016\/04\/Setup-User-and-Password.png 800w, https:\/\/www.tecmint.com\/wp-content\/uploads\/2016\/04\/Setup-User-and-Password-768x576.png 768w\" alt=\"Setup User and Password\" width=\"800\" height=\"600\" aria-describedby=\"caption-attachment-20212\" data-lazy-loaded=\"true\" \/><\/a><\/p>\n<p id=\"caption-attachment-20212\" class=\"wp-caption-text\">Setup User and Password<\/p>\n<\/div>\n<p><strong>11.<\/strong>\u00a0Next, the installer will automatically set your clock based on the physical location configured earlier. In case the location is correctly chosen hit on\u00a0<strong>Yes<\/strong>\u00a0to continue to disk partition layout.<\/p>\n<div id=\"attachment_20213\" class=\"wp-caption aligncenter\">\n<p><a href=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2016\/04\/Configure-System-Clock.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-20213\" src=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2016\/04\/Configure-System-Clock.png\" sizes=\"auto, (max-width: 800px) 100vw, 800px\" srcset=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2016\/04\/Configure-System-Clock.png 800w, https:\/\/www.tecmint.com\/wp-content\/uploads\/2016\/04\/Configure-System-Clock-768x576.png 768w\" alt=\"Configure System Clock\" width=\"800\" height=\"600\" aria-describedby=\"caption-attachment-20213\" data-lazy-loaded=\"true\" \/><\/a><\/p>\n<p id=\"caption-attachment-20213\" class=\"wp-caption-text\">Configure System Clock<\/p>\n<\/div>\n<p><strong>12.<\/strong>\u00a0On the next step you can choose the method that will be used to slice up your disk. For instance, if you need to create custom partition scheme (such as\u00a0<strong>\/home<\/strong>,\u00a0<strong>\/var<\/strong>,\u00a0<strong>\/boot<\/strong>\u00a0etc) choose Manual method.<\/p>\n<p>For a general purpose server you can stick to\u00a0<strong>Guided with LVM<\/strong>\u00a0method as illustrated below, which automatically creates the partitions on your behalf.<\/p>\n<div id=\"attachment_20214\" class=\"wp-caption aligncenter\">\n<p><a href=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2016\/04\/Select-Partition-Method.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-20214\" src=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2016\/04\/Select-Partition-Method.png\" sizes=\"auto, (max-width: 800px) 100vw, 800px\" srcset=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2016\/04\/Select-Partition-Method.png 800w, https:\/\/www.tecmint.com\/wp-content\/uploads\/2016\/04\/Select-Partition-Method-768x576.png 768w\" alt=\"Select Partition Method\" width=\"800\" height=\"600\" aria-describedby=\"caption-attachment-20214\" data-lazy-loaded=\"true\" \/><\/a><\/p>\n<p id=\"caption-attachment-20214\" class=\"wp-caption-text\">Select Partition Method<\/p>\n<\/div>\n<p><strong>13.<\/strong>\u00a0Next, select the disk that will be used by the installer to create partitions and press\u00a0<strong>Enter<\/strong>\u00a0key.<\/p>\n<div id=\"attachment_20215\" class=\"wp-caption aligncenter\">\n<p><a href=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2016\/04\/Select-Disk-Partition.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-20215\" src=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2016\/04\/Select-Disk-Partition.png\" sizes=\"auto, (max-width: 800px) 100vw, 800px\" srcset=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2016\/04\/Select-Disk-Partition.png 800w, https:\/\/www.tecmint.com\/wp-content\/uploads\/2016\/04\/Select-Disk-Partition-768x576.png 768w\" alt=\"Select Disk Partition\" width=\"800\" height=\"600\" aria-describedby=\"caption-attachment-20215\" data-lazy-loaded=\"true\" \/><\/a><\/p>\n<p id=\"caption-attachment-20215\" class=\"wp-caption-text\">Select Disk Partition<\/p>\n<\/div>\n<p><strong>14.<\/strong>\u00a0Answer with\u00a0<strong>Yes<\/strong>\u00a0at the next screen in order to commit changes to disk with LVM scheme and hit on\u00a0<strong>Continue<\/strong>\u00a0to use the entire disk space for guided partitions.<\/p>\n<div id=\"attachment_20217\" class=\"wp-caption aligncenter\">\n<p><a href=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2016\/04\/Add-Disk-Partition-Size.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-20217\" src=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2016\/04\/Add-Disk-Partition-Size.png\" sizes=\"auto, (max-width: 800px) 100vw, 800px\" srcset=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2016\/04\/Add-Disk-Partition-Size.png 800w, https:\/\/www.tecmint.com\/wp-content\/uploads\/2016\/04\/Add-Disk-Partition-Size-768x576.png 768w\" alt=\"Add Disk Partition Size\" width=\"800\" height=\"600\" aria-describedby=\"caption-attachment-20217\" data-lazy-loaded=\"true\" \/><\/a><\/p>\n<p id=\"caption-attachment-20217\" class=\"wp-caption-text\">Add Disk Partition Size<\/p>\n<\/div>\n<div id=\"attachment_20218\" class=\"wp-caption aligncenter\">\n<p><a href=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2016\/04\/Confirm-Disk-Partition-Changes.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-20218\" src=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2016\/04\/Confirm-Disk-Partition-Changes.png\" sizes=\"auto, (max-width: 800px) 100vw, 800px\" srcset=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2016\/04\/Confirm-Disk-Partition-Changes.png 800w, https:\/\/www.tecmint.com\/wp-content\/uploads\/2016\/04\/Confirm-Disk-Partition-Changes-768x576.png 768w\" alt=\"Confirm Disk Partition Changes\" width=\"800\" height=\"600\" aria-describedby=\"caption-attachment-20218\" data-lazy-loaded=\"true\" \/><\/a><\/p>\n<p id=\"caption-attachment-20218\" class=\"wp-caption-text\">Confirm Disk Partition Changes<\/p>\n<\/div>\n<p><strong>15.<\/strong>\u00a0Finally, approve for the last time the changes to be written to disk by pressing on\u00a0<strong>Yes<\/strong>\u00a0and the installation will now begin. From this step on all the changes will be committed to disk.<\/p>\n<div id=\"attachment_20219\" class=\"wp-caption aligncenter\">\n<p><a href=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2016\/04\/Confirm-Disk-Partition-Changes-1.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-20219\" src=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2016\/04\/Confirm-Disk-Partition-Changes-1.png\" sizes=\"auto, (max-width: 800px) 100vw, 800px\" srcset=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2016\/04\/Confirm-Disk-Partition-Changes-1.png 800w, https:\/\/www.tecmint.com\/wp-content\/uploads\/2016\/04\/Confirm-Disk-Partition-Changes-1-768x576.png 768w\" alt=\"Confirm Disk Partition Changes\" width=\"800\" height=\"600\" aria-describedby=\"caption-attachment-20219\" data-lazy-loaded=\"true\" \/><\/a><\/p>\n<p id=\"caption-attachment-20219\" class=\"wp-caption-text\">Confirm Disk Partition Changes<\/p>\n<\/div>\n<div id=\"attachment_20220\" class=\"wp-caption aligncenter\">\n<p><a href=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2016\/04\/Installing-Ubuntu-16.04-Server.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-20220\" src=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2016\/04\/Installing-Ubuntu-16.04-Server.png\" sizes=\"auto, (max-width: 800px) 100vw, 800px\" srcset=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2016\/04\/Installing-Ubuntu-16.04-Server.png 800w, https:\/\/www.tecmint.com\/wp-content\/uploads\/2016\/04\/Installing-Ubuntu-16.04-Server-768x576.png 768w\" alt=\"Installing Ubuntu 16.04 Server\" width=\"800\" height=\"600\" aria-describedby=\"caption-attachment-20220\" data-lazy-loaded=\"true\" \/><\/a><\/p>\n<p id=\"caption-attachment-20220\" class=\"wp-caption-text\">Installing Ubuntu 16.04 Server<\/p>\n<\/div>\n<p><strong>16.<\/strong>\u00a0In case your system is behind a proxy or a firewall use the next screen to bypass the network restrictions, otherwise just leave it black and hit on\u00a0<strong>Continue<\/strong>.<\/p>\n<div id=\"attachment_20221\" class=\"wp-caption aligncenter\">\n<p><a href=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2016\/04\/Configure-Package-Manager.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-20221\" src=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2016\/04\/Configure-Package-Manager.png\" sizes=\"auto, (max-width: 800px) 100vw, 800px\" srcset=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2016\/04\/Configure-Package-Manager.png 800w, https:\/\/www.tecmint.com\/wp-content\/uploads\/2016\/04\/Configure-Package-Manager-768x576.png 768w\" alt=\"Configure System Package Manager\" width=\"800\" height=\"600\" aria-describedby=\"caption-attachment-20221\" data-lazy-loaded=\"true\" \/><\/a><\/p>\n<p id=\"caption-attachment-20221\" class=\"wp-caption-text\">Configure System Package Manager<\/p>\n<\/div>\n<p><strong>17.<\/strong>\u00a0Next, the installer will configure\u00a0<strong>apt<\/strong>\u00a0repositories and will install the selected software. After it finishes the installation tasks a new screen will appear which will ask you how to manage the upgrade process. Select\u00a0<strong>No<\/strong>automatic updates for now (you will manually select what updates are necessary) and hit\u00a0<strong>Enter<\/strong>\u00a0key to continue.<\/p>\n<div id=\"attachment_20222\" class=\"wp-caption aligncenter\">\n<p><a href=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2016\/04\/Manage-Ubuntu-16.04-Upgrades.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-20222\" src=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2016\/04\/Manage-Ubuntu-16.04-Upgrades.png\" sizes=\"auto, (max-width: 800px) 100vw, 800px\" srcset=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2016\/04\/Manage-Ubuntu-16.04-Upgrades.png 800w, https:\/\/www.tecmint.com\/wp-content\/uploads\/2016\/04\/Manage-Ubuntu-16.04-Upgrades-768x576.png 768w\" alt=\"Manage Ubuntu 16.04 Upgrades\" width=\"800\" height=\"600\" aria-describedby=\"caption-attachment-20222\" data-lazy-loaded=\"true\" \/><\/a><\/p>\n<p id=\"caption-attachment-20222\" class=\"wp-caption-text\">Manage Ubuntu 16.04 Upgrades<\/p>\n<\/div>\n<p><strong>18.<\/strong>\u00a0On the next step you will be asked to select what software to install. Select only standard system utilities and\u00a0<strong>OpenSSH<\/strong>\u00a0server (if you require remote access) by pressing the spacebar key and hit on\u00a0<strong>Continue<\/strong>.<\/p>\n<div id=\"attachment_20223\" class=\"wp-caption aligncenter\">\n<p><a href=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2016\/04\/System-Software-Selection.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-20223\" src=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2016\/04\/System-Software-Selection.png\" sizes=\"auto, (max-width: 800px) 100vw, 800px\" srcset=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2016\/04\/System-Software-Selection.png 800w, https:\/\/www.tecmint.com\/wp-content\/uploads\/2016\/04\/System-Software-Selection-768x576.png 768w\" alt=\"System Software Selection\" width=\"800\" height=\"600\" aria-describedby=\"caption-attachment-20223\" data-lazy-loaded=\"true\" \/><\/a><\/p>\n<p id=\"caption-attachment-20223\" class=\"wp-caption-text\">System Software Selection<\/p>\n<\/div>\n<p><strong>19.<\/strong>\u00a0Once the installer finishes installing the software, a new screen will prompt you whether to install the\u00a0<strong>Grub<\/strong>boot loader to hard disk\u00a0<strong>MBR<\/strong>\u00a0(first\u00a0<strong>512<\/strong>\u00a0byte sector). Obviously without the GRUB you can\u2019t boot up your system after restart, so hit on\u00a0<strong>Yes<\/strong>\u00a0to continue with the installation.<\/p>\n<div id=\"attachment_20224\" class=\"wp-caption aligncenter\">\n<p><a href=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2016\/04\/Install-Grub-Boot-Loader.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-20224\" src=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2016\/04\/Install-Grub-Boot-Loader.png\" sizes=\"auto, (max-width: 800px) 100vw, 800px\" srcset=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2016\/04\/Install-Grub-Boot-Loader.png 800w, https:\/\/www.tecmint.com\/wp-content\/uploads\/2016\/04\/Install-Grub-Boot-Loader-768x576.png 768w\" alt=\"Install Grub Boot Loader\" width=\"800\" height=\"600\" aria-describedby=\"caption-attachment-20224\" data-lazy-loaded=\"true\" \/><\/a><\/p>\n<p id=\"caption-attachment-20224\" class=\"wp-caption-text\">Install Grub Boot Loader<\/p>\n<\/div>\n<p><strong>20.<\/strong>\u00a0Finally, after the boot loader is written to\u00a0<strong>Hard Disk MBR<\/strong>, the installation process finishes.\u00a0<strong>Hit<\/strong>\u00a0on Continue to reboot the machine and remove the installation media.<\/p>\n<div id=\"attachment_20225\" class=\"wp-caption aligncenter\">\n<p><a href=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2016\/04\/Finish-Ubuntu-16.04-Server-Installation.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-20225\" src=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2016\/04\/Finish-Ubuntu-16.04-Server-Installation.png\" sizes=\"auto, (max-width: 800px) 100vw, 800px\" srcset=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2016\/04\/Finish-Ubuntu-16.04-Server-Installation.png 800w, https:\/\/www.tecmint.com\/wp-content\/uploads\/2016\/04\/Finish-Ubuntu-16.04-Server-Installation-768x576.png 768w\" alt=\"Finish Ubuntu 16.04 Server Installation\" width=\"800\" height=\"600\" aria-describedby=\"caption-attachment-20225\" data-lazy-loaded=\"true\" \/><\/a><\/p>\n<p id=\"caption-attachment-20225\" class=\"wp-caption-text\">Finish Ubuntu 16.04 Server Installation<\/p>\n<\/div>\n<p><strong>21.<\/strong>\u00a0After\u00a0<strong>reboot<\/strong>, login to your system console using the credentials configured during the installation process and you\u2019re good to go on production with your server.<\/p>\n<div id=\"attachment_20226\" class=\"wp-caption aligncenter\">\n<p><a href=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2016\/04\/Ubuntu-16.04-Server-Login-Prompt.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-20226\" src=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2016\/04\/Ubuntu-16.04-Server-Login-Prompt.png\" sizes=\"auto, (max-width: 800px) 100vw, 800px\" srcset=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2016\/04\/Ubuntu-16.04-Server-Login-Prompt.png 800w, https:\/\/www.tecmint.com\/wp-content\/uploads\/2016\/04\/Ubuntu-16.04-Server-Login-Prompt-768x576.png 768w\" alt=\"Ubuntu 16.04 Server Login Prompt\" width=\"800\" height=\"600\" aria-describedby=\"caption-attachment-20226\" data-lazy-loaded=\"true\" \/><\/a><\/p>\n<p id=\"caption-attachment-20226\" class=\"wp-caption-text\">Ubuntu 16.04 Server Login Prompt<\/p>\n<\/div>\n<p>That\u2019s all! Keep in mind that this version of Ubuntu has official maintenance support from Canonical until\u00a0<strong>2021<\/strong>for hardware, bugs, software and security updates.<\/p>\n<\/div>\n<\/div>\n<h1 class=\"post-title\"><strong>Initial Ubuntu Server Setup for Beginners<\/strong><\/h1>\n<p>This tutorial will guide you on the first basic steps you need to configure on a new installed Ubuntu server in order to increase security and reliability for your server.<\/p>\n<p>The configurations explained in this topic are almost the same for all Ubuntu server systems, regarding of the underlying OS platform, whether Ubuntu is installed on a bare-metal server, in a private virtual machine or a virtual machine spinned-out in a VPS public cloud.<\/p>\n<h4>Requirements<\/h4>\n<ol>\n<li><a href=\"https:\/\/www.tecmint.com\/installation-of-ubuntu-16-04-server-edition\/\" target=\"_blank\" rel=\"noopener\">Ubuntu Server Edition installation<\/a><\/li>\n<\/ol>\n<h3>Update and Upgrade Ubuntu System<\/h3>\n<p>The first step you need to take care of in case of fresh installation of Ubuntu server or a new deployed Ubuntu VPS is to make sure the system and all system components, such as the kernel, the package manager and all other installed packages are up-to-date with the latest released versions and security patches.<\/p>\n<p>To update Ubuntu server, to log in to server\u2019s console with an account with root privileges or directly as root and run the below commands in order to perform the update and upgrade process.<\/p>\n<pre>$ sudo apt update \r\n<\/pre>\n<div id=\"attachment_27650\" class=\"wp-caption aligncenter\">\n<p><a href=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2017\/10\/Update-Ubuntu-Server.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-27650\" src=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2017\/10\/Update-Ubuntu-Server.png\" sizes=\"auto, (max-width: 853px) 100vw, 853px\" srcset=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2017\/10\/Update-Ubuntu-Server.png 853w, https:\/\/www.tecmint.com\/wp-content\/uploads\/2017\/10\/Update-Ubuntu-Server-768x172.png 768w\" alt=\"Update Ubuntu Server\" width=\"853\" height=\"191\" aria-describedby=\"caption-attachment-27650\" data-lazy-loaded=\"true\" \/><\/a><\/p>\n<p id=\"caption-attachment-27650\" class=\"wp-caption-text\">Update Ubuntu Server<\/p>\n<p>After running the update command, you will see the number of available packages for upgrading process and the command used for listing the packages upgrades.<\/p>\n<pre>$ sudo apt list --upgradable\r\n<\/pre>\n<div id=\"attachment_27651\" class=\"wp-caption aligncenter\">\n<p><a href=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2017\/10\/Upgrade-Ubuntu-Server.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-27651\" src=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2017\/10\/Upgrade-Ubuntu-Server.png\" alt=\"List Upgrade Ubuntu Packages\" width=\"755\" height=\"217\" aria-describedby=\"caption-attachment-27651\" data-lazy-loaded=\"true\" \/><\/a><\/p>\n<p id=\"caption-attachment-27651\" class=\"wp-caption-text\">List Upgrade Ubuntu Packages<\/p>\n<\/div>\n<p>After you\u2019ve consulted the list of packages available for upgrading, issue the below command to start system upgrade process.<\/p>\n<pre>$ sudo apt upgrade\r\n<\/pre>\n<div id=\"attachment_27652\" class=\"wp-caption aligncenter\">\n<p><a href=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2017\/10\/Upgrade-Ubuntu-Server-Packages.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-27652\" src=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2017\/10\/Upgrade-Ubuntu-Server-Packages.png\" alt=\"Upgrade Ubuntu Server Packages\" width=\"747\" height=\"548\" aria-describedby=\"caption-attachment-27652\" data-lazy-loaded=\"true\" \/><\/a><\/p>\n<p id=\"caption-attachment-27652\" class=\"wp-caption-text\">Upgrade Ubuntu Server Packages<\/p>\n<\/div>\n<p>In order to remove all locally downloaded deb packages and all other\u00a0<a href=\"https:\/\/www.tecmint.com\/useful-basic-commands-of-apt-get-and-apt-cache-for-package-management\/\" target=\"_blank\" rel=\"noopener\">apt-get caches<\/a>, execute the below command.<\/p>\n<pre>$ sudo apt autoremove\r\n$ sudo apt clean\r\n<\/pre>\n<div id=\"attachment_27653\" class=\"wp-caption aligncenter\">\n<p><a href=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2017\/10\/Autoremove-APT-Packages-and-Cache.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-27653\" src=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2017\/10\/Autoremove-APT-Packages-and-Cache.png\" alt=\"Autoremove APT Packages and Cache\" width=\"713\" height=\"277\" aria-describedby=\"caption-attachment-27653\" data-lazy-loaded=\"true\" \/><\/a><\/p>\n<p id=\"caption-attachment-27653\" class=\"wp-caption-text\">Autoremove APT Packages and Cache<\/p>\n<\/div>\n<h3>Create New Account in Ubuntu<\/h3>\n<p>By default, as a security measure, the root account is completely disabled in Ubuntu. In order to create a new account on the system, log in to the system with the account user with root privileges and create a new account with the below command.<\/p>\n<p>This new account will be granted with root powers privileges via\u00a0<a href=\"https:\/\/www.tecmint.com\/sudoers-configurations-for-setting-sudo-in-linux\/\" target=\"_blank\" rel=\"noopener\">sudo command<\/a>\u00a0and will be used to perform administrative tasks in the system. Make sure you setup a strong password to protect this account. Follow the\u00a0<strong>adduser<\/strong>\u00a0prompt to setup the user details and password.<\/p>\n<pre>$ sudo adduser ubuntu_user\r\n<\/pre>\n<div id=\"attachment_27654\" class=\"wp-caption aligncenter\">\n<p><a href=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2017\/10\/Create-User-in-Ubuntu.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-27654\" src=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2017\/10\/Create-User-in-Ubuntu.png\" alt=\"Create User in Ubuntu\" width=\"726\" height=\"348\" aria-describedby=\"caption-attachment-27654\" data-lazy-loaded=\"true\" \/><\/a><\/p>\n<p id=\"caption-attachment-27654\" class=\"wp-caption-text\">Create User in Ubuntu<\/p>\n<\/div>\n<p>If this account will be assigned to another system admin, you can force the user to change its password at the first log in attempt by issuing the following command.<\/p>\n<pre>$ sudo chage -d0 ubuntu_user\r\n<\/pre>\n<p>For now, the new added user cannot perform administrative tasks via sudo utility. To grant this new user account with administrative privileges you should add the user to \u201c<strong>sudo<\/strong>\u201d system group by issuing the below command.<\/p>\n<pre>$ sudo usermod -a -G sudo ubuntu_user\r\n<\/pre>\n<p>By default, all users belonging to the \u201c<strong>sudo<\/strong>\u201d group are allowed to execute commands with root privileges via\u00a0<a href=\"https:\/\/www.tecmint.com\/run-sudo-command-without-password-linux\/\" target=\"_blank\" rel=\"noopener\">sudo utility<\/a>. Sudo command must be used before writing the command needed for execution, as shown in the below example.<\/p>\n<pre>$ sudo apt install package_name\r\n<\/pre>\n<p>Test if the new user has the root privileges granted, by logging in to the system and run the\u00a0<strong>apt update<\/strong>command prefixed with sudo.<\/p>\n<pre>$ su - ubuntu_user\r\n$ sudo apt update\r\n<\/pre>\n<div id=\"attachment_27655\" class=\"wp-caption aligncenter\">\n<p><a href=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2017\/10\/Verify-New-User.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-27655\" src=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2017\/10\/Verify-New-User.png\" alt=\"Verify New User\" width=\"623\" height=\"401\" aria-describedby=\"caption-attachment-27655\" data-lazy-loaded=\"true\" \/><\/a><\/p>\n<p id=\"caption-attachment-27655\" class=\"wp-caption-text\">Verify New User<\/p>\n<\/div>\n<h3>Configure System Hostname in Ubuntu<\/h3>\n<p>Usually, the machine hostname is set-up during the system installation process or when the VPS is created in the cloud. However, you should change the name of your machine in order to better reflect the destination of your server or to better describe its final purpose.<\/p>\n<p>In a large company, machines are named after complex naming schemes in order to easily identify the machine in datacenter\u2019s racks. For instance, if your Ubuntu machine will operate a mail server, the name of the machine should reflect this fact and you can setup machine hostname as\u00a0<strong>mx01.mydomain.lan<\/strong>, for example.<\/p>\n<p>To show details about your machine hostname run the following command.<\/p>\n<pre>$ hostnamectl\r\n<\/pre>\n<p>In order to change the name of your machine, issue\u00a0<strong>hostnamectl command<\/strong>\u00a0with the new name you will configure for your machine, as illustrated in the below excerpt.<\/p>\n<pre>$ sudo hostnamectl set-hostname tecmint\r\n<\/pre>\n<p>Verify the new name of your system with one of the below commands.<\/p>\n<pre>$ hostname\r\n$ hostname -s\r\n$ cat \/etc\/hostname \r\n<\/pre>\n<div id=\"attachment_27656\" class=\"wp-caption aligncenter\">\n<p><a href=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2017\/10\/Set-Hostname-in-Ubuntu-Server.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-27656\" src=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2017\/10\/Set-Hostname-in-Ubuntu-Server.png\" alt=\"Set Hostname in Ubuntu Server\" width=\"594\" height=\"341\" aria-describedby=\"caption-attachment-27656\" data-lazy-loaded=\"true\" \/><\/a><\/p>\n<p id=\"caption-attachment-27656\" class=\"wp-caption-text\">Set Hostname in Ubuntu Server<\/p>\n<\/div>\n<h3>Setup SSH with Public Key Authentication in Ubuntu<\/h3>\n<p>To increase system security degree of an Ubuntu server, you should set-up SSH public key authentication for an local account. In order to generate SSH Key Pair, the public and private key, with a specifying a key length, such as 2048 bits, execute the following command at your server console.<\/p>\n<p>Make sure you\u2019re logged in to the system with the user you\u2019re setting up the SSH key.<\/p>\n<pre>$ su - ubuntu_user\r\n$ ssh-keygen -t RSA -b 2048\r\n<\/pre>\n<div id=\"attachment_27657\" class=\"wp-caption aligncenter\">\n<p><a href=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2017\/10\/Setup-SSH-Keys-in-Ubuntu.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-27657\" src=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2017\/10\/Setup-SSH-Keys-in-Ubuntu.png\" sizes=\"auto, (max-width: 780px) 100vw, 780px\" srcset=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2017\/10\/Setup-SSH-Keys-in-Ubuntu.png 780w, https:\/\/www.tecmint.com\/wp-content\/uploads\/2017\/10\/Setup-SSH-Keys-in-Ubuntu-768x473.png 768w\" alt=\"Setup SSH Keys in Ubuntu\" width=\"780\" height=\"480\" aria-describedby=\"caption-attachment-27657\" data-lazy-loaded=\"true\" \/><\/a><\/p>\n<p id=\"caption-attachment-27657\" class=\"wp-caption-text\">Setup SSH Keys in Ubuntu<\/p>\n<\/div>\n<p>While the key is generated, you will be prompted to add\u00a0<strong>passphrase<\/strong>\u00a0in order to secure the key. You can enter a strong passphrase or choose to leave the passphrase blank if you want to automate tasks via SSH server.<\/p>\n<p>After the SSH key has been generated, you can copy the public key to a remote server by executing the below command. To install the public key to the remote SSH server you will need a remote user account with the proper permissions and credentials to log in to remote server.<\/p>\n<pre>$ ssh-copy-id remote_user@remote_server\r\n<\/pre>\n<div id=\"attachment_27658\" class=\"wp-caption aligncenter\">\n<p><a href=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2017\/10\/Copy-SSH-Key-to-Remote-Server.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-27658\" src=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2017\/10\/Copy-SSH-Key-to-Remote-Server.png\" alt=\"Copy SSH Key to Remote Server\" width=\"681\" height=\"289\" aria-describedby=\"caption-attachment-27658\" data-lazy-loaded=\"true\" \/><\/a><\/p>\n<p id=\"caption-attachment-27658\" class=\"wp-caption-text\">Copy SSH Key to Remote Server<\/p>\n<\/div>\n<p>You should be able to automatically log in via SSH to the remote server using the public key authentication method. You won\u2019t need to add the remote user password while using SSH public key authentication.<\/p>\n<p>After you\u2019ve logged in to the remote server, you can start to execute commands, such as\u00a0<strong>w command<\/strong>\u00a0to list ssh remote logged in users, as shown in the below screenshot.<\/p>\n<p>Type exit in the console to close the remote SSH session.<\/p>\n<pre>$ ssh remote_user@remote_server\r\n$ w\r\n$ exit\r\n<\/pre>\n<div id=\"attachment_27659\" class=\"wp-caption aligncenter\">\n<p><a href=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2017\/10\/Verify-SSH-Passwordless-Login.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-27659\" src=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2017\/10\/Verify-SSH-Passwordless-Login.png\" sizes=\"auto, (max-width: 796px) 100vw, 796px\" srcset=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2017\/10\/Verify-SSH-Passwordless-Login.png 796w, https:\/\/www.tecmint.com\/wp-content\/uploads\/2017\/10\/Verify-SSH-Passwordless-Login-768x333.png 768w\" alt=\"Verify SSH Passwordless Login\" width=\"796\" height=\"345\" aria-describedby=\"caption-attachment-27659\" data-lazy-loaded=\"true\" \/><\/a><\/p>\n<p id=\"caption-attachment-27659\" class=\"wp-caption-text\">Verify SSH Passwordless Login<\/p>\n<\/div>\n<p>To see the content of your public SSH key in order to manually install the key to a remote SSH server, issue the following command.<\/p>\n<pre>$ cat ~\/.ssh\/id_rsa.pub\r\n<\/pre>\n<div id=\"attachment_27660\" class=\"wp-caption aligncenter\">\n<p><a href=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2017\/10\/View-SSH-Key.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-27660\" src=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2017\/10\/View-SSH-Key.png\" alt=\"View SSH Key\" width=\"621\" height=\"124\" aria-describedby=\"caption-attachment-27660\" data-lazy-loaded=\"true\" \/><\/a><\/p>\n<p id=\"caption-attachment-27660\" class=\"wp-caption-text\">View SSH Key<\/p>\n<\/div>\n<h3>Secure SSH Server in Ubuntu<\/h3>\n<p>In order to secure the SSH daemon you should change the default SSH port number from\u00a0<strong>22<\/strong>\u00a0to a random port, higher than\u00a0<strong>1024<\/strong>, and disallow remote SSH access to the root account via password or key, by opening SSH server main configuration file and make the following changes.<\/p>\n<pre>$ sudo vi \/etc\/ssh\/sshd_config\r\n<\/pre>\n<p>First, search the commented line\u00a0<strong>#Port22<\/strong>\u00a0and add a new line underneath (replace the listening port number accordingly):<\/p>\n<pre>Port 2345\r\n<\/pre>\n<p>Don\u2019t close the file, scroll down and search for the line\u00a0<strong>#PermitRootLogin yes<\/strong>, uncomment the line by removing the\u00a0<strong>#<\/strong>\u00a0sign (hashtag) from the beginning of the line and modify the line to look like shown in the below excerpt.<\/p>\n<pre>PermitRootLogin no\r\n<\/pre>\n<div id=\"attachment_27661\" class=\"wp-caption aligncenter\">\n<p><a href=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2017\/10\/Secure-SSH-Service.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-27661\" src=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2017\/10\/Secure-SSH-Service.png\" sizes=\"auto, (max-width: 849px) 100vw, 849px\" srcset=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2017\/10\/Secure-SSH-Service.png 849w, https:\/\/www.tecmint.com\/wp-content\/uploads\/2017\/10\/Secure-SSH-Service-768x449.png 768w\" alt=\"Secure SSH Service\" width=\"849\" height=\"496\" aria-describedby=\"caption-attachment-27661\" data-lazy-loaded=\"true\" \/><\/a><\/p>\n<p id=\"caption-attachment-27661\" class=\"wp-caption-text\">Secure SSH Service<\/p>\n<\/div>\n<p>Afterwards, restart the SSH server to apply the new settings and test the configuration by trying to log in from a remote machine to this server with the root account via the new port number. The access to root account via SSH should be restricted.<\/p>\n<pre>$ sudo systemctl restart sshd\r\n<\/pre>\n<p>Also, run\u00a0<a href=\"https:\/\/www.tecmint.com\/20-netstat-commands-for-linux-network-management\/\" target=\"_blank\" rel=\"noopener\">netstat<\/a>\u00a0or\u00a0<strong>ss command<\/strong>\u00a0and filter the output via\u00a0<a href=\"https:\/\/www.tecmint.com\/12-practical-examples-of-linux-grep-command\/\" target=\"_blank\" rel=\"noopener\">grep<\/a>\u00a0in order to show the new listening port number for SSH server.<\/p>\n<pre>$ sudo ss -tlpn| grep ssh\r\n$ sudo netstat -tlpn| grep ssh\r\n<\/pre>\n<div id=\"attachment_27662\" class=\"wp-caption aligncenter\">\n<p><a href=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2017\/10\/Verify-SSH-Port.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-27662\" src=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2017\/10\/Verify-SSH-Port.png\" alt=\"Verify SSH Port\" width=\"612\" height=\"149\" aria-describedby=\"caption-attachment-27662\" data-lazy-loaded=\"true\" \/><\/a><\/p>\n<p id=\"caption-attachment-27662\" class=\"wp-caption-text\">Verify SSH Port<\/p>\n<\/div>\n<p>There are situations where you might want to automatically\u00a0<a href=\"https:\/\/www.tecmint.com\/tmout-auto-logout-linux-shell-idle-sessions\/\" target=\"_blank\" rel=\"noopener\">disconnect all remote SSH connections<\/a>\u00a0established into your server after a period of inactivity.<\/p>\n<p>In order to enable this feature, execute the below command, which adds the\u00a0<strong>TMOUT<\/strong>\u00a0bash variable to your account\u00a0<strong>.bashrc<\/strong>\u00a0hidden file and forces every SSH connection made with the name of the user to be disconnected or dropped-out after 5 minutes of inactivity.<\/p>\n<pre>$ echo 'TMOUT=300' &gt;&gt; .bashrc\r\n<\/pre>\n<p>Run\u00a0<a href=\"https:\/\/www.tecmint.com\/view-contents-of-file-in-linux\/\" target=\"_blank\" rel=\"noopener\">tail command<\/a>\u00a0to check if the variable has been correctly added at the end of\u00a0<strong>.bashrc<\/strong>\u00a0file. All subsequent SSH connections will be automatically closed after 5 minutes of inactivity from now on.<\/p>\n<pre>$ tail .bashrc\r\n<\/pre>\n<p>In the below screenshot, the remote SSH session from drupal machine to Ubuntu server via ubuntu_user account has been timed out and auto-logout after 5 minutes.<\/p>\n<div id=\"attachment_27627\" class=\"wp-caption aligncenter\">\n<p><a href=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2017\/10\/Auto-Disconnect-SSH-Sessions.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-27627\" src=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2017\/10\/Auto-Disconnect-SSH-Sessions.png\" alt=\"Auto Disconnect SSH Sessions\" width=\"555\" height=\"109\" aria-describedby=\"caption-attachment-27627\" data-lazy-loaded=\"true\" \/><\/a><\/p>\n<p id=\"caption-attachment-27627\" class=\"wp-caption-text\">Auto Disconnect SSH Sessions<\/p>\n<\/div>\n<h3>Configure Ubuntu Firewall UFW<\/h3>\n<p>Every server needs a well configured firewall in order to secure the system at network level. Ubuntu server uses\u00a0<strong>UFW<\/strong>\u00a0application to manage the iptables rules on the server.<\/p>\n<p>Check the status of UFW firewall application in Ubuntu by issuing the below commands.<\/p>\n<pre>$ sudo systemctl status ufw\r\n$ sudo ufw status\r\n<\/pre>\n<div id=\"attachment_27663\" class=\"wp-caption aligncenter\">\n<p><a href=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2017\/10\/Check-UFW-Firewall-Status.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-27663\" src=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2017\/10\/Check-UFW-Firewall-Status.png\" alt=\"Check UFW Firewall Status\" width=\"562\" height=\"244\" aria-describedby=\"caption-attachment-27663\" data-lazy-loaded=\"true\" \/><\/a><\/p>\n<p id=\"caption-attachment-27663\" class=\"wp-caption-text\">Check UFW Firewall Status<\/p>\n<\/div>\n<p>Usually, the UFW firewall daemon is up and running in Ubuntu server, but the rules are not applied by default. Before enabling UFW firewall policy in you system, first you should add a new rule to allow SSH traffic to pass through firewall via the changed SSH port. The rule can be added by executing the below command.<\/p>\n<pre>$ sudo ufw allow 2345\/tcp\r\n<\/pre>\n<p>After you\u2019ve allowed SSH traffic, you can enable and check UFW firewall application with the following commands.<\/p>\n<pre>$ sudo ufw enable\r\n$ sudo ufw status\r\n<\/pre>\n<div id=\"attachment_27664\" class=\"wp-caption aligncenter\">\n<p><a href=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2017\/10\/Open-SSH-Port-and-Verify.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-27664\" src=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2017\/10\/Open-SSH-Port-and-Verify.png\" alt=\"Open SSH Port and Verify\" width=\"590\" height=\"294\" aria-describedby=\"caption-attachment-27664\" data-lazy-loaded=\"true\" \/><\/a><\/p>\n<p id=\"caption-attachment-27664\" class=\"wp-caption-text\">Open SSH Port and Verify<\/p>\n<\/div>\n<p>To add new firewall rules for other network services subsequently installed on your server, such as HTTP server, a mail server or other network services, use the below firewall commands examples as guide.<\/p>\n<pre>$ sudo ufw allow http  #allow http traffic\r\n$ sudo ufw allow proto tcp from any to any port 25,443  # allow https and smtp traffic\r\n<\/pre>\n<p>To list all firewall rules run the below command.<\/p>\n<pre>$ sudo ufw status verbose\r\n<\/pre>\n<div id=\"attachment_27665\" class=\"wp-caption aligncenter\">\n<p><a href=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2017\/10\/Check-UFW-Firewall-Rules.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-27665\" src=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2017\/10\/Check-UFW-Firewall-Rules.png\" alt=\"Check UFW Firewall Rules\" width=\"673\" height=\"424\" aria-describedby=\"caption-attachment-27665\" data-lazy-loaded=\"true\" \/><\/a><\/p>\n<p id=\"caption-attachment-27665\" class=\"wp-caption-text\">Check UFW Firewall Rules<\/p>\n<\/div>\n<h3>Set Ubuntu Server Time<\/h3>\n<p>To control or query Ubuntu server clock and other related time settings, execute\u00a0<a href=\"https:\/\/www.tecmint.com\/set-time-timezone-and-synchronize-time-using-timedatectl-command\/\" target=\"_blank\" rel=\"noopener\">timedatectl command<\/a>\u00a0with no argument.<\/p>\n<p>In order to change your server\u2019s time zone settings, first execute\u00a0<strong>timedatectl command<\/strong>\u00a0with list-timezones argument to list all available time zones and, then, set the time zone of your system as shown in the below excerpt.<\/p>\n<pre>$ sudo timedatectl \r\n$ sudo timedatectl list-timezones \r\n$ sudo timedatectl set-timezone Europe\/Vienna\r\n<\/pre>\n<div id=\"attachment_27666\" class=\"wp-caption aligncenter\">\n<p><a href=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2017\/10\/Set-Ubuntu-Timezone.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-27666\" src=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2017\/10\/Set-Ubuntu-Timezone.png\" alt=\"Set Ubuntu Timezone\" width=\"732\" height=\"196\" aria-describedby=\"caption-attachment-27666\" data-lazy-loaded=\"true\" \/><\/a><\/p>\n<p id=\"caption-attachment-27666\" class=\"wp-caption-text\">Set Ubuntu Timezone<\/p>\n<\/div>\n<p>The new\u00a0<strong>systemd-timesyncd<\/strong>\u00a0systemd daemon client can be utilized in Ubuntu in order to provide an accurate time for your server across network and synchronize time with an upper time peer server.<\/p>\n<p>To apply this new feature of Systemd, modify\u00a0<strong>systemd-timesyncd<\/strong>\u00a0daemon configuration file and add the closest geographically NTP servers to NTP statement line, as shown in the below file excerpt:<\/p>\n<pre>$ sudo nano \/etc\/systemd\/timesyncd.conf\r\n<\/pre>\n<p>Add following configuration to\u00a0<strong>timesyncd.conf<\/strong>\u00a0file:<\/p>\n<pre>[Time]\r\nNTP=0.pool.ntp.org 1.pool.ntp.org\r\nFallbackNTP=ntp.ubuntu.com\r\n<\/pre>\n<div id=\"attachment_27667\" class=\"wp-caption aligncenter\">\n<p><a href=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2017\/10\/NTP-Configuration.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-27667\" src=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2017\/10\/NTP-Configuration.png\" alt=\"NTP Time Configuration\" width=\"556\" height=\"331\" aria-describedby=\"caption-attachment-27667\" data-lazy-loaded=\"true\" \/><\/a><\/p>\n<p id=\"caption-attachment-27667\" class=\"wp-caption-text\">NTP Time Configuration<\/p>\n<\/div>\n<p>To add your nearest geographically NTP servers, consult the NTP pool project server list at the following address:\u00a0<a href=\"http:\/\/www.pool.ntp.org\/en\/\" target=\"_blank\" rel=\"noopener nofollow\">http:\/\/www.pool.ntp.org\/en\/<\/a><\/p>\n<p>Afterwards, restart the Systemd timesync daemon to reflect changes and check daemon status by running the below commands. After restart, the daemon will start to sync time with the new ntp server peer.<\/p>\n<pre>$ sudo systemctl restart systemd-timesyncd.service \r\n$ sudo systemctl status systemd-timesyncd.service\r\n<\/pre>\n<div id=\"attachment_27668\" class=\"wp-caption aligncenter\">\n<p><a href=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2017\/10\/Start-TimeSyncd-Service.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-27668\" src=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2017\/10\/Start-TimeSyncd-Service.png\" sizes=\"auto, (max-width: 819px) 100vw, 819px\" srcset=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2017\/10\/Start-TimeSyncd-Service.png 819w, https:\/\/www.tecmint.com\/wp-content\/uploads\/2017\/10\/Start-TimeSyncd-Service-768x394.png 768w\" alt=\"Start TimeSyncd Service\" width=\"819\" height=\"420\" aria-describedby=\"caption-attachment-27668\" data-lazy-loaded=\"true\" \/><\/a><\/p>\n<p id=\"caption-attachment-27668\" class=\"wp-caption-text\">Start TimeSyncd Service<\/p>\n<\/div>\n<h3>Disable and Remove Unneeded Services in Ubuntu<\/h3>\n<p>In order to get a list of all TCP and UDP network services up-and-running by default in your Ubuntu server, execute the\u00a0<strong>ss<\/strong>\u00a0or\u00a0<a href=\"https:\/\/www.tecmint.com\/20-netstat-commands-for-linux-network-management\/\" target=\"_blank\" rel=\"noopener\">netstat command<\/a>.<\/p>\n<pre>$ sudo netstat -tulpn\r\nOR\r\n$ sudo ss -tulpn\r\n<\/pre>\n<div id=\"attachment_27669\" class=\"wp-caption aligncenter\">\n<p><a href=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2017\/10\/List-All-Running-Services.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-27669\" src=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2017\/10\/List-All-Running-Services.png\" alt=\"List All Running Services\" width=\"661\" height=\"298\" aria-describedby=\"caption-attachment-27669\" data-lazy-loaded=\"true\" \/><\/a><\/p>\n<p id=\"caption-attachment-27669\" class=\"wp-caption-text\">List All Running Services<\/p>\n<\/div>\n<p>Staring with\u00a0<strong>Ubuntu 16.10<\/strong>\u00a0release, the default DNS resolver is now controlled by\u00a0<strong>systemd-resolved<\/strong>\u00a0service, as revealed by the output of\u00a0<strong>netstat<\/strong>\u00a0or\u00a0<strong>ss commands<\/strong>.<\/p>\n<p>You should also check the\u00a0<strong>systemd-resolved<\/strong>\u00a0service status by running the following command.<\/p>\n<pre>$ sudo systemctl status systemd-resolved.service\r\n<\/pre>\n<div id=\"attachment_27670\" class=\"wp-caption aligncenter\">\n<p><a href=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2017\/10\/Check-Systemd-resolved-Status.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-27670\" src=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2017\/10\/Check-Systemd-resolved-Status.png\" sizes=\"auto, (max-width: 795px) 100vw, 795px\" srcset=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2017\/10\/Check-Systemd-resolved-Status.png 795w, https:\/\/www.tecmint.com\/wp-content\/uploads\/2017\/10\/Check-Systemd-resolved-Status-768x317.png 768w\" alt=\"Check Systemd Resolved Status\" width=\"795\" height=\"328\" aria-describedby=\"caption-attachment-27670\" data-lazy-loaded=\"true\" \/><\/a><\/p>\n<p id=\"caption-attachment-27670\" class=\"wp-caption-text\">Check Systemd Resolved Status<\/p>\n<\/div>\n<p>The\u00a0<strong>systemd-resolved<\/strong>\u00a0service binds on all enabled network interfaces and listens on ports\u00a0<strong>53<\/strong>\u00a0and\u00a0<strong>5355 TCP<\/strong>and\u00a0<strong>UDP<\/strong>.<\/p>\n<p>Running\u00a0<strong>system-resolved<\/strong>\u00a0caching DNS daemon on a production server can be dangerous due to the numerous number of DDOS attacks performed by malicious hackers against unsecured DNS servers.<\/p>\n<p>In order to stop and disable this service, execute the following commands.<\/p>\n<pre>$ sudo systemctl stop systemd-resolved\r\n$ sudo systemctl disable systemd-resolved\r\n<\/pre>\n<div id=\"attachment_27671\" class=\"wp-caption aligncenter\">\n<p><a href=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2017\/10\/Disable-Systemd-Resolved.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-27671\" src=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2017\/10\/Disable-Systemd-Resolved.png\" alt=\"Disable Systemd Resolved Service\" width=\"695\" height=\"84\" aria-describedby=\"caption-attachment-27671\" data-lazy-loaded=\"true\" \/><\/a><\/p>\n<p id=\"caption-attachment-27671\" class=\"wp-caption-text\">Disable Systemd Resolved Service<\/p>\n<\/div>\n<p>Verify if the service has been stopped and disabled by issuing\u00a0<strong>ss<\/strong>\u00a0or\u00a0<strong>netstat command<\/strong>. The systemd-resolved listening ports, 53 and 5355 TCP and UDP, should not be listed in netstat or ss command output, as illustrated in the below.<\/p>\n<p>You should also reboot the machine in order to completely disable all systemd-resolved daemon services and restore the default\u00a0<strong>\/etc\/resolv.conf<\/strong>\u00a0file.<\/p>\n<pre>$ sudo ss -tulpn\r\n$ sudo netstat -tulpn\r\n$ sudo systemctl reboot\r\n<\/pre>\n<div id=\"attachment_27672\" class=\"wp-caption aligncenter\">\n<p><a href=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2017\/10\/Verify-All-Running-Services.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-27672\" src=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2017\/10\/Verify-All-Running-Services.png\" alt=\"Verify All Running Services\" width=\"671\" height=\"229\" aria-describedby=\"caption-attachment-27672\" data-lazy-loaded=\"true\" \/><\/a><\/p>\n<p id=\"caption-attachment-27672\" class=\"wp-caption-text\">Verify All Running Services<\/p>\n<\/div>\n<p>Although, you\u2019ve disabled some unwanted networking services to run in your server, there are also other services installed and running in your system, such as\u00a0<strong>lxc<\/strong>\u00a0process and\u00a0<strong>snapd<\/strong>\u00a0service. These services can be easily detected via\u00a0<a href=\"https:\/\/www.tecmint.com\/ps-command-examples-for-linux-process-monitoring\/\" target=\"_blank\" rel=\"noopener\">ps<\/a>,\u00a0<a href=\"https:\/\/www.tecmint.com\/12-top-command-examples-in-linux\/\" target=\"_blank\" rel=\"noopener\">top<\/a>\u00a0or\u00a0<strong>pstree<\/strong>\u00a0commands.<\/p>\n<pre>$ sudo ps aux\r\n$ sudo top\r\n$ sudo pstree\r\n<\/pre>\n<div id=\"attachment_27673\" class=\"wp-caption aligncenter\">\n<p><a href=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2017\/10\/List-Running-Services-in-Tree-Format.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-27673\" src=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2017\/10\/List-Running-Services-in-Tree-Format.png\" alt=\"List Running Services in Tree Format\" width=\"578\" height=\"501\" aria-describedby=\"caption-attachment-27673\" data-lazy-loaded=\"true\" \/><\/a><\/p>\n<p id=\"caption-attachment-27673\" class=\"wp-caption-text\">List Running Services in Tree Format<\/p>\n<\/div>\n<p>In case you\u2019re not going to use LXC container virtualization in your server or start installing software packaged via Snap package manager, you should completely disable and remove these services, by issuing the below commands.<\/p>\n<pre>$ sudo apt autoremove --purge lxc-common lxcfs\r\n$ sudo apt autoremove --purge snapd\r\n<\/pre>\n<p>That\u2019s all! Now, Ubuntu server is now prepared for installing additional software needed for custom network services or applications, such as installing and configuring a web server, a database server, a file share service or other specific applications.<\/p>\n<p><a style=\"font-size: 1rem;\" href=\"https:\/\/www.tecmint.com\/installation-of-ubuntu-16-04-server-edition\/\" target=\"_blank\" rel=\"noopener\">Source<\/a><\/p>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>Ubuntu Server 16.04, also named\u00a0Xenial Xerus, has been released by Canonical and it\u2019s now ready for installation. The details about this new LTS version can be found on the previous article:\u00a0How to upgrade Ubuntu 15.10 to 16.04. This topic will guide you on how you can install\u00a0Ubuntu 16.04 Server Edition\u00a0with\u00a0Long Time Support\u00a0on your machine. If &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/www.appservgrid.com\/paw92\/index.php\/2019\/03\/29\/installation-of-ubuntu-16-04-server-edition-and-initial-ubuntu-server-setup\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Installation of Ubuntu 16.04 Server Edition and Initial Ubuntu Server Setup&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-12899","post","type-post","status-publish","format-standard","hentry","category-linux"],"_links":{"self":[{"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/posts\/12899","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/comments?post=12899"}],"version-history":[{"count":1,"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/posts\/12899\/revisions"}],"predecessor-version":[{"id":12900,"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/posts\/12899\/revisions\/12900"}],"wp:attachment":[{"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/media?parent=12899"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/categories?post=12899"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/tags?post=12899"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}