Install Ubuntu Linux Into Virtual Machine (2024)

The easiest way is to install a pre-canned 32-bit Ubuntu 16.04 system from a virtual appliancecalled "

md32xu16047eolvm-vbox6118-f1

". There are two places from which you can download this virtual appliance:

Save the downloaded file as "

md32xu16047eolvm-vbox6118-f1.ova

".This file is about 3.5GB in size and it can take a while to download.If you have a poor Internet connection, it may take over an hour to download this file!Once you have downloaded this file, you should not delete it because you may need it again if one day your system refuses to boot (trust me, this can happen).

When you are done with installing VirtualBox, your machine would launch VirtualBox automaticallyand you will get a screen that looks like the following:

Install Ubuntu Linux Into Virtual Machine (1)

If you click con About VirtualBox under the Help Menu, you will see the version of the VirtualBox you are running.The screenshots here are from VirtualBox-6.1.6. If you are using a newer version of VirtualBox, your screensmay look different and some of the default values may be different.

Step 1: Import Virtual Appliance

Click on the Import button and your screen will look like the following:

Install Ubuntu Linux Into Virtual Machine (2)

Click on the yellow folder icon on the right to select a virtual appliance. Select the "

md32xu16047eolvm-vbox6118-f1.ova

"file you have just downloaded and your screen will look like the following (please note that the photo is a bit old andthe strings on the screen will not match what you see and that's okay)):

Install Ubuntu Linux Into Virtual Machine (3)

On the screen shown above, it's important that you check the "Import hard drives as DVI" checkbox.

