Set Up a Linux VM (Ubuntu), step by step
Tags: linux, ubuntu, azure
Published: 2024-05-24 03:42:26

_A Linux machine is like a magic book on your computer that can do lots of cool things. Now, a Linux machine is like having a special magic book that's really good at following instructions and can change its story whenever you want._

![ToyVMUbuntu](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/8vpoa2m5eg50eyeaze53.png)
A **Linux machine** refers to _a computer that is running the Linux operating system._ Linux is an open-source operating system, meaning it's free to use and its source code is available for anyone to view, modify, and distribute. It's known for its stability, security, and flexibility, which is why it's widely used in servers, desktops, and even mobile devices.

Key Points:

1. **Open Source**: Unlike Windows or macOS, Linux is open-source, so anyone can contribute to its development or customize it for their needs.
2. **Distributions**: There are many versions of Linux, called distributions (or distros), such as Ubuntu, Fedora, and Debian. Each distro has its own set of features and tools.
3. **Command Line**: While Linux has graphical user interfaces (GUIs), a lot of powerful features are accessed through the command line.
4. **Security and Stability**: Linux is less prone to viruses and malware, making it a popular choice for servers and security-sensitive applications.
5. **Flexibility**: Linux can run on a wide range of hardware, from old computers to modern servers and smartphones.

For this tut, we shall walk through the installation of Ubuntu on Microsoft Azure Platform.

_Navigate_ to [portal.azure.com](portal.azure.com) and select **Virtual Machine**
![Azure](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/wxelccspwav5335lm2nz.png)
_Create_ an **Azure virtual machine**
![create azure](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/88r43cmx8zy8ncog159b.png)
Provide details of your virtual machine (Resource group, Virtual machine name, Image)
![RG](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/uxr8jjz5ufx20ezvd9q7.png)
Here we shall be using SSH for **Administrator account**
We have provided Username, and Key pair name
![SSH](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/vr3xsj4j36r57ol9sqke.png)
Set _Inbound port_ (**22**)
![Port](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/m3gghcbhphgh2lkaygim.png)
Now to the **Monitoring** tab - _**Disable** boot diagnostic_
Next, the **tags** are set for billing purposes
![tags](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/7frrxgbjytc5lblycw4l.png)
Almost there, go to **Review + create**
![RC](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/6v2j9w2w29tulgum8v4f.png)
Next,  **download private key and create the resource**
![Iwork](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/nkbm5t882hrncfb0x8gg.png)

**Allow** for _deployment to be completed_
![deployment](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/sqn8z8kr2e0ac0u7xpt1.png)
_Select_ your public IP 
![IP](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/7d4kdbc3fzq3eqjasxq0.png)

**Modify** _Idle time_ and give _DNS name_ label (optional)
![idle time](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/9imra9dixlrz0ehbcuxs.png)
Open windows **cmd** 
![CMD](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/a8js86dhuw0omiwm71w7.png)
**SSH** into the machine 

```
ssh -i /"path name"/KeyPairName.pem azureuser@20.15.105.5
For example;
_ssh -i /"C:\Users\King Fisher\Downloads"/OlaLinuxUbuntu22.pem azureuser@20.15.105.5_

```
![SSH](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ab5nol6oohkz6hlyzet6.png)

Hurray >> 🍾**Working Ubuntu VM**
![SSH+CMD](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/o6uiutpt1ogqtw5an6sp.png)