Installing Linux
Table of contents
- Installation options
- Installing Ubuntu on VirtualBox
- Installing WSL2 on Windows
- First boot and configuration
- Verifying the installation
1 - Installation options
Several methods exist for using Linux. Here are the main ones:
Comparison of the methods
| Method | Difficulty | Performance | Recommended for |
|---|---|---|---|
| VirtualBox | Easy | Medium | Learning, testing |
| WSL2 | Very easy | Good | Windows developers |
| Dual Boot | Medium | Excellent | Intensive use |
| Cloud VPS | Easy | Variable | DevOps, production |
| Standalone installation | Easy | Excellent | Linux only |
For this course, we recommend WSL2 if you are on Windows 10/11, or VirtualBox for any other situation.
Hardware prerequisites
| Component | Minimum | Recommended |
|---|---|---|
| RAM | 4 GB | 8 GB+ |
| Storage | 20 GB | 50 GB+ |
| CPU | 2 cores | 4 cores+ |
| Virtualization | Enabled in BIOS | - |
🔝 Back to table of contents
2 - Installing Ubuntu on VirtualBox
Step 1: Download the software
VirtualBox:
- Go to virtualbox.org
- Download the version for your system (Windows/macOS/Linux)
- Install with the default options
Ubuntu:
- Go to ubuntu.com/download
- Download Ubuntu Desktop LTS (Long Term Support version)
- You get a
.isofile (~4 GB)
Step 2: Create the virtual machine
Detailed configuration:
| Setting | Recommended value |
|---|---|
| Name | Ubuntu-Learning |
| Type | Linux |
| Version | Ubuntu (64-bit) |
| RAM | 4096 MB (4 GB) |
| Hard disk | Create a virtual disk |
| File type | VDI |
| Size | 25 GB (dynamic) |
Step 3: Configure the VM
Before starting, adjust these settings:
System → Processor:
- Processors: 2 (or more if available)
- Check "Enable PAE/NX"
Display → Screen:
- Video memory: 128 MB
- Controller: VMSVGA
Storage:
- Click the empty CD icon
- Choose the downloaded Ubuntu ISO
Step 4: Installing Ubuntu
- Start the VM → Click "Start"
- Choose the language → English
- Install Ubuntu → Click "Install Ubuntu"
- Keyboard layout → English
- Installation type → Normal installation
- Erase the disk → Yes (it's a VM, no risk)
- Create user → Name, password
- Wait → The installation takes 10-15 minutes
- Reboot → When prompted
Do NOT check "Download updates during installation" for a faster installation.
Step 5: Guest Additions (optional but recommended)
Guest Additions improve integration:
- Better screen resolution
- Copy-paste between host and VM
- Shared folders
# Dans le terminal Ubuntu après installation :
sudo apt update
sudo apt install -y virtualbox-guest-additions-iso
sudo apt install -y build-essential dkms linux-headers-$(uname -r)
# Menu VirtualBox → Périphériques → Insérer l'image CD des Additions
cd /media/$USER/VBox*
sudo ./VBoxLinuxAdditions.run
sudo reboot
🔝 Back to table of contents
3 - Installing WSL2 on Windows
WSL2 (Windows Subsystem for Linux 2) lets you run Linux directly inside Windows 10/11.
Prerequisites
- Windows 10 version 2004+ or Windows 11
- Virtualization enabled in the BIOS
Installation with a single command
Open PowerShell as administrator and run:
wsl --install
This command:
- Enables the WSL features
- Downloads the WSL2 Linux kernel
- Installs Ubuntu by default
After the installation, reboot your computer.
First configuration
On the first launch of Ubuntu:
Installing, this may take a few minutes...
Please create a default UNIX user account.
Enter new UNIX username: votre_nom
New password: ********
Retype new password: ********
Verify the WSL2 installation
# Dans PowerShell
wsl --list --verbose
Expected result:
NAME STATE VERSION
* Ubuntu Running 2
Install other distributions
# Voir les distributions disponibles
wsl --list --online
# Installer une distribution spécifique
wsl --install -d Debian
wsl --install -d Ubuntu-22.04
Access the files
| From | To | Path |
|---|---|---|
| Windows | Linux | \\wsl$\Ubuntu\home\user |
| Linux | Windows | /mnt/c/Users/YourName |
# Depuis Ubuntu WSL, accéder au bureau Windows
cd /mnt/c/Users/VotreNom/Desktop
🔝 Back to table of contents
4 - First boot and configuration
The Ubuntu Desktop interface
System update
The first thing to do after installation:
# Mettre à jour la liste des paquets
sudo apt update
# Mettre à jour les paquets installés
sudo apt upgrade -y
sudo = "Super User DO" - runs a command as an administrator. You will be asked for your password.
Basic customization
Settings → Appearance:
- Light or dark theme
- Dock position
Settings → Region and language:
- Formats: France
- Input sources: French
Install essential software
# Éditeur de texte avancé
sudo apt install -y vim
# Outil de téléchargement
sudo apt install -y curl wget
# Git pour le contrôle de version
sudo apt install -y git
# Utilitaires réseau
sudo apt install -y net-tools
🔝 Back to table of contents
5 - Verifying the installation
Check that everything works correctly:
System information
# Version du noyau Linux
uname -r
# Exemple: 5.15.0-91-generic
# Version d'Ubuntu
lsb_release -a
# Description: Ubuntu 22.04.3 LTS
# Architecture
uname -m
# x86_64
Terminal test
# Afficher la date
date
# Afficher le répertoire courant
pwd
# Lister les fichiers
ls
# Afficher "Hello World"
echo "Hello World, je suis sur Linux !"
Internet connection test
# Ping vers Google
ping -c 4 google.com
# Télécharger une page
curl -I https://ubuntu.com
Verification checklist
| Test | Command | Expected result |
|---|---|---|
| Kernel | uname -r | Version 5.x or 6.x |
| Distribution | lsb_release -d | Ubuntu XX.XX |
| User | whoami | Your username |
| Internet | ping -c 2 google.com | Replies received |
| Disk space | df -h / | Available space |
If all these commands work, congratulations! Your Linux is ready for the rest of the course.
🔝 Back to table of contents
Key takeaways
- VirtualBox is ideal for learning risk-free
- WSL2 is the simplest solution on Windows 10/11
- Always update after a new installation
sudo apt update && sudo apt upgrade= a command to know- Verify your installation with
unameandlsb_release
🔝 Back to table of contents
← Previous chapter | Next chapter: The interface and the Terminal →