Jedsada Srijunpoe

« Home

Installing Linux for the first time of my life

Hi! In this blog, I will show you how I installed Linux for the first time of my life :D


1. Install WSL

I followed Install Linux on Windows with WSL documentation to install Linux on Windows with WSL

First, I opened Windows Command Prompt with administrator and run this command

wsl --install

install wsl1
install wsl2

This command will download the latest Linux kernel, set WSL 2 as your default, and install a Linux distribution for you (Ubuntu by default) and then I restarted my PC


2. Install ubuntu 22.04

I searched “Ubuntu” in Microsoft Store and downloaded Ubuntu 22.04 LTS because it has 5 stars review :D

install ubuntu1
install ubuntu2

I opened it up and created a default UNIX user account

install ubuntu3
install ubuntu4
install ubuntu5
install ubuntu6


3. Try using Basic WSL2 Commands

I followed this Basic commands for WSL documentation

3.1. Check which version of WSL you are running

wsl -l -v

This command will list your installed Linux distributions

wsl basic command1

Next, I selected Ubuntu-22.04 with this command

wsl -s "Ubuntu-22.04"

wsl basic command2

To terminate the specified distribution use this command

wsl --t "Ubuntu-22.04"

wsl basic command3

3.2. Install a specific Linux distribution

This command will show you a list of the Linux distributions to install

wsl -l -o

wsl basic command4

To install a specific Linux distribution use this command

wsl --install -d <Distro>

I installed Debian

wsl basic command5
wsl basic command6
wsl basic command7

3.3. Unregister or uninstall a Linux distribution

To unregister and uninstall a WSL distribution:

wsl --unregister <DistributionName>

I uninstalled Debian

wsl basic command8


4. Try using Basic Ubuntu Commands

Ubuntu Commands1
Ubuntu Commands1


5. Run Linux GUI apps on the Windows Subsystem for Linux

I followed this documentations

Support for GUI apps on WSL does not provide a full desktop experience. It relies on Windows desktop, so installing desktop-focused tools or apps may not be supported.

5.1. Prerequisites

If you already have WSL installed on your machine, you can update to the latest version that includes Linux GUI support by running the update command from an elevated command prompt.

wsl --update

You will need to restart WSL for the update to take effect.

wsl --shutdown

5.2. Run Linux GUI apps

5.2.1. Update the packages in your distribution

$ sudo apt update

5.2.2. Install Gedit

Gedit is the default text editor of the GNOME desktop environment.

$ sudo apt install gedit -y

gedit1

Run gedit to open Untitled Document text

gedit2
gedit3

You can run gedit <file name> to open or create text file

gedit4
gedit5
gedit6

Open existing file

gedit7
gedit7

5.2.3. Install Nautilus

Nautilus, also known as GNOME Files, is the file manager for the GNOME desktop. (Similar to Windows File Explorer).

$ sudo apt install nautilus -y

nautilus1

To launch, enter: nautilus

nautilus2
nautilus3