윈도우에 우분투 WSL2 설치하기

윈도우에서 WSL2 ( Windows Subsystem for Linux ) 를 설치하는 방법. WSL 설치 전 윈도우 터미널 설치 권장.

Windows 10 버전 2004 이상(빌드 19041 이상) 또는 Windows 11

설치

wsl --install

우분투로 설치

설치 중: 가상 머신 플랫폼
가상 머신 플랫폼이(가) 설치되었습니다.
설치 중: Linux용 Windows 하위 시스템
Linux용 Windows 하위 시스템이(가) 설치되었습니다.
설치 중: Ubuntu
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:
.
.
.
Enter new UNIX username: nasoru
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 22.04.2 LTS (GNU/Linux 5.15.90.1-microsoft-standard-WSL2 x86_64)

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


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

사용자 이름과 비밀번호를 입력하면 우분투 설치가 완료된다.

추가 설정

ubuntu config --default-user root

WSL에서 root 계정을 기본으로 접속하려면 powershell 또는 cmd를 열고 입력한다.

WSL2 네트워크 연결 에러 해결 방법 | nasoru

댓글 0개