Commonly used commands related to WSL2
About 160 wordsLess than 1 minute...
Abstract
This article documents commonly used commands related to WLS2.
Command
View all local subsystems
wsl --list --allView all online subsystems
wsl --list --onlineInstall subsystems
wsl --install -d Ubuntu-20.04Start the specified subsystem
wsl -d Ubuntu-20.04Force shutdown subsystem
wsl --terminateExport the specified subsystem
wsl --export Ubuntu-20.04 C:\ubuntu-20.04.tarImport the specified subsystem and specify the directory and name (can be used to customize the subsystem name)
wsl --import CustomWSLName C:\CustomWSLDir C:\ubuntu-20.04.tar --version 2 Powered by Waline v3.3.0