Ubuntu Virtual Machine Installation Demo

In this demo, we will

1. Install VirtualBox

2. Download Ubuntu Server

3. Create a Ubuntu Server VM

Launch VirtualBox and create your first Ubuntu VM using the downloaded .iso image file. We use Ubuntu Server instead of Ubuntu Desktop because we only need a basic server machine without too many unnecessary functionalities. The resulting overhead to your host machine is smaller, and the VM starts up faster too.

Some notes when creating a new VM:

Refer to the videos Creating VM, Setting up VM

Start Installing Ubuntu

Some notes about installing Ubuntu:

Refer to videos Install Ubuntu 1, Install Ubuntu 2

Log in into Ubuntu

Reboot after Ubuntu installation complete; wait a little bit for some initialization steps complete. Then log in with your username and password.


First try the ifconfig command´╝Ü

ubuntu@ubuntu:~$ ifconfig

Command 'ifconfig' not found, but can be installed with:

sudo apt install net-tools


If some messages like above show, it means ifconfig has not been installed yet. (ifconfig is no longer installed by defaults in newer Ubuntu, and is replaced by more versatile ip command, but we will use it here for simplicity).

Follow its suggestion and install ifconfig:

ubuntu@ubuntu:~$ sudo apt install net-tools

Below shows the installation result:


Run ifconfig again to check the network interfaces:


Your display may look different, but take notes about the IP address of the Host-only interface card. The example above shows You can SSH from your host machine into this Ubuntu VM using the IP later. (Another IP address, is the IP address of the NAT interface card, the apps in your host machine cannot access it).

Finally check if the VM has internet access:

ubuntu@ubuntu:~$ ping google.com

Refer to the first part of the video Ping, SSH, and Upgrade

4. Connect to the Ubuntu VM using SSH

Launch your favorite SSH client from the host machine.
Some operation systems (Mac, Ubuntu, some Windows) have pre-installed SSH clients. If you are using Windows, you can also download third-party SSH clients. For example, search “windows ssh download” on the web and you can find PuTTY site

The benefit of using SSH is that you can easily copy and paste commands from your machine to Ubuntu VM for execution, and vice versa. You can also create multiple SSH connections with the Ubuntu VM for control and monitoring at the same time.

Below shows some examples on a Mac host machine. Suppose the Host-only network IP is, and tue username is ubuntu:

ssh -l ubuntu

The first time you connect to the VM, your SSH client may show some message asking you for confirmation. Enter yes:


(If somehow SSH shows some warning messages telling you the machine has potential security risk, you may have to remove an entry in the file <your home directory>/.ssh/known_hosts related the the IP address).

If you log in successfully, you will enter a command line interface:


Repeat the basic commands such as ping, ifconfig to see if the VM is working properly. If so, we can access the Ubuntu VM “remotely” from now on.





Refer to the second part of the video Ping, SSH, and Upgrade

5. Update and Upgrade your Ubuntu

Let also update and upgrade the Ubuntu VM right now to make sure it is up-to-date with proper security updates.

sudo apt update
sudo apt upgrade

Refer to the last part of the video Ping, SSH, and Upgrade