Advance

Initial server setup on Ubuntu 22.04

Initial server setup on Ubuntu 22.04
5
(1)

Ubuntu is still one of the top options for corporate use and serves as the technical basis for projects such as Linux Mint and Elementary OS. It is interesting to know that Ubuntu has two main versions and publishes them twice a year. Ubuntu 22.04 LTS is now available. In the continuation of this article, we will explain the Initial server setup on Ubuntu 22.04 step by step. It should be noted that you can view and purchase existing Ubuntu VPS packages by visiting the Eldernode website.

Introduction to Ubuntu 22.04

Ubuntu 22.08 was released on April 21, 2022. Ubuntu 22.04 is the first version to work on all Raspberry Pi 4 models when using the full desktop environment. A very basic and practical point about Ubuntu 22.04 is that it includes Rust programming language, OpenSSL v3, Remote Desktop Protocol (RDP), Linux 5.15 kernel and Mesa 22 graphics.

Ubuntu 22.04 is currently available for various AMD-based 32-bit and 64-bit PCs. Also, Docker, WSL, and other services that provide Ubuntu images are releasing Ubuntu 22.04.

ubuntu 22.04 desktop environment

Recommended Article: How to install Django on Ubuntu 20.04

Ubuntu 22.04 changes compared to previous versions

Some of the changes that have been made to Ubuntu 22.04 include the new screenshot feature, updated colors, and dark mode in the Ubuntu system theme and software program. You may be interested to know that the default web browser, Firefox, is now a Snap package instead of the traditional APT package.

Some apps and features have been discontinued to keep 22.04 stable. The main change is that this version of Ubuntu now uses the Gnome 42 desktop environment. Gnome 42 changes to a horizontal workspace switcher and application launcher, similar to Windows 11 and macOS. There are also some new touchpad movements to move between workspaces and windows in this version.

Prerequisites to Ubuntu 22.04 Initial Server Setup

-> At least 2GB of free storage space

-> A non-root user with Sudo privileges

-> If you’re going to install Ubuntu Server alongside data you wish to keep, ensure you have a recent backup.

How to Initial server setup on Ubuntu 22.04

In the continuation of this article, we will teach you How to Initial server setup on Ubuntu 22.04. To get started, the first step is to be able to login as root using the following command. Note that after entering the following command you need to enter your root password to log in. You will also change the root password the first time you log in to the server with a password.

ssh root@your_server_ip

For Initial server setup on Ubuntu 22.04, follow the steps below to the end of the article.

How to Create a New User

After you have successfully logged in by running the above command, you now need to create a new user using the following command:

adduser michael

After running the above command, you can enter your password and then press Enter.

How to Grant Administrative Privileges

Once you’ve been able to create a new user, you now need to setup what is known as a superuser or root privilege for a regular user account to get more user privileges.

Note: Note that after this you can type sudo before the commands and execute them with superuser privileges.

usermod -aG sudo michael

How to Setup a Firewall

In this section, we are going to teach you how to setup a firewall. You should note that once installed, applications can register their profiles in the UFW. These profiles allow the UFW to manage these applications by name.

You can check the list of installed UFW profiles by running the following command:

ufw app list

Then you need to allow SSH connections in the next step. To do this, run the following command:

ufw allow OpenSSH

Now it’s time to enable the firewall using the following command:

ufw enable

After runing the following command, type “y” and then press Enter.

If you want to check the status of SSH connections, you can use the following command:

ufw status

How to Enable External Access for User

In this section we are going to enable External Access for the new user we created. The important thing to know is that configuring SSH access for your new user depends on whether your server root account uses a password or SSH keys.

As mentioned, there are two ways to access SSH, the first is to use a password and the second is to authenticate using SSH keys. In the first method, if you log in to your main account using a password, you should know that password authentication is enabled for SSH. So you can SSH to your new account using the following command:

ssh michael@your_server_ip

If you want to run commands with administrative privileges, you can use the following command:

sudo command_to_run

In the second method, you should note that if you have logged in to your main account using SSH keys, password authentication for SSH is disabled. So to log in as your regular user with an SSH key, you need to add a copy of your local public key to the file below, which is for the new user.

~/.ssh/authorized_keys

You can use the following command to copy files such as the public key contained in the ~/.ssh /authorized_keys file to a root account with the correct ownership and permissions:

rsync --archive --chown=michael:michael ~/.ssh /home/michael

After you have completed all the above steps, you can now open a new terminal session on your local device and use SSH with your new username, as in the following command:

ssh michael@your_server_ip

Note: You can enter your desired username instead of “michael” in the instructions of this tutorial.

Recommended Article: How To Install Zpanel On Ubuntu 20.04 & 19.10

Conclusion

Ubuntu is integrated into the public cloud and optimized for performance, security and ease of use. One of the key new features is confidential computing, which improves data protection and privacy in leading public clouds. In this article, we tried to teach you step by step how to Initial server setup on Ubuntu 22.04.

How useful was this post?

Click on a star to rate it!

Average rating 5 / 5. Vote count: 1

No votes so far! Be the first to rate this post.

We Are Waiting for your valuable comments and you can be sure that it will be answered in the shortest possible time.

Leave a Reply

Your email address will not be published. Required fields are marked *

We are by your side every step of the way

Think about developing your online business; We will protect it compassionately

We are by your side every step of the way

+8595670151

7 days a week, 24 hours a day