WSL 2์— Kali Linux์˜ Win-KeX ๋ฐ์Šคํฌํƒ‘์„ ์„ค์น˜ํ•˜๋Š” ๋ฐฉ๋ฒ•

2020. 8. 25. 02:14ใ†๋ฆฌ๋ˆ…์Šค

์ง€๋‚œ์ฃผ ์ฏค์— Kali Linux 2020.3์ด ๋‹ค์šด๋กœ๋“œ๋ฅผ ์œ„ํ•ด ์ถœ์‹œ๋˜์—ˆ์Šต๋‹ˆ๋‹ค. ์ƒˆ ์—…๋ฐ์ดํŠธ๋Š” ๋งŽ์€ ์ƒˆ๋กœ์šด ๊ธฐ๋Šฅ์„ ๋„์ž…ํ–ˆ์ง€๋งŒ Linux ์šฉ Windows ํ•˜์œ„ ์‹œ์Šคํ…œ (WSL) 2์™€ ํ•จ๊ป˜ ์‚ฌ์šฉํ•  ์ˆ˜ ์žˆ๋Š” GUI์ธ Windows + Kali Desktop EXperience (Win-KeX)์— ์ดˆ์ ์„ ๋งž์ถ”๊ณ  ์‹ถ์Šต๋‹ˆ๋‹ค.

์‹œ์ž‘ํ•˜๋ ค๋ฉด Windows 10 ๋ฒ„์ „ 2004๋กœ ์—…๋ฐ์ดํŠธํ•ด์•ผ ํ•ฉ๋‹ˆ๋‹ค. ์ด ๋ฒ„์ „์„ ์‹คํ–‰์ค‘์ธ ๊ฒฝ์šฐ ๋‹ค์Œ์— WSL 2์— Kali Linux๋ฅผ ์„ค์น˜ํ•ด์•ผ ํ•ฉ๋‹ˆ๋‹ค.

Kali Linux ์„ค๋ช…์„œ์— ๋”ฐ๋ฅด๋ฉด ๋จผ์ € PowerShell์„ ๊ด€๋ฆฌ์ž๋กœ ์—ด๊ณ 

Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux

๋ฅผ ์‹คํ–‰ํ•œ ๋‹ค์Œ ๋‹ค์‹œ ์‹œ์ž‘ํ•ด์•ผ ํ•ฉ๋‹ˆ๋‹ค.

 

๊ทธ๋Ÿฐ ๋‹ค์Œ ๊ด€๋ฆฌ์ž๋กœ PowerShell์„ ๋‹ค์‹œ ์—ด๊ณ 

dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart ๋ฐ

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

๋ฅผ ์‹คํ–‰ํ•˜๊ณ  ๋‹ค์‹œ ์‹œ์ž‘ํ•ฉ๋‹ˆ๋‹ค.

๋‹ค์Œ์œผ๋กœ WSL 2 Linux ์ปค๋„์„ ๋‹ค์šด๋กœ๋“œํ•ด์•ผ ํ•ฉ๋‹ˆ๋‹ค. ์„ค์น˜ํ•œ ํ›„ PowerShell์„ ๊ด€๋ฆฌ์ž ๊ถŒํ•œ์œผ๋กœ ๋‹ค์‹œ ์—ด๊ณ 

wsl --set-default-version 2๋ฅผ ์‹คํ–‰ํ•ฉ๋‹ˆ๋‹ค.

๋ชจ๋“  ์ž‘์—…์ด ์™„๋ฃŒ๋˜๋ฉด Microsoft ์Šคํ† ์–ด๋กœ ์ด๋™ํ•˜์—ฌ Kali Linux๋ฅผ ์„ค์น˜ํ•ฉ๋‹ˆ๋‹ค.

WSL 1์— Kali Linux๊ฐ€ ์„ค์น˜๋˜์–ด์žˆ๋Š” ๊ฒฝ์šฐ ๊ณ„์†ํ•˜๊ธฐ ์ „์— ์—…๊ทธ๋ ˆ์ด๋“œํ•ด์•ผํ•ฉ๋‹ˆ๋‹ค.

wsl --set-version kali-linux 2๋ฅผ ์‹คํ–‰ํ•œ ๋‹ค์Œ WSL์—์„œ Kali Linux๋ฅผ ์—ด์–ด ์„ค์ •์„ ์™„๋ฃŒํ•ฉ๋‹ˆ๋‹ค.

์ด ์‹œ์ ์—์„œ Kali Linux๋ฅผ WSL 2์—์„œ ์‹คํ–‰ํ•˜๊ณ  Win-KeX๋ฅผ ์‹คํ–‰ํ•˜๋ ค๋ฉด Kali Linux ์„ค์น˜ ๋‚ด์—์„œ sudo apt update && sudo apt install kali-win-kex

๋ฅผ ์‹คํ–‰ํ•ด์•ผ ํ•ฉ๋‹ˆ๋‹ค.

์„ค์น˜๊ฐ€ ์™„๋ฃŒ๋˜๋ฉด kex๋ฅผ ์ž…๋ ฅํ•˜์—ฌ Win-KeX ์ธํ„ฐํŽ˜์ด์Šค๋ฅผ ์‹คํ–‰ํ•ฉ๋‹ˆ๋‹ค.

Kali Linux ๋ฌธ์„œ์—๋Š” ์„ค์น˜๋ฅผ ์ถ”๊ฐ€๋กœ ์‚ฌ์šฉ์ž ์ •์˜ํ•˜๊ธฐ ์œ„ํ•ด ์‹คํ–‰ํ•  ์ˆ˜์žˆ๋Š” ๋ช‡ ๊ฐ€์ง€ ์ถ”๊ฐ€ ๋ช…๋ น๋„ ํฌํ•จ๋˜์–ด ์žˆ๋Š”๋ฐ ์ด ์„ค๋ช…์„œ๋ฅผ ์ฐธ์กฐํ•ฉ๋‹ˆ๋‹ค.

 

๋ฐ˜์‘ํ˜•