Skip to content

leelsey/set4wsl

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Set4wsl

Easily configure your WSL environment.

I. Install WSL

Before you start it, RUN Terminal(CMD/POWERSHELL) as ADMINISTRATOR.

1. Powershell Security Bypass

Set-ExecutionPolicy -Scope Process -ExecutionPolicy Bypass

2. Setup WSL

Setup WSL on Windows. Run this and restart Windows.

Option A

Download Set4wsl and run the PowerShell script.

.\enable_wsl.ps1
Option B

If can't donwload, try manually.

dism /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart
dism /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart

3. Use WSL2

If not Windows 11 or Windows 10 2004 and higher, follow this and setup WSL2.

Option A

Download Set4wsl and run the PowerShell script.

.\set_wsl.ps1
Option B

If can't donwload, try manually.

curl -L -o \wsl_update_x64.msi https://wslstorestorage.blob.core.windows.net/wslblob/wsl_update_x64.msi
.\wsl_update_x64.msi /quiet
Remove-Item .\wsl_update_x64.msi
wsl --set-default-version 2

II. Install Linux

1. Update WSL

Update WSL on Windows.

wsl --update

2. Download Linux

Install Default(Ubuntu) via WSL.

wsl --install
# or use this: wsl --install ubuntu 

Install Alterantive(Debian/Kali) via WSL.

wsl --install debian
# or
wsl --install kali-linux

III. Configure WSL

Run this script on Windows for configure WSL. Before run this, you need minimum 3GB storage space.

.\config_wsl.ps1

IV. Use WSL GUI

This all command use on Linux.

1. Update Linux

Update and upgrade Linux.

sudo apt update && sudo apt -y upgrade

2. WSLg

Then install gui application.

sudo apt install -y [AppName]
# e.g. sudo apt install -y epiphany-browser

Run GUI application.

[AppName] &
# e.g. epiphany-browser &

3. Win-Kex

If you use Kali Linux, try Win-Kex with seamless mode.

sudo apt install -y kali-win-kex

1) Window Mode

Start

Use Win-Kex Window Mode.

kex --win
Stop

Stop Win-Kex Window Mode.

kex --win --stop

2) Seamless Mode

Start

Use Win-Kex Seamless Mode.

kex --sl
Stop

Stop Win-Kex Seamless Mode.

kex --sl --stop

3) Useful Command

Turn on Kali Linux sound.

kex --win --sound

V. Work Environment

1. Kali Linux

Setup Kali Environment

1) Upgrade for Kali

Update all packages

sudo apt update && sudo apt full-upgrade -y

2) Metapackages

Default Packages

Setup to install default Kali tools

sudo apt install -y kali-linux-default
Full Packages

Setup to install all Kali tools

sudo apt install -y kali-linux-everything