{"id":4344,"date":"2021-02-16T07:22:56","date_gmt":"2021-02-16T07:22:56","guid":{"rendered":"https:\/\/ded9.com\/?p=4344"},"modified":"2025-11-08T11:46:24","modified_gmt":"2025-11-08T11:46:24","slug":"ubuntu-linux-server-installation","status":"publish","type":"post","link":"https:\/\/ded9.com\/de\/ubuntu-linux-server-installation\/","title":{"rendered":"Installation Guide for Ubuntu Server\u202fLinux"},"content":{"rendered":"<p>When setting up an Ubuntu Linux server, a few essential steps are required to enhance the security and performance of your server. These steps provide a secure foundation for the tasks you want to perform. In this tutorial, we\u2019ll guide you through the initial setup process for an Ubuntu Linux server.<\/p>\n<h2><strong>Prerequisites for Installing Ubuntu Linux Server<\/strong><\/h2>\n<ol>\n<li><strong>A Server with Ubuntu Installed:<\/strong><br \/>\nIdeally, use a recent Long-Term Support (LTS) version such as Ubuntu 20.04 or 22.04 for better security, features, and support.<\/li>\n<li><strong>Access Credentials:<\/strong>\n<ul>\n<li>If you have <strong>remote access<\/strong> via <a href=\"https:\/\/en.wikipedia.org\/wiki\/Secure_Shell\" target=\"_blank\" rel=\"noopener\">SSH<\/a>, ensure you have the server\u2019s IP address along with a username and password (or SSH key).<\/li>\n<li>You&#8217;ll need physical access to the server and the local username and password for direct access via the console.<\/li>\n<\/ul>\n<\/li>\n<\/ol>\n<h2><strong>Connecting to Your Server<\/strong><\/h2>\n<p>You can connect to your server through the following methods:<\/p>\n<h4><strong>1. Direct Console Access:<\/strong><\/h4>\n<p>Use the console to log in with your server&#8217;s username and password.<\/p>\n<h4><strong>2. SSH (Recommended):<\/strong><\/h4>\n<p>To connect remotely to your server, use SSH (Secure Shell). SSH is a command-line tool for Linux and macOS users, and for Windows users, you can use tools such as <a href=\"https:\/\/ded9.com\/what-is-putty\/\">PuTTY<\/a>. Here\u2019s the syntax to connect:<\/p>\n<div class=\"wp-block-codemirror-blocks code-block \">\n<div class=\"wp-block-codemirror-blocks code-block\">\n<pre class=\"CodeMirror\" data-setting=\"{&quot;mode&quot;:&quot;shell&quot;,&quot;mime&quot;:&quot;text\/x-sh&quot;,&quot;theme&quot;:&quot;material&quot;,&quot;lineNumbers&quot;:false,&quot;lineWrapping&quot;:false,&quot;styleActiveLine&quot;:false,&quot;readOnly&quot;:true,&quot;align&quot;:&quot;&quot;}\">ssh username@server-ip<\/pre>\n<\/div>\n<h4><strong>3. Graphical Tools:<\/strong><\/h4>\n<p>Tools like VNC allow remote graphical access, but this is typically not recommended for servers due to increased resource usage. By default, the Ubuntu Server version doesn\u2019t include a GUI, but you can install one if necessary.<\/p>\n<p><strong>Tip:<\/strong> For better security, always use key-based authentication instead of passwords for SSH logins.<\/p>\n<h2><strong>Creating a Non-Root User<\/strong><\/h2>\n<p>In Linux, the root user has full administrative privileges. However, for security, it\u2019s best practice to perform daily operations with a non-root user.<br \/>\nBy default, Ubuntu disables root login for remote access. During installation, you&#8217;ll be prompted to create a non-root user, which should be used for logging in.<\/p>\n<h4><strong>Add a New User<\/strong><\/h4>\n<p>To add another user named <code>john<\/code>, run the following command:<\/p>\n<div class=\"wp-block-codemirror-blocks code-block\">\n<pre class=\"CodeMirror\" data-setting=\"{&quot;mode&quot;:&quot;shell&quot;,&quot;mime&quot;:&quot;text\/x-sh&quot;,&quot;theme&quot;:&quot;material&quot;,&quot;lineNumbers&quot;:false,&quot;lineWrapping&quot;:false,&quot;styleActiveLine&quot;:false,&quot;readOnly&quot;:true,&quot;align&quot;:&quot;&quot;}\">sudo adduser john\r\n<\/pre>\n<\/div>\n<p>You will be prompted to set a password and enter additional information.<\/p>\n<h4><strong>Grant Administrative Privileges<\/strong><\/h4>\n<p>To give the user <code>john<\/code> superuser access, add it to the <code>sudo<\/code> group:<\/p>\n<div class=\"wp-block-codemirror-blocks code-block\">\n<pre class=\"CodeMirror\" data-setting=\"{&quot;mode&quot;:&quot;shell&quot;,&quot;mime&quot;:&quot;text\/x-sh&quot;,&quot;theme&quot;:&quot;material&quot;,&quot;lineNumbers&quot;:false,&quot;lineWrapping&quot;:false,&quot;styleActiveLine&quot;:false,&quot;readOnly&quot;:true,&quot;align&quot;:&quot;&quot;}\">sudo usermod -aG sudo john\r\n<\/pre>\n<\/div>\n<h4><strong>Switch to the New User<\/strong><\/h4>\n<p>You can switch to the new user with the following command:<\/p>\n<div class=\"wp-block-codemirror-blocks code-block\">\n<pre class=\"CodeMirror\" data-setting=\"{&quot;mode&quot;:&quot;shell&quot;,&quot;mime&quot;:&quot;text\/x-sh&quot;,&quot;theme&quot;:&quot;material&quot;,&quot;lineNumbers&quot;:false,&quot;lineWrapping&quot;:false,&quot;styleActiveLine&quot;:false,&quot;readOnly&quot;:true,&quot;align&quot;:&quot;&quot;}\">su - john\r\n<\/pre>\n<\/div>\n<p>You\u2019re now operating as the new user with administrative privileges.<\/p>\n<h2><strong>Setting Up a Firewall<\/strong><\/h2>\n<p>Ubuntu Server comes with <strong>UFW (Uncomplicated Firewall)<\/strong> pre-installed. It\u2019s disabled by default but can be easily configured.<\/p>\n<h4><strong>Enable and Configure UFW<\/strong><\/h4>\n<p>1. Enable UFW:<\/p>\n<div class=\"wp-block-codemirror-blocks code-block\">\n<pre class=\"CodeMirror\" data-setting=\"{&quot;mode&quot;:&quot;shell&quot;,&quot;mime&quot;:&quot;text\/x-sh&quot;,&quot;theme&quot;:&quot;material&quot;,&quot;lineNumbers&quot;:false,&quot;lineWrapping&quot;:false,&quot;styleActiveLine&quot;:false,&quot;readOnly&quot;:true,&quot;align&quot;:&quot;&quot;}\">sudo ufw enable\r\n<\/pre>\n<\/div>\n<p>2. Allow SSH access (important for remote management):<\/p>\n<div class=\"wp-block-codemirror-blocks code-block\">\n<pre class=\"CodeMirror\" data-setting=\"{&quot;mode&quot;:&quot;shell&quot;,&quot;mime&quot;:&quot;text\/x-sh&quot;,&quot;theme&quot;:&quot;material&quot;,&quot;lineNumbers&quot;:false,&quot;lineWrapping&quot;:false,&quot;styleActiveLine&quot;:false,&quot;readOnly&quot;:true,&quot;align&quot;:&quot;&quot;}\">sudo ufw allow ssh\r\n<\/pre>\n<\/div>\n<p>3. Check UFW status and rules:<\/p>\n<div class=\"wp-block-codemirror-blocks code-block\">\n<pre class=\"CodeMirror\" data-setting=\"{&quot;mode&quot;:&quot;shell&quot;,&quot;mime&quot;:&quot;text\/x-sh&quot;,&quot;theme&quot;:&quot;material&quot;,&quot;lineNumbers&quot;:false,&quot;lineWrapping&quot;:false,&quot;styleActiveLine&quot;:false,&quot;readOnly&quot;:true,&quot;align&quot;:&quot;&quot;}\">sudo ufw status verbose\r\n<\/pre>\n<\/div>\n<p>Example output:<\/p>\n<div class=\"wp-block-codemirror-blocks code-block\">\n<pre class=\"CodeMirror\" data-setting=\"{&quot;mode&quot;:&quot;shell&quot;,&quot;mime&quot;:&quot;text\/x-sh&quot;,&quot;theme&quot;:&quot;material&quot;,&quot;lineNumbers&quot;:false,&quot;lineWrapping&quot;:false,&quot;styleActiveLine&quot;:false,&quot;readOnly&quot;:true,&quot;align&quot;:&quot;&quot;}\">Status: active\r\nLogging: on (low)\r\nDefault: deny (incoming), allow (outgoing), disabled (routed)\r\nNew profiles: skip<\/pre>\n<\/div>\n<h2><strong>Set System Timezone<\/strong><\/h2>\n<p>During installation, you\u2019re prompted to set the server\u2019s timezone. If you need to adjust it later or verify its current configuration:<\/p>\n<p>1. View current timezone settings:<\/p>\n<div class=\"wp-block-codemirror-blocks code-block\">\n<pre class=\"CodeMirror\" data-setting=\"{&quot;mode&quot;:&quot;shell&quot;,&quot;mime&quot;:&quot;text\/x-sh&quot;,&quot;theme&quot;:&quot;material&quot;,&quot;lineNumbers&quot;:false,&quot;lineWrapping&quot;:false,&quot;styleActiveLine&quot;:false,&quot;readOnly&quot;:true,&quot;align&quot;:&quot;&quot;}\">timedatectl\r\n<\/pre>\n<\/div>\n<p>2. Change the timezone (e.g., set it to <code>America\/New_York<\/code>):<\/p>\n<div class=\"wp-block-codemirror-blocks code-block\">\n<pre class=\"CodeMirror\" data-setting=\"{&quot;mode&quot;:&quot;shell&quot;,&quot;mime&quot;:&quot;text\/x-sh&quot;,&quot;theme&quot;:&quot;material&quot;,&quot;lineNumbers&quot;:false,&quot;lineWrapping&quot;:false,&quot;styleActiveLine&quot;:false,&quot;readOnly&quot;:true,&quot;align&quot;:&quot;&quot;}\">sudo timedatectl set-timezone America\/New_York\r\n<\/pre>\n<\/div>\n<p>3. Synchronize system time using <code>systemd-timesyncd<\/code>, which is enabled by default:<\/p>\n<div class=\"wp-block-codemirror-blocks code-block\">\n<pre class=\"CodeMirror\" data-setting=\"{&quot;mode&quot;:&quot;shell&quot;,&quot;mime&quot;:&quot;text\/x-sh&quot;,&quot;theme&quot;:&quot;material&quot;,&quot;lineNumbers&quot;:false,&quot;lineWrapping&quot;:false,&quot;styleActiveLine&quot;:false,&quot;readOnly&quot;:true,&quot;align&quot;:&quot;&quot;}\">timedatectl set-ntp true\r\n<\/pre>\n<\/div>\n<h2><strong>Conclusion<\/strong><\/h2>\n<p>By completing these basic setup steps, you\u2019re laying a solid foundation for your Ubuntu Linux server. You\u2019ve created a secure non-root user, configured a firewall, and set up your timezone. These initial settings ensure better security and prepare the server for further configuration or application deployment.<\/p>\n<p>Taking these steps not only makes your server secure but also enhances its reliability and performance. Whether you plan to use your Ubuntu server for web hosting, data storage, or as part of a larger infrastructure, starting with these basics ensures you avoid common vulnerabilities and setup errors.<\/p>\n<p>As you continue managing your server, always follow best practices such as keeping the system updated, monitoring logs for suspicious activity, and implementing backups for critical data. With a well-prepared server, you&#8217;re equipped to explore more advanced configurations and applications, confidently supporting your intended use case.<\/p>\n<h2>FAQ<\/h2>\n<div id=\"rank-math-rich-snippet-wrapper\"><div id=\"rank-math-faq\" class=\"rank-math-block\">\n<div class=\"rank-math-list \">\n<div id=\"faq-1\" class=\"rank-math-list-item\">\n<h3 class=\"rank-math-question \">What are the system requirements and preparation steps before installing Ubuntu Server?<\/h3>\n<div class=\"rank-math-answer \">\n\n<p>You\u2019ll need a 64\u2011bit compatible processor (for amd64\/arm64 architectures), at least\u202f2\u202fGB\u202fRAM and a few gigabytes of disk space (5\u202fGB or more recommended) for basic installation. Also back up any existing data since disk partitioning may erase it.<\/p>\n\n<\/div>\n<\/div>\n<div id=\"faq-2\" class=\"rank-math-list-item\">\n<h3 class=\"rank-math-question \">How do you create the installation media and boot into the installer?<\/h3>\n<div class=\"rank-math-answer \">\n\n<p>Download the Ubuntu Server ISO from releases.ubuntu.com, create a bootable USB (or DVD), plug it into the target system and reboot. Enter BIOS\/boot menu (usually via\u202fF2\/F10\/F12) to select the USB drive and start the installer.<\/p>\n\n<\/div>\n<\/div>\n<div id=\"faq-3\" class=\"rank-math-list-item\">\n<h3 class=\"rank-math-question \">What are the key installation steps once the installer starts?<\/h3>\n<div class=\"rank-math-answer \">\n\n<p>Choose your language and keyboard layout. Decide whether to auto\u2011configure networking (DHCP) or manually set it. Configure storage: choose \u201cUse entire disk\u201d for simple setup or manual partitioning for advanced use. Enter a username, hostname and password. Enable SSH if you plan to access the server remotely. After completion, reboot, remove the installation media, and log in to your new system.<\/p>\n\n<\/div>\n<\/div>\n<\/div>\n<\/div><\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>When setting up an Ubuntu Linux server, a few essential steps are required to enhance the security and performance of your server. These steps provide a secure foundation for the tasks you want to perform. In this tutorial, we\u2019ll guide you through the initial setup process for an Ubuntu Linux server. Prerequisites for Installing Ubuntu [&hellip;]<\/p>\n","protected":false},"author":9,"featured_media":245769,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[11515],"tags":[3192,961],"class_list":["post-4344","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-ubuntu-2","tag-linux-server","tag-ubuntu"],"acf":[],"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/ded9.com\/de\/wp-json\/wp\/v2\/posts\/4344","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ded9.com\/de\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ded9.com\/de\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ded9.com\/de\/wp-json\/wp\/v2\/users\/9"}],"replies":[{"embeddable":true,"href":"https:\/\/ded9.com\/de\/wp-json\/wp\/v2\/comments?post=4344"}],"version-history":[{"count":6,"href":"https:\/\/ded9.com\/de\/wp-json\/wp\/v2\/posts\/4344\/revisions"}],"predecessor-version":[{"id":265179,"href":"https:\/\/ded9.com\/de\/wp-json\/wp\/v2\/posts\/4344\/revisions\/265179"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/ded9.com\/de\/wp-json\/wp\/v2\/media\/245769"}],"wp:attachment":[{"href":"https:\/\/ded9.com\/de\/wp-json\/wp\/v2\/media?parent=4344"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ded9.com\/de\/wp-json\/wp\/v2\/categories?post=4344"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ded9.com\/de\/wp-json\/wp\/v2\/tags?post=4344"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}