StoryCode

사용법.탐색기에서 wsl direcotory 접근 방법

WSL
반응형

탐색기 주소창에서 \\wsl$ 로 접근하면 wsl 목록들이 보임.

반응형

'WSL' 카테고리의 다른 글

WSL.Add OSs.Windows 11.WSL2  (0) 2023.12.03
After.Reboot.Run.WSL.Automatically  (0) 2023.06.26
Install openssh-server  (0) 2023.06.24
실행  (0) 2023.06.07

WSL.Add OSs.Windows 11.WSL2

WSL
반응형

1.Download) https://learn.microsoft.com/en-us/windows/wsl/install-manual 에서 하단 "Downloading distributions" 에 보면 OS 이미지 있음. 원하는 거 Download 할 것.

2.Unpack tar.gz) 다운로드 받은 파일을 7Zip 으로 압축 해제 한다.
   여러개의 appx 파일이 나오며, 이중 Ubuntu*x64.appx 를 다시 압축 해제 한다.
   그러면 install.tar.gz 가 나온다.

3.WSL 설치) powershell.관리자> wsl --import Ubuntu-22.04-01 "c:\Users\me\Desktop\WSL.Ubuntu-22.04-01" "c:\Users\me\Desktop\WSL\Ubuntu_2204.1.7.0_x64\install.tar.gz"

설명) Ubuntu-22.04-01 : Just Name. wsl -l -v 에서 나올 이름

c:\Users\me\Desktop\WSL.Ubuntu-22.04-01 : 설치할 디렉토리. 원래 설치 디렉토리는 권한문제때문에 설치가 안됨. 내가 정한 설치 디렉토리임.

c:\Users\me\Desktop\WSL\Ubuntu_2204.1.7.0_x64\install.tar.gz : 설치할 원본 OS 의 tar.gz. 2) 에서 압축 해제한 파일.

 

4.WSL 실행) powershell.관리자> wsl --distribution Ubuntu-22.04-01

 

5.root> cd /etc/apt

6.root> vi sources.list

              :%s/archive.ubuntu.com/ftp.daumkakao.com/g

              :%s/:%s/security.ubuntu.com/ftp.daumkakao.com/g

7.root> apt full-upgrade -y

8.root> apt-get install -y ubuntu-restricted-extras net-tools git strongswan iperf ssh libssl-dev libncurses5 libncurses5-dev bin86 ftpd wireshark speedometer mpv vim cmake build-essential

 

9.Windows.WSL의 사용자.바탕화면.".wslconfig" 파일만들기>

[wsl12]
memory=4GB
swap=0
localhostForwarding=true

 

# 참조 : https://learn.microsoft.com/ko-kr/windows/wsl/wsl-config

 

10.wsl.conf vs .wslconfig

- [Desktop]\.wslconfig를 사용하여 WSL 2에서 실행되는 모든 설치된 배포판에서 전역 설정을 구성합니다.
- /etc/wsl.conf를 사용하여 WSL 1 또는 WSL 2에서 실행되는 각 Linux 배포에 대해 배포당 로컬 설정을 구성합니다.

 

 

반응형

'WSL' 카테고리의 다른 글

사용법.탐색기에서 wsl direcotory 접근 방법  (0) 2023.12.15
After.Reboot.Run.WSL.Automatically  (0) 2023.06.26
Install openssh-server  (0) 2023.06.24
실행  (0) 2023.06.07

After.Reboot.Run.WSL.Automatically

WSL
반응형

1) cmd > shell:startup

 

2) startup_wsl.bat

@echo off
wsl -u root -- service ssh start

반응형

'WSL' 카테고리의 다른 글

사용법.탐색기에서 wsl direcotory 접근 방법  (0) 2023.12.15
WSL.Add OSs.Windows 11.WSL2  (0) 2023.12.03
Install openssh-server  (0) 2023.06.24
실행  (0) 2023.06.07

Install openssh-server

WSL
반응형
sudo apt-get update
sudo apt-get upgrade

sudo apt-get purge openssh-server
sudo apt-get install openssh-server

/etc/ssh/sshd_config
Port 22
Protocol 2
PermitRootLogin no
AuthorizedKeysFile  .ssh/authorized_keys
PasswordAuthentication yes
PubkeyAuthentication yes
ChallengeResponseAuthentication no
X11Forwarding yes
UseDNS no

sudo service ssh --full-restart
sudo service ssh restart

ssh localhost
반응형

'WSL' 카테고리의 다른 글

사용법.탐색기에서 wsl direcotory 접근 방법  (0) 2023.12.15
WSL.Add OSs.Windows 11.WSL2  (0) 2023.12.03
After.Reboot.Run.WSL.Automatically  (0) 2023.06.26
실행  (0) 2023.06.07

실행

WSL
반응형

1) 

> cmd

 

cmd> c:\Windows\System32\wsl.exe --list --all

Linux용 Windows 하위 시스템 배포:
Ubuntu(기본값)

 

cmd > c:\Windows\System32\wsl.exe # Ubuntu(기본값) 접속

혹은

cmd> c:\Windows\System32\wsl.exe -d Ubuntu 2 # 2 는 WSL 버전 2 를 뜻함.

 

 

2) Startup.type WSL

바로 Ubuntu(기본값) 으로 접속

 

3) 버전보기

wsl --version

 

4) 모든 WSL 보기

wsl --list --all

반응형

'WSL' 카테고리의 다른 글

사용법.탐색기에서 wsl direcotory 접근 방법  (0) 2023.12.15
WSL.Add OSs.Windows 11.WSL2  (0) 2023.12.03
After.Reboot.Run.WSL.Automatically  (0) 2023.06.26
Install openssh-server  (0) 2023.06.24