Windows
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:
--list --online wsl
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):
--install -d <distro> wsl
See example below:
--install -d Ubuntu wsl
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.
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.