{"id":90,"date":"2026-02-03T02:54:59","date_gmt":"2026-02-02T17:54:59","guid":{"rendered":"https:\/\/hmhr.ath.cx\/?p=90"},"modified":"2026-02-03T02:55:02","modified_gmt":"2026-02-02T17:55:02","slug":"wsl","status":"publish","type":"post","link":"https:\/\/hmhr.ath.cx\/?p=90","title":{"rendered":"WSL"},"content":{"rendered":"\n<p>Windows\u4e0a\u3067\u3001Linux\u30b7\u30b9\u30c6\u30e0\u3092\u4f7f\u3048\u308b\u3088\u3046\u306b\u3059\u308b\u305f\u3081WSL\u3092\u4f7f\u3063\u3066\u307f\u308b\u3002<br>\u3053\u306e\u8a18\u4e8b\u306e\u6700\u7d42\u7684\u306a\u76ee\u6a19\u3068\u3057\u3066\u306f\u3001Windows\u4e0a\u3067Linux\u7cfb\u306e\u30d5\u30a1\u30a4\u30eb\u30b7\u30b9\u30c6\u30e0\u3092\u8aad\u307f\u66f8\u304d\u3067\u304d\u308b\u3088\u3046\u306b\u3059\u308b\u3053\u3068\u3002<\/p>\n\n\n\n<!--more-->\n\n\n\n<h2 class=\"wp-block-heading\">\u4e0b\u6e96\u5099<\/h2>\n\n\n\n<p>Windows10\u3067\u6700\u65b0\u306e\u30a2\u30c3\u30d7\u30c7\u30fc\u30c8\u3092\u3057\u3066\u304a\u3051\u3070\u30d0\u30fc\u30b8\u30e7\u30f3\u7684\u306b\u306f\u554f\u984c\u306a\u3055\u305d\u3046\u3002<br>Windows\u5074\u306e\u8a2d\u5b9a\u306f\u3001<strong>Linux \u7528 Windows \u30b5\u30d6\u30b7\u30b9\u30c6\u30e0<\/strong>\u304c\u6709\u52b9\u5316\u3055\u308c\u3066\u3044\u308b\u5fc5\u8981\u304c\u3042\u308b\u3002<br>\u3053\u308c\u306fGUI\u4e0a\u3067\u306f\u3001<strong>\u30d7\u30ed\u30b0\u30e9\u30e0\u3068\u6a5f\u80fd<\/strong>\u306e<strong>Windows\u306e\u6a5f\u80fd\u306e\u6709\u52b9\u5316\u307e\u305f\u306f\u7121\u52b9\u5316<\/strong>\u304b\u3089<strong>Linux \u7528 Windows \u30b5\u30d6\u30b7\u30b9\u30c6\u30e0<\/strong>\u306b\u30c1\u30a7\u30c3\u30af\u3092\u5165\u308c\u3066\u6709\u52b9\u306b\u3059\u308b\u304b\u3001<br>\u7ba1\u7406\u8005\u6a29\u9650\u306eWindows PowerShell\u3067<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: powershell; title: ; notranslate\" title=\"\">\nEnable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux\n<\/pre><\/div>\n\n\n<p>\u3092\u5b9f\u884c\u3057\u3066\u6709\u52b9\u5316\u3059\u308b\u3002<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: powershell; title: ; notranslate\" title=\"\">\nwsl --update\nwsl --set-default-version 2\n<\/pre><\/div>\n\n\n<p>\u4e0a\u8a18\u3092\u5b9f\u884c\u3057\u3066\u3001\u30ab\u30fc\u30cd\u30eb\u306e\u30a2\u30c3\u30d7\u30c7\u30fc\u30c8\u3068\u3001wsl2\u3092\u4f7f\u3046\u305f\u3081\u306e\u8a2d\u5b9a\u3092\u884c\u3046\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Linux\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<\/h2>\n\n\n\n<p>Microsoft Store\u304b\u3089\u3082\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3067\u304d\u308b\u3088\u3046\u3060\u304c\u3001\u4eca\u56de\u306fPowerShell\u304b\u3089\u884c\u3046\u3002<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: powershell; title: ; notranslate\" title=\"\">\nwsl --install -d Debian\n<\/pre><\/div>\n\n\n<p>\u4eca\u56de\u306f\u3001Debian\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u3066\u307f\u305f\u3001\u30c7\u30d5\u30a9\u30eb\u30c8\u3060\u3068Ubuntu\u304c\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3055\u308c\u3001-d\u4ee5\u964d\u306e\u30aa\u30d7\u30b7\u30e7\u30f3\u304c\u4e0d\u8981\u3002<br>\u66ab\u304f\u5f85\u3064\u3068\u5225\u30a6\u30a3\u30f3\u30c9\u30a6\u304c\u7acb\u3061\u4e0a\u304c\u308aDebian\u30b7\u30b9\u30c6\u30e0\u306e\u753b\u9762\u3068\u306a\u308b\u3002<\/p>\n\n\n\n<p>Linux\u30e6\u30fc\u30b6\u306e\u5165\u529b\u753b\u9762\u306b\u306a\u308b\u306e\u3067\u3001WSL\u306eLinux\u30b7\u30b9\u30c6\u30e0\u5185\u3067\u4f7f\u7528\u3057\u305f\u3044\u30e6\u30fc\u30b6\u540d\u3092\u6307\u5b9a\u3059\u308b\u3002\uff08Windows\u306e\u30e6\u30fc\u30b6\u540d\u3068\u540c\u3058\u3067\u306a\u304f\u3066\u3044\u3044\uff09<br>\u30d1\u30b9\u30ef\u30fc\u30c9\u3092\u5165\u529b\u3059\u308b\u3068Linux\u304c\u4f7f\u3048\u308b\u3088\u3046\u306b\u306a\u308b\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">wsl\u304b\u3089wsl2\u3078\u306e\u5909\u63db<\/h3>\n\n\n\n<p>\u3082\u3057\u3001wsl\u306e\u307e\u307eLinux\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u3066\u3057\u307e\u3063\u305f\u5834\u5408\u306f<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: powershell; title: ; notranslate\" title=\"\">\nwsl --set-version 2\n<\/pre><\/div>\n\n\n<p>\u3068\u3059\u308b\u3068\u3001wsl\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u5909\u66f4\u304c\u3067\u304d\u308b\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">\u30de\u30a6\u30f3\u30c8\u3059\u308b<\/h2>\n\n\n\n<p>Windows\u5074\u3067\u8a8d\u8b58\u3057\u3066\u30c9\u30e9\u30a4\u30d6\u30ec\u30bf\u30fc\u304c\u5272\u308a\u5f53\u3066\u3089\u308c\u3066\u3044\u308b\u30c9\u30e9\u30a4\u30d6\u306f\u3001wsl\u5185\u306e<strong>\/mnt<\/strong>\u306b\u81ea\u52d5\u7684\u306b\u30de\u30a6\u30f3\u30c8\u3055\u308c\u3066\u3044\u308b\u3002<br><strong>\/mnt\/c<\/strong>\u306a\u3069\u304c\u305d\u3046\u3060\u3002<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: powershell; title: ; notranslate\" title=\"\">\nGET-CimInstance -query &quot;SELECT * from Win32_DiskDrive&quot;\n<\/pre><\/div>\n\n\n<p>\u307e\u305a\u306f\u4e0a\u8a18\u30b3\u30de\u30f3\u30c9\u3067\u3001Windows\u4e0a\u3067\u8a8d\u8b58\u3055\u308c\u3066\u3044\u308b\u30c9\u30e9\u30a4\u30d6\u60c5\u5831\u4e00\u89a7\u3092\u8868\u793a\u3059\u308b\u3002<br>Linux\u306a\u30d5\u30a1\u30a4\u30eb\u30b7\u30b9\u30c6\u30e0\u306e\u30c9\u30e9\u30a4\u30d6\u306eDeviceID\u3092\u78ba\u8a8d\u3059\u308b\u3002<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nwsl --mount \\\\.\\PHYSICALDRIVE2\n<\/pre><\/div>\n\n\n<p>\u3053\u308c\u3067\u3001wsl\u5074\u306b\u30c9\u30e9\u30a4\u30d6\u3092\u8a8d\u8b58\u3055\u305b\u308b\u3053\u3068\u304c\u3067\u304d\u308b\u3002\/dev\u3092\u78ba\u8a8d\u3059\u308b\u3068\u3001\/dev\/sdd1\u306a\u3069\u304c\u3042\u308b\u306f\u305a\u3060\u3002<br>\\\\.\\PHYSICALDRIVE2\u306e\u90e8\u5206\u306f\u5148\u7a0b\u78ba\u8a8d\u3057\u305fDeviceID\u3092\u8a2d\u5b9a\u3059\u308b\u3002<\/p>\n\n\n\n<p>\u3042\u3068\u306f\u666e\u901a\u306b<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: bash; title: ; notranslate\" title=\"\">\nsudo mkdir \/mnt\/sdd1\nsudo mount \/dev\/sdd1 \/mnt\/sdd1\n<\/pre><\/div>\n\n\n<p>\u306e\u3088\u3046\u306b\u3059\u308c\u3070\u3001wsl\u5185\u3067\u30de\u30a6\u30f3\u30c8\u3067\u304d\u30a2\u30af\u30bb\u30b9\u3082\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u308b\u3002<\/p>\n\n\n\n<p>\u3057\u304b\u3057\u3001\u3053\u308c\u3067\u306fWindows\u5074\u304b\u3089\\wsl.localhost\\Debian\\mnt\\sdd1\u3068\u30a2\u30af\u30bb\u30b9\u3057\u3066\u3082\u30d5\u30a1\u30a4\u30eb\u3092\u78ba\u8a8d\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u306a\u304b\u3063\u305f\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">\u30d1\u30fc\u30c6\u30a3\u30b7\u30e7\u30f3\u3092\u6307\u5b9a\u3057\u3066\u30de\u30a6\u30f3\u30c8<\/h2>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: powershell; title: ; notranslate\" title=\"\">\nwsl --mount \\\\.\\PHYSICALDRIVE2 --partition 2\n<\/pre><\/div>\n\n\n<p>partition\u30aa\u30d7\u30b7\u30e7\u30f3\u3067\u4f55\u756a\u76ee\u306e\u30d1\u30fc\u30c6\u30a3\u30b7\u30e7\u30f3\u3092\u30de\u30a6\u30f3\u30c8\u3059\u308b\u304b\u304c\u6307\u5b9a\u3067\u304d\u308b\u3002<br>partition\u756a\u53f7\u306f1\u304b\u3089\u59cb\u307e\u308a\u3001\u300c\u30c7\u30a3\u30b9\u30af\u7ba1\u7406\u300d\u306a\u3069\u304b\u3089\u5bb9\u91cf\u3092\u3082\u3068\u306b\u63a8\u6e2c\u3057\u3066\u6307\u5b9a\u3059\u308b\u3002<br>\u81ea\u52d5\u7684\u306b\/mnt\/wsl\/PYSICALDRIVE2p2\u304c\u30de\u30a6\u30f3\u30c8\u3055\u308c\u308b\u3002<\/p>\n\n\n\n<p>Windows\u5074\u304b\u3089\\wsl.localhost\\Debian\\mnt\\wsl\\PYSICALDRIVE2p2\u306b\u30a2\u30af\u30bb\u30b9\u3059\u308b\u3068\u3001Windows\u4e0a\u304b\u3089\u3082\u30d5\u30a1\u30a4\u30eb\u3092\u78ba\u8a8d\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u305f\u3002<\/p>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Windows\u4e0a\u3067\u3001Linux\u30b7\u30b9\u30c6\u30e0\u3092\u4f7f\u3048\u308b\u3088\u3046\u306b\u3059\u308b\u305f\u3081WSL\u3092\u4f7f\u3063\u3066\u307f\u308b\u3002\u3053\u306e\u8a18\u4e8b\u306e\u6700\u7d42\u7684\u306a\u76ee\u6a19\u3068\u3057\u3066\u306f\u3001Windows\u4e0a\u3067Linux\u7cfb\u306e\u30d5\u30a1\u30a4\u30eb\u30b7\u30b9\u30c6\u30e0\u3092\u8aad\u307f\u66f8\u304d\u3067\u304d\u308b\u3088\u3046\u306b\u3059\u308b\u3053\u3068\u3002<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4,5],"tags":[],"class_list":["post-90","post","type-post","status-publish","format-standard","hentry","category-linux","category-windows"],"_links":{"self":[{"href":"https:\/\/hmhr.ath.cx\/index.php?rest_route=\/wp\/v2\/posts\/90","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/hmhr.ath.cx\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/hmhr.ath.cx\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/hmhr.ath.cx\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/hmhr.ath.cx\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=90"}],"version-history":[{"count":5,"href":"https:\/\/hmhr.ath.cx\/index.php?rest_route=\/wp\/v2\/posts\/90\/revisions"}],"predecessor-version":[{"id":101,"href":"https:\/\/hmhr.ath.cx\/index.php?rest_route=\/wp\/v2\/posts\/90\/revisions\/101"}],"wp:attachment":[{"href":"https:\/\/hmhr.ath.cx\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=90"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/hmhr.ath.cx\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=90"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/hmhr.ath.cx\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=90"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}