Learning Objectives
1. Create working environment for future labs
0 Learn what a virtual machine (VM) is
0 Install and configure VirtualBox
0 Install Ubuntu VM
2. Understand basics of working in Ubuntu
Introduction
A virtual machine is a software that emulates a virtual environment on your machine. This entire virtual machine is (ideally) completely contained within the host machine that is hosting it.
As an example, if you are running a Windows 7 VM on a Mac, the Windows 7 VM should run exactly like a real Windows 7 on a machine. The operating system on VM does not know that it is being virtualized.
This allows us to run the same virtual machine on different computers, so when we run software on the same type of virtual machine we all get the same result. Virtual machine also allows any possible viruses on the virtual computer to be completely self-contained, leaving the host computer safe and unharmed by the viruses.
We will be using virtual machines in this class so that everyone has the same, safe environment to work on for future labs.
Materials
VirtualBox: https://www.virtualbox.org/wiki/Downloads
Ubuntu 16.04 Desktop ISO: http://www.ubuntu.com/download/desktop
Discussion
Why would people use a virtual machine?
What do you want to learn in your lab sections?
Tasks
1. Download the required materials
2. Install VirtualBox
0 Run the VirtualBox Installer
0 Proceed with the installation until the installer completes
IA490 Lab 1 Handout
3. Create Ubuntu Virtual Machine
0 Within VirtualBox, click the new button (just below file)
0 Fill out the settings as shown and click next:
0 Leave memory size as recommended – click next
0 Create a virtual hard disk now – click create
0 Use VDI – click next
0 Use Dynamically allocated – click next
0 Feel free to customize the size and location – click next
3. Install Ubuntu
0 Double click on the VM you just created to start it
0 Click on the folder icon to navigate to where you saved your Ubuntu ISO
0 Click Start
0 Click Install Ubuntu
0 Check the first box and click continue
0 Erase disk and install Ubuntu (if a confirm box pops up, click continue)
0 Click continue on location
0 Continue on language
0 Use your netid for your name, enter a password and click continue
2
0 Once the installer finishes, click restart to reset the machine
0 If the VM hangs, click the Machine on the VM menu bar and click Reset
4. Final Configuration
0 Log into Ubuntu
0 Click Devices in the VirtualBox menu – Insert Guest Additions CD Image
0 Follow the prompts
0 Machine is VirtualBox Menu – Reset
5. Start the Terminal
0 Log into your user to get to your desktop
0 The menu bar on the left is called the “Launcher”
0 Start up a terminal
0 Press Ctrl + Alt + T and a terminal should pop up
0 Pin the terminal to the launcher by right clicking its icon in the launcher
0 You can now click on terminal icon to reopen terminal
6. Basic Terminal Commands
0 Run the following commands in terminal
0 “whoami”
0 “pwd”
0 “ls –help”
0 “cd ..”
0 “ls”
0 “ping google.com” (Ctrl + C to stop)
0 “nslookup google.com”
0 “python” (Ctrl + D to stop)
0 For additional help, refer to this documentation: https://help.ubuntu.com/community/UsingTheTerminal
7. Learn to Use a Text Editor
0 Your installation of Ubuntu comes with a preinstalled text editor: nano
0 Practice opening, editing, and saving files using nano
0 For additional help, refer to this documentation: https://help.ubuntu.com/community/Nano
8. Write Your First Program
0 Your installation of Ubuntu also comes with python, a handy programming language
0 Create a new text file in nano called hello.py
0 Insert the following line of text: print "hello world"
0 Save and exit nano
0 Run the file by typing into the terminal: “python hello.py”
3
Assignment
Due on Moodle at 11:55 PM on Thursday, September 1.
In a pdf file named netid_vm_lab.pdf, answer the following questions:
1. What are two reasons for why someone might want to use a virtual machine?
2. Briefly explain what each of these terminal commands do:
a. cd
b. ls
c. pwd
d. cp
e. mv
f. rm
g. man
h. sudo
3. Copy and paste a screenshot of the terminal window after running: python hello.py