사용자 도구

사이트 도구


wiki:os:windows:wsl

문서의 이전 판입니다!


WSL

  • description : WSL 활용법
  • author : 주레피
  • email : dhan@repia.com
  • lastupdate : 2022-04-14

Backup or restore

PowerShell or CMD <code bash> 목록 조회 PS C:\Users> wsl -l -v

NAME                   STATE           VERSION

* docker-desktop-data Stopped 2

docker-desktop         Stopped         2
Ubuntu-20.04           Stopped         2

백업 PS C:\Users> wsl –export Ubuntu-20.04 Ubuntu-20.04_20220414.tar 복구 $> wsl –import Ubuntu-20.04 C:\User\jurepi\Ubuntu-20.04_20220414.tar

</code>

Troubleshooting

  • System has not been booted with systemd as init system (PID 1). Can’t operate. Failed to connect to bus: Host is down
$> sudo apt install daemonize dbus-user-session fontconfig
$> sudo daemonize /usr/bin/unshare --fork --pid --mount-proc /lib/systemd/systemd --system-unit=basic.target
$> exec sudo nsenter -t $(pidof systemd) -a su - $LOGNAME
$> snap version
 
// 서비스 목록 확인하기
$> service --status-all
 
$> systemctl list-units --type=service
[+] running, [-] stopped service
  • Error: 0x80070050 조치 방안
// PowerShell OR CMD
PS C:\Users> wsl --shutdown 
// In Windows, run the Registry Editor
컴퓨터\HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Lxss\{....}
DistributionName 값을 Ubuntu20.04LTS -> Ubuntu-20.04
히안하게 되네요 ㅠㅠ

Ref

/volume1/web/dokuwiki/data/attic/wiki/os/windows/wsl.1649918094.txt.gz · 마지막으로 수정됨: 2022/04/14 15:34 저자 dhan