Dendi Handian
Posted on February 18, 2023
This post is my journal on trying debian in WSL and playing around with it as starter.
Requirements
- Having WSL (WSL2) activated
Installing Debian WSL
Open Microsoft Store and search for Debian. Get to install and Open after it installed.
It will launch debian program window. Fill the new user and password to use it.
Download Package Information
sudo apt-get update
Checking Debian Version
sudo apt-get install lsb-release
lsb_release -a
Simple Python Server Test in Debian WSL
Installing Python
sudo apt-get install python3
Verifying Python Installation
python3 --version
Starting a Simple Webserver
Here is the command to start a simple web server in python
python3 -m http.server 8000
Open the http://localhost:8000
in your browser to confirm if it accessible.
Installing Pip (For Further Python Development)
sudo apt-get install python3-pip
Browse Files in Visual Studio Code
Install the WSL extension
After it installed, you can click the arrow-like icon at bottom-left of VSCode
And it will open the menu for SSH connections, pick the Connect to WSL using Distro
and choose Debian
It will open a new VS Code window and wait a while for the server connection and then you can browse and manage the files inside the WSL Debian through VS Code.
You can close the connection to the WSL later by clicking the same arrow-like icon and choose close connection
.
Posted on February 18, 2023
Join Our Newsletter. No Spam, Only the good stuff.
Sign up to receive the latest update from our blog.