HOW TO CREATE A LINUX VIRTUAL MACHINE ON MICROSOFT AZURE
Tags: azure
Published: 2023-02-21 22:43:35

**STEP 1**
login to your Microsoft azure account and navigate to Create Resource

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/18v8k0lojzl3rbusal0y.png)

**STEP 2**
Click! And select Virtual Machine

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/yb0157sepasribrm1mq2.png)

**STEP 3**

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/zkqygf4f750kuepd3umm.png)

*Select your Subscription
*Select or Create your Resource group 
*Give Virtual machine a name (it must be a unique name)
*Select your Region (preferable east Us)
*Availability Option must be set at "Availability zone"
*Click on the your Preferred zone
*Security type: standard
*img: select any version of Ubuntu for a linux Virtual Machine

**STEP 4**


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/9c3s98cg1qa185btyyxz.png)

Size should be set depending on your Budget

**STEP 5**

**ADMINISTRATOR ACCOUNT**
Administrator type : Password
UserName: azureuser
password: ********

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ozlh13cmmest4gr822z1.png)

**STEP 6**

Select inbound port as SSH(22)
Then click and select "Review + Create"

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/6n8ppeoxei849bkgt4s8.png)a

**STEP 7**
Click and Select "Create"

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/w90qrojgzqv450x8z9uc.png)

**STEP 8**

Click and Select "Go to Resource"


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/07dju41a8co2mk2fswsh.png)

**STEP 9**

Click one **Connect **on the top Left side and Select **SSH**


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/wggh2oaku6n3dc8g58df.png)

**STEP 10**

Copy Command Text  from line 2 and Paste in space bar 3

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/7wwxt5u84mgg9nnzrs2v.png) 

**STEP 11**
Copy Command Text 4 and Then go to your main Pc and open  powerShell  software
 
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/zdfkp5t64p9zz654cw1v.png)

**STEP 12**
Once in powerShell paste the Command Text 4 into power shell 


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/wopbxhz4v578ovkuy3o4.png)

**STEP 13**

1) Delete  "-i chmod 400 <keyname>.pem" 
2) leave ssh azureuser@4.236.186.54 and click enter


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/bd6mfcgzhpkbe02z2x7f.png)

**STEP 13**
PowerShell is going to prompt a command asking you to connect to serve Virtual Machine type yes and Click ENTER

**Step 14 Step**
PowerSHell is going to ask you to Type in password for your virtual machine you created in step 5 
you can type in the password manually or user shortcut command key 
" strg V" in Windows and in Mac "cmd V" 
**Note**
password may not show when you type in the powerShell so make sure the password is correct and then press enter


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/fz6etr55sgykibera9sh.png)

**FINAL STEP**
 Congratulations You are now connected to your Linux virtual Machine 


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/6j9mpkwl683yd6ott08v.png)