본문 바로가기

백엔드

WSL 설치하기

반응형

WSL(Window Subsystem for Linux)는 버츄얼 머신 플랫폼으로 윈도에서 리눅스 애플리케이션을 사용하게 해 줍니다.

설치하기

설치기본 사양은 window 10 / 64bit 이상이어야 합니다. 해당 정보는 'system information'에서 가능합니다.

 

윈도 검색창을 열고 'powershell'을 엽니다.

열린 커맨드 창에서 아래 명령어를 실행합니다.

wsl --install

설치가 완료되면 컴퓨터를 껐다 켭니다. 다시 윈도 검색창을 열고 wsl설치 시 자동으로 설치되는 우분투를 엽니다.  먼저, 사용자 생성을 위해 유저이름을 입력하고

비밀번호를 입력합니다. 비밀번호는 입력하더라도 화면에 뜨지 않으니 신경 써서 입력합니다. 

버전확인

설치가 완료되면 파워 쉘이나 CLI에서 아래 명령어를 통해 사용 중인 리눅스 애플리케이션의 버전을 확인 가능합니다.

wsl -l -v


비밀번호 리셋

비밀번호를 까먹은 경우 파워 쉘이나 CLI에서 아래 명령어로 새로 설정이 가능합니다.

wsl -u root
passwd <username>


개발환경 설치하기

visual studio code설치

 

Visual Studio Code - Code Editing. Redefined

Visual Studio Code is a code editor redefined and optimized for building and debugging modern web and cloud applications.  Visual Studio Code is free and available on your favorite platform - Linux, macOS, and Windows.

code.visualstudio.com

비주얼 스튜디오 코드 설치 후 익스텐션을 열고 아래 익스텐션 패키지를 설치합니다.

Remote development


※ 익스텐션 패키지가 부담스럽다면 아래 익스텐션만 설치하여도 VS Code의 터미널을 통해 설치된 WSL의 사용이 가능합니다.

wsl


이상으로 윈도에서 WSL을 설치하는 방법을 보았습니다.


참고

Install WSL | Microsoft Learn

 

Install WSL

Install Windows Subsystem for Linux with the command, wsl --install. Use a Bash terminal on your Windows machine run by your preferred Linux distribution - Ubuntu, Debian, SUSE, Kali, Fedora, Pengwin, Alpine, and more are available.

learn.microsoft.com

Set up a WSL development environment | Microsoft Learn

 

Set up a WSL development environment

Set up a WSL development environment using best practices from this set-by-step guide. Learn how to run Ubuntu, Visual Studio Code or Visual Studio, Git, Windows Credential Manager, MongoDB, MySQL, Docker remote containers and more.

learn.microsoft.com

Get started using VS Code with WSL | Microsoft Learn

 

Get started using VS Code with WSL

Learn how to set up VS Code to author and debug code using the Windows Subsystem for Linux.

learn.microsoft.com

Remote Development - Visual Studio Marketplace

 

Remote Development - Visual Studio Marketplace

Extension for Visual Studio Code - An extension pack that lets you open any folder in a container, on a remote machine, or in WSL and take advantage of VS Code's full feature set.

marketplace.visualstudio.com

https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-wsl 

 

WSL - Visual Studio Marketplace

Extension for Visual Studio Code - Open any folder in the Windows Subsystem for Linux (WSL) and take advantage of Visual Studio Code's full feature set.

marketplace.visualstudio.com

 

728x90
반응형

'백엔드' 카테고리의 다른 글

닥커?  (2) 2023.03.25
웹 3 프로젝트 배포  (0) 2023.03.01
인터넷 컴퓨터 (웹 3) 애플리케이션  (2) 2023.02.26