Easy Guide: Install Ubuntu 24.04 LTS in VirtualBox
Welcome! You want to get Ubuntu 24.04 LTS working inside VirtualBox. You’re looking for a guide that shows you every step. Maybe you saw our video about doing it by hand, or you just like reading instructions.
This article is your complete guide for a manual install of Ubuntu 24.04 in VirtualBox. Our video shows you what to click. This guide tells you why you click certain things. It helps you fix problems and shows you what to do after you finish.
Let’s start setting up your Ubuntu 24.04 VirtualBox setup.
Why Install Ubuntu 24.04 LTS by Hand in VirtualBox?
Ubuntu 24.04 LTS is a great operating system. It’s stable, and it gets free updates for 5 years. VirtualBox is a free tool. It lets you run another computer system, like Ubuntu, on your main computer without changing anything on your main system.
Doing a manual installation means you do each step yourself. You see and choose what to do. This is good for learning. It also lets you set up your system exactly how you want it.
What You Need Before You Start
Before you start the manual install of Ubuntu 24.04 in VirtualBox, get these things:
- Oracle VirtualBox: Download and put the newest version on your computer. Find it on the official VirtualBox website (Download VirtualBox).
- Ubuntu 24.04 LTS Desktop File: Get the file needed to put Ubuntu on your virtual computer. It’s called an ISO file. Look for the 64-bit PC (AMD64) Desktop Image on the official Ubuntu website (Download Ubuntu).
- Enough Room on Your Hard Drive: You need space for VirtualBox, the Ubuntu file, and the virtual computer’s storage (you need at least 25GB for the virtual computer, but more is better).
- Computer Setting Turned On (CRITICAL!): Your computer’s main chip needs a special setting on. It’s called Intel VT-x or AMD-V. You turn it on in your computer’s starting menu (BIOS/UEFI). You press a key like F2, Delete, F10, or F12 when your computer first turns on. If this setting is not on, VirtualBox cannot run Ubuntu 24.04. If you use Windows, also turn off something called Hyper-V if you have it.
Step-by-Step: How to Manually Install Ubuntu 24.04 LTS in VirtualBox
Follow these steps to put Ubuntu on your virtual computer yourself:
Make a New Virtual Computer in VirtualBox
- Open VirtualBox.
- Click the “New” button.
- Name: Give your virtual computer a clear name, like
Ubuntu
. - Where to Save: Pick a folder where the files for this virtual computer will go.
- Ubuntu File: Click the little arrow and pick
Other...
to find the Ubuntu 24.04 LTS file you downloaded. - Type: Linux , Subtype: Ubuntu, Version: Ubuntu (64-bit).
- Skip Automatic Install: Make sure the box that says “Skip Unattended Installation” is checked. We are doing it by hand.
- Now select “Hardware” section.
Giving Your Virtual Computer Resources
- Memory (RAM): This is how much short-term memory your virtual computer gets from your main computer. Ubuntu 24.04 needs at least 2GB (2048 MB). But giving it 4GB (4096 MB) or 8GB (8192 MB) is much better if your main computer has enough. Stay in the green area.
- Processors (CPU): This is like giving your virtual computer parts of your main computer’s brain. Giving it 2 or 4 brains makes things much faster. Stay in the green area.
- Now select “Hard Disk” section.
Setting Up the Virtual Hard Drive
- This is where Ubuntu will live inside the virtual computer.
- Choose “Create a Virtual Hard Disk now”.
- File Type: Keep VDI as it is.
- How it Saves: Keep unchecked “Pre-allocate Full Size”. This means the storage file starts small and only gets bigger as you put more things in your virtual computer, up to a limit you set. This saves space on your real hard drive at first.
- Where it Saves and How Big:
- You can use the default place or pick a different one.
- Set the Size. Ubuntu needs at least 25GB. But 40 GB or 50 GB is better so you have room for more programs and files later.
- Click “Finish”.
Starting the VM and the Installer
- Select the virtual computer you just made from the list in the main VirtualBox window.
- Click the big “Start” button.
- A new window will open. Your virtual computer should start up and automatically use the Ubuntu 24.04 file you picked to begin the installation process.
- You will be prompted to click Try or Install Ubuntu to begin the installer setup.
Now you will see the Ubuntu setup screens inside the VirtualBox window. You’ll follow these steps manually.
Language and Keyboard Setup
- Language: Select your preferred language, like English. Then click “Next”.
- Accessibility & Keyboard Layout: You can pick settings to help you use it if needed. After that, choose how your Keyboard works (like English (US)). You can type in the box to test it and make sure it works correctly. Click “Next”.
Network Connection
- Connect to the Internet: It’s generally a good idea to connect to the internet now if possible. Doing this lets the setup download updates and extra programs while it installs, which can save time later. If you’re using the usual network setting in VirtualBox (NAT) and your main computer is online, it should connect automatically. Click “Next”.
Choosing What to Install
- Choose Installation Type:
- Install Ubuntu: Select this option to put the system permanently on your virtual computer’s hard drive. (Choosing “Try Ubuntu” lets you look around without installing anything, which is good for a quick test).
- Click “Next”.
- Installation Setup (Default or Minimal):
- Default selection: This choice puts a standard Ubuntu system on your VM. It includes useful programs like a web browser, office programs, music/video players, and basic tools.
- Extended selection: This option adds more office and useful tools.
- Which to Pick? For most people starting out, “Default selection” is usually fine. You can always add more programs later using the App Center. Picking “Minimal selection” gives you very little, meaning you have to add almost everything yourself after installing.
- Click “Next”.
- Third-party software:
- Install third-party software for graphics and Wi-Fi hardware and additional media formats: Check both boxes. This is highly recommended for VMs and real computers alike. It adds necessary drivers and things needed to play videos and audio correctly, and can help with compatibility.
- Click “Next”.
Setting Up the Virtual Disk and User
- Type of Installation (Disk Setup): Here you tell the setup where to put Ubuntu on the virtual hard drive you made earlier. Since this is a brand new virtual drive with nothing on it, the easiest and safest option is:
- Erase disk and install Ubuntu: Select this choice. It’s very important to understand this: it will only erase the virtual hard disk you created in VirtualBox. It does NOT touch your real computer’s hard drive at all! This option automatically sets up the necessary parts on the virtual disk for Ubuntu.
- (Advanced: Other options like “Manual partitioning” are for users who know more about disk setups and want a custom setup. For your first virtual computer install, “Erase disk” is the simplest and recommended).
- Click “Install Now”.
- A screen will pop up showing a summary of the changes that will be made to the virtual disk. Click “Continue” to confirm you’re okay with this.
- Who are you?:
- Fill in your name, the name for your virtual computer (this is its hostname on a network), choose a username (lowercase letters usually), and create a strong password.
- Choose if you want to “Require my password to log in” every time you start (this is good for safety) or “Log in automatically”.
- Click “Next”.
- Choose Your Location: Click on the map or type where you are to set the correct time zone. Then click “Next”.
Waiting for Installation and Finishing
- Installation Progress: The setup will now copy files from the ISO and put the Ubuntu system onto the virtual hard drive. This will take some time, so please be patient while it runs.
- Installation Complete: Once it’s finished, a message will appear telling you the installation is done and asking you to restart the computer.
Restart and Remove Installation File
- Click “Restart Now”.
- VirtualBox might pop up a message. It wants you to “take out” the Ubuntu file so the virtual computer starts from the hard drive you just put Ubuntu on, not from the installation file again.
- In the menu bar of the VirtualBox window, go to
Devices
->Optical Drives
, and uncheck the Ubuntu ISO file. - Press Enter inside the virtual computer’s window.
- The virtual computer should restart and start up your new Ubuntu 24.04 system.
Logging In for the First Time
- You should see the screen to log in to Ubuntu. Type the password you made earlier.
Great job! You have installed Ubuntu 24.04 LTS yourself in VirtualBox.
Important Steps After You Finish Your Setup
Once you are logged in, there are a few very important steps to take to make your virtual computer fully useful and easy to work with.
1. Put On VirtualBox Guest Additions (VERY IMPORTANT!)
These tools make your virtual computer work much better. They help with screen size, copying and pasting, sharing folders, and more. Doing this step after Ubuntu is installed is key!
Step 1A: Get Latest System Updates
It’s a good idea to make sure your Ubuntu system is up-to-date before installing extra tools.
- Open the Terminal (
Ctrl + Alt + T
). - Type these two commands one at a time. Press Enter after each and give your password when asked:
sudo apt update sudo apt upgrade
sudo apt update
gets the list of new things your system needs. sudo apt upgrade
puts those new things on your system.
Step 1B: Install Tools Needed for Guest Additions
Guest Additions needs a few other simple tools on your Ubuntu system to install correctly.
- While still in the Terminal, type this command and press Enter:
sudo apt install build-essential dkms linux-headers-generic bzip2
Enter your password if asked. This command gets bzip2
and other tools like build-essential
(for building software) and dkms
and linux-headers-generic
(needed so Guest Additions works with your specific Linux system).
Step 1C: Insert and Run the Guest Additions Installer
Now we can get the Guest Additions setup running.
- In the menu bar of the VirtualBox window (the window showing your Ubuntu VM), go to
Devices
->Insert Guest Additions CD image...
- Inside your Ubuntu virtual computer, you might see a CD icon appear on the left side, or a message asking to run something.
- If you see a message asking to run, click “Run”.
- If you don’t see a message, open the Files app, look on the left for the CD icon (it might be named “VBox_GAs_…”). Click it to open it.
- Find a file named
VBoxLinuxAdditions.run
. - Right-click on
VBoxLinuxAdditions.run
and choose “Run as a Program” or “Open in Terminal”. If you “Open in Terminal”, you might need to typesudo ./VBoxLinuxAdditions.run
and press Enter. - The installer will run in a Terminal window. Enter your password if it asks.
- Let the script run completely. It will install the tools. You’ll know it’s done when you see the command prompt return.
Step 1D: Restart Your Virtual Computer
- The Guest Additions won’t work until you restart.
- Go to the power menu in the top right corner of your Ubuntu screen and choose “Restart”.
- After restarting, features like automatic screen resizing, shared clipboard, and drag-and-drop should work!
2. Set Up Copy/Paste and Drag/Drop
After you put on Guest Additions and restart, these should work.
- In the VirtualBox window menu, go to
Devices
->Shared Clipboard
and make sureBidirectional
is picked. - Go to
Devices
->Drag'n'Drop
and pickBidirectional
. - Try copying text from a program on your main computer into a text editor in the Ubuntu VM. Then try copying from Ubuntu back to your main computer. Try dragging a small file from one to the other.
Shared folders let you easily get to files on your main computer from inside your Ubuntu virtual computer.
- In the VirtualBox window menu, go to
Devices
->Shared Folders
->Shared Folder Settings...
- Click the ‘+’ button to add a folder.
- Folder Path: Choose a folder on your main computer you want to share.
- Folder Name: Give it a name for inside the virtual computer (like
MyDocs
). - Options: Check
Auto-mount
(it shows up automatically) andMake Permanent
. You can checkRead-only
if you don’t want Ubuntu to change files in it. - Click “OK”.
- To see the folder in Ubuntu, you usually need to add your user to a special group. Open the Terminal and type:
sudo usermod -aG vboxsf your_ubuntu_username
(Remember to change your_ubuntu_username
to the actual username you picked when you installed Ubuntu).
- Restart your Ubuntu virtual computer again for this to work.
- After it restarts, look for the shared folder. It might be in
/media/sf_<folder_name>
(like/media/sf_MyDocs
).
4. Install More Apps
- Ubuntu has an App Center (sometimes called Software Center). You can open this to easily find and install thousands of free programs like web browsers, music players, video editors, and much more.
- If you prefer using the Terminal, you can also install programs quickly by typing
sudo apt install program-name
(replaceprogram-name
with the name of the app you want to install) and pressing Enter.
5. Make Ubuntu Look How You Like
- Open the Settings app in Ubuntu. Here you can change things like your desktop background, how windows look, where the dock (taskbar) is located, and set other personal preferences to make it feel like yours.
Fixing Problems During or After Setup
Here are some things that might go wrong and how to fix them when you manual install Ubuntu 24.04 in VirtualBox:
- Problem: Virtual computer won’t start / Says things about “VT-x” or “AMD-V”.
- Fix: The “Virtualization” setting on your main computer is off. You must turn it on in your computer’s starting menu (BIOS/UEFI). Restart, press the key to get into settings (F2, Del, etc.), find the setting (Intel VT-x / AMD-V) and turn it on. Also, turn off Windows things like Hyper-V if needed.
- Problem: Setup stops or freezes while it’s running.
- Fix: Make sure the virtualization setting is on. Try giving the VM more video memory (in VM Settings -> Display). If it stops while setting up the hard drive, try making the virtual disk again or making the VM again.
- Problem: After restarting, it says “No Operating System Found”.
- Fix: The virtual computer doesn’t know where Ubuntu is. Make sure you finished the setup correctly. Go to VM Settings -> Storage. Take out the Ubuntu ISO file from the virtual CD drive after installing. The virtual hard drive (VDI file) should be there.
- Problem: Guest Additions won’t install.
- Fix: Update your Ubuntu system first (
sudo apt update && sudo apt upgrade
). Make sure you have tools needed to build them:sudo apt install build-essential dkms linux-headers-$(uname -r)
before running the script. Check you usedsudo
to run the script.
- Fix: Update your Ubuntu system first (
- Problem: Shared Folder isn’t there or doesn’t work.
- Fix: Did you restart the Ubuntu VM after adding your username to the group in the Terminal? You must restart. Check the shared folder settings in VirtualBox are right (Auto-mount, Permanent). Look in the right place inside Ubuntu (usually
/media/sf_
).
- Fix: Did you restart the Ubuntu VM after adding your username to the group in the Terminal? You must restart. Check the shared folder settings in VirtualBox are right (Auto-mount, Permanent). Look in the right place inside Ubuntu (usually
You Have a Great Ubuntu 24.04 Virtual Computer Now!
You successfully completed a manual install of Ubuntu 24.04 in VirtualBox. It’s a powerful, stable system, and you’ve set up the Guest Additions and shared folders. This detailed guide covers the how and why of each manual step, giving you more information than just watching might provide.
Feel free to bookmark this page and come back to it whenever you need to remember a step or fix something with your Ubuntu 24.04 VirtualBox setup.
Got questions or run into a problem not covered here during your manual installation or setup? Ask below! Leave a comment, and we’ll help if we can.
And if you want to see someone doing these manual steps shown in this guide, you can watch our video here: