Windows

Published

2025-06-25

Caution

This section is being reviewed. Thank you for your patience.

Windows Subsystem for Linux (WSL) allows you to run Linux on your Windows computer without a virtual machine or dual-booting. You can use Linux command-line tools and applications alongside your Windows programs.

Install

Open Windows PowerShell as Administrator and run the following commands:

wsl install 

To view a list of available linux distributions (distro), run the following:

wsl --list --online

Pick the distro you’d like to install (i.e., Ubuntu, Debian, Fedora, openSUSE, etc.) and install it using (replacing <distro> with the name of the distribution):

wsl --install -d <distro>

See example below:

wsl --install -d Ubuntu

Configure

A Linux terminal looks like a text window with a prompt, something like:

john@LAPTOP:~$
  • john is your Linux user name.
  • LAPTOP is your computer’s name.
  • ~ means you’re in your “home” folder (your personal space).
  • After the dollar sign ($), you type commands.

Keeping Linux Updated

Linux uses a package manager to install and update software.

On Ubuntu or Debian:

sudo apt update

This asks Windows for your Linux password (sudo means run as administrator).

After updating apt, download and install any available updates:

sudo apt upgrade

Run these commands every few weeks to keep things fresh and secure.

Sharing Files

One of WSL’s coolest features is file sharing:

Windows → Linux

Your Windows drives are mounted under /mnt. For example, your C: drive is at /mnt/c. So if you want to work on a file stored in Windows’ Documents folder, you might type:

cd /mnt/c/Users/YourName/Documents
ls

Linux → Windows

You can save files in your Linux home (~/), then open them in Windows by navigating in File Explorer to:

\\wsl$\Ubuntu\home\john

(Replace Ubuntu and john with your distribution name and user name.)

Customizing Shell

If you’re spending a lot of time in the terminal, it’s nice to customize it to your liking. Below are some examples:

Change the prompt color

Edit a file called .bashrc. In your terminal, type:

nano ~/.bashrc

Scroll to the bottom and add a line like:

PS1="\[\e[32m\]\u@\h:\w\$ \[\e[0m\]"

Press Ctrl+O to save, Enter to confirm, then Ctrl+X to exit. Finally, reload with:

source ~/.bashrc

Auto-update on launch

In the same file (~/.bashrc), you could add:

sudo apt update && sudo apt upgrade -y

Now every time you open your terminal, it checks for updates.

Recap

Linux can feel a bit mysterious if we’re used to clicking icons in Windows. WSL lets you run a “real” Linux command line inside Windows, without setting up a separate computer or virtual machine. WSL allows us to use Linux tools from the same computer we’re already using.

WSL is fast, lightweight, and it integrates quickly with Windows files and applications.