Installing Ubuntu and Initial Setup
Now that you've learned about Linux and Ubuntu in our first lesson, it's time to get your hands dirty! In this lesson, you'll install Ubuntu on your computer and perform essential initial setup tasks to create a productive development environment.
Learning Goals:
- Create a bootable Ubuntu USB drive
- Install Ubuntu alongside or replace your current operating system
- Complete post-installation setup and configuration
- Install essential development tools
- Understand basic system navigation
Preparing for Installation
Download Ubuntu ISO
First, download the latest Ubuntu LTS (Long-Term Support) version from the official Ubuntu website. LTS versions receive security updates and support for five years, making them ideal for development work.
# This is what you'll see after installation
lsb_release -a
Create Bootable USB Drive
You'll need a USB drive with at least 8GB capacity and a tool to create bootable media.
- Windows
- macOS
- Linux
Download and use Rufus - a free, open-source tool:
- Insert your USB drive
- Open Rufus and select your USB device
- Click "SELECT" and choose the Ubuntu ISO file
- Keep default settings and click "START"
- Wait for the process to complete
Use the built-in dd command or Etcher:
# Identify your USB device (be very careful with this!)
diskutil list
# Unmount the USB drive
diskutil unmountDisk /dev/disk2
# Create bootable USB (replace /dev/disk2 with your device)
sudo dd if=~/Downloads/ubuntu-22.04.3-desktop-amd64.iso of=/dev/disk2 bs=1m
Use the dd command or GNOME Disks:
# Identify your USB device
lsblk
# Create bootable USB (replace /dev/sdb with your device)
sudo dd if=ubuntu-22.04.3-desktop-amd64.iso of=/dev/sdb status=progress bs=4M
Creating a bootable USB will erase all data on the USB drive. Back up any important files before proceeding.
Installing Ubuntu
Boot from USB
- Insert the bootable USB drive
- Restart your computer and enter BIOS/UEFI (typically F2, F12, DEL, or ESC during startup)
- Change boot order to prioritize USB devices
- Save changes and exit - your computer will boot into Ubuntu live environment
Installation Process
Once booted, you'll see the Ubuntu installer:
-
Select Language: Choose your preferred language
-
Keyboard Layout: Configure your keyboard
-
Updates and Software:
- Choose "Normal installation" for a complete desktop experience
- Check "Install third-party software" for better hardware support
-
Installation Type:
- Dual-boot: "Install Ubuntu alongside Windows/macOS" (recommended for beginners)
- Full replacement: "Erase disk and install Ubuntu" (erases everything)
- Manual: Advanced partitioning for experienced users
-
Time Zone: Select your location
-
User Account:
- Enter your name, computer name, username, and password
- Choose "Log in automatically" or "Require my password to log in"
# This represents what happens behind the scenes
sudo useradd -m -s /bin/bash john
sudo passwd john
sudo usermod -aG sudo john
Choose a strong password and remember your username - you'll use these frequently when working with Ubuntu.
Post-Installation Setup
System Updates
After your first login, immediately update your system:
sudo apt update
sudo apt upgrade -y
Install Essential Tools
Install common development tools and utilities:
sudo apt install -y \
git \
curl \
wget \
vim \
build-essential \
software-properties-common
Configure Git
Set up your Git configuration for development work:
git config --global user.name "Your Name"
git config --global user.email "your.email@example.com"
git config --global init.defaultBranch main
Desktop Environment Tour
GNOME Overview
Ubuntu uses the GNOME desktop environment. Key components:
- Activities: Top-left hot corner or Super (Windows) key
- Dash: Left-side application launcher
- Top Bar: System status, notifications, and user menu
- Applications: Grid of installed applications
Useful Keyboard Shortcuts
Super (Windows key) - Open Activities overview
Super + A - Show applications
Super + Tab - Switch between windows
Ctrl + Alt + T - Open terminal
Super + L - Lock screen
Common Pitfalls
- Forgetting backup: Always back up important data before installation
- Wrong installation type: Double-check whether you're doing dual-boot or full replacement
- Weak password: Use a strong password, especially if you enable automatic login
- Skipping updates: Always run
sudo apt update && sudo apt upgradeafter installation - Not testing live environment: Boot from USB first to test hardware compatibility
- Ignoring driver issues: Some hardware may require additional drivers (check "Additional Drivers" in Settings)
Summary
You've successfully installed Ubuntu and completed essential initial setup! You now have:
- A working Ubuntu installation with latest updates
- Essential development tools installed
- Basic system configuration in place
- Understanding of the GNOME desktop environment
- Knowledge of common installation pitfalls to avoid
Your Ubuntu system is now ready for the command line fundamentals we'll cover in the next lesson.
Show quiz
-
What is the main advantage of using Ubuntu LTS over regular releases?
- A) Better performance
- B) Longer support period (5 years)
- C) More pre-installed software
- D) Smaller download size
-
Which command should you run immediately after installing Ubuntu to ensure all packages are up to date?
- A)
sudo apt install update - B)
sudo apt update && sudo apt upgrade - C)
sudo systemctl update - D)
sudo reboot now
- A)
-
What keyboard shortcut opens the terminal in Ubuntu's GNOME desktop?
- A) Ctrl + Shift + T
- B) Super + T
- C) Ctrl + Alt + T
- D) Alt + F2
-
When creating a bootable USB drive, what important precaution should you take?
- A) Use only USB 3.0 drives
- B) Back up the USB drive contents first
- C) Format the drive as NTFS
- D) Use a drive smaller than 8GB
-
Which Git command configures your global email for commits?
- A)
git set user.email - B)
git config --global user.email - C)
git global user-email - D)
git --config email
- A)
Answers:
- B - LTS versions receive security updates and support for five years
- B -
sudo apt update && sudo apt upgradefetches latest package lists and installs updates - C - Ctrl + Alt + T opens the terminal in GNOME
- B - The bootable USB creation process erases all data on the drive
- B -
git config --global user.emailsets your email for all Git repositories