{"id":346,"date":"2023-08-09T16:20:50","date_gmt":"2023-08-09T07:20:50","guid":{"rendered":"http:\/\/tech.itdesk.co.kr\/?p=346"},"modified":"2023-08-09T16:30:39","modified_gmt":"2023-08-09T07:30:39","slug":"windows-10-11-wslwindows-subsystem-for-linux-%ec%84%a4%ec%b9%98","status":"publish","type":"post","link":"https:\/\/iwgh.duckdns.org\/?p=346","title":{"rendered":"Windows 10\/11 WSL(Windows Subsystem for Linux) \uc124\uce58"},"content":{"rendered":"<p>OS \uc694\uad6c\uc0ac\ud56d : Windows 10 version 2004 and higher (Build 19041 and higher) or Windows 11<\/p>\n<p>\ucc38\uc870\ub9c1\ud06c : https:\/\/learn.microsoft.com\/en-us\/windows\/wsl\/install#upgrade-version-from-wsl-1-to-wsl-2<\/p>\n<\/p>\n<p>1. Powershell \ub610\ub294 command \ucc3d\uc5d0\uc11c \ud558\uae30 \uba85\ub839\uc5b4\ub97c \ud1b5\ud574 WSL sub system \uc124\uce58.<\/p>\n<p># wsl &#8211;install<\/p>\n<p>2. \ub9ac\ub205\uc2a4 \ubc30\ud3ec\ud310\uc744 \uc120\ud0dd\ud558\uc5ec \ub9ac\ub205\uc2a4 \uac00\uc0c1\uc2dc\uc2a4\ud15c \uc124\uce58<\/p>\n<p># wsl &#8211;list &#8211;online<\/p>\n<p style=\"padding-left: 40px;\">\ub2e4\uc74c\uc740 \uc124\uce58\ud560 \uc218 \uc788\ub294 \uc720\ud6a8\ud55c \ubc30\ud3ec\ud310 \ubaa9\ub85d\uc785\ub2c8\ub2e4.<br \/>&#8216;wsl.exe &#8211;install &lt;Distro&gt;&#8217;\ub97c \uc0ac\uc6a9\ud558\uc5ec \uc124\uce58\ud569\ub2c8\ub2e4.<\/p>\n<p style=\"padding-left: 40px;\">NAME FRIENDLY NAME<br \/>Ubuntu Ubuntu<br \/>Debian Debian GNU\/Linux<br \/>kali-linux Kali Linux Rolling<br \/>Ubuntu-18.04 Ubuntu 18.04 LTS<br \/>Ubuntu-20.04 Ubuntu 20.04 LTS<br \/>Ubuntu-22.04 Ubuntu 22.04 LTS<br \/>OracleLinux_7_9 Oracle Linux 7.9<br \/>OracleLinux_8_7 Oracle Linux 8.7<br \/>OracleLinux_9_1 Oracle Linux 9.1<br \/>openSUSE-Leap-15.5 openSUSE Leap 15.5<br \/>SUSE-Linux-Enterprise-Server-15-SP4 SUSE Linux Enterprise Server 15 SP4<br \/>SUSE-Linux-Enterprise-15-SP5 SUSE Linux Enterprise 15 SP5<br \/>openSUSE-Tumbleweed openSUSE Tumbleweed<\/p>\n<p># wsl &#8211;install -d OracleLinux_7_9<br \/>-&gt; \uc624\ub77c\ud074\ub9ac\ub205\uc2a4 \ubc30\ud3ec\ud310\uc744 \uc120\ud0dd\ud558\uc5ec \uc124\uce58<\/p>\n<p style=\"padding-left: 40px;\">\uc124\uce58 \uc911: Oracle Linux 7.9<br \/>[ 0.0% ]<br \/>Oracle Linux 7.9\uc774(\uac00) \uc124\uce58\ub418\uc5c8\uc2b5\ub2c8\ub2e4.<br \/>Oracle Linux 7.9\uc744(\ub97c) \uc2dc\uc791\ud558\ub294 \uc911&#8230;<br \/>Installing, this may take a few minutes&#8230;<br \/>Please create a default UNIX user account. The username does not need to match your Windows username.<br \/>For more information visit: https:\/\/aka.ms\/wslusers<br \/>Enter new UNIX username:<br \/>BAD PASSWORD: The password is shorter than 8 characters<br \/>Retype new password:<br \/>passwd: all authentication tokens updated successfully.<br \/>Installation successful!<\/p>\n<p># wsl -l -v<br \/>-&gt; \uc124\uce58\ub41c \ubc84\uc804 \ud655\uc778<\/p>\n<p style=\"padding-left: 40px;\">NAME\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 \u00a0 \u00a0 STATE\u00a0\u00a0\u00a0 VERSION<br \/>* Ubuntu-22.04\u00a0\u00a0\u00a0 Running\u00a0 2<br \/>OracleLinux_7_9 Running\u00a0 2<\/p>\n<p># wsl\u00a0\u00a0\u00a0\u00a0 ; linux shell \uc9c4\uc785 (default \ubc30\ud3ec\ud310)<\/p>\n<p># wsl -s OracleLinux_7_9\u00a0\u00a0\u00a0\u00a0 ; default \ubc30\ud3ec\ud310 \ubcc0\uacbd.<\/p>\n<p># wsl -d Ubuntu-22.04\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 ; \uc9c0\uc815\ub41c \ubc30\ud3ec\ud310 shell \uc2e4\ud589<\/p>\n<p># wsl &#8211;set-version Ubuntu-22.04 2\u00a0\u00a0\u00a0\u00a0 ; WSL \ubc84\uc804\uc744 2\ub85c \ubcc0\uacbd, \ube44\uad50\ud45c \ucc38\uc870.<\/p>\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"436\" src=\"http:\/\/tech.itdesk.co.kr\/wp-content\/uploads\/2023\/08\/image-3-1024x436.png\" alt=\"\" class=\"wp-image-347\" srcset=\"https:\/\/iwgh.duckdns.org\/wp-content\/uploads\/2023\/08\/image-3-1024x436.png 1024w, https:\/\/iwgh.duckdns.org\/wp-content\/uploads\/2023\/08\/image-3-300x128.png 300w, https:\/\/iwgh.duckdns.org\/wp-content\/uploads\/2023\/08\/image-3-768x327.png 768w, https:\/\/iwgh.duckdns.org\/wp-content\/uploads\/2023\/08\/image-3-1000x426.png 1000w, https:\/\/iwgh.duckdns.org\/wp-content\/uploads\/2023\/08\/image-3-230x98.png 230w, https:\/\/iwgh.duckdns.org\/wp-content\/uploads\/2023\/08\/image-3-350x149.png 350w, https:\/\/iwgh.duckdns.org\/wp-content\/uploads\/2023\/08\/image-3-480x204.png 480w, https:\/\/iwgh.duckdns.org\/wp-content\/uploads\/2023\/08\/image-3.png 1233w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p class=\"has-small-font-size wp-block-paragraph\" style=\"font-style:normal;font-weight:100\"> \ucc38\uc870 : https:\/\/learn.microsoft.com\/ko-KR\/windows\/wsl\/compare-versions<\/p>\n\n\n\n<p># wsl &#8211;unregister OracleLinux_7_9\u00a0\u00a0\u00a0\u00a0 ; \uc124\uce58\ub41c \ubc30\ud3ec\ud310 \uc0ad\uc81c<br \/><br \/><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">** WSL \uc0ac\uc6a9\uc2dc systemctl \uba85\ub839\uc5b4\uac00 &#8220;Host is down&#8221; \uba54\uc138\uc9c0\uc640 \uc791\ub3d9\ub418\uc9c0 \uc54a\uc744\ub54c.<\/p>\n\n\n\n<blockquote class=\"wp-block-quote has-white-color has-text-color has-background has-link-color wp-elements-1 is-layout-flow wp-block-quote-is-layout-flow\" style=\"background-color:#0000009c\">\n<p class=\"has-small-font-size wp-block-paragraph\">$ systemctl<\/p>\n\n\n\n<p class=\"has-small-font-size wp-block-paragraph\">System has not been booted with systemd as init system (PID 1). Can&#8217;t operate.<br>Failed to connect to bus: Host is down<\/p>\n<\/blockquote>\n\n\n\n<p class=\"wp-block-paragraph\">**\ud558\uae30 \uba85\ub839\uc5b4\ub97c \uc785\ub825.<\/p>\n\n\n\n<blockquote class=\"wp-block-quote has-white-color has-text-color has-background has-link-color wp-elements-2 is-layout-flow wp-block-quote-is-layout-flow\" style=\"background-color:#0000009c\">\n<pre class=\"wp-block-code has-small-font-size\"><code>$ sudo -b unshare --pid --fork --mount-proc \/lib\/systemd\/systemd --system-unit=basic.target\n$ sudo -E nsenter --all -t $(pgrep -xo systemd) runuser -P -l $USER -c \"exec $SHELL\"<\/code><\/pre>\n<\/blockquote>\n","protected":false},"excerpt":{"rendered":"<p>OS \uc694\uad6c\uc0ac\ud56d : Windows 10 version 2004 and higher (Build 19041 and higher) or Windows 11 \ucc38\uc870\ub9c1\ud06c : https:\/\/learn.microsoft.com\/en-us\/windows\/wsl\/install#upgrade-version-from-wsl-1-to-wsl-2 1. Powershell \ub610\ub294 command \ucc3d\uc5d0\uc11c \ud558\uae30 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":347,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[18,1],"tags":[10,11,98,27,97],"class_list":["post-346","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-small","category-tech","tag-install","tag-linux","tag-subsystem","tag-window","tag-wsl"],"_links":{"self":[{"href":"https:\/\/iwgh.duckdns.org\/index.php?rest_route=\/wp\/v2\/posts\/346","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/iwgh.duckdns.org\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/iwgh.duckdns.org\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/iwgh.duckdns.org\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/iwgh.duckdns.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=346"}],"version-history":[{"count":3,"href":"https:\/\/iwgh.duckdns.org\/index.php?rest_route=\/wp\/v2\/posts\/346\/revisions"}],"predecessor-version":[{"id":350,"href":"https:\/\/iwgh.duckdns.org\/index.php?rest_route=\/wp\/v2\/posts\/346\/revisions\/350"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/iwgh.duckdns.org\/index.php?rest_route=\/wp\/v2\/media\/347"}],"wp:attachment":[{"href":"https:\/\/iwgh.duckdns.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=346"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/iwgh.duckdns.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=346"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/iwgh.duckdns.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=346"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}