Installing and using a Linux VM

From csn
Jump to navigation Jump to search
Windows running Ubuntu
Windows running Ubuntu
Ubuntu running Windows
Ubuntu running Windows

This lab is designed to get you up and running in a Linux environment as quickly as possible. In this week the goal is to get the Linux environment on your Windows or OSX operating system running on the computer sitting in front of you. Internal South St students are encouraged to do this in the labs, and then go home and re-do the task on their own computer. External students, as well as Singapore and Dubai based students, will complete this on their own computer in class.

Virtual box offers a virtualized environment to run an operating system. The images to the right show Ubuntu Linux running in a Windows environment. Below that you can see Windows running in a Linux environment. We can virtualize any operating system within another and this is a very powerful tool which should become clearer as we progress through the unit. VirtualBox is just one of many approaches to doing this. If you are interested in trying something different outside of class time, feel free to have a read and try to understand the difference between:

  • Hyper-V for Windows
  • Virtual Box
  • VMware
  • Parallels for MAC

You can download VirtualBox at the link below, but if you are in the South St labs, running windows, this will already be done:

Note that if you are in the South St labs, you should speak with your tutor about how to access the Internet for your operating system.

If you are working on your own computer, and you already have a Virtualisation tool such as VMware or Parallels, feel free to use that but understand that you will need to translate the Virtual box instructions below to your own software. Also if you have completed this exercise in the labs and would like to try something else on your home PC, feel free to do this. Experimenting is a great way to learn.

After you have installed Virtual box, you should download the Ubuntu Linux image. Although pre-installed Ubuntu Virtualbox images exist, and this would be the most expedient approach, we will download a .iso file. These types of files are used to install an operating system from scratch and were historically burned onto a cd. Download from a local mirror:

Ask your tutor what version you will use and then download.

We will now use this .iso image file to install the Ubuntu Operating System in Virtual box.

Start Virtualbox

Follow the instructions in the captions under the images below.

Start the VirtualBox program, and click new
Start the VirtualBox program, and click new
Call it ICT171-Ubuntu
Call it ICT171-Ubuntu
Choose 2048 MB Memory if you have enough to spare
Choose 2048 MB Memory if you have enough to spare
Follow the defaults as shown
Follow the defaults as shown
Follow the defaults as shown
Follow the defaults as shown
Follow the defaults as shown
Follow the defaults as shown
Click start to start the virtual machine
Click start to start the virtual machine
Virtual Box will tell you that you are starting a machine with no boot media. You need to point Virtualbox towards your Ubuntu .iso file so that it can boot from this.
Virtual Box will tell you that you are starting a machine with no boot media. You need to point Virtualbox towards your Ubuntu .iso file so that it can boot from this.

Note that what we are doing here is mapping the iso as a virtual cd drive. After doing this, the Ubuntu machine should start booting. Eventually, you should be able to click Install Ubuntu.

Work through the installation of your Ubuntu Linux install

Yes, we are throwing you in at the deep end here! If you get stuck please make use of the forums, your tutor and your peers. That's what they are there for! Working through the problems and seeking assistance will get you there. Along the way, you'll be learning applied skills and a problem-solving approach that is essential for all IT professionals.

When your machine has finished installing you may need to manually reboot it. Go to Machine->Reset

Next week you will start to learn the Linux command line and get a bit more proficient in operating it. Internal students who have only completed this in the labs are encouraged to have a go on their home machine. Don't leave your lab yet, however.

Read and learn about different Linux Distros

Spend some time reading about what we mean by the word distro. Read and think about the different Linux distros and their use. Feel free to have a read here: https://www.howtogeek.com/191207/10-of-the-most-popular-linux-distributions-compared/

Consider whether you would like to try something different at home. If you have time in the labs, this is the perfect time to try downloading a different distro and playing with it in Virtualbox.

Some of your local mirrors will distribute many different Linux Operating Systems.

Click only if you are a Sheldon, Big Bang Theory, fan https://www.youtube.com/watch?v=X_mzgdQGwY4

Have some fun

Try to have some fun and spend some time doing something you find interesting in Linux. Below somebody is offering a command-line based video of Star Wars. The more you can just spend some time in Linux, the more you will pick up. The following will only work if you have an Internet connection. Can you open a terminal and run the following command?

telnet towel.blinkenlights.nl

External and Dubai/Singapore Students

In future weeks labs might refer to getting your lab partner to test or try to do something on your Linux machine. For you, you will be your partner. In all these cases, where we might say "get your lab partner to test your webpage" OR "get your partner to login via ssh into your Linux machine, you will need to do this from your native operating system (most likely this is Windows or MacOS).

To perform these tasks, we want your Linux Virtual machine's network interface to be accessible from your Windows or MacOS machine. Set the network adapter to bridged and select your network adapter which connects to the Internet. Please seek assistance from your tutor with this.

This is where you can change the network adapter to bridged so that you have bi-directional network access between the Ubuntu Virtual Machine and your Windows or OSX OS - Note that this can be problematic on some work networks such as eduroam
This is where you can change the network adapter to bridged so that you have bi-directional network access between the Ubuntu Virtual Machine and your Windows or OSX OS - Note that this can be problematic on some work networks such as eduroam

Troubleshooting at home

If you experience errors stating that "VT-x" is not available, you may need to turn on virtualisation in your bios. Every computer manufacturer has a different method to access the bios; you may need to google “HP how to turn on virtualisation bios” or “dell how to turn on virtualisation bios” (apple this should already be enabled).

If you get stuck on this step or do not feel confident, then ask your tutor. Also, do lots of reading until you are confident that you know what you are doing. See the links below:


Extra

If you would like your guest VM to be able to resize the screen you may want to try installing the following extensions you will need to execute these in a terminal session.

sudo apt install virtualbox-guest-dkms virtualbox-guest-utils virtualbox-guest-x11