A WSL segítségével használhatunk bizonyos Linux-disztrókat Windows 10 alatt: Ubuntu, Debian, Kali, openSUSE Leap.
Először is telepítsük a Windows Terminal nevű progit az MS Store-ból (szabad szoftver és a Microsofté), mert az alapértelmezett terminál csúnya és használhatatlan.
Következő lépésben tegyük lehetővé a WSL működését. Keressünk rá a Start menüben és indítsuk el ezt: Turn Windows features on or off. Kapcsoljuk be ezeket: Virtual Machine Platform és Windows Subsystem for Linux. Újra kell indítani a gépet.
Ezután indítsuk el adminisztrátorként a Terminált, és telepítsük a Debiant (szabad szoftver, természetesen):
# wsl --set-default-version 2
# wsl --list --online
# wsl --install -d Debian
Ha befejeződött a telepítés, megadtuk a felhasználónevünk és jelszavunk (sudo user), akkor Windows oldalról készen vagyunk. A 2017-es Debian Stretch persze upgrade-re szorul, de néhány perc alatt azon is túleshetünk (ez már apt
).
A Terminal beállításai
Startup > Default profile
: kiválaszthatjuk a Debiant, így azzal indul a Terminal.Profiles/Debian > Additional settings/Appearance
:Text/Color scheme
: a Tango Dark jobb a defaultnál.Text/Font size
: valószínűleg növelni akarjuk.Transparency/Background opacity
: opcionális, 95% nem zavaró.Window/Padding
: opcionális, képernyőfüggő.
Profiles/Debian > Additional settings/Advanced
:Text antialiasing
: a ClearType jobb a defaultnál.Profile termination behavior
: close only when process exits successfully – tehát actrl+d
bezárja.Bell notification style
: nem szeretem a csilingelést.
VS Code
Ezt a kiterjesztést kell telepíteni: Remote Development extension pack. Ezután vagy WSL-ből indítjuk (code .
), vagy átváltunk WSL-módba (ctrl+shift+p
wsl new window). Lásd: Get started using Visual Studio Code with Windows Subsystem for Linux.
The WSL extension splits VS Code into a “client-server” architecture, with the client (the user interface) running on your Windows machine and the server (your code, Git, plugins, etc) running “remotely” in your WSL distribution. When running the WSL extension, selecting the Extensions tab will display a list of extensions split between your local machine and your WSL distribution. Installing a local extension, like a theme, only needs to be installed once. Some extensions, like the Python extension or anything that handles things like linting or debugging, must be installed separately on each WSL distribution.