the windows subsystem for linux runs an integrated, fast, and small version of gnu/linux alongside windows 10.
sudo
is). unless otherwise specified, bash
code blocks are terminal commands to be entered one by one.<this>
(between a <
and >
), it means you need to replace it with your own input. e.g. <font>
might need to become Ubuntu Mono
./path/to/file
, you need to edit the file and then re-source it. accompanying code blocks contain the insert and if necessary detail where to add it. the recommended way of doing this with a .sh
or .fish
file is via nano <filename>
(edits) source <filename>
.the original implementation. it lacks certain system calls, but has better performance with the normal windows filesystem. windows files can be found in /mnt/c
. it’s recommended to soft link to your regularly used folders, e.g
ln -s "/mnt/c/Users/<win10-username>/OneDrive" ~/onedrive
a new architecture that uses virtualisation and a full linux kernel to fully support system calls and other parts of the environment (without the speed loss that might be expected). this is recommended for all situations except for when win10 files need to be accessed, e.g. on a laptop with a small amount of storage space that shares files between systems.
wsl drives can be accessed in explorer by going to \\\\wsl$
.
<aside> 💡 for a more detailed comparison, read https://docs.microsoft.com/en-us/windows/wsl/compare-versions
</aside>
<aside>
🪟 windows 11: open powershell and run wsl --install
, then restart your computer and skip to step #5.
</aside>
open powershell as admin and run:
dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart
optional: enable wsl v2 (this will require SVM to be enabled in the BIOS/UEFI).
reboot computer.
download ubuntu from the microsoft store.
open the ubuntu app. it will complete installation of itself, and prompt you to create a user & password. (this password is what you will need to put in when running a command with sudo
).
to ensure everything is as up-to-date as possible, run:
sudo apt update -y && sudo apt upgrade -y
install missing packages commonly used:
sudo apt install -y build-essential software-properties-common unzip pwgen git