{"id":1470,"date":"2023-03-02T19:41:00","date_gmt":"2023-03-02T10:41:00","guid":{"rendered":"https:\/\/hi3103.net\/notes\/?p=1470"},"modified":"2023-03-02T19:41:08","modified_gmt":"2023-03-02T10:41:08","slug":"windows-10-%e3%81%ab-wsl2-%e3%82%92%e5%b0%8e%e5%85%a5%e3%81%99%e3%82%8b","status":"publish","type":"post","link":"https:\/\/hi3103.net\/notes\/dev\/1470","title":{"rendered":"Windows 10 \u306b WSL2 \u3092\u5c0e\u5165\u3059\u308b"},"content":{"rendered":"<h3>\u3084\u308b\u3053\u3068<\/h3>\n<ul>\n<li>Windows 10 \u306b\u300cWindows Subsystem for Linux 2 (WSL 2)\u300d\u3092\u5c0e\u5165\u3059\u308b\n<ul>\n<li>WSL2 \u4e0a\u3067\u5229\u7528\u3059\u308b Linux \u306e\u30c7\u30a3\u30b9\u30c8\u30fc\u30b7\u30e7\u30f3\u306f Ubuntu \uff08\uff1d\u30c7\u30d5\u30a9\u30eb\u30c8\u306e\u307e\u307e\uff09\u3068\u3059\u308b<\/li>\n<\/ul>\n<\/li>\n<li>\u5b9f\u7528\u4e0a\u5fc5\u8981\u306a\u4ee5\u4e0b\u306e\u30bb\u30c3\u30c8\u30a2\u30c3\u30d7\u3092\u3042\u308f\u305b\u3066\u884c\u3046\n<ol>\n<li>WSL2\/Ubuntu \u4e0a\u3067\u65e5\u672c\u8a9e\u3092\u6271\u3048\u308b\u3088\u3046\u306b\u3059\u308b<\/li>\n<li>WSL2\/Ubuntu \u306b Homebrew \u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b<\/li>\n<\/ol>\n<\/li>\n<\/ul>\n<h3>\u6240\u8981\u6642\u9593<\/h3>\n<p>30\uff5e40\u5206<\/p>\n<h3>\u53c2\u8003\u30ea\u30d5\u30a1\u30ec\u30f3\u30b9<\/h3>\n<p><a href=\"https:\/\/docs.microsoft.com\/ja-jp\/windows\/wsl\/install-win10\">Windows Subsystem for Linux (WSL) \u3092 Windows 10 \u306b\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b | Microsoft Docs<\/a><\/p>\n<p><!--more--><\/p>\n<h3>\u4f5c\u696d\u30ed\u30b0<\/h3>\n<h4>1\uff1aWSL2 \u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<\/h4>\n<h5>\u524d\u63d0\u6761\u4ef6\u3092\u6e80\u305f\u3059\u304b\u78ba\u8a8d<\/h5>\n<blockquote>\n<p><a href=\"https:\/\/docs.microsoft.com\/ja-jp\/windows\/wsl\/install-win10\">Windows Subsystem for Linux (WSL) \u3092 Windows 10 \u306b\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b | Microsoft Docs<\/a><\/p>\n<p>\u524d\u63d0\u6761\u4ef6<\/p>\n<p>\u4ee5\u4e0b\u306e\u30b3\u30de\u30f3\u30c9\u3092\u4f7f\u7528\u3059\u308b\u306b\u306f\u3001Windows 10 \u30d0\u30fc\u30b8\u30e7\u30f3 2004 \u4ee5\u4e0a (\u30d3\u30eb\u30c9 19041 \u4ee5\u4e0a) \u307e\u305f\u306f Windows 11 \u3092\u5b9f\u884c\u3057\u3066\u3044\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<\/blockquote>\n<p>\u3068\u306e\u3053\u3068\u3002<\/p>\n<p>\u4ee5\u4e0b\u3092\u53c2\u8003\u306bWLS2 \u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b\u305f\u3081\u306e\u30b3\u30de\u30f3\u30c9\u3092\u6271\u3048\u308b\u304b\u78ba\u8a8d\u3092\u3059\u308b\u3002<\/p>\n<blockquote>\n<p><a href=\"https:\/\/support.microsoft.com\/ja-jp\/windows\/628bec99-476a-2c13-5296-9dd081cdd808\">\u4f7f\u7528\u4e2d\u306e Windows \u30aa\u30da\u30ec\u30fc\u30c6\u30a3\u30f3\u30b0 \u30b7\u30b9\u30c6\u30e0\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u3092\u78ba\u8a8d\u3059\u308b &#8211; Microsoft \u30b5\u30dd\u30fc\u30c8<\/a><\/p>\n<\/blockquote>\n<ol>\n<li><code>Windows<\/code> + <code>I<\/code> \u3067\u300c\u8a2d\u5b9a\u300d\u3092\u958b\u304f<\/li>\n<li>[\u30b7\u30b9\u30c6\u30e0] &gt; [\u8a73\u7d30\u8a2d\u5b9a] \u3092\u9078\u629e\u3057\u3001\u300cWindows \u306e\u4ed5\u69d8\u300d\u3092\u78ba\u8a8d\u3059\u308b<br \/>\n<img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/hi3103.net\/notes\/img\/uploads\/2023\/03\/2303-windows-version_check-768x297.png\" alt=\"\" width=\"768\" height=\"297\"  \/><\/li>\n<\/ol>\n<p>\u4e0b\u8a18\u300cOS \u30d3\u30eb\u30c9\u300d\u306e\u6570\u5024\u304c <code>19041<\/code> \u4ee5\u4e0a\u306a\u306e\u3067\u3001\u6761\u4ef6\u3092\u6e80\u305f\u3057\u3066\u3044\u308b\u3002<\/p>\n<pre><code>\u30a8\u30c7\u30a3\u30b7\u30e7\u30f3  Windows 10 Home\n\u30d0\u30fc\u30b8\u30e7\u30f3   22H2\n\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u65e5 \u200e2022\/\u200e08\/\u200e17\nOS \u30d3\u30eb\u30c9  19045.2604\n\u30a8\u30af\u30b9\u30da\u30ea\u30a8\u30f3\u30b9    Windows Feature Experience Pack 120.2212.4190.0<\/code><\/pre>\n<h5>\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb&amp;\u5b9f\u884c<\/h5>\n<ol>\n<li>PowerShell \u3092\u7ba1\u7406\u8005\u30e2\u30fc\u30c9\u3067\u8d77\u52d5\n<ul>\n<li>\u30a2\u30a4\u30b3\u30f3\u4e0a\u3067\u53f3\u30af\u30ea\u30c3\u30af &gt; [\u7ba1\u7406\u8005\u3068\u3057\u3066\u5b9f\u884c\u3059\u308b] \u3092\u30af\u30ea\u30c3\u30af<br \/>\n<img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/hi3103.net\/notes\/img\/uploads\/2023\/03\/2303-windows-app-run_as_admin.png\" alt=\"\" width=\"335\" height=\"300\"  \/><\/li>\n<\/ul>\n<\/li>\n<li>\u4ee5\u4e0b\u30b3\u30de\u30f3\u30c9\u3092\u5b9f\u884c\n<pre><code class=\"language-powershell\">wsl --install<\/code><\/pre>\n<p>\u3053\u308c\u306b\u3088\u308a\u4ee5\u4e0b\u304c\u304a\u304d\u308b\u3089\u3057\u3044\u3002<\/p>\n<ul>\n<li>WSL \u3092\u5b9f\u884c<\/li>\n<li>Linux \u306e Ubuntu \u30c7\u30a3\u30b9\u30c8\u30ea\u30d3\u30e5\u30fc\u30b7\u30e7\u30f3\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b\u305f\u3081\u306b\u5fc5\u8981\u306a\u6a5f\u80fd\u3092\u6709\u52b9\u306b\u3059\u308b<\/li>\n<\/ul>\n<\/li>\n<\/ol>\n<h5>Ubuntu \u521d\u56de\u5b9f\u884c<\/h5>\n<ol>\n<li>\u30b7\u30b9\u30c6\u30e0\u518d\u8d77\u52d5\u304c\u5fc5\u8981\u3068\u8a00\u308f\u308c\u308b\u306e\u3067\u3001Windows \u3092\u518d\u8d77\u52d5\u3059\u308b<\/li>\n<li>\u518d\u8d77\u52d5\u5f8c\u3001\u52dd\u624b\u306b Ubuntu \u304c\u958b\u59cb\u3055\u308c\u308b\uff08\u7d50\u69cb\u5f85\u3064\uff09<br \/>\n<img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/hi3103.net\/notes\/img\/uploads\/2023\/03\/2303-wsl2-first_boot_ubuntu.png\" alt=\"\" width=\"406\" height=\"165\"  \/><\/li>\n<li>\n<p>\u30c7\u30d5\u30a9\u30eb\u30c8\u306e UNIX \u30e6\u30fc\u30b6\u30fc\u30a2\u30ab\u30a6\u30f3\u30c8\u3092\u4f5c\u6210\u305b\u3088\u3068\u8a00\u308f\u308c\u308b\u306e\u3067\u3001\u30e6\u30fc\u30b6\u30fc\u540d\u3068\u30d1\u30b9\u30ef\u30fc\u30c9\u3092\u8a2d\u5b9a\u3002\u6b63\u3057\u304f\u9032\u3080\u3068\u6210\u529f\u3059\u308b    <\/p>\n<pre><code>Ubuntu \u306f\u65e2\u306b\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3055\u308c\u3066\u3044\u307e\u3059\u3002\nUbuntu \u3092\u958b\u59cb\u3057\u3066\u3044\u307e\u3059...\nInstalling, this may take a few minutes...\nPlease create a default UNIX user account. The username does not need to match your Windows username.\nFor more information visit: https:\/\/aka.ms\/wslusers\nEnter new UNIX username: hi3103\nNew password:\nRetype new password:\npasswd: password updated successfully\nInstallation successful!\nTo run a command as administrator (user \"root\"), use \"sudo &lt;command&gt;\".\nSee \"man sudo_root\" for details.\n\nWelcome to Ubuntu 22.04.1 LTS (GNU\/Linux 5.15.90.1-microsoft-standard-WSL2 x86_64)\n\n * Documentation:  https:\/\/help.ubuntu.com\n * Management:     https:\/\/landscape.canonical.com\n * Support:        https:\/\/ubuntu.com\/advantage\n\nThis message is shown once a day. To disable it please create the\n\/home\/hi3103\/.hushlogin file.<\/code><\/pre>\n<\/li>\n<\/ol>\n<h4>2\uff1aWindows Termnal \u304b\u3089 Ubuntu \u3092\u8d77\u52d5<\/h4>\n<blockquote>\n<p><a href=\"https:\/\/apps.microsoft.com\/store\/detail\/windows-terminal\/9N0DX20HK701?hl=ja-jp&amp;gl=jp\">Windows Terminal &#8211; Microsoft Store \u30a2\u30d7\u30ea<\/a><\/p>\n<\/blockquote>\n<ul>\n<li>Windows \u4e0a\u3067 PowerShell \u3084 Ubuntu \u3092\u64cd\u4f5c\u3059\u308b\u3068\u304d\u306f\u3001\u300cWindows Terminal\u300d\u3068\u3044\u3046\u30a2\u30d7\u30ea\u3092\u4f7f\u3046\u306e\u304c\u304a\u3059\u3059\u3081\u3002<\/li>\n<li>\u30a2\u30d7\u30ea\u3092\u8d77\u52d5\u3059\u308b\u3068 PowerShell \u304c\u8d77\u52d5\u3059\u308b\u306e\u3002<\/li>\n<li>\u4ed6\u306e\u30b7\u30a7\u30eb\u3092\u4f7f\u3046\u3068\u304d\u306f\u30bf\u30d6\u6a2a\u306e\u4e0b\u5411\u304d\u77e2\u5370\u30a2\u30a4\u30b3\u30f3\u304b\u3089\u9078\u629e\u3059\u308b\u3002<br \/>\n<img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/hi3103.net\/notes\/img\/uploads\/2023\/03\/2030-windows_terminal-select_ubuntu.png\" alt=\"\" width=\"629\" height=\"366\"  \/><\/li>\n<\/ul>\n<h4>2\uff1aAPT ( Advanced Package Tool ) \u3092\u6700\u65b0\u306e\u72b6\u614b\u306b\u3059\u308b<\/h4>\n<p>\u3053\u306e\u3042\u3068\u306e\u30b9\u30c6\u30c3\u30d7\u3067\u4f7f\u3046\u306e\u3067\u3001\u4e0b\u6e96\u5099\u3068\u3057\u3066\u4ee5\u4e0b\u3092\u5b9f\u884c\u3002<\/p>\n<pre><code class=\"language-bash\">$ sudo apt update &amp;&amp; sudo apt upgrade<\/code><\/pre>\n<p>\u53c2\u8003\uff1a<a href=\"https:\/\/linuxfan.info\/package-management-ubuntu\">\u300capt-get\u300d\u306f\u3082\u3046\u53e4\u3044\uff1f\u65b0\u3057\u3044\u300capt\u300d\u30b3\u30de\u30f3\u30c9\u3092\u4f7f\u3063\u305fUbuntu\u306e\u30d1\u30c3\u30b1\u30fc\u30b8\u7ba1\u7406 | LFI<\/a><\/p>\n<h4>3\uff1a\u65e5\u672c\u8a9e\u3092\u4f7f\u3048\u308b\u3088\u3046\u306b\u3059\u308b<\/h4>\n<p>\u30c7\u30d5\u30a9\u30eb\u30c8\u306e\u30ed\u30b1\u30fc\u30eb\u8a2d\u5b9a\u3060\u3068\u65e5\u672c\u8a9e\u304c\u6271\u3048\u306a\u3044\u306e\u3067\u3001\u65e5\u672c\u8a9e\u306e\u8a00\u8a9e\u30d1\u30c3\u30af\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u3066\u8a2d\u5b9a\u3059\u308b\u3002<\/p>\n<h5>\u78ba\u8a8d<\/h5>\n<p>\u73fe\u5728\u306e\u30ed\u30b1\u30fc\u30eb\u3092\u8868\u793a\u30021\u884c\u76ee\u306e <code>LANG=C.UTF-8<\/code> \u3092\u65e5\u672c\u8a9e\u306e\u6307\u5b9a\u306b\u5909\u66f4\u3059\u308b\u306e\u304c\u30b4\u30fc\u30eb\u3002<\/p>\n<pre><code class=\"language-bash\">$ locale\nLANG=C.UTF-8\nLANGUAGE=\nLC_CTYPE=\"C.UTF-8\"\nLC_NUMERIC=\"C.UTF-8\"\nLC_TIME=\"C.UTF-8\"\nLC_COLLATE=\"C.UTF-8\"\nLC_MONETARY=\"C.UTF-8\"\nLC_MESSAGES=\"C.UTF-8\"\nLC_PAPER=\"C.UTF-8\"\nLC_NAME=\"C.UTF-8\"\nLC_ADDRESS=\"C.UTF-8\"\nLC_TELEPHONE=\"C.UTF-8\"\nLC_MEASUREMENT=\"C.UTF-8\"\nLC_IDENTIFICATION=\"C.UTF-8\"\nLC_ALL=<\/code><\/pre>\n<p>\u8a2d\u5b9a\u53ef\u80fd\u306a\u30ed\u30b1\u30fc\u30eb\u3092\u78ba\u8a8d\u3002\u65e5\u672c\u8a9e\u306e\u8a2d\u5b9a\u304c\u306a\u3044\u3053\u3068\u304c\u308f\u304b\u308b\u3002<\/p>\n<pre><code class=\"language-bash\">$ locale -a\nC\nC.utf8\nPOSIX<\/code><\/pre>\n<h5>\u65e5\u672c\u8a9e\u8a00\u8a9e\u30d1\u30c3\u30af\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<\/h5>\n<p>\u4ee5\u4e0b\u3092\u5b9f\u884c<\/p>\n<pre><code class=\"language-bash\">$ sudo apt install language-pack-ja<\/code><\/pre>\n<p>\u3082\u3063\u304b\u3044\u8a2d\u5b9a\u53ef\u80fd\u306a\u30ed\u30b1\u30fc\u30eb\u3092\u78ba\u8a8d\u3057\u3066\u307f\u308b\u3068\u3001 <code>ja_JP.utf8<\/code> \u304c\u5897\u3048\u3066\u308b<\/p>\n<pre><code class=\"language-bash\">$ locale -a\nC\nC.utf8\nPOSIX\nja_JP.utf8 \u2190\u3053\u308c\u304c\u5897\u3048\u305f<\/code><\/pre>\n<h5>\u30ed\u30b1\u30fc\u30eb\u3092\u65e5\u672c\u8a9e\u306b\u8a2d\u5b9a<\/h5>\n<p>\u4ee5\u4e0b\u3092\u5b9f\u884c<\/p>\n<pre><code class=\"language-bash\">$ sudo update-locale LANG=ja_JP.UTF-8<\/code><\/pre>\n<h5>Ubuntu \u3092\u518d\u8d77\u52d5<\/h5>\n<p>PowerShell \u3067\u4ee5\u4e0b\u3092\u5b9f\u884c\u3057\u3001WLS2\/Ubuntu \u3092\u30b7\u30e3\u30c3\u30c8\u30c0\u30a6\u30f3<\/p>\n<pre><code class=\"language-bash\">wsl --shutdown<\/code><\/pre>\n<p>\u3075\u305f\u305f\u3073 Windows Terminal \u304b\u3089 WLS2\/Ubuntu \u3092\u8d77\u52d5\uff08\u3053\u308c\u3067\u518d\u8d77\u52d5\u306b\u306a\u308b\uff09<\/p>\n<h5>\u30ed\u30b1\u30fc\u30eb\u8a2d\u5b9a\u3092\u78ba\u8a8d<\/h5>\n<p>\u73fe\u5728\u306e\u30ed\u30b1\u30fc\u30eb\u3092\u518d\u3073\u8868\u793a\u30021\u884c\u76ee <code>LANG=ja_JP.UTF-8<\/code> \u306b\u8a2d\u5b9a\u3067\u304d\u3066\u3044\u308c\u3070OK\u3002<\/p>\n<pre><code class=\"language-bash\">$ locale\nLANG=ja_JP.UTF-8\nLANGUAGE=\nLC_CTYPE=\"ja_JP.UTF-8\"\nLC_NUMERIC=\"ja_JP.UTF-8\"\nLC_TIME=\"ja_JP.UTF-8\"\nLC_COLLATE=\"ja_JP.UTF-8\"\nLC_MONETARY=\"ja_JP.UTF-8\"\nLC_MESSAGES=\"ja_JP.UTF-8\"\nLC_PAPER=\"ja_JP.UTF-8\"\nLC_NAME=\"ja_JP.UTF-8\"\nLC_ADDRESS=\"ja_JP.UTF-8\"\nLC_TELEPHONE=\"ja_JP.UTF-8\"\nLC_MEASUREMENT=\"ja_JP.UTF-8\"\nLC_IDENTIFICATION=\"ja_JP.UTF-8\"\nLC_ALL=<\/code><\/pre>\n<h4>4\uff1aHomebrew \u3092\u5c0e\u5165\u3059\u308b<\/h4>\n<p>\u3042\u308b\u3068\u4f55\u304b\u3068\u4fbf\u5229\u306a\u306e\u3067\u30d1\u30c3\u30b1\u30fc\u30b8\u7ba1\u7406\u30de\u30cd\u30fc\u30b8\u30e3\u30fc\u300cHomebrew\u300d\u3092\u4f7f\u3048\u308b\u3088\u3046\u306b\u3057\u3066\u304a\u304f\u3002<\/p>\n<h5>\u53c2\u8003URL<\/h5>\n<ul>\n<li><a href=\"https:\/\/www.publickey1.jp\/blog\/23\/homebrew_40git_clonejson.html\">\u30d1\u30c3\u30b1\u30fc\u30b8\u30de\u30cd\u30fc\u30b8\u30e3\u300cHomebrew 4.0\u300d\u6b63\u5f0f\u30ea\u30ea\u30fc\u30b9\u3001\u3088\u308a\u9ad8\u901f\u306b\u3002Git clone\u304b\u3089JSON\u306b\u3088\u308b\u30d1\u30c3\u30b1\u30fc\u30b8\u7ba1\u7406\u3078\u5207\u308a\u66ff\u3048 \uff0d Publickey<\/a>\n<ul>\n<li>2023\u5e742\u670820\u65e5\u306b\u51fa\u3066\u305f\u8a18\u4e8b\u3002\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u6642\u306e\u51e6\u7406\u306e\u65b9\u6cd5\u304c\u5909\u308f\u3063\u305f\u3089\u3057\u3044<\/li>\n<\/ul>\n<\/li>\n<li><a href=\"https:\/\/docs.brew.sh\/Homebrew-on-Linux\">Homebrew on Linux \u2014 Homebrew Documentation<\/a>\n<ul>\n<li>WSL2 \u74b0\u5883\u306b\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b\u3068\u304d\u306e\u624b\u9806\u66f8<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<h5>\u6e96\u5099<\/h5>\n<p>\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u306b\u5fc5\u8981\u306a\u30d3\u30eb\u30c9\u30c4\u30fc\u30eb\u3092\u843d\u3068\u3059<\/p>\n<pre><code class=\"language-bash\">$ sudo apt-get install build-essential curl file git<\/code><\/pre>\n<h5>\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<\/h5>\n<blockquote>\n<p><a href=\"https:\/\/brew.sh\/\">Homebrew \u2014 The Missing Package Manager for macOS (or Linux)<\/a><\/p>\n<\/blockquote>\n<p>\u4ee5\u4e0b\u3092\u5b9f\u884c\u3002\u30b3\u30de\u30f3\u30c9\u81ea\u4f53\u306f\u5909\u308f\u308a\u306a\u3057\u3002<\/p>\n<p>\u300c4.0\u4ee5\u524d\u306e\u65b9\u6cd5\u3067\u843d\u3068\u3057\u305f\u3044\u300d\u3068\u304d\u306f\u5225\u306e\u30b3\u30de\u30f3\u30c9\u3092\u4f7f\u3046\u5fc5\u8981\u304c\u3042\u308b\u307f\u305f\u3044\u3002<\/p>\n<pre><code class=\"language-powershell\">\/bin\/bash -c \"$(curl -fsSL https:\/\/raw.githubusercontent.com\/Homebrew\/install\/HEAD\/install.sh)\"<\/code><\/pre>\n<p>\u4ee5\u4e0b\u306e\u30b9\u30af\u30ea\u30d7\u30c8\u304c\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3055\u308c\u3001<\/p>\n<pre><code class=\"language-bash\">==&gt; This script will install:\n\/home\/linuxbrew\/.linuxbrew\/bin\/brew\n\/home\/linuxbrew\/.linuxbrew\/share\/doc\/homebrew\n\/home\/linuxbrew\/.linuxbrew\/share\/man\/man1\/brew.1\n\/home\/linuxbrew\/.linuxbrew\/share\/zsh\/site-functions\/_brew\n\/home\/linuxbrew\/.linuxbrew\/etc\/bash_completion.d\/brew\n\/home\/linuxbrew\/.linuxbrew\/Homebrew<\/code><\/pre>\n<p>\u4ee5\u4e0b\u306e\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u304c\u4f5c\u6210\u3055\u308c\u308b\u3068\u306e\u3053\u3068\u3002<\/p>\n<pre><code class=\"language-bash\">==&gt; The following new directories will be created:\n\/home\/linuxbrew\/.linuxbrew\/bin\n\/home\/linuxbrew\/.linuxbrew\/etc\n\/home\/linuxbrew\/.linuxbrew\/include\n\/home\/linuxbrew\/.linuxbrew\/lib\n\/home\/linuxbrew\/.linuxbrew\/sbin\n\/home\/linuxbrew\/.linuxbrew\/share\n\/home\/linuxbrew\/.linuxbrew\/var\n\/home\/linuxbrew\/.linuxbrew\/opt\n\/home\/linuxbrew\/.linuxbrew\/share\/zsh\n\/home\/linuxbrew\/.linuxbrew\/share\/zsh\/site-functions\n\/home\/linuxbrew\/.linuxbrew\/var\/homebrew\n\/home\/linuxbrew\/.linuxbrew\/var\/homebrew\/linked\n\/home\/linuxbrew\/.linuxbrew\/Cellar\n\/home\/linuxbrew\/.linuxbrew\/Caskroom\n\/home\/linuxbrew\/.linuxbrew\/Frameworks<\/code><\/pre>\n<p>\u554f\u984c\u306a\u3051\u308c\u3070 <code>Enter<\/code> \u30ad\u30fc\u3067\u7d9a\u884c\u3002<\/p>\n<p>\u5b8c\u4e86\u3059\u308b\u3068\u3001\u6b21\u306e\u30b9\u30c6\u30c3\u30d7\u306e\u6848\u5185\u304c\u3042\u308b\u3002<\/p>\n<pre><code class=\"language-bash\">Warning: \/home\/linuxbrew\/.linuxbrew\/bin is not in your PATH.\n  Instructions on how to configure your shell for Homebrew\n  can be found in the 'Next steps' section below.<\/code><\/pre>\n<pre><code class=\"language-bash\">==&gt; Next steps:\n- Run these two commands in your terminal to add Homebrew to your PATH:\n    (echo; echo 'eval \"$(\/home\/linuxbrew\/.linuxbrew\/bin\/brew shellenv)\"') &gt;&gt; \/home\/hi3103\/.profile\n    eval \"$(\/home\/linuxbrew\/.linuxbrew\/bin\/brew shellenv)\"\n- Install Homebrew's dependencies if you have sudo access:\n    sudo apt-get install build-essential\n  For more information, see:\n    https:\/\/docs.brew.sh\/Homebrew-on-Linux\n- We recommend that you install GCC:\n    brew install gcc\n- Run brew help to get started\n- Further documentation:\n    https:\/\/docs.brew.sh<\/code><\/pre>\n<h5>\u30d1\u30b9\u3092\u901a\u3059<\/h5>\n<p><code>Next Steps<\/code> \u306e\u6848\u5185\u306b\u5f93\u3044\u3001\u516c\u5f0f\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u306b\u3042\u308b\u30b3\u30de\u30f3\u30c9\u3092\u9806\u306b\u5b9f\u884c<\/p>\n<pre><code class=\"language-bash\">$ test -d ~\/.linuxbrew &amp;&amp; eval $(~\/.linuxbrew\/bin\/brew shellenv)\n$ test -d \/home\/linuxbrew\/.linuxbrew &amp;&amp; eval $(\/home\/linuxbrew\/.linuxbrew\/bin\/brew shellenv)\n$ test -r ~\/.bash_profile &amp;&amp; echo \"eval \\$($(brew --prefix)\/bin\/brew shellenv)\" &gt;&gt;~\/.bash_profile\n$ echo \"eval \\$($(brew --prefix)\/bin\/brew shellenv)\" &gt;&gt;~\/.profile<\/code><\/pre>\n<p>\u30b7\u30a7\u30eb\u3092\u518d\u8d77\u52d5<\/p>\n<pre><code class=\"language-bash\">$ exec $SHELL -l<\/code><\/pre>\n<h5>\u5b9f\u884c\u30c6\u30b9\u30c8<\/h5>\n<p>\u8a66\u3057\u306b <code>tree<\/code> \u30b3\u30de\u30f3\u30c9\u3092\u843d\u3068\u3057\u3066\u307f\u308b\u3002\u307e\u305a\u306f\u5b58\u5728\u3059\u308b\u304b\u78ba\u8a8d\u3002<\/p>\n<pre><code class=\"language-bash\">$ brew search tree\n==&gt; Formulae\nas-tree          datree           pstree           tree-sitter      treefmt          tre\ncherrytree       pipdeptree       tree             treecc           treefrog<\/code><\/pre>\n<p>\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<\/p>\n<pre><code class=\"language-bash\">$ brew install tree<\/code><\/pre>\n<p>\u9069\u5f53\u306a\u5834\u6240\u3067\u5b9f\u884c\u3057\u3001\u52d5\u4f5c\u3059\u308c\u3070OK<\/p>\n<pre><code class=\"language-bash\">$ tree<\/code><\/pre>\n<h4>5\uff1a\u30d5\u30a1\u30a4\u30eb\u306e\u5834\u6240\u3092\u78ba\u8a8d\u3059\u308b<\/h4>\n<h5>Windows \u4e0a\u3067 WSL2\/Ubuntu \u5185\u306e\u30d5\u30a1\u30a4\u30eb\u3092\u53c2\u7167\u3059\u308b\u5834\u5408<\/h5>\n<p>\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u7d4c\u7531\u3067\u30a2\u30af\u30bb\u30b9\u53ef\u80fd\u3002\u30a8\u30af\u30b9\u30d7\u30ed\u30fc\u30e9\u30fc\u304b\u3089\u53c2\u7167\u3067\u304d\u308b\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/hi3103.net\/notes\/img\/uploads\/2023\/03\/2303-windoes-access_ubuntu_volume-578x768.png\" alt=\"\" width=\"578\" height=\"768\"  \/><\/p>\n<p>\u30d1\u30b9\u3068\u3057\u3066\u306f\u4ee5\u4e0b\uff08\u4f8b\uff1aUNIX \u30e6\u30fc\u30b6\u30fc\u306e\u30db\u30fc\u30e0\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\uff09<\/p>\n<pre><code>\\\\wsl.localhost\\Ubuntu\\home\\\u30e6\u30fc\u30b6\u30fc\u540d<\/code><\/pre>\n<h5>WSL2\/Ubuntu  \u4e0a\u3067 Windows \u5185\u306e\u30d5\u30a1\u30a4\u30eb\u3092\u53c2\u7167\u3059\u308b\u5834\u5408<\/h5>\n<p>Windows \u306e\u30ed\u30fc\u30ab\u30eb\u30c7\u30fc\u30bf\u306f <code>\/mnt\/<\/code> \u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306b\u30de\u30a6\u30f3\u30c8\u3055\u308c\u3066\u3044\u308b\u3002<\/p>\n<table>\n<thead>\n<tr>\n<th>\u30d1\u30b9<\/th>\n<th>\u5bfe\u5fdc\u3059\u308b\u30c9\u30e9\u30a4\u30d6<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>\/mnt\/c\/<\/td>\n<td>C\u30c9\u30e9\u30a4\u30d6<\/td>\n<\/tr>\n<tr>\n<td>\/mnt\/d\/<\/td>\n<td>D\u30c9\u30e9\u30a4\u30d6<\/td>\n<\/tr>\n<tr>\n<td>\/mnt\/g\/<\/td>\n<td>Google Drive\uff08\u540c\u671f\u5229\u7528\u3057\u3066\u3044\u308b\u5834\u5408\u306e\u307f\uff09<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<pre><code class=\"language-bash\">hi3103@MARTHA:\/$ cd \/mnt\/\nhi3103@MARTHA:\/mnt$ ls -la\n\u5408\u8a08 8\ndrwxr-xr-x  7 root   root   4096  3\u6708  2 13:28 .\ndrwxr-xr-x 19 root   root   4096  3\u6708  2 13:40 ..\ndrwxrwxrwx  1 hi3103 hi3103 4096  3\u6708  1 18:36 c \u2190C\u30c9\u30e9\u30a4\u30d6\ndrwxrwxrwx  1 hi3103 hi3103 4096  3\u6708  1 18:35 d \u2190D\u30c9\u30e9\u30a4\u30d6\ndrwxrwxrwx  0 hi3103 hi3103  512  3\u6708  2 13:24 g \u2190G\u30c9\u30e9\u30a4\u30d6\ndrwxrwxrwt  2 root   root     60  3\u6708  2 13:40 wsl\ndrwxrwxrwt  7 root   root    300  3\u6708  2 13:40 wslg<\/code><\/pre>\n<p>\u4f8b\uff1aWindows \u5074\u306e\u30e6\u30fc\u30b6\u30fc\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306b\u79fb\u52d5\u3059\u308b<\/p>\n<pre><code class=\"language-bash\">cd \/mnt\/c\/Users\/\u30e6\u30fc\u30b6\u30fc\u540d<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>\u3084\u308b\u3053\u3068 Windows 10 \u306b\u300cWindows Subsystem for Linux 2 (WSL 2)\u300d\u3092\u5c0e\u5165\u3059\u308b WSL2 \u4e0a\u3067\u5229\u7528\u3059\u308b Linux \u306e\u30c7\u30a3\u30b9\u30c8\u30fc\u30b7\u30e7\u30f3\u306f Ubuntu \uff08\uff1d\u30c7\u30d5\u30a9\u30eb\u30c8\u306e\u307e\u307e\uff09\u3068 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[93],"tags":[98,96,99],"class_list":["post-1470","post","type-post","status-publish","format-standard","hentry","category-dev","tag-ubuntu","tag-windows-10","tag-wsl"],"_links":{"self":[{"href":"https:\/\/hi3103.net\/notes\/wp-json\/wp\/v2\/posts\/1470","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/hi3103.net\/notes\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/hi3103.net\/notes\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/hi3103.net\/notes\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/hi3103.net\/notes\/wp-json\/wp\/v2\/comments?post=1470"}],"version-history":[{"count":0,"href":"https:\/\/hi3103.net\/notes\/wp-json\/wp\/v2\/posts\/1470\/revisions"}],"wp:attachment":[{"href":"https:\/\/hi3103.net\/notes\/wp-json\/wp\/v2\/media?parent=1470"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/hi3103.net\/notes\/wp-json\/wp\/v2\/categories?post=1470"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/hi3103.net\/notes\/wp-json\/wp\/v2\/tags?post=1470"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}