MRC/Tutorials/Installing Ubuntu: Difference between revisions

From Control Systems Technology Group
Jump to navigation Jump to search
m (Formating)
 
(30 intermediate revisions by 10 users not shown)
Line 1: Line 1:
= Installing Ubuntu =
Ubuntu is an operating system, much like windows and MacOS. It is what makes a computer usable. Running a different operating system is like using a different computer altogether. In this course we recommend using a virtual machine to run ubuntu.


Download Ubuntu 14.04:
On your laptop, download virtualbox from their website:


* [http://releases.ubuntu.com/14.04/ubuntu-14.04.2-desktop-i386.iso 32-bit]
<https://www.virtualbox.org/wiki/Downloads>
* [http://releases.ubuntu.com/14.04/ubuntu-14.04.2-desktop-amd64.iso 64-bit]


Then, assuming you are currently running Windows, go to [http://www.ubuntu.com/download/desktop/create-a-usb-stick-on-windows this page] and follow the instructions to create a bootable USB stick. Reboot your computer with the newly created USB stick, and install Ubuntu. If you want to keep using Windows next to Ubuntu the most easy way is to have a dual-boot system, i.e., during startup you can choose to boot either Ubuntu or Windows. Of course you can also bring your notebook to the ICT servicedesk and ask them to install Ubuntu (but mention that you need version '''14.04''').
run the installer, and follow the instructions.


=== Troubleshoot ===
Virtualbox is the program that will create and run our virtual machine. A virtual machine is best seen as a piece of software that behaves as a virtual computer, which will thus allow us to install (and use) Ubuntu within windows.


'''Nothing happens when I reboot with the USB drive'''
After installing virtualbox, make sure you download a copy of the desktop image of Ubuntu to a folder on your windows machine:


When rebooting your computer with the USB stick it may be the case that booting from your hard drive or SSD is preferred over booting from the USB drive, and the Ubuntu installation doesn't start. In that case, try rebooting again, and now try to enter the ''BIOS'' or watch out for a ''Boot order'' menu. Often, you have to press keys during start-up such as F12 or DEL. Once you found the boot order menu, make sure the USB drive has priority over your normal drive, and restart.
<https://releases.ubuntu.com/24.04/>


= The Ubuntu Terminal =
===Setting up your virtual machine===
Start by opening '''VirtualBox''' and clicking the blue star-like icon labeled '''"New"'''.


Most of your interaction with Ubuntu will be done through the terminal, the number-one way of interacting with Ubuntu using your keyboard. A terminal can be started by pressing ''ctrl-alt-t''. <!-- It might be a good idea to drag the terminal icon in the menu to the Ubuntu panel, as you will be using it a lot. -->
# A menu with four tabs will appear. Under the '''"Name and Operating System"''' tab, give your VM a descriptive name. You can leave the ''Machine Folder'' at its default location. Select the Ubuntu image you downloaded in the previous step. Make sure to choose the correct ''Type'' and ''Version'' from the dropdown menus:
#* '''Type:''' Linux
#* '''Version:''' Ubuntu (64-bit)
# Also, check the box to '''skip unattended installation'''.
# We don't need to modify anything in the '''"Unattended Install"''' tab, since we chose to skip it.
# In the '''"Hardware"''' tab:
#* Set the '''Memory Size''' to more than '''4096 MB'''. Stay within the green boundary shown below the slider.
#* Choose the number of '''processors''' allocated to your VM. A good starting point is at least '''half of your available cores'''—more is generally better, depending on your system's capabilities.
# In the '''"Hard Disk"''' tab:
#* Select '''"Create a virtual hard disk now."'''
#* Choose the size and location of the virtual hard disk. We recommend at least '''40 GB''' (more is better, if you have the space).
#* You may want to store the virtual disk on a different physical drive for performance.
#* For the file type, select '''VDI'''.
# Click '''Finish''' to create your VM.


Although the terminal commands may seem somewhat puzzling at first, you'll soon find out that the terminal is a nifty tool and allows for faster and more powerful access to all of Ubuntu's possibilities than the graphical interface and mouse. If you don't know your way around the terminal, have a look at [https://help.ubuntu.com/community/UsingTheTerminal this page].
==== Final Configuration Steps ====
To complete your VM setup:


# Right-click your VM in the list.
# Select '''Settings''' (indicated by an orange gear icon).
# In the sidebar, go to '''Display''':
#* Set '''Video Memory''' to at least '''64 MB'''.
# Go to '''Network''':
#* Set '''"Attached to"''' as '''Bridged Adapter'''.
#* Under '''Name''', select your wireless adapter (e.g., ''Intel(R) Wi-Fi 6 AX200 160MHz'').


Ubuntu is already pretty great out-of-the-box, but some [[Embedded Motion Control/Tutorials/Customizing Ubuntu | customizations will make your Ubuntu experience even better]].
Click '''OK''' to confirm your changes.
 
===== Note: =====
If you encounter the error and it does not go away after a minute.
 
<code>VMWGFX seems to be running on an unsupported hypervisor.</code>
 
A possible fix is:
 
* Go back to '''Settings'''.
* Switch to '''Expert Mode''' (top-left corner).
* Under '''Display''', set the '''Graphics Controller''' to '''VBoxSVGA'''.
This paragraph has all the necessary steps, but the formatting and tone could use some polish for clarity and consistency. Here's a revised version that improves flow, readability, and professionalism:
 
=== Installing Ubuntu ===
Start your VM by clicking '''Start'''. The VM will boot to the Ubuntu installation screen. Follow the on-screen instructions to complete the installation.
 
# '''Select your preferred language''', accessibility options (if needed), and keyboard layout.
# '''Use wired connection''' for internet access.
# There is '''no need to update the installer''' at this stage.<blockquote>''Tip: Skipping updates now can speed up installation''</blockquote>
# Choose '''Install Ubuntu'''.
# Select '''Interactive Installation'''.
# Choose your '''preferred installation type'''—the default option is usually suitable.
# Enable '''third-party software installation'''.<blockquote>''Optional: You may also choose to install additional programs, this will not be necessary for the course.''</blockquote>
# Select '''Erase disk and install Ubuntu'''.<blockquote>''Don't worry—this only applies to the virtual disk and won’t affect your Windows or macOS system.''</blockquote>
# '''Create a user account''' by entering your name, computer name, username, and password.
# Set your '''timezone''' to '''Amsterdam'''.
# Click '''Continue''' to begin the installation.
# After the installation select '''Restart now''' and '''Enter''' when prompted to do so
 
===Post-install configuration===
Once Ubuntu finishes installing, you'll be brought to the '''login screen'''. Enter the password you created earlier to access the Ubuntu desktop.
 
After logging in, you may be prompted to complete some final setup steps, such as signing into '''Online Accounts'''. These are optional, you can configure them now or skip them and do it later.
 
You may see two additional prompts:
 
* '''Upgrade to a newer version of Ubuntu:'''  → Select '''"Don't Upgrade"'''.<blockquote>''We're sticking with version 24.04 for compatibility reasons.''</blockquote>
* '''Install updated software:'''  → Select '''"Install Now"'''.<blockquote>''Alternatively, you can install updates later using the terminal command below:''  <code>sudo apt-get update && sudo apt-get upgrade</code></blockquote>
 
==== Install VirtualBox Guest Additions ====
To enable functionality like copy-paste between your host (Windows/macOS) and the virtual machine, or dragging and dropping files first run this in the terminal:
<code>sudo apt-get install virtualbox-guest-additions-iso</code>
Then follow these steps:
 
===== 1. Enable Shared Freatures =====
While your VM is running:
 
# Go to the '''Devices''' menu in the VirtualBox window toolbar.
# Navigate to '''Shared Clipboard''' or '''Drag and Drop'''.
# Set both to '''Bidirectional'''.<blockquote>This allows content to be shared in both directions: from your host to the VM and vice versa.</blockquote>
 
===== 2. Install Guest Additions =====
To make these features actually work, you need to install '''VirtualBox Guest Additions''':
 
# In the '''Devices''' menu, select '''Insert Guest Additions CD Image...'''<blockquote>''Note: This won’t open anything immediately. That’s normal.''</blockquote>
# In Ubuntu, you’ll see a '''CD icon''' appear in the taskbar or file manager. Click to open it.
# In the file manager window that opens, look for a '''red header''' and click '''Run Software'''.
# A message will appear asking if you’d like to run software from <code>"VBox_GA_7.1.4"</code> or a similarly named version.  → Click '''Run''' and follow any prompts in the terminal window that appears.
 
===== 3. Reboot VM =====
After the installation is complete:
 
* Close the window through through the '''red "X"''' and choose '''Send the Shutdown Signal'''.
* Once the VM shuts down, '''start it again'''.
 
Your '''shared clipboard''' and '''drag-and-drop''' functionality should now be working!
 
==== Verifying Your Installation ====
You're almost done! Head to your '''desktop''' and check the default wallpaper.
 
* If it shows a '''crown''' image, congratulations, you're running the correct version of Ubuntu '''24.04'''.
* If you see something else (like a '''leopard jellyfish''', '''beaver''', or other animal), you likely installed the wrong version.
 
In that case, we ask you kindly to '''reinstall''' the correct version of '''Ubuntu 24.04'''
 
=== Power off the Virtual machine ===
When you're ready to shut down your virtual machine, you might be want to simply click the '''red "X"''' in the VirtualBox window. When you do, you’ll be presented with three options:
 
==== 1. Save the Machine State ====
This option preserves the VM exactly as it is running programs, open files, and all. The next time you start the VM, it will resume from this state.<blockquote>Think of it like closing your laptop lid: everything stays just as you left it.</blockquote>
 
==== 2. Send the Shutdown Signal ====
 
This performs a regular shutdown, as if you had clicked “Shut Down” from within Ubuntu’s menu.<blockquote>This is the recommended way to power off your VM.</blockquote>
 
==== 3. Power Off the Machine ====
 
This is a '''forceful''' shutdown, similar to holding down the physical power button on a real computer.<blockquote>Only use this if the system is frozen or unresponsive.</blockquote>Choose the option that best fits your situation. For everyday use, '''"Send the Shutdown Signal"''' is the safest and most appropriate choice
 
----Next section: [[MRC/Tutorials/The terminal|The terminal]]

Latest revision as of 16:13, 9 April 2025

Ubuntu is an operating system, much like windows and MacOS. It is what makes a computer usable. Running a different operating system is like using a different computer altogether. In this course we recommend using a virtual machine to run ubuntu.

On your laptop, download virtualbox from their website:

<https://www.virtualbox.org/wiki/Downloads>

run the installer, and follow the instructions.

Virtualbox is the program that will create and run our virtual machine. A virtual machine is best seen as a piece of software that behaves as a virtual computer, which will thus allow us to install (and use) Ubuntu within windows.

After installing virtualbox, make sure you download a copy of the desktop image of Ubuntu to a folder on your windows machine:

<https://releases.ubuntu.com/24.04/>

Setting up your virtual machine

Start by opening VirtualBox and clicking the blue star-like icon labeled "New".

  1. A menu with four tabs will appear. Under the "Name and Operating System" tab, give your VM a descriptive name. You can leave the Machine Folder at its default location. Select the Ubuntu image you downloaded in the previous step. Make sure to choose the correct Type and Version from the dropdown menus:
    • Type: Linux
    • Version: Ubuntu (64-bit)
  2. Also, check the box to skip unattended installation.
  3. We don't need to modify anything in the "Unattended Install" tab, since we chose to skip it.
  4. In the "Hardware" tab:
    • Set the Memory Size to more than 4096 MB. Stay within the green boundary shown below the slider.
    • Choose the number of processors allocated to your VM. A good starting point is at least half of your available cores—more is generally better, depending on your system's capabilities.
  5. In the "Hard Disk" tab:
    • Select "Create a virtual hard disk now."
    • Choose the size and location of the virtual hard disk. We recommend at least 40 GB (more is better, if you have the space).
    • You may want to store the virtual disk on a different physical drive for performance.
    • For the file type, select VDI.
  6. Click Finish to create your VM.

Final Configuration Steps

To complete your VM setup:

  1. Right-click your VM in the list.
  2. Select Settings (indicated by an orange gear icon).
  3. In the sidebar, go to Display:
    • Set Video Memory to at least 64 MB.
  4. Go to Network:
    • Set "Attached to" as Bridged Adapter.
    • Under Name, select your wireless adapter (e.g., Intel(R) Wi-Fi 6 AX200 160MHz).

Click OK to confirm your changes.

Note:

If you encounter the error and it does not go away after a minute.

VMWGFX seems to be running on an unsupported hypervisor.

A possible fix is:

  • Go back to Settings.
  • Switch to Expert Mode (top-left corner).
  • Under Display, set the Graphics Controller to VBoxSVGA.

This paragraph has all the necessary steps, but the formatting and tone could use some polish for clarity and consistency. Here's a revised version that improves flow, readability, and professionalism:

Installing Ubuntu

Start your VM by clicking Start. The VM will boot to the Ubuntu installation screen. Follow the on-screen instructions to complete the installation.

  1. Select your preferred language, accessibility options (if needed), and keyboard layout.
  2. Use wired connection for internet access.
  3. There is no need to update the installer at this stage.

    Tip: Skipping updates now can speed up installation

  4. Choose Install Ubuntu.
  5. Select Interactive Installation.
  6. Choose your preferred installation type—the default option is usually suitable.
  7. Enable third-party software installation.

    Optional: You may also choose to install additional programs, this will not be necessary for the course.

  8. Select Erase disk and install Ubuntu.

    Don't worry—this only applies to the virtual disk and won’t affect your Windows or macOS system.

  9. Create a user account by entering your name, computer name, username, and password.
  10. Set your timezone to Amsterdam.
  11. Click Continue to begin the installation.
  12. After the installation select Restart now and Enter when prompted to do so

Post-install configuration

Once Ubuntu finishes installing, you'll be brought to the login screen. Enter the password you created earlier to access the Ubuntu desktop.

After logging in, you may be prompted to complete some final setup steps, such as signing into Online Accounts. These are optional, you can configure them now or skip them and do it later.

You may see two additional prompts:

  • Upgrade to a newer version of Ubuntu: → Select "Don't Upgrade".

    We're sticking with version 24.04 for compatibility reasons.

  • Install updated software: → Select "Install Now".

    Alternatively, you can install updates later using the terminal command below: sudo apt-get update && sudo apt-get upgrade

Install VirtualBox Guest Additions

To enable functionality like copy-paste between your host (Windows/macOS) and the virtual machine, or dragging and dropping files first run this in the terminal:

sudo apt-get install virtualbox-guest-additions-iso

Then follow these steps:

1. Enable Shared Freatures

While your VM is running:

  1. Go to the Devices menu in the VirtualBox window toolbar.
  2. Navigate to Shared Clipboard or Drag and Drop.
  3. Set both to Bidirectional.

    This allows content to be shared in both directions: from your host to the VM and vice versa.

2. Install Guest Additions

To make these features actually work, you need to install VirtualBox Guest Additions:

  1. In the Devices menu, select Insert Guest Additions CD Image...

    Note: This won’t open anything immediately. That’s normal.

  2. In Ubuntu, you’ll see a CD icon appear in the taskbar or file manager. Click to open it.
  3. In the file manager window that opens, look for a red header and click Run Software.
  4. A message will appear asking if you’d like to run software from "VBox_GA_7.1.4" or a similarly named version. → Click Run and follow any prompts in the terminal window that appears.
3. Reboot VM

After the installation is complete:

  • Close the window through through the red "X" and choose Send the Shutdown Signal.
  • Once the VM shuts down, start it again.

Your shared clipboard and drag-and-drop functionality should now be working!

Verifying Your Installation

You're almost done! Head to your desktop and check the default wallpaper.

  • If it shows a crown image, congratulations, you're running the correct version of Ubuntu 24.04.
  • If you see something else (like a leopard jellyfish, beaver, or other animal), you likely installed the wrong version.

In that case, we ask you kindly to reinstall the correct version of Ubuntu 24.04

Power off the Virtual machine

When you're ready to shut down your virtual machine, you might be want to simply click the red "X" in the VirtualBox window. When you do, you’ll be presented with three options:

1. Save the Machine State

This option preserves the VM exactly as it is running programs, open files, and all. The next time you start the VM, it will resume from this state.

Think of it like closing your laptop lid: everything stays just as you left it.

2. Send the Shutdown Signal

This performs a regular shutdown, as if you had clicked “Shut Down” from within Ubuntu’s menu.

This is the recommended way to power off your VM.

3. Power Off the Machine

This is a forceful shutdown, similar to holding down the physical power button on a real computer.

Only use this if the system is frozen or unresponsive.

Choose the option that best fits your situation. For everyday use, "Send the Shutdown Signal" is the safest and most appropriate choice


Next section: The terminal