Skip to main content

Installing Linux


Table of contents

  1. Installation options
  2. Installing Ubuntu on VirtualBox
  3. Installing WSL2 on Windows
  4. First boot and configuration
  5. Verifying the installation


1 - Installation options

Several methods exist for using Linux. Here are the main ones:

Comparison of the methods

MethodDifficultyPerformanceRecommended for
VirtualBoxEasyMediumLearning, testing
WSL2Very easyGoodWindows developers
Dual BootMediumExcellentIntensive use
Cloud VPSEasyVariableDevOps, production
Standalone installationEasyExcellentLinux only
Recommendation

For this course, we recommend WSL2 if you are on Windows 10/11, or VirtualBox for any other situation.

Hardware prerequisites

ComponentMinimumRecommended
RAM4 GB8 GB+
Storage20 GB50 GB+
CPU2 cores4 cores+
VirtualizationEnabled 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 .iso file (~4 GB)

Step 2: Create the virtual machine

Detailed configuration:

SettingRecommended value
NameUbuntu-Learning
TypeLinux
VersionUbuntu (64-bit)
RAM4096 MB (4 GB)
Hard diskCreate a virtual disk
File typeVDI
Size25 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

  1. Start the VM → Click "Start"
  2. Choose the language → English
  3. Install Ubuntu → Click "Install Ubuntu"
  4. Keyboard layout → English
  5. Installation type → Normal installation
  6. Erase the disk → Yes (it's a VM, no risk)
  7. Create user → Name, password
  8. Wait → The installation takes 10-15 minutes
  9. Reboot → When prompted
Important

Do NOT check "Download updates during installation" for a faster installation.

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
info

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

FromToPath
WindowsLinux\\wsl$\Ubuntu\home\user
LinuxWindows/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
note

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

TestCommandExpected result
Kerneluname -rVersion 5.x or 6.x
Distributionlsb_release -dUbuntu XX.XX
UserwhoamiYour username
Internetping -c 2 google.comReplies received
Disk spacedf -h /Available space
Everything works?

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 uname and lsb_release

🔝 Back to table of contents


← Previous chapter | Next chapter: The interface and the Terminal →