Ook wel afgekort als 'WSL'.


Er zijn twee versies:

WSL 1 en WSL 2, WSL 2 is een stuk sneller, klik voor meer inzicht in de verschillen tussen de versies.


linkWebsite

Insert beschrijving


linkFeatures

Linux commando's gebruiken binnen windows.

Snellere Docker containers voor bij development.


linkUseful Commands

The Linux distributions that you install via WSL are best managed using PowerShell or Windows Command Prompt (CMD). See the WSL command reference guide for a list of basic commands to be familiar with when using WSL.


In addition, many commands are interoperable between Windows and Linux.


linkOpen WSL subsystem directory (2e command om het in explorer te openen)

wsl ~
explorer.exe .


linkInstallation

Run in Powershell met admin rechten: (zie documentation)
wsl --install

Installeer Ubuntu LTS uit de Windows App Store

Setup linux username en password

Update en upgrade packages:
sudo apt update && sudo apt upgrade

Restart

Installeer Docker desktop als je die nog niet geinstalleerd hebt.

Open Docker van de taakbalk -> Settings -> General

Select from your installed WSL 2 distributions which you want to enable Docker integration on by going to: Settings > Resources > WSL Integration.


To confirm that Docker has been installed, open a WSL distribution (e.g. Ubuntu) and display the version and build number by entering: docker -v

Test that your installation works correctly by running a simple built-in Docker image using: docker run hello-world

// Installeer git als je dat nog niet hebt
sudo apt-get install git

linkEen SSH key aanmaken

ssh-keygen
cat ~/.ssh/id_rsa.pub

Voeg deze key toe aan Github.


linkSetup the project folders

cd ~
mkdir Projects
cd Projects
git clone URL

Het opslaan van nieuwe projecten doe je vanaf nu onder de Linux file system root directory:
\\wsl$\\home\\Username\\Projects


linkGet started using Visual Studio Code with WSL

Install the VS Code Remote-WSL extension. This extension enables you to open your Linux project running on WSL in VS Code (no need to worry about pathing issues, binary compatibility, or other cross-OS challenges).

Install the VS code Remote-Containers extension. This extension enables you to open your project folder or repo inside of a container, taking advantage of Visual Studio Code's full feature set to do your development work within the container.

Install the VS Code Docker extension. This extension adds the functionality to build, manage, and deploy containerized applications from inside VS Code. (You need the Remote-Container extension to actually use the container as your dev environment.)

Je kunt projecten nu vanuit de map openen met:
code .


linkInstalleer NPM, Yarn & Node.jsmet version manager 'n'

//
sudo apt install npm
sudo apt install nodejs
sudo npm i -g n
sudo n install lts
sudo n use lts


linkInstalleer de coole Windows 🖥️ Terminal


linkSettings die ik heb aangepast



The content above is from a note published by an Amplenote subscriber. As updates to the note are made, they are reflected here in real time.   Learn how to embed notes anywhere keyboard_arrow_right