Friday, September 11, 2026

Linux Installation & Environment with WSL

If you are using Windows 11, WSL (Windows Subsystem for Linux) is one of the easiest ways to learn Linux without installing VirtualBox or VMware.

1. What is WSL?

WSL = Windows Subsystem for Linux

It allows you to run a Linux environment directly inside Windows.

┌──────────────────────────────┐
│          Windows 11          │
│                              │
│   VS Code / Chrome / Apps    │
│                              │
│   ┌──────────────────────┐   │
│   │         WSL          │   │
│   │                      │   │
│   │    Ubuntu Linux      │   │
│   │                      │   │
│   │ Bash | Linux Tools   │   │
│   └──────────────────────┘   │
└──────────────────────────────┘

You can practice real Linux commands such as:

ls
cd
pwd
mkdir
chmod
chown
ps
systemctl
ip
ssh
grep
find

2. WSL vs VirtualBox

Feature

WSL

VirtualBox

Installation

Easy

More setup

Performance

Lightweight

Uses more resources

Linux GUI

Available with WSLg

Full VM desktop

Linux CLI

Excellent

Excellent

Linux administration practice

Full virtual machine

Snapshots

Different approach

Beginner

⭐⭐⭐⭐⭐

⭐⭐⭐⭐

DevOps practice

⭐⭐⭐⭐⭐

⭐⭐⭐⭐⭐

My recommendation

For your current Linux + AWS + Docker + DevOps learning, start with:

WSL + Ubuntu

Later, use an Ubuntu VM or AWS EC2 when you need to practice full server/network environments.

3. Check Your Windows Version

Open PowerShell as Administrator.

Run:

winver

You can also check WSL:

wsl --status

If WSL isn't installed, Windows will tell you.

4. Install WSL

The easiest method on modern Windows is:

PowerShell → Run as Administrator

Then:

wsl --install

This normally installs WSL and a default Linux distribution.

After installation, restart Windows if prompted.

5. Install Ubuntu Specifically

You can install Ubuntu with:

wsl --install -d Ubuntu

Then restart if requested.

After Windows restarts, Ubuntu may open automatically.

You'll see something similar to:

Installing, this may take a few minutes...

Then:

Enter new UNIX username:

Create your Linux username.

Example:

linuxuser

Then create a Linux password.

⚠️ Important: When entering a Linux password in the terminal, you normally won't see * characters. That's normal.

6. Start Ubuntu

After installation, you can open:

Start Menu → Ubuntu

Or from PowerShell:

wsl

You should get a Linux shell:

linuxuser@DESKTOP:~$

Congratulations — you are now inside Linux. 🎉

7. Understand What You're Seeing

For example:

linuxuser@DESKTOP:~$

Breakdown:

linuxuser
    ↓
Linux username

@
    ↓
separator

DESKTOP
    ↓
hostname

:
    ↓

~
    ↓
home directory

$
    ↓
normal user

Compare:

linuxuser@DESKTOP:~$

with:

root@DESKTOP:/#

$ generally indicates a normal user shell.

# generally indicates a root shell.

8. First WSL Linux Commands

Run these one by one:

whoami
hostname
pwd
ls
date
uname -a

And:

cat /etc/os-release

You should see Ubuntu information.

9. Update Ubuntu

Run:

sudo apt update

Then:

sudo apt upgrade

Or:

sudo apt update && sudo apt upgrade

Remember:

apt update
     ↓
Refresh package information

apt upgrade
     ↓
Install available updates

10. Understand sudo

sudo means you want to execute a command with administrative privileges.

Example:

sudo apt update

Without sudo:

apt update

may not have enough permission for certain administrative operations.

You can check your user:

whoami

Check groups:

groups

11. Practice Linux Filesystem in WSL

Create your practice directory:

mkdir ~/linux-lab

Go inside:

cd ~/linux-lab

Create directories:

mkdir files users networking services processes

Check:

ls

Create a file:

touch test.txt

Check:

ls -l

Write something:

echo "Linux Practice" > test.txt

Read it:

cat test.txt

Expected:

Linux Practice

12. Access Windows Files from WSL

This is one of the most useful WSL features.

Your Windows drives are normally available under:

/mnt/

For example, your C: drive:

cd /mnt/c

Check:

ls

You can go to your Windows Users directory:

cd /mnt/c/Users

Then:

ls

You should see Windows user folders.

Important concept

Windows                         WSL

C:\                             /mnt/c/
D:\                             /mnt/d/

So:

C:\Users
   ↓
/mnt/c/Users

13. Access WSL Files from Windows

From WSL, run:

explorer.exe .

Windows File Explorer will open the current Linux directory.

This is very convenient when working with:

  • VS Code
  • HTML
  • Python
  • Git
  • Docker
  • Linux projects

14. Use VS Code with WSL

For your coding and DevOps learning, this is particularly useful.

Install Visual Studio Code and the WSL extension.

