Prerequisites:
Step 1: Create a New Virtual Machine
- Open VirtualBox and click New.
- Enter a name (e.g., Ubuntu Server 22.04), set Type to Linux, and Version to Ubuntu (64-bit).
- Click Next.

Step 2: Allocate Memory (RAM)
- Assign at least 2GB (2048 MB) for smooth performance.
- Click Next.
Step 3: Create a Virtual Hard Disk
- Select Create a virtual hard disk now and click Create.
- Choose VDI (VirtualBox Disk Image).
- Select Dynamically allocated (saves space).
- Set disk size to at least 10GB (25GB recommended for flexibility).
- Click Create.
Step 4: Attach the Ubuntu Server ISO
- Select your VM and click Settings.
- Go to Storage > Empty under the optical drive.
- Click the CD icon and select Choose a disk file.
- Browse and select the Ubuntu Server 22.04 ISO you downloaded.
- Click OK.
Step 5: Start the Virtual Machine
- Select your VM and click Start.
- The Ubuntu Server installer will boot.
Step 6: Install Ubuntu Server 22.04
1. Language & Keyboard Setup
- Choose your preferred language and keyboard layout.
2. Network Configuration
- The installer should detect your network automatically.
- (Optional) Set a static IP if needed.
3. Proxy & Mirror Settings
- Leave blank unless you’re behind a proxy.
4. Storage Setup
- Select Use an entire disk (unless you need manual partitioning).
- Confirm and proceed.
5. User & SSH Setup
- Enter your name, server name, username, and password.
- (Recommended) Enable Install OpenSSH server for remote access.
6. Install Additional Software (Optional)
- Select any extra packages (e.g., Docker, LAMP stack).
7. Complete Installation
- Wait for the installation to finish.
- When prompted, remove the ISO and reboot.
Step 7: Log In & Update
- After reboot, log in with your credentials.
- Run updates:
sudo apt update && sudo apt upgrade -y
Final Thoughts
You now have a fully functional Ubuntu Server 22.04 running in VirtualBox! From here, you can:
- Set up a web server (Nginx/Apache).
- Deploy Docker containers.
- Practice Linux administration.
If you run into issues, check VirtualBox’s Guest Additions for better performance or adjust network settings (NAT/Bridged).
Let me know in the comments if you’d like a guide on setting up specific services!
Enjoy your Ubuntu Server journey!
Did this guide help you? Share it with others who might find it useful!