CREATING LINUX MACHINE IN AZURE PORTAL
Published: 2023-07-02 15:49:09



The steps above can be used to create our Linux Virtual Machine but with slightly different variation. We can proceed to creating our machines using SSH or Password. In this guide I will show creating your VM using only Password. To start follow the steps below.

1 Select 'create a resource' as shown in the example above.
![Azure resources001](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/2n3y7opdn9hy9apuclnt.png)
2 From the Create a resource window, select virtual machine.
![Azure resources002] (https://dev-to-uploads.s3.amazonaws.com/uploads/articles/yauwkox7p9vtk80fpv0t.png)
3 Follow the steps stated while creating a windows machine as above for subscription, availability options, resource group and Image. Provide a name for your machine. Here we are using 'azurelinux01' as virtual machine name.

![Azure resources018](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/9kdb34wa01giawrcnj6a.png)
4 Just as we did in creating our Windows VM earlier, our Linux VM would be given a Username and password. these details will be required when login into the created machine. The port selected is SSH 22.

![Azure resources019](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/oj8woj57h56yym6542hs.png)
5 We leave others menu items as default, now we move to the Monitoring menu, under diagnostics and disable it. We are doing it just for this practical only.

![Azure resources011](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/j04t0nm6dvcg1969jf20.png)
6 In this step we select the 'Review create button'. We wait until we get validation passed. Once validation passed, click on create button.
![Azure resources018](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ejvm5mypd2b7ezqu0ipr.png)
![Azure resources019](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/gmimgbni2puy2z7rduev.png)
7 In this step, we are done creating our VM, what is seen is Deployment complete. Next, select the 'go to resources' button.

![Azure resources020](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/h8h29w9mq1xwurd0o8no.png)
8 in this step we proceed to increase our public ip timeout to prevent the VM from timing out, here we select it to be 30 minutes. Then save changes.

![Azure resources021](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/0h9rkooxtryizswpvljc.png)

![Azure resources022](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/1wf6sj3v97x9q32d4m96.png)
9 After we proceed by selecting our Linux VM machine created.

![Azure resources023](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/skbzsl9z3x9qa117hhq7.png)
10 select connect, take note of the connection instructions, open windows power shell or any terminal of your choice.

![Azure resources024](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/3ffb0c4a929xchlzyago.png)
11 Here we are using MobaXterm as our terminal. use ssh Azureuser@20.106.237.88 to connect.

![Azure resources025](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/qxdjincva5lmje1g42vf.png)
12 provide your password, don't worry if you cant see it as you type, proceed.
13 your Linux VM is now ready. 

![Azure resources026](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/f0stqi5xdj9x5hvt79c5.png)
it is recommended as a rule of thumb to always delete resources not in use. The cloud is expensive, and you cannot leave resources running unused. To delete this VM proceed as follow.
Steps to Delete Linux VM
1 On the Linux vM home page ,select delete among the menu listed

![Azure resources027](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/a5y5rvwisxgw3f6b2yuy.png)
2 then proceed to selects the different resources created and ticks all boxes, finally select delete.
![Azure resources028](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/o2y6zpp97l1qaupr0i9o.png)
We have covered a lot of important things you need to know in this practical, if you find it interesting, please share your comments below.