WSL

From HPCWIKI
Jump to navigation Jump to search

Template:Status

Template:TOC

Overview

WSL에 대한 기술 문서입니다.

Summary

  • 무엇인가? - WSL
  • 왜 필요한가? - HPC 및 서버 환경에서 필수 개념
  • 언제 사용하는가? - 서버 구성, 성능 튜닝, 문제 해결 시


Purpose

이 문서가 존재하는 이유

  • Goal: WSL에 대한 기술 정보 제공
  • Scope: WSL의 개념, 사용법, 설정
  • Non-goals: 다른 주제로의 확장


Key Concepts

Concept Description Related
WSL HPC/서버 환경에서 중요한 기술 개념 Linux, Server


Detailed Explanation

WSL, or Windows Subsystem for Linux, is a feature of Windows that allows you to run a Linux environment on your Windows machine, without the need for a separate virtual machine or dual booting. WSL is designed to provide a seamless and productive experience for developers who want to use both Windows and Linux at the same time[1]

  1. Open PowerShell as Admin: Press Win + X and select "Terminal (Admin)" or "Windows PowerShell (Admin)".
  2. Install WSL: Type wsl --install and press Enter. This command enables required features, installs the latest kernel, and defaults to Ubuntu.
  3. Restart: Your computer will likely need to restart to complete the installation.
  4. Optional : Create User: After reboot, a terminal window will open asking for a Linux username and password (these are separate from your Windows login).
  • Launch: Open the Start Menu and search for your installed distro (e.g., "Ubuntu") or type wsl in Command Prompt/PowerShell.
  • Update Software: In your Linux terminal, run sudo apt update && sudo apt upgrade (for Ubuntu/Debian).
  • Install Software: Use sudo apt install <package_name> (e.g., sudo apt install git).
  • Access Windows Files: Your Windows drives are mounted under /mnt/ (e.g., cd /mnt/c/Users/YourUser).
#WSL check status 
>wsl -l -v 
# Start WSL machine 
>wsl -d <machine name>
# Stop a WSL machine 
>wsl -t <machine name>
# Stop all WSL machine
>wsl --shutdown

Networking in WSL can be configured in various ways to enable communication between Windows and Linux applications.


Best Practices

  • 최신 버전 사용 권장
  • 공식 문서 참고
  • 테스트 환경에서 먼저 검증


References


Related Pages

Knowledge Graph

Related

LinuxUbuntu tips and tricksBash scriptVisual Studio Code