Setting-Up WSL for Windows
GridLAB-D™ development can be done on Windows using the Windows Sub-System for Linux (WSL). This creates a Linux OS-like environment running on Windows kernel. This provides full access to all Linux binaries (used in many open-source software projects) which simplifies GridLAB-D™ development.
Installing WSL
Prior to installing the WSL distribution, check that the following specifications are met: - Operating System - Windows 10 or Windows 11. - Software - Windows Subsystem Linux, Ubuntu 22.04. - Permissions - Privileged access to the Linux system as root or using the sudo command. - Command line prompt # means that the commands to be executed with root privileges. - Command line prompt $ means that the commands to be executed without root privileges. - Use the "Turn Windows" features on or off option on the control panel to ensure that the Virtual Machine Platform and the Windows Subsystem for Linux features are turned on. - If changes to the features status are made, the machine will need to be rebooted for the changes to take effect.
To install WSL from the Windows command line
wsl --install Ubuntu-24.04
Follow prompts to finish installation. Close and reopen Terminal. You should now see an Ubunut-24.04 terminal option in your terminal options list. In your Ubuntu terminal update and upgrade the package manager.
sudo apt update
sudo apt upgrade
To install WSL using the Microsoft Store application 1. Open the Microsoft Store application using the start menu 1. Use the search option of the Microsoft Store application to search for Ubuntu 22.04 1. Once found, click on the "Get" button to download the Ubuntu 22.04 software 1. Follow the displayed instructions to complete the installation of Ubuntu 22.04 1. During installation, make sure to note and save the username and password that is entered. For security purposes these should not be the same as your network credentials 1. Once the installation process is complete, Ubuntu 22.04 can be started by clicking on the Ubuntu icon displayed on the start menu
Update PATH variable
TODO Describe how to update the PATH variable for WSL To permenently update the PATH variable for a single user perform the following steps: .1 Open the bashrc for editing using the command nano ~/.bashrc. .1 Enter the command export PATH="$PATH:/your/new/path" replacing "your/new/path" with correct path string. .1 Enter the command source ~/.bashrc. To permenently update the PATH variable for a single user perform the following steps: 1. Open the existing environment path for editing using "sudo nano /etc/environment. 1. Update the environment path string by appending your desired path to the existing path using the command "PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/ usr/bin:/sbin:/bin:/your/new/path"" and replacing "your/new/path" with the desired path string. 1. Restart WSL in PowerShell using the command "wsl --shutdown".