Many users can benefit from the ability to run both Windows and Linux
egy Windows gépen. A Windows alrendszer Linux-hez
(WSL) lehetővé teszi egy Linux disztribúció telepítését (például Ubuntu,
OpenSUSE, Kali, Debian, Arch Linux, etc) and use Linux applications,
segédprogramok és Bash parancssor eszközök közvetlen futtatását Windows-en, módosítás nélkül,
without the overhead of a traditional virtual machine or dual-boot
setup.
Prerequisites:
Mielőtt elkezdenéd, fontos, hogy megbizonyosodjál, a megfelelő verzió fut-e
version of Windows:
Check Windows Version:
A Windows verzió meghatározásához kövesd ezeket a lépéseket:
-
Nyomj meg Windows + R billentyűkombinációt a Futtatás párbeszédpanel megnyitásához.
-
Type winver and press Enter.
-
A window will pop up displaying your Windows version and build
szám. Bizonyosodj meg róla, hogy Windows 10 2004-es vagy újabb verziót futtatsz
(Build 19041 and higher) or Windows 11 to use the commands
below.

Install WSL
You can now install everything you need to run WSL with a single
parancs. Így tudod megtenni:
Step
1. lépés: Nyiss meg egy parancssor ablakot rendszergazda módban
-
Kattints a jobb gombbal a Windows Start gombra.
-
Select Windows Terminal (Admin) or
Parancssor (rendszergazdaként). Ez elengedhetetlen, mert
rendszergazdai jogosultságok szükségesek a telepítéshez.
Step 2: Enter the
Installation Command
A parancssorban vagy Windows Terminalban rendszergazdai jogosultságokkal
enter the following command:
wsl --install --web-download

Change the
Default Linux Distribution
Alapértelmezésben a telepített Linux disztribúció Ubuntu lesz. Azonban
you can change this default distribution using the -d
flag.
A disztribúció megváltoztatásához kövesd ezeket a lépéseket:
-
Nyiss meg egy parancssor ablakot vagy Windows Terminalt.
-
Enter wsl –list –online to see a list of
available Linux distributions for download through the online
store.

- Replace Distribution Name with the name of the
disztribúció, amelyet szeretnél, majd futtasd:
wsl --install -d <Distribution Name>

How to Run a
Linux Distribution with WSL
Once you’ve installed a Linux distribution using Windows Subsystem
Linux-hez (WSL), könnyedén elindíthatod és azonnal nekiláthatsz a munkának. Így csináld:
a Linux disztribúció futtatásához:
Option 1: Start Menu
Search
-
A Windows Start keresősávjában gépeld be a telepített
Linux disztribúció nevét. Például, ha a Ubuntu telepítve van, egyszerűen
type Ubuntu. -
Windows will display your Linux distribution in the search
eredmények. Kattints rá a disztribúció indításához.

Option 2: Command
Line
You can also run your Linux distribution from the command line in
Windows. Here’s how:
-
Nyiss meg egy parancssor ablakot vagy Windows Terminalt.
-
Írd be a telepített disztribúció nevét. Például, ha
have Ubuntu, type ubuntu , majd nyomj meg az Enter billentyűt.

Basic Commands for
WSL
Now that you have WSL installed and have set up your Linux
disztribúciók esetén fontos, hogy megismerkedj néhány alapvető
paranccsal az Linux környezetben való hatékony munkához. Az alábbiakban találsz
some key commands you can use within WSL.
List Installed Linux
Distributions:
To view a list of the Linux distributions installed on your Windows
machine, including their state and WSL version, use:

Set WSL Version:
Az Linux disztribúció WSL verziójának (1 vagy 2) beállításához,
use:
wsl --set-version <distribution name> <versionNumber>

Set Default WSL
Version:
To set a default version of WSL (1 or 2) for new Linux distribution
installations, use:
wsl --set-default-version <Version>

Set Default Linux
Distribution:
Az alapértelmezett Linux disztribúció beállításához a wsl paranccsal,
use:
wsl --set-default <Distribution Name>

Run a Specific Linux
Distribution:
Egy adott Linux disztribúció futtatásához egy adott felhasználóval használd:
wsl --distribution <Distribution Name> --user <User Name>

Removing a
Specific Linux Distribution
If you want to remove a specific Linux distribution from your WSL
setup, follow these steps:
-
Nyiss meg egy parancssor ablakot vagy Windows Terminalt.
-
Run the following command and replace distro
name with the name of the distribution you want to
remove:
wsl --unregister <distro name>

Ez a parancs eltávolítja az adott disztribúciót a WSL-ből,
és törli azt a rendszerről. Fontos megjegyezni, hogy az adott disztribúcióhoz tartozó összes adat, beállítás és
szoftver véglegesen elveszett.
Uninstall WSL from
Your Computer
Ha teljesen el szeretnéd távolítani a WSL-t a számítógépedről, kövesd
these steps:
-
Nyiss meg egy parancssor ablakot vagy Windows Terminalt.
-
Below command will disable the Windows Subsystem for Linux
funkciót a rendszeredről. Miután letiltod, a WSL eltávolításra kerül az
computer.
Disable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux

A WSL segítségével az Windows és Linux integrációja gyors és egyszerű. Az
ensuring you have the right Windows version to executing commands for
Linux disztribúciók telepítése és futtatása során az eljárás
egyértelmű. Ráadásul az Linux disztribúcióid egyszerű WSL parancsokkal
kezelhetők. Ha további információra van szükséged,
támogatásra van szükséged, fordulj bizalommal támogatási csapatunkhoz submitting a
ticket.
Also in Initial Documents
Related guides.
Need help with something else?
Median response time under 1 hour. Real humans, not bots.