Then from your WSL terminal, inside your project:

code .

Your Linux project can open directly in VS Code.

Conceptually:

Windows
   │
   └── VS Code
          │
          ↓
        WSL
          │
          ↓
       Ubuntu
          │
          ├── Git
          ├── Python
          ├── Bash
          ├── Docker
          └── Linux commands

15. Install Basic Linux Administration Tools

Run:

sudo apt install curl wget git vim nano tree net-tools

Check them:

git --version
curl --version
wget --version

Check tree:

tree

16. Practice Users and Permissions

Create a test directory:

mkdir ~/permission-lab
cd ~/permission-lab

Create a file:

touch test.txt

Check permissions:

ls -l

You may see something like:

-rw-r--r-- 1 linuxuser linuxuser 0 Sep 11 test.txt

You'll later learn:

-rw-r--r--
 │││ │││
 │││ ││└── Others
 │││ └──── Group
 │└──────── Owner
 └───────── File type

This is a major Linux administration topic.

17. Check Running Processes

Try:

ps

For more information:

ps aux

You can also use:

top

Press:

q

to exit top.

Later you'll learn:

Process
   ↓
PID
   ↓
CPU
   ↓
Memory
   ↓
Kill / Manage

18. WSL Networking Practice

Check your network:

ip addr

or:

ip a

Check connectivity:

ping google.com

Stop pinging with:

Ctrl + C

Check DNS:

cat /etc/resolv.conf

Check hostname:

hostname

These commands will become important when you study Linux networking.

19. WSL Management Commands

These commands are run from Windows PowerShell/CMD, not necessarily inside Ubuntu.

List installed distributions

wsl --list --verbose

or:

wsl -l -v

Example:

  NAME      STATE       VERSION
* Ubuntu    Running     2

The important part is:

VERSION
   2

You are using WSL 2.

Start WSL

wsl

Start Ubuntu

wsl -d Ubuntu

Shut down WSL

wsl --shutdown

Check status

wsl --status

20. WSL 1 vs WSL 2

Feature

WSL 1

WSL 2

Linux compatibility

Good

Better

Linux kernel

Compatibility layer

Real Linux kernel

System calls

Limited

Much better compatibility

Containers

Limited

Excellent

Docker

Less suitable

Excellent

DevOps

Good

Recommended

For your Docker + DevOps learning:

Use WSL 2.

21. WSL + Docker

Since you're learning Docker, WSL 2 is particularly useful.

A common setup is:

Windows 11
     │
     ├── VS Code
     │
     ├── Docker Desktop
     │
     └── WSL 2
           │
           └── Ubuntu
                 │
                 ├── Linux
                 ├── Git
                 ├── Bash
                 └── Docker

You can therefore learn:

Linux
 ↓
Git
 ↓
Docker
 ↓
Jenkins
 ↓
AWS
 ↓
DevOps

using the same Windows computer.

22. WSL vs AWS EC2

Don't confuse your WSL Ubuntu with your AWS Ubuntu server.

WSL

Your Windows PC
      ↓
     WSL
      ↓
    Ubuntu

AWS EC2

Internet
    ↓
   AWS
    ↓
   EC2
    ↓
 Ubuntu Server

Commands such as:

ls
cd
pwd
mkdir
chmod
chown
grep
find
ps
ip
ssh

can be practiced in both environments.

23. Your WSL Linux Administration Lab

I recommend creating this structure:

~/linux-lab/
│
├── files/
├── users/
├── permissions/
├── processes/
├── services/
├── networking/
├── storage/
├── scripts/
├── logs/
└── projects/

Create it with:

mkdir -p ~/linux-lab/{files,users,permissions,processes,services,networking,storage,scripts,logs,projects}

Then:

cd ~/linux-lab
tree

You'll have a proper Linux practice environment.

24. WSL Troubleshooting Commands

If WSL doesn't start correctly, first check:

wsl --status

Then:

wsl -l -v

You can restart the WSL environment:

wsl --shutdown

Then start Ubuntu again:

wsl -d Ubuntu

If WSL isn't installed

From Administrator PowerShell:

wsl --install

Then restart Windows.

25. Important WSL Learning Checklist

#

Topic

Status

1

Understand WSL

2

Install WSL

3

Install Ubuntu

4

Understand WSL 2

5

Create Linux user

6

Understand sudo

7

Open Ubuntu terminal

8

Learn basic Linux commands

9

Update Ubuntu

10

Install Linux tools

11

Understand / filesystem

12

Access Windows files

13

Access WSL files from Windows

14

Use VS Code with WSL

15

Practice permissions

16

Practice processes

17

Practice networking

18

Learn WSL management commands

19

Integrate WSL with Docker

20

Build Linux administration lab


No comments:

Post a Comment

File System — Complete Beginner Guide

Unlike Windows, where you commonly see drives such as C:\ , D:\ , etc., Linux uses one main directory tree starting from / (root) . Think ...