How to launch a Linux Virtual Machine on Amazon AWS

In this tutorial, we will explain how to create, launch, configure, and connect to a Linux Virtual Machine using AWS Compute Cloud (EC2).

Amazon EC2 is the Amazon Web Service you use to create and run virtual machines in the cloud (we call these virtual machines ‘instances’).

1. Enter the EC2 Dashboard and click under Comput service “EC2”.

2. To create and configure your virtual machine click “Launch Instance”.

3. In the below screenshot, you can choose the Amazon Machine Image (AMI), which is a template that contains the software configuration required to launch your instance, For this guide, I will install “Amazon Linux AMI”.

4. Choose the instance type, every instance got its own specs such as processor speed, RAM, Hard-Disk capacity, you can know all the instance type from HERE, as for this tutorial we will choose the default “t2.micro”, and then I will click “Review and Launch”.

5. Now you can review all the options that you selected if it’s correct and you are ready and don’t need to do any modification click “Launch”.

6. Before you connect to your created virtual machine you will need to have a pair key, after you clicked “Launch”, select Create a new key pair and name it for example “MyKeyPair”. then click Download Key Pair. “MyKeyPair.pem” will be downloaded to your machine, after that you are ready to launch.

7. The next screen after you had clicked “Launch Instances”, click on “View Instances”.

8. Write down the public IP address of you Linux AWS instance as you will use it to connect.

9. To connect to your instance you will need “GIT” if you are a Windows user download it from HERE, and if you are a MAC/Linux user, use the SSH command to connect.

10. After you download “GIT” for Windows, install it.

11. On your desktop background do a right-click, and then click on “Git Bash Here”.

12. Use the command “SSH” to connect to the created instance edit the below command with your username, password, and IP address to connect.

ssh -i ‘c:\Users\yourusername\.ssh\MyKeyPair.pem’ ec2-user@{IP_Address}
Example
ssh -i ‘c:\Users\AvoidErrorsUSER\.ssh\MyKeyPair.pem’ [email protected]

Type “Yes” or “Y” and press Enter to continue.

13. Once you are connected, you will see a welcome screen of your instance, just like the below screenshot.

Summary

After this tutorial, you should be able to know how you can launch a Linux virtual machine on Amazon AWS without the cost and complexity of purchasing servers or managing data centers.

Miguel

I started this tech blog back in 2011 as a place to write down processes I took to fix my client systems and network. Now I write some tips and tricks to help others with the tech issues that one might encounter.

You may also like...