Tools: How to create a linux virtual machine. (2026)
This article is about the simple steps to create a Linux virtual machine. what is a Linux virtual machine? A Linux virtual machine (VM) is a computer that runs Linux as its operating system, but instead of being a physical machine, it exists inside another computer using virtualization software. think of it this way - Your real computer = the host - The virtual machine = a computer inside your computer - Linux = the operating system running inside that virtual computer.with the following steps we will create a Linux virtual machine. - step 1 on your azure portal, search and click on virtual machines. - step 2 click on +create - step 3 on the project details, select your subscription, resource group, virtual machine name, the region, and on the availability option select no infrastructure redundancy required, on the security type select standard. - step 4 still on the project details, on the image, just because its a Linux vm select ubuntu pro or any of the ubuntu options available, select the size or you click on see all and select the one that suites your computer. - step 5 still on the project details, on the authentication type, select password select a username, confirm password. - step 5 on the inbound port, select hTTP(80), SSH(22) select review + create - step 6 after validation is passed click on create - step 7 after deployment, click on resource - step 9 on the overview page, you will see that our vm has an IP address, click on the IP address. - step 10 after clicking on the IP address, increase the idle timeout minutes to 30 and click apply - note the reason why we increase the idle timeout is because In an Microsoft Azure Virtual Machine, the idle timeout is increased so your connection doesn’t disconnect too quickly when there’s no activity. - step 11 connect the VM - step 12 check access - step 13 copy username - step 14 open up your Command Line Interface (cli).what is a cli? It is a way of interacting with a computer by typing commands instead of clicking buttons with a mouse. on the cli, paste the username of the vm you created and press enter. - step 15 the command ask if you want to continue? type yes insert your vm password and press enter. - note password will be invisible when inserting so you have to be sure and confident. - this shows we have connected our vm to linux. as you can see the name of our vm previously created. - step 16 so before you run a command as an administrator or you want to update anything on cli you have to be in root . so have to login in as root. type sudo su and press enter. as you can see from the image we jus switched to root - step 17 to update the package index, in the cli, type apt update and press enter. what does apt update do? it is used to refresh the package list on systems like Ubuntu and also it updates the Linux vm to the latest version. - step 17 let us install something into the Linux vm, for example let us install nginx. so in the cli, type apt install nginx and press enter. make sure it is spaced out when typing a command on the cli. - type yes when asked if you want to continue - step 18 to confirm you have installed nginx, go back to the vm and copy the IP address, paste it on a browser and press enter. this shows we have successfully installed nginx on linux. Templates let you quickly answer FAQs or store snippets for re-use. as well , this person and/or