Linux powers servers, containers, and developer laptops worldwide. Today you will set up a safe environment, understand what Linux actually is, and run your first commands with confidence.
Prerequisites
- A computer with hardware virtualization (Intel VT x or AMD V) enabled in BIOS or UEFI.
- 20 to 30 GB of free disk space for a virtual machine or WSL.
- Optional on Windows: Windows 11 with WSL enabled.
Linux is a kernel. A distribution packages the kernel with userland tools, a package manager, and defaults. Popular beginner choices are Ubuntu LTS from the Debian family and Fedora Workstation from the Red Hat family. Both are excellent and both are used throughout this series.
Step 1 - Pick your environment
Choose one of these. Any option works for the series.
Option A: Virtual machine (recommended for beginners)
- Why: Safest choice, easy snapshots, isolated from your main system, works on Windows, macOS, and Linux.
- Tools: VirtualBox, VMware Workstation or Player, Parallels on macOS, or UTM on Apple silicon.
- Guest OS: Ubuntu 24.04 LTS or Fedora Workstation 40.
Suggested VM settings:
- CPU: 2 to 4 vCPUs
- RAM: 4 to 8 GB
- Disk: 30 to 40 GB dynamically allocated
- Network: NAT
- Display: enable 3D acceleration if available
Option B: WSL on Windows
- Why: Fast startup and deep Windows integration with Visual Studio Code.
- Install in an elevated PowerShell:
wsl --install -d Ubuntu
If WSL is not enabled yet, Windows will install the features and request a reboot. After reboot, launch Ubuntu from the Start menu and create your Unix username and password.
Useful checks:
wsl --status
wsl --version
wsl -l -v
If you see Version 1, set default to 2:
wsl --set-default-version 2
Option C: Bare metal dual boot
- Why: Best performance and full hardware access.
- Caution: Partitioning can cause data loss if done incorrectly. Back up first and read each installer screen carefully.
Step 2 - Download and verify the ISO
Verifying the ISO avoids confusing installer crashes.
- Download Ubuntu Desktop 24.04 LTS or Fedora Workstation 40 from the official website.
- Download the checksum file and the signature if available.
- Verify on Linux or macOS:
# inside the folder where the ISO and checksum live
sha256sum Ubuntu-24.04-*.iso
# Compare the printed hash to the official hash
On Windows you can use PowerShell:
Get-FileHash .\Ubuntu-24.04-*.iso -Algorithm SHA256
Step 3 - Install Ubuntu in a VM (example)
Fedora follows similar steps with its Anaconda installer.
- Create a new VM and attach the ISO as the optical drive.
- Boot the VM and select Install Ubuntu.
- Select keyboard layout and network.
- Installation type: choose Normal installation. Check Install third party software if you want better hardware support in a VM.
- Disk: choose Erase disk. This applies only to the VM virtual disk.
- Timezone: set your region.
- User account: create a username and strong password.
- Finish and reboot. Eject the ISO when prompted.
Use an ARM64 image and a hypervisor that supports Apple silicon. Proprietary apps may not provide ARM builds. The tools we use in this series are open source and available for ARM.
Step 4 - First boot checklist
Open a terminal. On Ubuntu press Super and type Terminal. On Fedora use Activities then type Terminal.
Run the following. Read the output. Understanding the output is the goal.
# Identity and host information
whoami
hostnamectl
# Kernel and release
uname -a
cat /etc/os-release
# Package updates on Ubuntu or Debian
sudo apt update
sudo apt full-upgrade -y
# Reboot if the kernel or core libraries were updated
sudo reboot
Fedora uses dnf:
sudo dnf upgrade -y
Arch Linux uses pacman:
sudo pacman -Syu
apt is a user friendly frontend that combines common apt-get and apt-cache operations. When following guides, prefer apt where possible, and fall back to apt-get if a script expects it.
Step 5 - Anatomy of a command
A typical command looks like this:
command -o --option arguments
Examples:
ls -la # list all files with details
mkdir projects && cd projects
cp /etc/hosts ./hosts.backup
Notes:
- Lines starting with # are comments for humans.
- Use Tab for auto completion of commands and paths.
- Press Up and Down to cycle history.
- Press Ctrl R to search command history.
Step 6 - Help systems you will use every day
# Manual pages
man ls
# Built in help
ls --help
# Search for commands by topic
apropos directory | head -20
Install TLDR pages for quick examples if you like:
# Ubuntu or Debian
sudo apt install -y tldr
# Fedora
sudo dnf install -y tldr
# Use it
tldr ls
Man page sections quick reference:
- 1 user commands
- 5 file formats and conventions
- 7 overviews and conventions
- 8 system administration commands
Step 7 - Your first filesystem tour
pwd # print working directory
ls -lah # list files with human readable sizes
cd / # go to the filesystem root
ls
cd /etc # configuration files
ls
cd /home # user home directories
ls
cd ~ # back to your home directory
Key locations that you will revisit in this series:
- / the root of the filesystem
- /etc system configuration
- /var variable data such as logs and caches
- /home or /home/USERNAME your personal files
Step 8 - Make and edit a file
Use nano for a simple editor and less for viewing.
nano /tmp/notes.txt
Type a few lines. Save with Ctrl O then Enter. Exit with Ctrl X.
less /tmp/notes.txt
If you are curious about Vim, run vimtutor. I will cover editors in detail on Day 4.
Step 9 - Quality of life setup (optional but recommended)
Prompt with git branch and exit code is useful later. For now make a minimal improvement that does not hide information.
# Append a tiny prompt to your .bashrc
printf '\n# Minimal prompt with working dir\nPS1="\\u@\\h \\w\\$ "\n' >> ~/.bashrc
source ~/.bashrc
Copy and paste in terminals:
- Ubuntu GNOME Terminal: Ctrl Shift C and Ctrl Shift V
- macOS Terminal or iTerm2: Command C and Command V
- Windows Terminal: Ctrl Shift C and Ctrl Shift V
Hands on lab (30 to 60 minutes)
Follow the steps end to end. The Success criteria at the end will help you verify your work.
Part 1 - Verify environment
- VM users: confirm guest additions or tools are installed for your hypervisor.
- WSL users: confirm WSL 2 is active with
wsl -l -v
and that Ubuntu is version 2.
Part 2 - System identity and updates
whoami
hostnamectl | head -5
uname -r
cat /etc/os-release | head -8
# Install curl and htop as warm up
sudo apt update && sudo apt install -y curl htop || true
sudo dnf install -y curl htop || true
# System wide update
sudo apt full-upgrade -y || true
sudo dnf upgrade -y || true
Part 3 - Network smoke test
ip addr | sed -n '1,25p'
ping -c 4 ubuntu.com || ping -c 4 fedora.org
curl -I https://example.com
Part 4 - File operations
mkdir -p ~/playground/day1 && cd ~/playground/day1
printf "hello linux\n" > hello.txt
cp hello.txt hello.bak
ls -l
rm hello.bak
Part 5 - Help systems
man uname
uname --help | head -20
apropos memory | head -20
Success criteria
- You can describe your system using uname and os release output.
- Package updates complete without errors.
- You can reach the internet from the VM or WSL.
- You can create, copy, view, and delete files.
- You can find help for a command and explain a few flags in your own words.
Troubleshooting and common pitfalls
Virtualization not enabled
- Symptom: 64 bit guests are unavailable or the VM fails to start.
- Fix: Enable Intel VT x or AMD V in BIOS or UEFI. On Windows also disable Hyper V if using VirtualBox.
ISO corrupt or wrong architecture
- Symptom: Installer crashes or kernel panic on boot.
- Fix: Verify SHA256 checksum. Make sure you downloaded the correct x86 64 or ARM64 image for your hardware and hypervisor.
Tiny display in the VM
- Symptom: Low resolution and poor scaling.
- Fix: Install guest additions or tools. Enable auto resize or scale to fit mode.
APT lock or interrupted upgrade
- Symptom: Could not get lock var lib dpkg lock frontend.
- Fix: Wait for the automatic updater to finish or reboot. Avoid killing dpkg or apt mid operation. If a lock remains, verify that no apt or dpkg process is running before removing lock files.
No internet in guest
- Symptom: ping fails and curl cannot reach websites.
- Fix: Use NAT mode for the VM network. Restart the VM. Check that host VPN or firewall rules are not blocking traffic.
WSL stuck on Version 1
- Run
wsl --set-default-version 2
then reinstall the distro withwsl --install -d Ubuntu
or convert an existing one withwsl --set-version Ubuntu 2
.
Recap
- Linux is a kernel while a distribution is the complete operating system package that ships with userland tools and a package manager.
- You installed Ubuntu or Fedora in a safe environment and performed your first update.
- You practiced discovery commands, learned how to use man pages, and explored the filesystem.
- You captured your command history for reflection and reuse.
Homework
- Create a folder
~/projects/notes
and a fileintro.md
that lists your goals for the 30 day series and any prior experience you have. - Install htop using your package manager and launch it. Observe CPU and memory usage while running
yes > /dev/null &
then stop the process withkill %1
orpkill yes
. - Explore three directories under
/
and write a one line description for each in~/projects/notes/fs-tour.md
.
sudo apt install -y htop # Ubuntu or Debian
sudo dnf install -y htop # Fedora
sudo pacman -S htop # Arch
Up next: Day 2 - Shell Fundamentals (Bash)
On Day 2 you will learn command syntax, quoting, history, completions, and the mental model that makes shell usage predictable.