Click on the Import button at the bottom and it will start importing the virtual appliance.It can take a few minutes to finish importing. When you are done, your screen should look like the following (if the right side looks different,it's perfectly fine):

Install Ubuntu Linux Into Virtual Machine (4)

The most important two buttons on the right are the Settings button and the Start button.The most important setting is the setting for the Display. For now, just click on the Settings buttonand you will get a popup window. In the popup window, click on Display on the left and you will see a screen that looks like the following for the Display setting:

Install Ubuntu Linux Into Virtual Machine (5)

Don't click on anything! I just want you to see the checkbox that's labeled, "Enable 3D Acceleration".This is a very important checkbox! In the above screenshot, it's showing that this checkbox is currently checked.If things go wrong, you might want to come back here and uncheck this checkbox and try again!For now, keep it checked because it will make your virtual machine run faster.

If your host machine is running Mac OS X, another important setting in the above screen is the amountof video memory your virtual machine gets. In the above screenshot, it's showing that your virtual machine will be given 16 MB of video memory.If things go wrong, you might want to come back here and set the video memory to 128 MB and try again.

Another important setting is the setting for the "base memory".Click on System on the left and you will see a screen that looks like the following for the System setting:

Install Ubuntu Linux Into Virtual Machine (6)

Check the Enable I/O APIC checkbox and don't click on anything for now!(Please note that if it turns out that your hardware is incompatible with Enable I/O APIC, you should uncheck that checkbox.)You should see that "Base Memory" is set at 1024MB (i.e., 1GB) by default.You should run as few things inside your virtual machine as possible because things are slowerwhen you run them inside a virtual machine. For example, if you want to use a web browser, it's best thatyou run your web browser on your host machine and not inside the virtual machine (unless there is a good reasonfor it). If you must run many applications inside your virtual machine, you can give your virtual machine more memoryby changing the Base Memory setting here. Please understand that the more memory you give to your virtual machine,the less memory your host machine will be left with! So, you need to first figure out how much memory your host machine has.I think it's a good rule that Base Memory should never exceed 1/3 of the total amount of memory of your host machine.For now, keep the Base Memory at 1024MB.

Now click on the OK button to save your setting and go back to the start screen and proceed to start your virtual machine.

Step 2: Start Your Virtual Machine

Now your 32-bit Ubuntu 16.04 system is ready to go! The name of your system is "

md32xu16047eolvm-vbox6118-f1

".

All you need to do is to click on the Start button to boot up your 32-bit Ubuntu 16.04 system.So, go ahead an click on the Start button (looks like a green arrow in the above screenshot).It can take several minutes for your system to boot. Be patient.

If all goes well, you will see the following screen (this is the XUbuntu Desktop):

Install Ubuntu Linux Into Virtual Machine (7)

The above screenshot is from a Windows machine.If you have a Mac, then the screen will of course look different (for example, the menubar will be on the very top of your screen,just like for all Mac applications). On some systems, you will get a popup window saying something about an "Indicator Plugin", justclick the Remove button.

If you don't see the above screen but get a black screen instead,then you need to trouble-shoot to figure out what's wrong.If you get a black screen, you should first turn off the virtual machine.Since you were not able to start Ubuntu 16.04 successfully, you must do a forced shutdown of your virtual machine.If you are on Windows, you should click on the Close Box as shown in the screenshot above.You will get a popup window asking if you want to "save the machine state", "send the shutdown signal", or "power off the machine".At this time you must select "power off the machine" and click on the OK button.Wait for the virtual machine to completely shutdown (i.e., when the virtual machine window disappears) before proceeding to trouble-shoot.This can take some time, so please be patient.After the virtual machine has completely shutdown,the first thing you should try is to uncheck the Enable 3D Acceleration checkbox and restart andhope that you will get a better result! If you don't, you should contact the instructor.

If all goes well and you got the XUbuntu Desktop,please click on the Terminal program and your screen should look like the following:

Install Ubuntu Linux Into Virtual Machine (8)

You are logged in automatically by default. Your user ID is "student" and this is an administrator account.Your password is also "student". Please note that this is also your administrator password!Any time you are prompted for the "admin password", you should enter this password.

Your default commandline shell is "bash". If you want to switch to use "tcsh", you can just type:

 tcsh

and you should see that your commandline shell prompt will look different.

Once in a while, you will get a popup window asking you to update your system, please just cancel the popup window!If you really want to update your system, all you have to do is to type the following in your commandline shell:

 upgrade

You will be prompted for the admin password. You should enter your admin password andproceed with updating your system. (Please note that this command is called "

upgrade

", but it doesn'treally "upgrade" your system. It updates your system.)

One more thing to try before proceeding... Maximize the window of your virtual machine and see if the size of the Ubuntu desktopwould fill the virtual machine window. If the Ubuntu desktop size doesn't change, you should first install Guest Additionsbefore proceeding. If the Ubuntu desktop resizes automatically, it means that you have Guest Additions already installed (which only needs to be done once).

Step 3: Set Up Shared Folder

It's very useful to be able to exchange files between your virtual machine and your host machine.The way to do it is to use a shared folder. To setup a shared folder, you need to first shutdown your virtual machine.The proper way to shutdown your virtual machine is to click on Main Menu in the XUbuntu Desktop.You will get the following screen (which is the main Xbuntu Menu):

Install Ubuntu Linux Into Virtual Machine (9)

From this screen, you can find a lot of programs to run. For now, just click on the Power off button in the lower right cornerand you should get the following screen:

Install Ubuntu Linux Into Virtual Machine (10)

Click on the Shut Down button to shutdown your virtual machine and go back to the VirtualBox start screen.If for some reason this doesn't work, you can also do the following. Start a Terminal and simply type the following:

 halt

Click on the Settings button and then follow theinstructions to set up a shared folder.To match what's already set up in your pre-canned virtual machine, please make sure to enter "/Shared-ubuntu" as your "Mount point" when youset up your shared folder andmake appropriate adjustments.After this is all set up, when you run your Terminal program,you can access the shared folder using the "

Shared-ubuntu

" folder in your home directory.By the way, shared folder can only work if you have installed Guest Additions.

If you get an error when accessing your shared folder, please try this fix and see if it works.

Once your Ubuntu 16.04 system is running smoothly, you should never need to shutdownyour virtual machine again! Whenever you need to shutdown your virtual machine, you should just suspend it.On Windows, you can simply click on the Close Box and select "save the machine state" to suspend your virtual machine.If you do it this way, next time when you need to start your virtual machine, just click on the green Start button in VirtualBox and your virtual machine state will be restoredand this is much faster than cold-booting your virtual machine.

Step 4: Backup Files You Have Created

Since it can take a while for your virtual machine to start, I would recommend that you do not shut down your virtual machine!If you simply close the lid of your laptop, everything will go to sleep, including your virtual machine. Although if you letyour laptop battery run out, your virtual machine would crash when your laptop dies. Most of the time, no harm is done when this happens.Although I have heard from students that when you are unlucky, you may not be able to get back into your virtual machine!When this happens, as far as I know, there is no way to recover the data inside your virtual machine!Therefore, it's imperative that you backup files you have created by copying themout of your virtual machine and into the shared folder and use your host machine's backup software to backup your shared folder.It's also a good idea to not overwrite files you have previously backed up (or use a version-control system) in case you need to get back to some older versions of your files.

To make backup easy, you should put all your files in one place. For example, you can do allyour work somewhere under the Documents folder in your home directory. Then youcan do the following to create a backup file and copy it into your shared folder using the following commands:

 cd $HOME tar cvzf Shared-ubuntu/Documents-backup-`date +%d%b%Y-%H%M%S`.tar.gz Documents

The above command assumes that you have already setup a shared folder in the

Shared-ubuntu

folder in your home directory.Please do not type the above command by hand! Just copy the above two lines and paste into your Terminal.(If you get a "cannot open" error when you tried the last command, please try this fix and see if it would help.)

Another way (probably a more cumbersome way) is to use your Google Drive to backup your filesfrom within the virtual machine. In this case, you will need to start your browser and loginto your Google Drive and then upload your files. No matter which way you choose, it's extremelyimportant that you have a backup strategy and have a good habit of backing up files you have createdat least once a day.

Step 5: Run Your VirtualBox Headless

This is totally unnecessary. But if you really want to run your VirtualBox "headless", i.e., without a desktop user interface,please read on (and I will assume that you are an Linux expert). Otherwise, you are done and you don't need this step.

Shutdown Ubuntu 16.04 and do the following(this is a quick summary of this website):

  • Click on Settings, then Network.
  • Under Adapter 1, click on Advanced, then Port Forwwarding.
  • Click on the "+" icon to add an entry and enter SSH under Name, TCP under Protocol, 127.0.0.1 under Host IP, 5679 under Host Port, leave Guest IP empty, and 22 under Guest Port, then click on OK to finish creating this entry.
  • (Only do this if you are planning on getting a desktop user interface over VNC. Click on the "+" icon to add another entry and enter VNC under Name, TCP under Protocol, 127.0.0.1 under Host IP, 5901 under Host Port, leave Guest IP empty, and 5901 under Guest Port, then click on OK to finish creating this entry.)
  • Click on Adapter 2, click on Enable Network Adapter, select Host-only Adapter for "Attached to", and select vboxnet0 or VirtualBox Host-Only Ethernet Adapter for "Name", then click on OK to finish setting up Adapter 2. (If nothing is available select under "Name", please take a look at this web page and go to 'File', then Host Manager, then press Create to create a host network with the specified IP address above.) On Windows 10/11, you may also want to check out this web page in case things are not working.
  • Click on System and check the Network checkbox in Boot Order and check the Enable I/O APIC in Extended Features.
  • Click on OK to finish Settings then start your Ubuntu 16.04 system.

In Ubuntu 16.04, start a Terminal and run the following command to install the OpenSSH Server:

 sudo apt-get install openssh-server

After you the OpenSSH Server is installed, run the following command:

 ifconfig

and you will see a printout that looks like the following, showing all the "interfaces" of your Ubuntu 16.04 system:

 enp0s8 Link encap:Ethernet HWaddr 08:00:27:85:b3:3c inet addr:192.168.56.102 Bcast:192.168.56.255 Mask:255.255.255.0 inet6 addr: fe80::751b:b7d0:e668:1eca/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:1 errors:0 dropped:0 overruns:0 frame:0 TX packets:40 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:590 (590.0 B) TX bytes:5560 (5.5 KB) lo Link encap:Local Loopback inet addr:127.0.0.1 Mask:255.0.0.0 inet6 addr: ::1/128 Scope:Host UP LOOPBACK RUNNING MTU:65536 Metric:1 RX packets:28 errors:0 dropped:0 overruns:0 frame:0 TX packets:28 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:1893 (1.8 KB) TX bytes:1893 (1.8 KB)

The important part is highlighted in red. The above is showing that my Ubuntu 16.04 systemhas two interfaces. The "

lo

" interface is to be used internally (i.e., from withint Ubuntu 16.04)and the other interfaces may be suitable for you to

ssh

into. In my case, my only choice is the

enp0s8

interface which has an "inet addr" (i.e., IP addres) of

192.168.56.102

. Therefore, if I wantto

ssh

into this machine, from outside of this virtual machine, you would do:

 ssh -X -Y [email protected]

If the above command does not work, please try:

 ssh -X -Y [email protected] -p 5679

Once you have verified that this works, you can shutdown your Ubuntu 16.04 system.Next time you start Ubuntu 16.04, instead of just click on the green Start button,click on the drop-down menu on the right side of the green Start button and select "Headless start".You can watch the Preview window to estimate if your Ubuntu 16.04 system is up and running or not. Thentry the above

ssh

command. Please remember that you don't have a desktop user interface any more!

Finally, where can you ssh from? You need a commandline app. On Mac OS X, you can run a "terminal" program.On Windows 10/11, you can run a PowerShell, or you can download putty (just google "putty download").Please note that if you want to run a program on Ubuntu 16.04 that has a graphical user interface,then you need to run an X11 server on your host machine.If your system is an Mac OS X system, you can install XQuartzand if your system is running Window 10, you can install X-Win32 from ITS software website.Please note that if you get X-Win32 from ITS, you need USC VPN in order to run X-Win32.If you don't want to run USC VPN, another choice for Windows 10/11 is Cygwin (although it's kind ofan overkill since it's a full-blown Linux-like system).

If you would prefer to do all the coding on your host machine,you can use FileZilla to transfer files between your host machine and a VM.This way, you can edit your files with your favorite editor on your laptop and use FileZilla to quickly copy your files into the VM using drag-and-drop.After you get FileZilla installed, just run it. Click on the File Menu then click on Site Manager. Click on the New Site button.In the popup window, enter the host name (also known as DNS name) of the VM into the Host box and keep the Port box empty.Select SFTP as the Protocol and select Normal as the Logon Type. Enter "student" as User and enter the password for the "student" account in the VM into the Password box. Click on OK to save all the information about this new site.Then click on the File Menu then click on Site Manager again. This time, click on the Connect button. Once you are connected, you can drag files fromyour laptop into your VM. If you get a popup window asking you to trust the host you are connecting to and add a key to the cache, you should readwhat's in the window. If everything looks right, check the checkbox and click OK so that you won't get this popup window every time you connect.

Install Ubuntu Linux Into Virtual Machine (2024)
Top Articles
19 Great Customer Service Tips To Improve Your Customer Satisfaction
Investing to beat inflation | Plynk
English Bulldog Puppies For Sale Under 1000 In Florida
Katie Pavlich Bikini Photos
Gamevault Agent
Pieology Nutrition Calculator Mobile
Hocus Pocus Showtimes Near Harkins Theatres Yuma Palms 14
Hendersonville (Tennessee) – Travel guide at Wikivoyage
Compare the Samsung Galaxy S24 - 256GB - Cobalt Violet vs Apple iPhone 16 Pro - 128GB - Desert Titanium | AT&T
Vardis Olive Garden (Georgioupolis, Kreta) ✈️ inkl. Flug buchen
Craigslist Dog Kennels For Sale
Things To Do In Atlanta Tomorrow Night
Non Sequitur
Crossword Nexus Solver
How To Cut Eelgrass Grounded
Pac Man Deviantart
Alexander Funeral Home Gallatin Obituaries
Energy Healing Conference Utah
Geometry Review Quiz 5 Answer Key
Hobby Stores Near Me Now
Icivics The Electoral Process Answer Key
Allybearloves
Bible Gateway passage: Revelation 3 - New Living Translation
Yisd Home Access Center
Pearson Correlation Coefficient
Home
Shadbase Get Out Of Jail
Gina Wilson Angle Addition Postulate
Celina Powell Lil Meech Video: A Controversial Encounter Shakes Social Media - Video Reddit Trend
Walmart Pharmacy Near Me Open
Marquette Gas Prices
A Christmas Horse - Alison Senxation
Ou Football Brainiacs
Access a Shared Resource | Computing for Arts + Sciences
Vera Bradley Factory Outlet Sunbury Products
Pixel Combat Unblocked
Movies - EPIC Theatres
Cvs Sport Physicals
Mercedes W204 Belt Diagram
Mia Malkova Bio, Net Worth, Age & More - Magzica
'Conan Exiles' 3.0 Guide: How To Unlock Spells And Sorcery
Teenbeautyfitness
Where Can I Cash A Huntington National Bank Check
Topos De Bolos Engraçados
Sand Castle Parents Guide
Gregory (Five Nights at Freddy's)
Grand Valley State University Library Hours
Hello – Cornerstone Chapel
Stoughton Commuter Rail Schedule
Nfsd Web Portal
Selly Medaline
Latest Posts
Article information

Author: Mr. See Jast

Last Updated:

Views: 5579

Rating: 4.4 / 5 (55 voted)

Reviews: 94% of readers found this page helpful

Author information

Name: Mr. See Jast

Birthday: 1999-07-30

Address: 8409 Megan Mountain, New Mathew, MT 44997-8193

Phone: +5023589614038

Job: Chief Executive

Hobby: Leather crafting, Flag Football, Candle making, Flying, Poi, Gunsmithing, Swimming

Introduction: My name is Mr. See Jast, I am a open, jolly, gorgeous, courageous, inexpensive, friendly, homely person who loves writing and wants to share my knowledge and understanding with you.