■ WSL이란?

  • WSL(Windows Subsystem for Linux)은 Windows 운영 체제에서 리눅스 배포판을 실행할 수 있게 해주는 호환 계층.
  • WSL을 통해 사용자는 가상 머신을 사용하지 않고도 리눅스 커널 기반 환경을 Windows 내에서 실행.
  • 개발자가 Windows와 Linux의 장점을 모두 활용할 수 있게 해주며, 특히 개발자 도구, Bash 스크립트 실행, 리눅스 네이티브 애플리케이션 사용 등의 용도로 많이 사용.

ㅁ WSL은 두 가지 주요 버전:

  1. WSL 1: 시스템 호출을 번역하여 리눅스 바이너리를 Windows에서 실행하게 해주는 방식입니다. 파일 시스템 성능이 좋지만 완전한 리눅스 커널을 제공하지는 않습니다.
  2. WSL 2: 실제 리눅스 커널을 가상 머신 내부에서 실행합니다. 이는 더 높은 성능과 더 나은 리눅스 호환성을 제공합니다.

참조 : https://learn.microsoft.com/en-us/windows/wsl/install

 

■ WINDOW 버전 확인

  • Windows 10 Pro 19041 이상이면 가능
  • Alt+x > 시스템 > Windows 사양 > OS 빌드 확인(그림 따기)

 

■ CMD 관리자 권한으로 실행

  • 시작 > '명령 프롬프트' > '관리자 권한으로 실행' 선택

 

■ WSL 설치

C:\windows\system32>wsl --install
설치 중: Ubuntu
Ubuntu이(가) 설치되었습니다.
Ubuntu을(를) 시작하는 중...
Installing, this may take a few minutes...
Please create a default UNIX user account. The username does not need to match your Windows username.
For more information visit: https://aka.ms/wslusers
Enter new UNIX username: da
New password:
Retype new password:
passwd: password updated successfully
Installation successful!
To run a command as administrator (user "root"), use "sudo <command>".
See "man sudo_root" for details.

Welcome to Ubuntu 24.04.1 LTS (GNU/Linux 5.15.153.1-microsoft-standard-WSL2 x86_64)

 * Documentation:  https://help.ubuntu.com
 * Management:     https://landscape.canonical.com
 * Support:        https://ubuntu.com/pro

 System information as of Tue Oct 22 17:59:02 KST 2024

  System load:  0.16                Processes:             36
  Usage of /:   0.1% of 1006.85GB   Users logged in:       0
  Memory usage: 2%                  IPv4 address for eth0: 172.23.251.226
  Swap usage:   0%


This message is shown once a day. To disable it please create the
/home/da/.hushlogin file.
da@mhchoi-PC:~$

 

■ 배포판 정보 확인

da@mhchoi-PC:~$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 24.04.1 LTS
Release:        24.04
Codename:       noble

 

■ Ubuntu 실행

  • 시작 > 'Ubuntu' 클릭

 

■ CMD창에서 Ubuntu 명령 실행하기

 

■ 오류 발생시 Manual 설치

Manual installation steps for older versions of WSL | Microsoft Learn

 

Manual installation steps for older versions of WSL

Step by step instructions to manually install WSL on older versions of Windows, rather than using the wsl install command.

learn.microsoft.com

 

+ Recent posts