Read the deployment acceptance checklist and run the read-only preflight on an extracted local package. Live hardware and cloud services require separate acceptance.
Learn navigation, file operations, Python execution, services and Windows WSL management. Includes an interactive practice terminal and Dr. Mohammad command explanations.
Open Start, search for PowerShell, right-click and choose Run as administrator. First check the distributions. If Ubuntu-24.04 is already listed, skip the install command. Otherwise run the second command. Restart Windows if asked.
Windows PowerShell
wsl-l-v
✓ Expected: A table of installed distributions, STATE and VERSION appears. Verify the intended distribution is listed with VERSION 2.
Windows PowerShell · administrator (only if missing)
wsl--install-dUbuntu-24.04
✓ Expected: Installation completes or Windows requests a restart. On first launch create your Linux username and password; the prompt resembles username@PC:~$. Verify the distribution with wsl -l -v (VERSION 2). WSL is a Linux environment, not a physical Raspberry Pi.
Checkpoint Ubuntu-24.04 appears in wsl -l -v with VERSION 2.
02
Open Ubuntu and create your Linux account
Run this in Windows PowerShell. On the first launch, choose a Linux username and password. Password characters are invisible while typing. The Linux password is used by sudo.
Windows PowerShell
wsl-dUbuntu-24.04
✓ Expected: The selected Linux shell opens; on first launch complete account creation. The prompt ends in $. No physical board is connected by this command.
In Ubuntu, run the following command. If it prints systemd, proceed directly to the next step. If it does not, use the separate recovery box under Troubleshooting at the bottom.
Ubuntu WSL · Bash
ps -p1-ocomm=
✓ Expected: systemd should be printed for the service-based workflow.
Checkpoint Output: systemd.
04
Install Visual Studio Code
On Windows, open the VS Code download page. Download the Windows User Installer, run it, accept the defaults and select Add to PATH if offered. Open VS Code. If it is already installed, skip installation.
Checkpoint VS Code opens on Windows.
05
Install the Windows VS Code extensions
In VS Code press Ctrl+Shift+X. Search for each extension by its exact name: WSL (Microsoft), PlatformIO IDE (PlatformIO), and Wokwi Simulator (Wokwi). Click Install for each. Keep this window local (not connected to WSL). Wokwi requires license activation; see Part E. Python is installed in the remote WSL window in Part D.
Checkpoint All three Windows extensions appear as installed.
B · Copy the toolkit into Ubuntu
No Linux path to type. No Windows username to replace. No unzip script. Use the already extracted psut-wsl folder from the full website package.
06
Locate the extracted website folder
In Windows File Explorer, right-click the downloaded complete website ZIP and select Extract All. Open the extracted folder. You will see index.html, START_WEBSITE.cmd, assets, labs and a folder named psut-wsl. Select only the psut-wsl folder and press Ctrl+C.
Checkpoint The psut-wsl folder contains setup_wsl.sh, requirements.txt, fakepi, labs, tools and wokwi.
07
Open the Linux home folder in File Explorer
Return to the Ubuntu terminal. Run the two commands below. Windows File Explorer opens your Linux home directory. If psut-wsl already exists there, do not paste over it: use the optional upgrade instructions below, or keep your existing working Version 4–6 toolkit and skip the paste operation in the next step.
Ubuntu WSL · Bash
cd ~
explorer.exe .
✓ Expected: Windows File Explorer opens the current Linux folder; no terminal output is normally required.Expected result for each action (2)
cd ~Normally no output. pwd should show the requested directory. A missing path produces an error; do not continue until corrected.
explorer.exe .Windows File Explorer opens the current Linux folder; no terminal output is normally required.
Checkpoint Explorer opens the Ubuntu home folder, not the Windows Downloads folder.
Only if an old psut-wsl folder is present: preserve it before replacing
Stop running lab programs, close VS Code windows using the old folder and open a fresh Ubuntu terminal. Run the command only if you want to replace the toolkit. It renames the old directory, including its code, virtual environment and local files; it does not erase databases or credentials in ~/.config/psut-wsl. The old venv must not be used from its renamed path.
✓ Expected: Normally silent; the original path is moved to the destination. Check that the backup exists before continuing.
Return to Explorer and refresh. Continue with the next step.
08
Paste and verify the toolkit
For a new installation, in the Linux home Explorer window, press Ctrl+V to paste the folder copied in the first step. If you are keeping an existing working toolkit, skip the paste and just run the verification command. Return to Ubuntu and list its contents. Do not copy the whole website into the toolkit folder.
Ubuntu WSL · Bash
ls ~/psut-wsl
✓ Expected: The toolkit directory listing includes setup_wsl.sh, labs, tools and wokwi.
Checkpoint The output includes setup_wsl.sh, requirements.txt, fakepi, labs, tools and wokwi.
Alternative: if you downloaded only the toolkit ZIP
Download psut_wsl_toolkit_fixed.zip in Windows. Copy this ZIP with Ctrl+C. Run cd ~ and explorer.exe . in Ubuntu, then paste the ZIP into that Linux home window. Ensure no existing psut-wsl directory is present before extracting. Run:
Ubuntu WSL · Bash
cd ~
python3-m zipfile -e psut_wsl_toolkit_fixed.zip .
ls ~/psut-wsl
✓ Expected: The toolkit directory listing includes setup_wsl.sh, labs, tools and wokwi.Expected result for each action (3)
cd ~Normally no output. pwd should show the requested directory. A missing path produces an error; do not continue until corrected.
python3-m zipfile -e psut_wsl_toolkit_fixed.zip .The archive is extracted into the requested directory; the prompt returns. Verify the expected toolkit files.
ls ~/psut-wslThe toolkit directory listing includes setup_wsl.sh, labs, tools and wokwi.
Ubuntu 24.04 normally includes python3. If missing, run sudo apt update then sudo apt install -y python3.
C · Install Python and all IoT tools
Recommended: install everything using one command. This is the actual installation, not the file-copy step. Internet access and your Linux sudo password are required. No Windows administrator terminal is needed.
09
Run the complete installer
Run the following command in Ubuntu. It installs the base packages, creates the Python virtual environment, installs the required Python libraries and configures the IoT services. Enter your Linux password when sudo asks; wait until the shell prompt returns. If Node-RED installer requests confirmation, read the prompt. Do not close the terminal during installation.
Ubuntu WSL · Bash
bash ~/psut-wsl/setup_wsl.sh --all
✓ Expected: The installer completes and returns to the prompt. Verify the selected services and run the toolkit self-test; package logs may vary.
Checkpoint Final line begins Done. If an error appears, stop and use the first error to diagnose; do not treat a partial installation as success.
What exactly gets installed?
Tool
Installed in
Purpose / check
Python 3, venv, pip
Ubuntu + toolkit .venv
Run Python; gpiozero, paho-mqtt, h5py, pyserial, requests, mysql-connector-python, influxdb-client, Pillow
Fake Pi
Toolkit fakepi/
GPIO, DHT22, OLED simulation
Mosquitto + clients
Ubuntu
MQTT broker 127.0.0.1:1884
MariaDB
Ubuntu
SQL database, practical 11
Node.js 24 / Node-RED / FlowFuse Dashboard 2.0
Ubuntu
Browser editor :1880 and dashboards
InfluxDB 2
Ubuntu
Time-series storage :8086
Telegraf
Ubuntu
MQTT ingestion; started per Lab P43
Grafana
Ubuntu
Charts :3000
SSH, socat, netcat, curl, tree, Thonny
Ubuntu
Supporting tools for Linux/serial/network labs
HiveMQ and ThingSpeak
Online services
No local server installation; configure in the browser
Alternative: install tools in smaller groups, or retry a failed group
Use this instead of --all if you prefer to install incrementally. Run each line separately. All optional switches include the base installation; the script reuses the existing venv. Stop on any error.
Base: Python, Fake Pi, Mosquitto, MariaDB and support tools
Ubuntu WSL · Bash
bash ~/psut-wsl/setup_wsl.sh
✓ Expected: The installer completes and returns to the prompt. Verify the selected services and run the toolkit self-test; package logs may vary.
Node-RED + dashboard
Ubuntu WSL · Bash
bash ~/psut-wsl/setup_wsl.sh --nodered
✓ Expected: The installer completes and returns to the prompt. Verify the selected services and run the toolkit self-test; package logs may vary.
InfluxDB 2 + Telegraf
Ubuntu WSL · Bash
bash ~/psut-wsl/setup_wsl.sh --influx
✓ Expected: The installer completes and returns to the prompt. Verify the selected services and run the toolkit self-test; package logs may vary.
Grafana
Ubuntu WSL · Bash
bash ~/psut-wsl/setup_wsl.sh --grafana
✓ Expected: The installer completes and returns to the prompt. Verify the selected services and run the toolkit self-test; package logs may vary.
All four groups together are equivalent to --all. Do not run both routes unless recovering or adding a missing tool.
D · Verify and open the Python workspace
10
Activate Python
Run the following in Ubuntu. Repeat the source command in every new terminal, including the VS Code terminal. This selects the venv and enables the fake Raspberry Pi.
Ubuntu WSL · Bash
source ~/psut-wsl/activate.sh
which pythonpython--versionpython-mpip check
✓ Expected: No broken requirements found. Resolve any reported conflicts before continuing.Expected result for each action (4)
source ~/psut-wsl/activate.shThe toolkit virtual environment is selected in this terminal, usually with (.venv) in the prompt. Verify which python points into ~/psut-wsl/.venv.
which pythonThe interpreter path ends in /psut-wsl/.venv/bin/python when the toolkit is active.
python--versionThe installed version is printed. For this toolkit InfluxDB must be 2.x; version numbers otherwise depend on installation.
python-mpip checkNo broken requirements found. Resolve any reported conflicts before continuing.
Checkpoint Prompt starts with (.venv); which python ends in /psut-wsl/.venv/bin/python.
11
Run the toolkit self-test
This tests Python imports, simulated GPIO, DHT22, local MQTT on port 1884, MariaDB and optional service reachability. It may ask for your sudo password.
Ubuntu WSL · Bash
bash ~/psut-wsl/tools/selftest.sh
✓ Expected: The toolkit reports checks for the installed components. Review any FAIL or unavailable optional service before continuing.
Checkpoint Core failures: 0; optional InfluxDB, Grafana and Node-RED reachable after a complete installation.
12
Check each installed service
These commands check installed tool versions and service status. Telegraf is deliberately not started as a system service; Lab P43 starts its own instance.
✓ Expected: A listening TCP socket for port 1884 should appear if the local MQTT broker is running.Expected result for each action (2)
systemctl is-active mosquitto mariadb nodered influxdb grafana-serverAn active line is expected for each required running service; inactive/failed requires investigation.
ss-ltn|grep :1884A listening TCP socket for port 1884 should appear if the local MQTT broker is running.
Ubuntu WSL · Bash
node--version
influxd version
telegraf version
✓ Expected: The installed version is printed. For this toolkit InfluxDB must be 2.x; version numbers otherwise depend on installation.Expected result for each action (3)
node--versionThe installed version is printed. For this toolkit InfluxDB must be 2.x; version numbers otherwise depend on installation.
influxd versionThe installed version is printed. For this toolkit InfluxDB must be 2.x; version numbers otherwise depend on installation.
telegraf versionThe installed version is printed. For this toolkit InfluxDB must be 2.x; version numbers otherwise depend on installation.
Checkpoint Mosquitto, MariaDB, Node-RED, InfluxDB and Grafana each report active; port 1884 is listening; each version command returns a version.
13
Open the WSL Python workspace
Run these commands in Ubuntu. VS Code opens a remote window. If prompted, allow VS Code Server installation. In that window press Ctrl+Shift+X, search Python (Microsoft), and click Install in WSL: Ubuntu-24.04. Press Ctrl+Shift+P → Python: Select Interpreter and select the .venv interpreter inside your opened folder (use Enter interpreter path and browse to .venv/bin/python if necessary).
Ubuntu WSL · Bash
cd ~/psut-wsl
code .
✓ Expected: VS Code opens the current directory; confirm the WSL remote indicator for Linux projects.Expected result for each action (2)
cd ~/psut-wslNormally no output. pwd should show the requested directory. A missing path produces an error; do not continue until corrected.
code .VS Code opens the current directory; confirm the WSL remote indicator for Linux projects.
Checkpoint Bottom-left shows WSL: Ubuntu-24.04; Python interpreter is the toolkit venv.
14
Run your first Python experiment
In the remote VS Code window select Terminal → New Terminal. Run these commands in that terminal. Stop the blinking program with Ctrl+C.
Ubuntu WSL · Bash
source ~/psut-wsl/activate.sh
cd ~/psut-wsl/labs/python/lab29
python blink_gpiozero.py
✓ Expected: The fake GPIO17 output alternates HIGH/LOW every 0.5 seconds. Press Ctrl+C to stop.Expected result for each action (3)
source ~/psut-wsl/activate.shThe toolkit virtual environment is selected in this terminal, usually with (.venv) in the prompt. Verify which python points into ~/psut-wsl/.venv.
cd ~/psut-wsl/labs/python/lab29Normally no output. pwd should show the requested directory. A missing path produces an error; do not continue until corrected.
python blink_gpiozero.pyThe fake GPIO17 output alternates HIGH/LOW every 0.5 seconds. Press Ctrl+C to stop.
Checkpoint The terminal reports GPIO17 changing between HIGH and LOW; the fake Pi is working.
E · Set up Wokwi in Windows VS Code
15
Activate Wokwi
Open a separate, local VS Code window using File → New Window. Press Ctrl+Shift+P, search Wokwi: Request a new License and follow the browser instructions. Availability and license terms depend on the Wokwi account. See Wokwi’s activation guide.
Checkpoint Wokwi reports a valid license in VS Code.
16
Build the first Wokwi project
In the local Windows VS Code window use File → Open Folder. Browse to the extracted website folder → psut-wsl → wokwi → uno-blink. Trust the workspace if you trust the supplied source. Wait for PlatformIO to initialize; click its Build checkmark in the bottom status bar (or Ctrl+Shift+P → PlatformIO: Build).
Checkpoint Build succeeds; .pio/build/uno/firmware.hex is created.
17
Start the simulator
Open diagram.json. Press Ctrl+Shift+P → Wokwi: Start Simulator. The project already contains its wiring, firmware code and wokwi.toml.
Checkpoint The Arduino LED blinks in Wokwi. This is actual firmware simulation, separate from the website models.
18
Verify the local MQTT route before using ESP32
Keep Ubuntu running. In Windows PowerShell check port 1884. If the result is False, do not change random network settings: use the troubleshooting section below. Then follow the MQTT center for matching broker configuration and Lab P43 for the ESP32 project.
Windows PowerShell
Test-NetConnectionlocalhost-Port1884
✓ Expected: Look for TcpTestSucceeded : True for the specified port. This proves TCP reachability only.
Checkpoint TcpTestSucceeded : True. This tests Windows reachability, not MQTT message delivery or Wokwi’s gateway.
F · Configure and use each service
Installation is finished. The following centers configure the installed tools for specific labs. You do not need to install them again when already working.
Mosquitto + HiveMQ + Node-RED
Local port 1884; public HiveMQ port 1883. Generate broker profiles, import the flow and test with Python.
These links work only when the corresponding service runs in WSL. Dashboards need configuration before they show readings.
Troubleshooting · only if a checkpoint fails
systemd is not PID 1
In Ubuntu run sudo nano /etc/wsl.conf. Add [boot] and systemd=true (if [boot] already exists, add the setting below it; preserve other settings). Save Ctrl+O, Enter, then Ctrl+X. Save all work in other WSL distributions first. In Windows PowerShell run wsl --shutdown, then wsl -d Ubuntu-24.04. Repeat the systemd check.
✓ Expected:
sudo nano /etc/wsl.conf — Nano opens the configuration file; saving preserves the requested systemd setting.
wsl --shutdown — All WSL distributions stop; usually no output. Save work first.
Read the first error. Run sudo apt update to check repository access; if it succeeds, retry only the affected installer group from Part C. Do not skip package-signature verification. If Node-RED is missing, use --nodered. If Grafana is missing, use --grafana. If InfluxDB or Telegraf is missing, use --influx.
✓ Expected:
sudo apt update — Repository metadata refreshes without errors; retry the appropriate installer only after this succeeds.
Windows cannot reach MQTT or RFC2217
In Ubuntu run sudo systemctl restart mosquitto, then ss -ltn | grep :1884. Repeat the Windows connection test. On supported Windows 11, mirrored networking may help. Edit the existing %USERPROFILE%\.wslconfig in Windows (preserve settings), add networkingMode=mirrored under [wsl2], save, then run wsl --shutdown in PowerShell after saving all work and reopen Ubuntu. Wokwi local networking may require its private gateway. On NAT systems use the virtual serial fallback in P35–36 if RFC2217 is inaccessible. Do not expose anonymous MQTT to the Internet.
✓ Expected:
sudo systemctl restart mosquitto — Normally silent on success; systemctl is-active mosquitto should report active.
ss -ltn | grep :1884 — The listener on port 1884 is listed if the broker is running.
wsl --shutdown — WSL stops; reopen Ubuntu to load the revised configuration and recheck connectivity.