<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Marco Trulla</title>
    <description>The latest articles on DEV Community by Marco Trulla (@ragnarokkr).</description>
    <link>https://dev.to/ragnarokkr</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F309053%2F110b43f1-7ccb-4a69-ac0d-465840769afe.png</url>
      <title>DEV Community: Marco Trulla</title>
      <link>https://dev.to/ragnarokkr</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/ragnarokkr"/>
    <language>en</language>
    <item>
      <title>A Comment Divider for Zed using Nushell</title>
      <dc:creator>Marco Trulla</dc:creator>
      <pubDate>Tue, 06 Jan 2026 14:56:27 +0000</pubDate>
      <link>https://dev.to/ragnarokkr/a-comment-divider-for-zed-using-nushell-13k8</link>
      <guid>https://dev.to/ragnarokkr/a-comment-divider-for-zed-using-nushell-13k8</guid>
      <description>&lt;p&gt;Like many of you, I recently switched from VS Code to &lt;a href="https://zed.dev/" rel="noopener noreferrer"&gt;Zed&lt;/a&gt;. Despite having a few limitations compared to the "programming behemoth," I absolutely love it. It’s fast, reliable, and packed with useful features.&lt;/p&gt;

&lt;p&gt;However, there is always a "but." Occasionally, I miss specific extensions from my VS Code configuration. One such example is the small but helpful &lt;a href="https://marketplace.visualstudio.com/items?itemName=stackbreak.comment-divider" rel="noopener noreferrer"&gt;Comment Divider&lt;/a&gt; extension, which allows you to select text and convert it into a stylized comment block.&lt;/p&gt;

&lt;p&gt;Since Zed doesn't have an equivalent extension yet, I decided to replicate the functionality using &lt;a href="https://www.nushell.sh/" rel="noopener noreferrer"&gt;Nushell&lt;/a&gt; (my daily shell of choice).&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;NOTE&lt;/strong&gt;: I primarily use Arch Linux on WSL, so you may need to adjust the code slightly (specifically the clipboard command) to suit your environment.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;UPDATE 2026-02-10&lt;/strong&gt;: since the &lt;a href="https://github.com/Ragnarokkr/donut/blob/master/common/nushell/scripts/strings/comments.nu" rel="noopener noreferrer"&gt;command&lt;/a&gt; is part of my (finally updated) &lt;a href="https://github.com/Ragnarokkr/donut" rel="noopener noreferrer"&gt;dotfiles repo&lt;/a&gt;, I'm gonna update it here too, with few more additions.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  1. The Nushell Script
&lt;/h2&gt;

&lt;p&gt;First, you need to create a command to generate the comments. You can save this as a standalone script or place it in your &lt;code&gt;$nu.user-autoload-dir&lt;/code&gt; to ensure it's sourced at startup.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# Generate a comment from a text or list, into the style of a specified programming language.&lt;/span&gt;
&lt;span class="nb"&gt;export &lt;/span&gt;def &lt;span class="s2"&gt;"comment generate"&lt;/span&gt; &lt;span class="o"&gt;[&lt;/span&gt;
    &lt;span class="nt"&gt;--align&lt;/span&gt; &lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="nt"&gt;-a&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt;: string &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s1"&gt;'center'&lt;/span&gt;     &lt;span class="c"&gt;# comment alignment (`left`, `center`, `right`)&lt;/span&gt;
    &lt;span class="nt"&gt;--block&lt;/span&gt; &lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="nt"&gt;-b&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt;: string &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s1"&gt;'single'&lt;/span&gt;     &lt;span class="c"&gt;# block format (`single`, `multi-single`, `multi`)&lt;/span&gt;
    &lt;span class="nt"&gt;--filled&lt;/span&gt; &lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="nt"&gt;-f&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt;                       &lt;span class="c"&gt;# fill the spaces with a filler character&lt;/span&gt;
    &lt;span class="nt"&gt;--filler-divider&lt;/span&gt;: string &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s1"&gt;'~'&lt;/span&gt;      &lt;span class="c"&gt;# filler character for divider comment&lt;/span&gt;
    &lt;span class="nt"&gt;--filler-header&lt;/span&gt;: string &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s1"&gt;'='&lt;/span&gt;       &lt;span class="c"&gt;# filler character for header comment&lt;/span&gt;
    &lt;span class="nt"&gt;--filler-subheader&lt;/span&gt;: string &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s1"&gt;'-'&lt;/span&gt;    &lt;span class="c"&gt;# filler character for sub-header comment&lt;/span&gt;
    &lt;span class="nt"&gt;--language&lt;/span&gt; &lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="nt"&gt;-l&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt;: string &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s1"&gt;'c'&lt;/span&gt;       &lt;span class="c"&gt;# language style&lt;/span&gt;
    &lt;span class="nt"&gt;--list&lt;/span&gt;                              &lt;span class="c"&gt;# prints out all supported language styles&lt;/span&gt;
    &lt;span class="nt"&gt;--margin-left&lt;/span&gt;: int &lt;span class="o"&gt;=&lt;/span&gt; 1              &lt;span class="c"&gt;# left margin&lt;/span&gt;
    &lt;span class="nt"&gt;--margin-right&lt;/span&gt;: int &lt;span class="o"&gt;=&lt;/span&gt; 1             &lt;span class="c"&gt;# right margin&lt;/span&gt;
    &lt;span class="nt"&gt;--padding-left&lt;/span&gt;: int &lt;span class="o"&gt;=&lt;/span&gt; 0             &lt;span class="c"&gt;# left padding&lt;/span&gt;
    &lt;span class="nt"&gt;--padding-right&lt;/span&gt;: int &lt;span class="o"&gt;=&lt;/span&gt; 0            &lt;span class="c"&gt;# right padding&lt;/span&gt;
    &lt;span class="nt"&gt;--style&lt;/span&gt; &lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="nt"&gt;-s&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt;: string &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s1"&gt;'header'&lt;/span&gt;     &lt;span class="c"&gt;# comment style (`header`, `sub-header`, `divider`)&lt;/span&gt;
    &lt;span class="nt"&gt;--width&lt;/span&gt; &lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="nt"&gt;-w&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt;: int &lt;span class="o"&gt;=&lt;/span&gt; 80              &lt;span class="c"&gt;# max line width&lt;/span&gt;
&lt;span class="o"&gt;]&lt;/span&gt;: &lt;span class="o"&gt;[&lt;/span&gt;nothing -&amp;gt; string string -&amp;gt; string list&amp;lt;string&amp;gt; -&amp;gt; string] &lt;span class="o"&gt;{&lt;/span&gt;
    const LANGUAGES &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="o"&gt;[&lt;/span&gt;
        &lt;span class="o"&gt;{&lt;/span&gt;
            ext_filter: &lt;span class="s1"&gt;'^(c|cpp|c3|d|jsx?|tsx?|jsonc|rs)$'&lt;/span&gt;
            support: &lt;span class="o"&gt;{&lt;/span&gt; single: single multi-single: multi-single multi: multi &lt;span class="o"&gt;}&lt;/span&gt;
            symbol: &lt;span class="o"&gt;{&lt;/span&gt; single_open: &lt;span class="s1"&gt;'//'&lt;/span&gt; single_close: &lt;span class="s1"&gt;''&lt;/span&gt; multi_open: &lt;span class="s1"&gt;'/*'&lt;/span&gt; multi_close: &lt;span class="s1"&gt;'*/'&lt;/span&gt; &lt;span class="o"&gt;}&lt;/span&gt;
        &lt;span class="o"&gt;}&lt;/span&gt;
        &lt;span class="o"&gt;{&lt;/span&gt;
            ext_filter: &lt;span class="s1"&gt;'^(zig)$'&lt;/span&gt;
            support: &lt;span class="o"&gt;{&lt;/span&gt; single: single multi-single: single multi: single &lt;span class="o"&gt;}&lt;/span&gt;
            symbol: &lt;span class="o"&gt;{&lt;/span&gt; single_open: &lt;span class="s1"&gt;'//'&lt;/span&gt; single_close: &lt;span class="s1"&gt;''&lt;/span&gt; multi_open: &lt;span class="s1"&gt;''&lt;/span&gt; multi_close: &lt;span class="s1"&gt;''&lt;/span&gt; &lt;span class="o"&gt;}&lt;/span&gt;
        &lt;span class="o"&gt;}&lt;/span&gt;
        &lt;span class="o"&gt;{&lt;/span&gt;
            ext_filter: &lt;span class="s1"&gt;'^(sh|zsh|bash|nu|py)$'&lt;/span&gt;
            support: &lt;span class="o"&gt;{&lt;/span&gt; single: single multi-single: multi-single multi: multi-single &lt;span class="o"&gt;}&lt;/span&gt;
            symbol: &lt;span class="o"&gt;{&lt;/span&gt; single_open: &lt;span class="s1"&gt;'#'&lt;/span&gt; single_close: &lt;span class="s1"&gt;''&lt;/span&gt; multi_open: &lt;span class="s1"&gt;'#'&lt;/span&gt; multi_close: &lt;span class="s1"&gt;''&lt;/span&gt; &lt;span class="o"&gt;}&lt;/span&gt;
        &lt;span class="o"&gt;}&lt;/span&gt;
        &lt;span class="o"&gt;{&lt;/span&gt;
            ext_filter: &lt;span class="s1"&gt;'^(sql)$'&lt;/span&gt;
            support: &lt;span class="o"&gt;{&lt;/span&gt; single: single multi-single: multi-single multi: multi &lt;span class="o"&gt;}&lt;/span&gt;
            symbol: &lt;span class="o"&gt;{&lt;/span&gt; single_open: &lt;span class="s1"&gt;'--'&lt;/span&gt; single_close: &lt;span class="s1"&gt;''&lt;/span&gt; multi_open: &lt;span class="s1"&gt;'/*'&lt;/span&gt; multi_close: &lt;span class="s1"&gt;'*/'&lt;/span&gt; &lt;span class="o"&gt;}&lt;/span&gt;
        &lt;span class="o"&gt;}&lt;/span&gt;
        &lt;span class="o"&gt;{&lt;/span&gt;
            ext_filter: &lt;span class="s1"&gt;'^(html|xhtml|xml)$'&lt;/span&gt;
            support: &lt;span class="o"&gt;{&lt;/span&gt; single: single multi-single: multi-single multi: multi &lt;span class="o"&gt;}&lt;/span&gt;
            symbol: &lt;span class="o"&gt;{&lt;/span&gt; single_open: &lt;span class="s1"&gt;'&amp;lt;!--'&lt;/span&gt; single_close: &lt;span class="s1"&gt;'--&amp;gt;'&lt;/span&gt; multi_open: &lt;span class="s1"&gt;'&amp;lt;!--'&lt;/span&gt; multi_close: &lt;span class="s1"&gt;'--&amp;gt;'&lt;/span&gt; &lt;span class="o"&gt;}&lt;/span&gt;
        &lt;span class="o"&gt;}&lt;/span&gt;
        &lt;span class="o"&gt;{&lt;/span&gt;
            ext_filter: &lt;span class="s1"&gt;'^(css)$'&lt;/span&gt;
            support: &lt;span class="o"&gt;{&lt;/span&gt; single: single multi-single: multi-single multi: multi &lt;span class="o"&gt;}&lt;/span&gt;
            symbol: &lt;span class="o"&gt;{&lt;/span&gt; single_open: &lt;span class="s1"&gt;'/*'&lt;/span&gt; single_close: &lt;span class="s1"&gt;'*/'&lt;/span&gt; multi_open: &lt;span class="s1"&gt;'/*'&lt;/span&gt; multi_close: &lt;span class="s1"&gt;'*/'&lt;/span&gt; &lt;span class="o"&gt;}&lt;/span&gt;
        &lt;span class="o"&gt;}&lt;/span&gt;
    &lt;span class="o"&gt;]&lt;/span&gt;

    &lt;span class="nb"&gt;let &lt;/span&gt;get_net_width: closure &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt;|open: string, close: string|
        &lt;span class="nv"&gt;$width&lt;/span&gt; - &lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;$open&lt;/span&gt; | str length&lt;span class="o"&gt;)&lt;/span&gt; - &lt;span class="nv"&gt;$margin_left&lt;/span&gt; - &lt;span class="nv"&gt;$margin_right&lt;/span&gt; - &lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;$close&lt;/span&gt; | str length&lt;span class="o"&gt;)&lt;/span&gt;
    &lt;span class="o"&gt;}&lt;/span&gt;

    &lt;span class="nb"&gt;let &lt;/span&gt;fill_line: closure &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt;|w: int, text: oneof&amp;lt;string, nothing&amp;gt;, solid: bool &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;false&lt;/span&gt;|
        &lt;span class="nb"&gt;let &lt;/span&gt;data: string &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;if &lt;/span&gt;not &lt;span class="nv"&gt;$solid&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt;
            &lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;''&lt;/span&gt; | fill &lt;span class="nt"&gt;-w&lt;/span&gt; &lt;span class="nv"&gt;$padding_left&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt; + &lt;span class="nv"&gt;$text&lt;/span&gt; + &lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;''&lt;/span&gt; | fill &lt;span class="nt"&gt;-w&lt;/span&gt; &lt;span class="nv"&gt;$padding_right&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt;
        &lt;span class="o"&gt;}&lt;/span&gt; &lt;span class="k"&gt;else&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt;
            &lt;span class="s1"&gt;''&lt;/span&gt;
        &lt;span class="o"&gt;}&lt;/span&gt;
        match &lt;span class="nv"&gt;$style&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt;
            header &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt; &lt;span class="nv"&gt;$data&lt;/span&gt; | fill &lt;span class="nt"&gt;-w&lt;/span&gt; &lt;span class="nv"&gt;$w&lt;/span&gt; &lt;span class="nt"&gt;-a&lt;/span&gt; &lt;span class="nv"&gt;$align&lt;/span&gt; &lt;span class="nt"&gt;-c&lt;/span&gt; &lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="nv"&gt;$filled&lt;/span&gt; or &lt;span class="nv"&gt;$solid&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt; &lt;span class="nv"&gt;$filler_header&lt;/span&gt; &lt;span class="o"&gt;}&lt;/span&gt; &lt;span class="k"&gt;else&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt; &lt;span class="s1"&gt;' '&lt;/span&gt; &lt;span class="o"&gt;})&lt;/span&gt; &lt;span class="o"&gt;}&lt;/span&gt;
            sub-header &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt; &lt;span class="nv"&gt;$data&lt;/span&gt; | fill &lt;span class="nt"&gt;-w&lt;/span&gt; &lt;span class="nv"&gt;$w&lt;/span&gt; &lt;span class="nt"&gt;-a&lt;/span&gt; &lt;span class="nv"&gt;$align&lt;/span&gt; &lt;span class="nt"&gt;-c&lt;/span&gt; &lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="nv"&gt;$filled&lt;/span&gt; or &lt;span class="nv"&gt;$solid&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt; &lt;span class="nv"&gt;$filler_subheader&lt;/span&gt; &lt;span class="o"&gt;}&lt;/span&gt; &lt;span class="k"&gt;else&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt; &lt;span class="s1"&gt;' '&lt;/span&gt; &lt;span class="o"&gt;})&lt;/span&gt; &lt;span class="o"&gt;}&lt;/span&gt;
            divider &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt; &lt;span class="s1"&gt;''&lt;/span&gt; | fill &lt;span class="nt"&gt;-w&lt;/span&gt; &lt;span class="nv"&gt;$w&lt;/span&gt; &lt;span class="nt"&gt;-a&lt;/span&gt; &lt;span class="nv"&gt;$align&lt;/span&gt; &lt;span class="nt"&gt;-c&lt;/span&gt; &lt;span class="nv"&gt;$filler_divider&lt;/span&gt; &lt;span class="o"&gt;}&lt;/span&gt;
        &lt;span class="o"&gt;}&lt;/span&gt;
    &lt;span class="o"&gt;}&lt;/span&gt;

    &lt;span class="nb"&gt;let &lt;/span&gt;input &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nv"&gt;$in&lt;/span&gt;

    mut data: list&amp;lt;string&amp;gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;$input&lt;/span&gt; | describe&lt;span class="o"&gt;)&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; string &lt;span class="o"&gt;{&lt;/span&gt; &lt;span class="nv"&gt;$input&lt;/span&gt; | &lt;span class="nb"&gt;split &lt;/span&gt;row &lt;span class="o"&gt;(&lt;/span&gt;char newline&lt;span class="o"&gt;)&lt;/span&gt; &lt;span class="o"&gt;}&lt;/span&gt; &lt;span class="k"&gt;else&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt; &lt;span class="nv"&gt;$input&lt;/span&gt; &lt;span class="o"&gt;}&lt;/span&gt;

    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="nv"&gt;$list&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt;
        &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;$LANGUAGES&lt;/span&gt; | each &lt;span class="o"&gt;{&lt;/span&gt;|l|
            &lt;span class="nv"&gt;$l&lt;/span&gt;.ext_filter | str replace &lt;span class="s1"&gt;'^('&lt;/span&gt; &lt;span class="s1"&gt;''&lt;/span&gt; | str replace &lt;span class="s1"&gt;')$'&lt;/span&gt; &lt;span class="s1"&gt;''&lt;/span&gt; | &lt;span class="nb"&gt;split &lt;/span&gt;row &lt;span class="s1"&gt;'|'&lt;/span&gt;
        &lt;span class="o"&gt;}&lt;/span&gt; | flatten | &lt;span class="nb"&gt;sort&lt;/span&gt; &lt;span class="nt"&gt;-i&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt;
    &lt;span class="o"&gt;}&lt;/span&gt;

    &lt;span class="k"&gt;for &lt;/span&gt;lang &lt;span class="k"&gt;in&lt;/span&gt; &lt;span class="nv"&gt;$LANGUAGES&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt;
        &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;$language&lt;/span&gt; | find &lt;span class="nt"&gt;-ir&lt;/span&gt; &lt;span class="nv"&gt;$lang&lt;/span&gt;.ext_filter | is-empty&lt;span class="o"&gt;)&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt; &lt;span class="k"&gt;continue&lt;/span&gt; &lt;span class="o"&gt;}&lt;/span&gt;

        &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="nv"&gt;$style&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; divider &lt;span class="o"&gt;{&lt;/span&gt;
            &lt;span class="nb"&gt;let &lt;/span&gt;net_width: int &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;do&lt;/span&gt; &lt;span class="nv"&gt;$get_net_width&lt;/span&gt; &lt;span class="nv"&gt;$lang&lt;/span&gt;.symbol.single_open &lt;span class="nv"&gt;$lang&lt;/span&gt;.symbol.single_close
            &lt;span class="nv"&gt;$data&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="o"&gt;[(&lt;/span&gt;&lt;span class="nv"&gt;$lang&lt;/span&gt;.symbol.single_open
                + &lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;''&lt;/span&gt; | fill &lt;span class="nt"&gt;-w&lt;/span&gt; &lt;span class="nv"&gt;$margin_left&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt; + &lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="k"&gt;do&lt;/span&gt; &lt;span class="nv"&gt;$fill_line&lt;/span&gt; &lt;span class="nv"&gt;$net_width&lt;/span&gt; null &lt;span class="nb"&gt;true&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt; + &lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;''&lt;/span&gt; | fill &lt;span class="nt"&gt;-w&lt;/span&gt; &lt;span class="nv"&gt;$margin_right&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt;
                + &lt;span class="nv"&gt;$lang&lt;/span&gt;.symbol.single_close&lt;span class="o"&gt;)]&lt;/span&gt;
            &lt;span class="nb"&gt;break&lt;/span&gt;
        &lt;span class="o"&gt;}&lt;/span&gt;

        match &lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;$lang&lt;/span&gt;.support | get &lt;span class="nv"&gt;$block&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt;
            single &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt;
                &lt;span class="nb"&gt;let &lt;/span&gt;net_width: int &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;do&lt;/span&gt; &lt;span class="nv"&gt;$get_net_width&lt;/span&gt; &lt;span class="nv"&gt;$lang&lt;/span&gt;.symbol.single_open &lt;span class="nv"&gt;$lang&lt;/span&gt;.symbol.single_close
                &lt;span class="nb"&gt;let &lt;/span&gt;delimiter: list&amp;lt;string&amp;gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="o"&gt;[(&lt;/span&gt;&lt;span class="nv"&gt;$lang&lt;/span&gt;.symbol.single_open + &lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;''&lt;/span&gt; | fill &lt;span class="nt"&gt;-w&lt;/span&gt; &lt;span class="nv"&gt;$margin_left&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt; + &lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="k"&gt;do&lt;/span&gt; &lt;span class="nv"&gt;$fill_line&lt;/span&gt; &lt;span class="nv"&gt;$net_width&lt;/span&gt; null &lt;span class="nb"&gt;true&lt;/span&gt;&lt;span class="o"&gt;))]&lt;/span&gt;
                &lt;span class="nv"&gt;$data&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nv"&gt;$data&lt;/span&gt; | each &lt;span class="o"&gt;{&lt;/span&gt;|l|
                    &lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;$lang&lt;/span&gt;.symbol.single_open
                        + &lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;''&lt;/span&gt; | fill &lt;span class="nt"&gt;-w&lt;/span&gt; &lt;span class="nv"&gt;$margin_left&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt; + &lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="k"&gt;do&lt;/span&gt; &lt;span class="nv"&gt;$fill_line&lt;/span&gt; &lt;span class="nv"&gt;$net_width&lt;/span&gt; &lt;span class="nv"&gt;$l&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt; + &lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;''&lt;/span&gt; | fill &lt;span class="nt"&gt;-w&lt;/span&gt; &lt;span class="nv"&gt;$margin_right&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt;
                        + &lt;span class="nv"&gt;$lang&lt;/span&gt;.symbol.single_close&lt;span class="o"&gt;)&lt;/span&gt;
                &lt;span class="o"&gt;}&lt;/span&gt;
                &lt;span class="nv"&gt;$data&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nv"&gt;$delimiter&lt;/span&gt; ++ &lt;span class="nv"&gt;$data&lt;/span&gt; ++ &lt;span class="nv"&gt;$delimiter&lt;/span&gt;
            &lt;span class="o"&gt;}&lt;/span&gt;
            multi-single &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt;
                &lt;span class="nb"&gt;let &lt;/span&gt;net_width: int &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;do&lt;/span&gt; &lt;span class="nv"&gt;$get_net_width&lt;/span&gt; &lt;span class="nv"&gt;$lang&lt;/span&gt;.symbol.multi_open &lt;span class="nv"&gt;$lang&lt;/span&gt;.symbol.multi_close
                &lt;span class="nb"&gt;let &lt;/span&gt;delimiter: list&amp;lt;string&amp;gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="o"&gt;[(&lt;/span&gt;&lt;span class="nv"&gt;$lang&lt;/span&gt;.symbol.multi_open + &lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;''&lt;/span&gt; | fill &lt;span class="nt"&gt;-w&lt;/span&gt; &lt;span class="nv"&gt;$margin_left&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt; + &lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="k"&gt;do&lt;/span&gt; &lt;span class="nv"&gt;$fill_line&lt;/span&gt; &lt;span class="nv"&gt;$net_width&lt;/span&gt; null &lt;span class="nb"&gt;true&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt; + &lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;''&lt;/span&gt; | fill &lt;span class="nt"&gt;-w&lt;/span&gt; &lt;span class="nv"&gt;$margin_right&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt; + &lt;span class="nv"&gt;$lang&lt;/span&gt;.symbol.multi_close&lt;span class="o"&gt;)]&lt;/span&gt;
                &lt;span class="nv"&gt;$data&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nv"&gt;$data&lt;/span&gt; | each &lt;span class="o"&gt;{&lt;/span&gt;|l|
                    &lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;$lang&lt;/span&gt;.symbol.multi_open
                        + &lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;''&lt;/span&gt; | fill &lt;span class="nt"&gt;-w&lt;/span&gt; &lt;span class="nv"&gt;$margin_left&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt; + &lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="k"&gt;do&lt;/span&gt; &lt;span class="nv"&gt;$fill_line&lt;/span&gt; &lt;span class="nv"&gt;$net_width&lt;/span&gt; &lt;span class="nv"&gt;$l&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt; + &lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;''&lt;/span&gt; | fill &lt;span class="nt"&gt;-w&lt;/span&gt; &lt;span class="nv"&gt;$margin_right&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt;
                        + &lt;span class="nv"&gt;$lang&lt;/span&gt;.symbol.multi_close&lt;span class="o"&gt;)&lt;/span&gt;
                &lt;span class="o"&gt;}&lt;/span&gt;
                &lt;span class="nv"&gt;$data&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nv"&gt;$delimiter&lt;/span&gt; ++ &lt;span class="nv"&gt;$data&lt;/span&gt; ++ &lt;span class="nv"&gt;$delimiter&lt;/span&gt;
            &lt;span class="o"&gt;}&lt;/span&gt;
            multi &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt;
                &lt;span class="nb"&gt;let &lt;/span&gt;net_width: int &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;do&lt;/span&gt; &lt;span class="nv"&gt;$get_net_width&lt;/span&gt; &lt;span class="nv"&gt;$lang&lt;/span&gt;.symbol.multi_open &lt;span class="nv"&gt;$lang&lt;/span&gt;.symbol.multi_close
                &lt;span class="nb"&gt;let &lt;/span&gt;margin: int &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;$lang&lt;/span&gt;.symbol.multi_open | str length&lt;span class="o"&gt;)&lt;/span&gt; + &lt;span class="nv"&gt;$margin_left&lt;/span&gt;
                &lt;span class="nb"&gt;let &lt;/span&gt;header: list&amp;lt;string&amp;gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="o"&gt;[(&lt;/span&gt;&lt;span class="nv"&gt;$lang&lt;/span&gt;.symbol.multi_open + &lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;''&lt;/span&gt; | fill &lt;span class="nt"&gt;-w&lt;/span&gt; &lt;span class="nv"&gt;$margin_left&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt; + &lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="k"&gt;do&lt;/span&gt; &lt;span class="nv"&gt;$fill_line&lt;/span&gt; &lt;span class="nv"&gt;$net_width&lt;/span&gt; null &lt;span class="nb"&gt;true&lt;/span&gt;&lt;span class="o"&gt;))]&lt;/span&gt;
                &lt;span class="nb"&gt;let &lt;/span&gt;footer: list&amp;lt;string&amp;gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="o"&gt;[((&lt;/span&gt;&lt;span class="s1"&gt;''&lt;/span&gt; | fill &lt;span class="nt"&gt;-w&lt;/span&gt; &lt;span class="nv"&gt;$margin&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt; + &lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="k"&gt;do&lt;/span&gt; &lt;span class="nv"&gt;$fill_line&lt;/span&gt; &lt;span class="nv"&gt;$net_width&lt;/span&gt; null &lt;span class="nb"&gt;true&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt; + &lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;''&lt;/span&gt; | fill &lt;span class="nt"&gt;-w&lt;/span&gt; &lt;span class="nv"&gt;$margin_right&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt; + &lt;span class="nv"&gt;$lang&lt;/span&gt;.symbol.multi_close&lt;span class="o"&gt;)]&lt;/span&gt;
                &lt;span class="nv"&gt;$data&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nv"&gt;$data&lt;/span&gt; | each &lt;span class="o"&gt;{&lt;/span&gt;|l|
                    &lt;span class="o"&gt;((&lt;/span&gt;&lt;span class="s1"&gt;''&lt;/span&gt; | fill &lt;span class="nt"&gt;-w&lt;/span&gt; &lt;span class="nv"&gt;$margin&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt; + &lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="k"&gt;do&lt;/span&gt; &lt;span class="nv"&gt;$fill_line&lt;/span&gt; &lt;span class="nv"&gt;$net_width&lt;/span&gt; &lt;span class="nv"&gt;$l&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt; + &lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;''&lt;/span&gt; | fill &lt;span class="nt"&gt;-w&lt;/span&gt; &lt;span class="nv"&gt;$margin_right&lt;/span&gt;&lt;span class="o"&gt;))&lt;/span&gt;
                &lt;span class="o"&gt;}&lt;/span&gt;
                &lt;span class="nv"&gt;$data&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nv"&gt;$header&lt;/span&gt; ++ &lt;span class="nv"&gt;$data&lt;/span&gt; ++ &lt;span class="nv"&gt;$footer&lt;/span&gt;
            &lt;span class="o"&gt;}&lt;/span&gt;
        &lt;span class="o"&gt;}&lt;/span&gt;
    &lt;span class="o"&gt;}&lt;/span&gt;

    &lt;span class="nv"&gt;$data&lt;/span&gt; | str &lt;span class="nb"&gt;join&lt;/span&gt; &lt;span class="o"&gt;(&lt;/span&gt;char newline&lt;span class="o"&gt;)&lt;/span&gt;
&lt;span class="o"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  2. Configuring Zed Tasks
&lt;/h2&gt;

&lt;p&gt;The next step is to open your tasks configuration by pressing &lt;code&gt;Ctrl+Shift+P&lt;/code&gt; (or &lt;code&gt;Cmd+Shift+P&lt;/code&gt; on Mac) and searching for &lt;code&gt;zed: open tasks&lt;/code&gt; and add all the tasks you need. You can add the following example or customize &lt;a href="https://github.com/Ragnarokkr/donut/blob/master/windows/zed/tasks.json" rel="noopener noreferrer"&gt;my own tasks&lt;/a&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json-doc"&gt;&lt;code&gt;&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"label"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"Comment Divide - Header - Single Line"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"command"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"use strings/comments.nu 'comment generate' ; r#'$ZED_SELECTED_TEXT'# | comment generate -l (&lt;/span&gt;&lt;span class="se"&gt;\"&lt;/span&gt;&lt;span class="s2"&gt;$ZED_FILENAME&lt;/span&gt;&lt;span class="se"&gt;\"&lt;/span&gt;&lt;span class="s2"&gt; | path parse | get extension) -w 79 | wl-copy"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"use_new_terminal"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"reveal"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"no_focus"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"hide"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"on_success"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"shell"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"with_arguments"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
        &lt;/span&gt;&lt;span class="nl"&gt;"program"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"nu"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
        &lt;/span&gt;&lt;span class="nl"&gt;"args"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"-c"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="err"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"label"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"Comment Divide - Sub-Header - Single Line"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"command"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"use strings/comments.nu 'comment generate' ; r#'$ZED_SELECTED_TEXT'# | comment generate -l (&lt;/span&gt;&lt;span class="se"&gt;\"&lt;/span&gt;&lt;span class="s2"&gt;$ZED_FILENAME&lt;/span&gt;&lt;span class="se"&gt;\"&lt;/span&gt;&lt;span class="s2"&gt; | path parse | get extension) -w 79 -s sub-header | wl-copy"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"use_new_terminal"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"reveal"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"no_focus"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"hide"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"on_success"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"shell"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"with_arguments"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
        &lt;/span&gt;&lt;span class="nl"&gt;"program"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"nu"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
        &lt;/span&gt;&lt;span class="nl"&gt;"args"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"-c"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="err"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"label"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"Comment Divide - Divider"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"command"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"use strings/comments.nu 'comment generate' ; comment generate -l (&lt;/span&gt;&lt;span class="se"&gt;\"&lt;/span&gt;&lt;span class="s2"&gt;$ZED_FILENAME&lt;/span&gt;&lt;span class="se"&gt;\"&lt;/span&gt;&lt;span class="s2"&gt; | path parse | get extension) -s divider -w 79 | wl-copy"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"use_new_terminal"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"reveal"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"no_focus"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"hide"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"on_success"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"shell"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"with_arguments"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
        &lt;/span&gt;&lt;span class="nl"&gt;"program"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"nu"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
        &lt;/span&gt;&lt;span class="nl"&gt;"args"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"-c"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You will need to adjust the path to the script accordingly to your system configuration.&lt;/p&gt;

&lt;h2&gt;
  
  
  3. Keymapping
&lt;/h2&gt;

&lt;p&gt;As an extra bonus, if you want to speed up the things a little bit more, you can open your keymap file by pressing &lt;code&gt;Ctrl+Shift+P&lt;/code&gt; (or &lt;code&gt;Cmd+Shift+P&lt;/code&gt; on Mac) and searching for &lt;code&gt;zed: open keymap file&lt;/code&gt;, and add the following:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"context"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"Editor &amp;amp;&amp;amp; mode == full"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"bindings"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"F14"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"task::Spawn"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"task_name"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"Comment Divide - Header - Single Line"&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;}],&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"F15"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"task::Spawn"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"task_name"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"Comment Divide - Sub-Header - Single Line"&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;}],&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"F16"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"task::Spawn"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"task_name"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"Comment Divide - Divider"&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;}]&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In my configuration I'm using function keys from F14 to F16 to prevent conflicts. Feel free to customize them as you need.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;How to Use It&lt;/strong&gt;
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;Select the text you want to transform into a comment.&lt;/li&gt;
&lt;li&gt;Press &lt;code&gt;Alt+Shift+T&lt;/code&gt; and select your desired comment style; or use your keymapped short-cut.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The task will generate the formatted comment and copy it into your clipboard (I haven't found a way to inject it directly at the cursor position yet). Simply paste it over your selection, and you're good to go!&lt;/p&gt;

&lt;h2&gt;
  
  
  Examples
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Header&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;// ===========================================================================
//                              THIS IS A COMMENT
// ===========================================================================
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Header Single Line&lt;/strong&gt; and &lt;strong&gt;Sub-header Single Line&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;//                              THIS IS A COMMENT
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Header Filled&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;// ===========================================================================
// ===========================  THIS IS A COMMENT  ===========================
// ===========================================================================
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Header Filled Single Line&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;// ============================ THIS IS A COMMENT ============================
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Sub-header&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;// ---------------------------------------------------------------------------
//                              THIS IS A COMMENT
// ---------------------------------------------------------------------------
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Sub-header Filled&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;// ---------------------------------------------------------------------------
// ---------------------------  THIS IS A COMMENT  ---------------------------
// ---------------------------------------------------------------------------
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Sub-header Filled Single Line&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;// ---------------------------- THIS IS A COMMENT ----------------------------
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Comment Divider&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Multi-lines Comment Header&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;// ===========================================================================
//                            THIS IS A MULTI-LINE
//                               COMMENT HEADER
//                          WITH THREE LINES OF TEXT
// ===========================================================================
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Known Limitations
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Manual Injection: As previously mentioned, there is currently no way to inject the text directly into the editor. You must rely on an external clipboard command to copy and paste the result.&lt;/li&gt;
&lt;li&gt;File Naming: The command "guesses" the language style by reading the file extension. Therefore, the file must be saved with a filename; it will not work on "Untitled" buffers.&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>zed</category>
      <category>coding</category>
      <category>nushell</category>
    </item>
    <item>
      <title>WSL: Let's Create Multiple Instances with Shared Home Directory</title>
      <dc:creator>Marco Trulla</dc:creator>
      <pubDate>Fri, 27 Oct 2023 16:36:38 +0000</pubDate>
      <link>https://dev.to/ragnarokkr/wsl-lets-create-multiple-instances-with-shared-home-directory-14lm</link>
      <guid>https://dev.to/ragnarokkr/wsl-lets-create-multiple-instances-with-shared-home-directory-14lm</guid>
      <description>&lt;blockquote&gt;
&lt;p&gt;ℹ️ The article has been re-edited, keeping its content unchanged while enhancing it where possible and making it clearer where needed.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  Table of Contents
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Intro&lt;/li&gt;
&lt;li&gt;Prerequisites&lt;/li&gt;
&lt;li&gt;Preparing the virtual disk for your home&lt;/li&gt;
&lt;li&gt;Mounting the virtual disk on WSL&lt;/li&gt;
&lt;li&gt;Preparing the Linux distribution&lt;/li&gt;
&lt;li&gt;Creating a new session&lt;/li&gt;
&lt;li&gt;Configuring the new session&lt;/li&gt;
&lt;li&gt;Initializing the home virtual disk&lt;/li&gt;
&lt;li&gt;Mounting the virtual disk to the home directory&lt;/li&gt;
&lt;li&gt;Ready, Set, Go 🚀&lt;/li&gt;
&lt;li&gt;Troubleshooting&lt;/li&gt;
&lt;li&gt;References&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Intro &lt;a&gt;&lt;/a&gt;
&lt;/h2&gt;

&lt;p&gt;I often find myself fighting with the problem of having more than one WSL session for the same Linux distribution.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;💡It is not officially possible to install two or more fresh copies of the same distro unless you rename the executable downloaded from the Microsoft Store for each session you want to install.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Of course, it is possible to export a previously installed session and import it as many times as needed, but this leads to another (in my humble opinion) problem – the duplication of your home directory for every imported session. Having more independent sessions, on the other hand, introduces the challenge of mirroring your home directory between each session, thereby necessitating a shared home directory.&lt;/p&gt;

&lt;p&gt;To address this issue, I conducted research on the internet to find a solution that worked for me. I then documented it in a step-by-step guide (or more like a memo for myself), putting it in writing for future reference.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;DISCLAIMER: The following steps require running Windows 10/11 and performing actions that demand Administrator privileges. Incorrect execution can lead to disastrous results. While these steps have proven successful on my system, there is no guarantee they will work on yours. Proceed only if you are confident in your understanding of the process, and I cannot be held responsible if any issues arise.&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Prerequisites &lt;a&gt;&lt;/a&gt;
&lt;/h2&gt;

&lt;p&gt;To follow this guide, it is expected that the system has the following:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Windows 10/11 Education/Pro/Enterprise (Home edition is supported but may require additional steps)&lt;/li&gt;
&lt;li&gt;Windows Subsystem for Linux version 2 installed&lt;/li&gt;
&lt;li&gt;Sufficient disk space for sessions' and home's virtual disks&lt;/li&gt;
&lt;li&gt;Administrator privileges&lt;/li&gt;
&lt;li&gt;One or more Linux rootfs tarballs&lt;/li&gt;
&lt;li&gt;Basic understanding of shell commands&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Preparing the virtual disk for your home &lt;a&gt;&lt;/a&gt;
&lt;/h2&gt;

&lt;blockquote&gt;
&lt;p&gt;⚠️ This step is required &lt;strong&gt;ONLY&lt;/strong&gt; if you haven't already created your own virtual disk for the home directory.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;The initial step is to create a virtual disk serving as our shared home partition across all sessions. Various methods can achieve this.&lt;/p&gt;

&lt;p&gt;
  Option 1: Disk Management snap-in
  &lt;br&gt;
It can be created via the &lt;strong&gt;Disk Management&lt;/strong&gt; snap-in (&lt;code&gt;diskmgmt.msc&lt;/code&gt;) by following these steps:

&lt;ul&gt;
&lt;li&gt;Select &lt;strong&gt;Create VHD&lt;/strong&gt; from the &lt;strong&gt;Action&lt;/strong&gt; menu.&lt;/li&gt;
&lt;li&gt;Set options for &lt;strong&gt;VHDX&lt;/strong&gt; and &lt;strong&gt;Dynamically expanding&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Specify the path and size for the virtual disk file.
&lt;/li&gt;
&lt;/ul&gt;




&lt;/p&gt;
&lt;p&gt;
  Option 2: Windows Settings
  &lt;br&gt;
The same result can be achieved through the &lt;strong&gt;Windows Settings&lt;/strong&gt; panel by selecting &lt;strong&gt;Create VHD&lt;/strong&gt; in &lt;strong&gt;Disks &amp;amp; volumes&lt;/strong&gt; under &lt;strong&gt;Settings &amp;gt; System &amp;gt; Storage &amp;gt; Advanced storage settings&lt;/strong&gt;.&lt;br&gt;


&lt;/p&gt;

&lt;p&gt;
  Option 3: Diskpart
  &lt;blockquote&gt;
&lt;p&gt;ℹ️ To perform these steps, it is necessary to run the console with Administrator privileges.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;The same result can be achieved via the command line using &lt;strong&gt;diskpart&lt;/strong&gt; (&lt;code&gt;diskpart.exe&lt;/code&gt;). Once the console (&lt;code&gt;cmd.exe&lt;/code&gt;) is opened, simply type:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;diskpart.exe

DISKPART&amp;gt; create vdisk &lt;span class="nv"&gt;file&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"&amp;lt;path&amp;gt;"&lt;/span&gt; &lt;span class="nv"&gt;maximum&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&amp;lt;size&amp;gt; &lt;span class="nb"&gt;type&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;expandable
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;where &lt;code&gt;&amp;lt;path&amp;gt;&lt;/code&gt; is the file path for the virtual disk, and &lt;code&gt;&amp;lt;size&amp;gt;&lt;/code&gt; represents the maximum size (in KiB) to be assigned to the virtual disk.&lt;br&gt;
&lt;/p&gt;

&lt;/p&gt;

&lt;p&gt;
  Option 4: Hyper-V
  &lt;blockquote&gt;
&lt;p&gt;ℹ️ Running PowerShell with Administrator privileges is necessary. Users of Windows Home edition need to complete an additional step before being able to use the Hyper-V module.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;In PowerShell it is possible to use the &lt;code&gt;New-VHD&lt;/code&gt; cmdlet from the &lt;code&gt;Hyper-V&lt;/code&gt; module:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight powershell"&gt;&lt;code&gt;&lt;span class="n"&gt;New-VHD&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;-Path&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;path&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;-Dynamic&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;-SizeBytes&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;size&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;where &lt;code&gt;&amp;lt;path&amp;gt;&lt;/code&gt; is the file path to the virtual disk, and &lt;code&gt;&amp;lt;size&amp;gt;&lt;/code&gt; represents the maximum size, specified in MiB, GiB, or TiB, to be assigned to it.&lt;br&gt;
&lt;/p&gt;

&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;⚠️ Ensure that you have sufficient space for the virtual disk, as its minimum size will significantly increase once formatted in &lt;code&gt;ext4&lt;/code&gt;. To estimate the required space, you can use the following formula.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;

&lt;/p&gt;
&lt;div class="katex-element"&gt;
  &lt;span class="katex-display"&gt;&lt;span class="katex"&gt;&lt;span class="katex-mathml"&gt;Reserved Space=Partition Size×(Reserved ext4 Percentage100)
\text{Reserved Space} = \text{Partition Size} \times \left(\frac{\text{Reserved ext4 Percentage}}{100}\right)\newline
&lt;/span&gt;&lt;span class="katex-html"&gt;&lt;span class="base"&gt;&lt;span class="strut"&gt;&lt;/span&gt;&lt;span class="mord text"&gt;&lt;span class="mord"&gt;Reserved Space&lt;/span&gt;&lt;/span&gt;&lt;span class="mspace"&gt;&lt;/span&gt;&lt;span class="mrel"&gt;=&lt;/span&gt;&lt;span class="mspace"&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="base"&gt;&lt;span class="strut"&gt;&lt;/span&gt;&lt;span class="mord text"&gt;&lt;span class="mord"&gt;Partition Size&lt;/span&gt;&lt;/span&gt;&lt;span class="mspace"&gt;&lt;/span&gt;&lt;span class="mbin"&gt;×&lt;/span&gt;&lt;span class="mspace"&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="base"&gt;&lt;span class="strut"&gt;&lt;/span&gt;&lt;span class="minner"&gt;&lt;span class="mopen delimcenter"&gt;&lt;span class="delimsizing size3"&gt;(&lt;/span&gt;&lt;/span&gt;&lt;span class="mord"&gt;&lt;span class="mopen nulldelimiter"&gt;&lt;/span&gt;&lt;span class="mfrac"&gt;&lt;span class="vlist-t vlist-t2"&gt;&lt;span class="vlist-r"&gt;&lt;span class="vlist"&gt;&lt;span&gt;&lt;span class="pstrut"&gt;&lt;/span&gt;&lt;span class="mord"&gt;&lt;span class="mord"&gt;100&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span&gt;&lt;span class="pstrut"&gt;&lt;/span&gt;&lt;span class="frac-line"&gt;&lt;/span&gt;&lt;/span&gt;&lt;span&gt;&lt;span class="pstrut"&gt;&lt;/span&gt;&lt;span class="mord"&gt;&lt;span class="mord text"&gt;&lt;span class="mord"&gt;Reserved ext4 Percentage&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="vlist-s"&gt;​&lt;/span&gt;&lt;/span&gt;&lt;span class="vlist-r"&gt;&lt;span class="vlist"&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="mclose nulldelimiter"&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="mclose delimcenter"&gt;&lt;span class="delimsizing size3"&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="mspace newline"&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;/div&gt;



&lt;p&gt;As example, for a 10GiB virtual disk formatted in ext4:&lt;/p&gt;


&lt;div class="katex-element"&gt;
  &lt;span class="katex-display"&gt;&lt;span class="katex"&gt;&lt;span class="katex-mathml"&gt;10737418240×(5100)=536870912 (~512MiB)
10737418240 \times \left(\frac{5}{100}\right) = 536870912\text{ (\textasciitilde512MiB)}
&lt;/span&gt;&lt;span class="katex-html"&gt;&lt;span class="base"&gt;&lt;span class="strut"&gt;&lt;/span&gt;&lt;span class="mord"&gt;10737418240&lt;/span&gt;&lt;span class="mspace"&gt;&lt;/span&gt;&lt;span class="mbin"&gt;×&lt;/span&gt;&lt;span class="mspace"&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="base"&gt;&lt;span class="strut"&gt;&lt;/span&gt;&lt;span class="minner"&gt;&lt;span class="mopen delimcenter"&gt;&lt;span class="delimsizing size3"&gt;(&lt;/span&gt;&lt;/span&gt;&lt;span class="mord"&gt;&lt;span class="mopen nulldelimiter"&gt;&lt;/span&gt;&lt;span class="mfrac"&gt;&lt;span class="vlist-t vlist-t2"&gt;&lt;span class="vlist-r"&gt;&lt;span class="vlist"&gt;&lt;span&gt;&lt;span class="pstrut"&gt;&lt;/span&gt;&lt;span class="mord"&gt;&lt;span class="mord"&gt;100&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span&gt;&lt;span class="pstrut"&gt;&lt;/span&gt;&lt;span class="frac-line"&gt;&lt;/span&gt;&lt;/span&gt;&lt;span&gt;&lt;span class="pstrut"&gt;&lt;/span&gt;&lt;span class="mord"&gt;&lt;span class="mord"&gt;5&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="vlist-s"&gt;​&lt;/span&gt;&lt;/span&gt;&lt;span class="vlist-r"&gt;&lt;span class="vlist"&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="mclose nulldelimiter"&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="mclose delimcenter"&gt;&lt;span class="delimsizing size3"&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="mspace"&gt;&lt;/span&gt;&lt;span class="mrel"&gt;=&lt;/span&gt;&lt;span class="mspace"&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="base"&gt;&lt;span class="strut"&gt;&lt;/span&gt;&lt;span class="mord"&gt;536870912&lt;/span&gt;&lt;span class="mord text"&gt;&lt;span class="mord"&gt; (~512MiB)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;/div&gt;


&lt;h2&gt;
  
  
  Mounting the virtual disk on WSL &lt;a&gt;&lt;/a&gt;
&lt;/h2&gt;

&lt;p&gt;After creating the virtual disk, it is necessary to make it available in WSL for use by all sessions. In PowerShell type:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight powershell"&gt;&lt;code&gt;&lt;span class="n"&gt;wsl.exe&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;--mount&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;virtual_disk_path&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;--vhd&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;--bare&lt;/span&gt;&lt;span class="w"&gt; 
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This will make the virtual disk at &lt;code&gt;&amp;lt;virtual_disk_path&amp;gt;&lt;/code&gt; available in the current WSL, ready for mounting in every session."&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;ℹ️ This step is required each time a new virtual disk is created and after every system restart, as there is currently no way to automount the disks when WSL is initiated.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  Preparing the Linux distribution &lt;a&gt;&lt;/a&gt;
&lt;/h2&gt;

&lt;p&gt;The guide should work with any Linux distribution that offers a rootfs tarball compatible with WSL.&lt;/p&gt;

&lt;p&gt;For the sake of simplicity, all steps will be executed in PowerShell with Administrator privileges.&lt;/p&gt;

&lt;p&gt;
  Ubuntu
  &lt;br&gt;
You can download an image from &lt;a href="https://cloud-images.ubuntu.com/releases/" rel="noopener noreferrer"&gt;https://cloud-images.ubuntu.com/releases/&lt;/a&gt; (for releases before 22.04) or &lt;a href="https://cloud-images.ubuntu.com/wsl/" rel="noopener noreferrer"&gt;https://cloud-images.ubuntu.com/wsl/&lt;/a&gt; (for releases from 22.04 and later).&lt;br&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight powershell"&gt;&lt;code&gt;&lt;span class="n"&gt;Invoke-WebRequest&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;https://cloud-images.ubuntu.com/wsl/mantic/current/ubuntu-mantic-wsl-amd64-wsl.rootfs.tar.gz&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;-OutFile&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;ubuntu-mantic-wsl-amd64-wsl.rootfs.tar.gz&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;




&lt;/p&gt;

&lt;p&gt;
  Arch
  &lt;blockquote&gt;
&lt;p&gt;⚠️ This section is currently outdated (sorry, I've to find the time to update it 😔). You can follow the &lt;strong&gt;official&lt;/strong&gt; &lt;a href="https://wiki.archlinux.org/title/Install_Arch_Linux_on_WSL" rel="noopener noreferrer"&gt;guide&lt;/a&gt; on the Arch Linux website that explains how to install the OS on WSL.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;strong&gt;Additional steps are required within a Linux session to prepare Arch Linux before importing&lt;/strong&gt;. Firstly, download the &lt;strong&gt;bootstrap&lt;/strong&gt; archive from the Arch repository &lt;a href="https://geo.mirror.pkgbuild.com/iso/latest/" rel="noopener noreferrer"&gt;https://geo.mirror.pkgbuild.com/iso/latest/&lt;/a&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;wget https://geo.mirror.pkgbuild.com/iso/latest/archlinux-bootstrap-x86_64.tar.gz
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;or&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;wget https://geo.mirror.pkgbuild.com/iso/latest/archlinux-bootstrap-x86_64.tar.zst
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;After downloading, it is necessary to prepare the &lt;strong&gt;rootfs&lt;/strong&gt; tarball required for the import in WSL (be sure to use &lt;code&gt;sudo&lt;/code&gt; and check that everything in &lt;code&gt;root.x86_64&lt;/code&gt; is owned by &lt;code&gt;root:root&lt;/code&gt;, this will prevent lot of issues in next steps).&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;sudo tar&lt;/span&gt; &lt;span class="nt"&gt;-xf&lt;/span&gt; archlinux-bootstrap-x86_64.tar.gz
&lt;span class="c"&gt;# or, if tar ball is compressed with zstd (ensure the command is installed before running tar)&lt;/span&gt;
&lt;span class="nb"&gt;sudo tar&lt;/span&gt; &lt;span class="nt"&gt;-xf&lt;/span&gt; archlinux-bootstrap-x86_64.tar.std

&lt;span class="nb"&gt;sudo tar&lt;/span&gt; &lt;span class="nt"&gt;-czvf&lt;/span&gt; ArchWSL.tar.gz &lt;span class="nt"&gt;-C&lt;/span&gt; root.x86_64/ &lt;span class="nb"&gt;.&lt;/span&gt;

&lt;span class="nb"&gt;sudo cp &lt;/span&gt;ArchWSL.tar.gz /mnt/&amp;lt;path_for_tarball&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;where &lt;code&gt;&amp;lt;path_for_tarball&amp;gt;&lt;/code&gt; represents the location on your Windows system where the tarball will be stored for future imports.&lt;br&gt;
&lt;/p&gt;

&lt;br&gt;
&lt;/p&gt;

&lt;h2&gt;
  
  
  Creating a new session &lt;a&gt;&lt;/a&gt;
&lt;/h2&gt;

&lt;p&gt;To create a new Linux session in WSL, the first step is to import the chosen rootfs tarball. In PowerShell, type&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight powershell"&gt;&lt;code&gt;&lt;span class="n"&gt;wsl.exe&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;--import&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;session&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;session_path&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;rootfs_tarball_path&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;--version&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;2&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;where &lt;code&gt;&amp;lt;session&amp;gt;&lt;/code&gt; is the name to assign to the newly created Linux session, &lt;code&gt;&amp;lt;session_path&amp;gt;&lt;/code&gt; is the directory where the session's virtual disk will be created by WSL (the virtual disk always has the name &lt;code&gt;ext4.vhdx&lt;/code&gt;, so it is mandatory to specify a different directory for each unique instance), and &lt;code&gt;&amp;lt;rootfs_tarball_path&amp;gt;&lt;/code&gt; is the path to the tarball downloaded in the previous step.&lt;/p&gt;

&lt;p&gt;Then, start the session to allow WSL to install the distribution:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight powershell"&gt;&lt;code&gt;&lt;span class="n"&gt;wsl.exe&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;-d&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;session&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;At this point, the bare minimum Linux session is ready. However, unlike the default installation procedure via &lt;code&gt;wsl --install&lt;/code&gt;, which installs a session with Ubuntu and an already configured home directory, the session just created only has the root user. Further configuration is required to connect an user home directory to the previously created home virtual disk.&lt;/p&gt;

&lt;h2&gt;
  
  
  Configuring the new session &lt;a&gt;&lt;/a&gt;
&lt;/h2&gt;

&lt;p&gt;WSL sessions can be configured using the &lt;code&gt;wsl.conf&lt;/code&gt; configuration file. This is the first step required to configure the newly created session. Open the file with your preferred editor (here, &lt;code&gt;nano&lt;/code&gt; is used for the sake of simplicity).&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;nano /etc/wsl.conf
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Type in the following, save, and then exit:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight ini"&gt;&lt;code&gt;&lt;span class="nn"&gt;[boot]&lt;/span&gt;
&lt;span class="py"&gt;systemd&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;true&lt;/span&gt;

&lt;span class="nn"&gt;[user]&lt;/span&gt;
&lt;span class="py"&gt;default&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;&amp;lt;user_name&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;where &lt;code&gt;&amp;lt;user_name&amp;gt;&lt;/code&gt; is the default non-root login user when the session starts.&lt;/p&gt;

&lt;p&gt;Alternatively, if no editor is available, it's possibile to redirect stdin to the file:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="nt"&gt;-e&lt;/span&gt; &lt;span class="s2"&gt;"[boot]&lt;/span&gt;&lt;span class="se"&gt;\n&lt;/span&gt;&lt;span class="s2"&gt;systemd=true&lt;/span&gt;&lt;span class="se"&gt;\n\n&lt;/span&gt;&lt;span class="s2"&gt;[user]&lt;/span&gt;&lt;span class="se"&gt;\n&lt;/span&gt;&lt;span class="s2"&gt;default=&amp;lt;user_name&amp;gt;&lt;/span&gt;&lt;span class="se"&gt;\n&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; /etc/wsl.conf
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;blockquote&gt;
&lt;p&gt;💡Further information about the configuration parameters available for the &lt;code&gt;wsl.conf&lt;/code&gt; file can be found in the &lt;a href="https://learn.microsoft.com/en-us/windows/wsl/wsl-config#wslconf" rel="noopener noreferrer"&gt;documentation&lt;/a&gt; on the Microsoft website.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Now, configure root, then create the user and add it to the sudoers group.&lt;/p&gt;

&lt;p&gt;
  Ubuntu
  &lt;br&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;USERNAME&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&amp;lt;user_name&amp;gt;&lt;span class="p"&gt;;&lt;/span&gt; adduser &lt;span class="nv"&gt;$USERNAME&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; passwd &lt;span class="nv"&gt;$USERNAME&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; adduser &lt;span class="nv"&gt;$USERNAME&lt;/span&gt; &lt;span class="nb"&gt;sudo&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="nb"&gt;mkdir&lt;/span&gt; /home/&lt;span class="nv"&gt;$USERNAME&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="nb"&gt;chown&lt;/span&gt; &lt;span class="nv"&gt;$USERNAME&lt;/span&gt;: /home/&lt;span class="nv"&gt;$USERNAME&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;




&lt;/p&gt;

&lt;p&gt;
  Arch
  &lt;br&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# password for root&lt;/span&gt;
passwd

&lt;span class="c"&gt;# new user&lt;/span&gt;
&lt;span class="nv"&gt;USERNAME&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&amp;lt;user_name&amp;gt;&lt;span class="p"&gt;;&lt;/span&gt; useradd &lt;span class="nv"&gt;$USERNAME&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; passwd &lt;span class="nv"&gt;$USERNAME&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="nb"&gt;mkdir&lt;/span&gt; /home/&lt;span class="nv"&gt;$USERNAME&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="nb"&gt;chown&lt;/span&gt; &lt;span class="nv"&gt;$USERNAME&lt;/span&gt;: /home/&lt;span class="nv"&gt;$USERNAME&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;In Arch, you can create a file in &lt;code&gt;/etc/sudoers.d/&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;sudo mkdir&lt;/span&gt; /etc/sudoers.d
&lt;span class="nb"&gt;chmod &lt;/span&gt;0750 /etc/sudoers.d
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;with the following data:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight ini"&gt;&lt;code&gt;&lt;span class="err"&gt;&amp;lt;user_name&amp;gt;&lt;/span&gt; &lt;span class="py"&gt;ALL&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;(ALL:ALL) ALL&lt;/span&gt;

&lt;span class="c"&gt;## echo "&amp;lt;user_name&amp;gt; ALL=(ALL:ALL) ALL" &amp;gt; /etc/sudoers.d/&amp;lt;user_name&amp;gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Since Arch does not come configured as Ubuntu does, it is necessary to initialize and update Pacman:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;curl &lt;span class="nt"&gt;-s&lt;/span&gt; &lt;span class="s2"&gt;"https://gitlab.archlinux.org/pacman/pacman-contrib/-/raw/master/src/rankmirrors.sh.in"&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; rankmirrors.sh

&lt;span class="nb"&gt;chmod&lt;/span&gt; +x ./rankmirrors.sh

pacman-key &lt;span class="nt"&gt;--init&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; pacman-key &lt;span class="nt"&gt;--populate&lt;/span&gt;

&lt;span class="nv"&gt;COUNTRY&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;US&lt;span class="p"&gt;;&lt;/span&gt; curl &lt;span class="nt"&gt;-s&lt;/span&gt; &lt;span class="s2"&gt;"https://archlinux.org/mirrorlist/?country=&lt;/span&gt;&lt;span class="k"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;COUNTRY&lt;/span&gt;&lt;span class="k"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;&amp;amp;protocol=https&amp;amp;ip_version=4"&lt;/span&gt; | &lt;span class="nb"&gt;cut&lt;/span&gt; &lt;span class="nt"&gt;-b&lt;/span&gt; 2- | ./rankmirrors.sh &lt;span class="nt"&gt;-n&lt;/span&gt; 10 - &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; /etc/pacman.d/mirrorlist

pacman &lt;span class="nt"&gt;-Syu&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;And setup the locale:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;"en_US.UTF-8 UTF-8"&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; /etc/locale.gen

locale-gen
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;br&gt;
&lt;/p&gt;

&lt;h2&gt;
  
  
  Initializing the home virtual disk &lt;a&gt;&lt;/a&gt;
&lt;/h2&gt;

&lt;blockquote&gt;
&lt;p&gt;⚠️ These steps are required &lt;strong&gt;ONLY&lt;/strong&gt; if the virtual disk has not yet been initialized and formatted. &lt;strong&gt;DO NOT PERFORM THESE STEPS ON AN EXISTING VIRTUAL DISK, OR YOU WILL LOSE ALL THE DATA ON IT.&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;The first thing to do is to search for the device mounted in WSL:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;lsblk

NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT  
...  
...  
sdc    8:48   0 10G   0 disk  
...
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In the example above, the device is &lt;code&gt;sdc&lt;/code&gt; with a size of &lt;code&gt;10G&lt;/code&gt;. You will need to identify the device for the virtual disk you prepared as your home.&lt;/p&gt;

&lt;p&gt;Once found, it must be initialized by creating the partition table using the &lt;code&gt;parted&lt;/code&gt; command. You can install it on Ubuntu with &lt;code&gt;apt install parted&lt;/code&gt;, or on Arch with &lt;code&gt;pacman -S parted&lt;/code&gt;.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;parted /dev/sdc mklabel msdos
parted &lt;span class="nt"&gt;-a&lt;/span&gt; optimal /dev/sdc mkpart primary ext4 0% 100%
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Here, replace &lt;code&gt;/dev/sdc&lt;/code&gt; with the specific device you previously found.&lt;/p&gt;

&lt;p&gt;If everything went OK , a new partition will be shown under the device you specified:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;lsblk &lt;span class="nt"&gt;-o&lt;/span&gt; NAME,FSTYPE,SIZE,MOUNTPOINT /dev/sdc
NAME FSTYPE SIZE MOUNTPOINT  
sdc          10G  
└─sdc1       10G
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;It is not done yet. The new partition still needs to be formatted:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;mkfs.ext4 /dev/sdc1

mke2fs 1.47.0 &lt;span class="o"&gt;(&lt;/span&gt;5-Feb-2023&lt;span class="o"&gt;)&lt;/span&gt;
Discarding device blocks: &lt;span class="k"&gt;done
&lt;/span&gt;Creating filesystem with 2621184 4k blocks and 655360 inodes
Filesystem UUID: c91c874f-28fb-4d81-8eea-004fee865db0
Superblock backups stored on blocks:
        32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632

Allocating group tables: &lt;span class="k"&gt;done
&lt;/span&gt;Writing inode tables: &lt;span class="k"&gt;done
&lt;/span&gt;Creating journal &lt;span class="o"&gt;(&lt;/span&gt;16384 blocks&lt;span class="o"&gt;)&lt;/span&gt;: &lt;span class="k"&gt;done
&lt;/span&gt;Writing superblocks and filesystem accounting information: &lt;span class="k"&gt;done&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;And labeled (this is not mandatory, but it can be useful later as a replacement for the UUID value):&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;e2label /dev/sdc1 wsl-home
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Mounting the virtual disk to the home directory &lt;a&gt;&lt;/a&gt;
&lt;/h2&gt;

&lt;p&gt;This step is no different from the usual procedure used to mount external devices in your Linux filesystem.&lt;/p&gt;

&lt;p&gt;Once found the device:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;blkid

...
/dev/sdc1: &lt;span class="nv"&gt;LABEL&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"wsl-home"&lt;/span&gt; &lt;span class="nv"&gt;UUID&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"e9999b9b-5a8e-41e1-9881-a2f766838798"&lt;/span&gt; &lt;span class="nv"&gt;BLOCK_SIZE&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"4096"&lt;/span&gt; &lt;span class="nv"&gt;TYPE&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"ext4"&lt;/span&gt; ....  
...
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You can use its &lt;code&gt;LABEL&lt;/code&gt; or &lt;code&gt;UUID&lt;/code&gt; value for the home mount point. Open the &lt;code&gt;/etc/fstab&lt;/code&gt; file and add:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;UUID=&amp;lt;device_UUID&amp;gt; /home/&amp;lt;user_name&amp;gt; ext4 defaults 0 2
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Alternatively (if you are sure no other devices with the same label are mounted in WSL):&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;LABEL=&amp;lt;device_label&amp;gt; /home/&amp;lt;user_name&amp;gt; ext4 defaults 0 2
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Ready, Set, Go 🚀 &lt;a&gt;&lt;/a&gt;
&lt;/h2&gt;

&lt;p&gt;If you've reached this point without any problems, you're almost done!&lt;/p&gt;

&lt;p&gt;The last thing to do is to log out from the current session:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;exit&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Restart it:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight powershell"&gt;&lt;code&gt;&lt;span class="n"&gt;wsl.exe&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;-t&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;session&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="n"&gt;wsl.exe&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;-d&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;session&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;And configure it according to your needs.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F0947bm27yv1hwl45e2gs.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F0947bm27yv1hwl45e2gs.jpg" alt=" " width="800" height="404"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Yay!&lt;/p&gt;

&lt;h2&gt;
  
  
  Troubleshooting &lt;a&gt;&lt;/a&gt;
&lt;/h2&gt;

&lt;p&gt;
  No Hyper-V installed on the system
  &lt;br&gt;
To use the &lt;code&gt;New-VHD&lt;/code&gt; cmdlet in PowerShell, the &lt;strong&gt;Hyper-V&lt;/strong&gt; service must be enabled. This feature is supported only with Windows 10/11 Education, Pro, or Enterprise editions:

&lt;ul&gt;
&lt;li&gt;Through &lt;strong&gt;Hyper-V&lt;/strong&gt; and sub-options in &lt;strong&gt;Windows Features&lt;/strong&gt; from the Control Panel.&lt;/li&gt;
&lt;li&gt;Through PowerShell (with Administrator privileges) using the command: &lt;code&gt;Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Hyper-V -All&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Through the command line (with Administrator privileges) using the command: &lt;code&gt;DISM /Online /Enable-Feature /All /FeatureName:Microsoft-Hyper-V&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;However, if you are using Windows 10/11 Home edition, it is possible to modify the system to support &lt;strong&gt;Hyper-V&lt;/strong&gt; through a workaround.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;⚠️ This is an unsupported method to enable Windows 10/11 Home edition to run the &lt;strong&gt;Hyper-V&lt;/strong&gt; service. As mentioned, it's not officially supported by Microsoft, there's no guarantee it will work on your machine, it could lead to unexpected issues, and it may potentially violate the terms of the software's license agreement. &lt;strong&gt;Use it at your own risk&lt;/strong&gt;.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Create a batch file that will be executed as Administrator, and it will install and enable the service on the machine. Open your preferred text editor and type:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;pushd&lt;/span&gt; &lt;span class="s2"&gt;"%~dp0"&lt;/span&gt;  

&lt;span class="nb"&gt;dir&lt;/span&gt; /b %SystemRoot%&lt;span class="se"&gt;\s&lt;/span&gt;ervicing&lt;span class="se"&gt;\P&lt;/span&gt;ackages&lt;span class="se"&gt;\*&lt;/span&gt;Hyper-V&lt;span class="k"&gt;*&lt;/span&gt;.mum &lt;span class="o"&gt;&amp;gt;&lt;/span&gt;hyper-v.txt

&lt;span class="k"&gt;for&lt;/span&gt; /f %%i &lt;span class="k"&gt;in&lt;/span&gt; &lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'findstr /i . hyper-v.txt 2^&amp;gt;nul'&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt; &lt;span class="k"&gt;do &lt;/span&gt;dism /online /norestart /add-package:&lt;span class="s2"&gt;"%SystemRoot%&lt;/span&gt;&lt;span class="se"&gt;\s&lt;/span&gt;&lt;span class="s2"&gt;ervicing&lt;/span&gt;&lt;span class="se"&gt;\P&lt;/span&gt;&lt;span class="s2"&gt;ackages&lt;/span&gt;&lt;span class="se"&gt;\%&lt;/span&gt;&lt;span class="s2"&gt;%i"&lt;/span&gt;  

del hyper-v.txt  

dism /online /enable-feature /featurename:Microsoft-Hyper-V &lt;span class="nt"&gt;-All&lt;/span&gt; /LimitAccess /ALL  

pause
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Save it (e.g., &lt;code&gt;Enable-Hyper_V.bat&lt;/code&gt;), and once executed, the service should be available on your machine.&lt;br&gt;
&lt;/p&gt;

&lt;br&gt;
&lt;/p&gt;

&lt;p&gt;
  Missing device on system reboot
  &lt;br&gt;
As far as I know, there is currently no officially supported way to have your (virtual) external drives mounted in WSL when the operating system starts.

&lt;p&gt;However, with a bit of hacking, it is possible to achieve this result.&lt;/p&gt;
&lt;h3&gt;
  
  
  Option 1: Task Scheduler or Startup Folder
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Task Scheduler&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;run (&lt;code&gt;WIN+R&lt;/code&gt;) the snap-in &lt;code&gt;taskschd.msc&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;select &lt;code&gt;Create Task...&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;General&lt;/strong&gt; tab: type the task name in &lt;code&gt;Name&lt;/code&gt;: "WSL Home Mount" for example&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;General&lt;/strong&gt; tab: add a description if you want&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;General&lt;/strong&gt; tab: select &lt;code&gt;Run only when user is logged on&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;General&lt;/strong&gt; tab: select &lt;code&gt;Windows 10&lt;/code&gt; for &lt;code&gt;Configure for&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Triggers&lt;/strong&gt; tab: click &lt;code&gt;New...&lt;/code&gt;, create &lt;code&gt;On Access&lt;/code&gt; trigger, and set it for your user&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Actions&lt;/strong&gt; tab: click &lt;code&gt;New...&lt;/code&gt;, create &lt;code&gt;Start Program&lt;/code&gt;, set &lt;code&gt;C:\Windows\System32\wsl.exe&lt;/code&gt; for &lt;code&gt;Program or Script&lt;/code&gt;, and &lt;code&gt;--mount &amp;lt;virtual_disk_path&amp;gt; --vhd --bare&lt;/code&gt; for &lt;code&gt;Arguments&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Conditions&lt;/strong&gt; tab: deselect everything&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Settings&lt;/strong&gt; tab: activate the first 5 checkboxes, and set to &lt;code&gt;Don't start a new instance&lt;/code&gt; if the task is already running&lt;/li&gt;
&lt;li&gt;Save and reboot.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Startup Folder&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;open the folder: &lt;code&gt;WIN+R&lt;/code&gt;, &lt;code&gt;shell:startup&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;create a batch file and name it as you want (e.g. &lt;code&gt;wsl_home_mount.bat&lt;/code&gt;)&lt;/li&gt;
&lt;li&gt;type: &lt;code&gt;@echo off; C:\Windows\System32\wsl.exe --mount &amp;lt;virtual_disk_path&amp;gt; --vhd --bare&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Save and reboot &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;By doing so, every time Windows will restart, the specified virtual disk will be mounted into WSL and made ready for all the Linux sessions.&lt;/p&gt;
&lt;h3&gt;
  
  
  Option 2: Windows Terminal settings
&lt;/h3&gt;

&lt;p&gt;Replace the default startup command line for the specific Linux session in the Windows Terminal&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight powershell"&gt;&lt;code&gt;&lt;span class="n"&gt;pwsh.exe&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;-Command&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"wsl.exe -d &amp;lt;session&amp;gt; --mount &amp;lt;virtual_disk_path&amp;gt; --vhd --bare  --cd ~ | out-null; wsl.exe -d &amp;lt;session&amp;gt; --cd ~"&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;With this hack, WSL will attempt to mount the virtual disk and change to the home (&lt;code&gt;~&lt;/code&gt;) directory every time the session starts, if not already mounted.&lt;/p&gt;

&lt;p&gt;The (minor) issue with this workaround is that the Windows Terminal won't recognize the started process as a Linux session but rather as a PowerShell process running a script. For this reason, &lt;strong&gt;Option 1&lt;/strong&gt; is the preferred choice to solve the problem.&lt;br&gt;
&lt;/p&gt;

&lt;br&gt;
&lt;/p&gt;

&lt;p&gt;
  VSCode and other Windows executables do not start
  &lt;br&gt;
This problem may arise with certain Linux distributions, and it is connected to the fact that WSL does not correctly configure the &lt;a href="https://docs.kernel.org/admin-guide/binfmt-misc.html" rel="noopener noreferrer"&gt;Linux Kernel Support for Binary Formats&lt;/a&gt; to work with the &lt;a href="https://learn.microsoft.com/en-us/windows/wsl/filesystems" rel="noopener noreferrer"&gt;WSL interoperability&lt;/a&gt;.

&lt;p&gt;To solve the issue, just type:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;sudo &lt;/span&gt;sh &lt;span class="nt"&gt;-c&lt;/span&gt; &lt;span class="s1"&gt;'echo :WSLInterop:M::MZ::/init:PF &amp;gt; /usr/lib/binfmt.d/WSLInterop.conf'&lt;/span&gt;
&lt;span class="nb"&gt;sudo &lt;/span&gt;systemctl restart systemd-binfmt
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;br&gt;
&lt;/p&gt;

&lt;p&gt;
  Home directory permissions and race conditions
  &lt;br&gt;
As the home directory is shared between different Linux sessions, it is advisable for each session to use the same username to prevent conflicts and permission issues. (You may still need to run a &lt;code&gt;chown -R $(whoami): /home/$(whoami)&lt;/code&gt; if any issues arise when switching from one session to another.)

&lt;p&gt;Given that all sessions share the same home directory, it is not recommended to work with different sessions simultaneously to prevent race conditions and compromise the data integrity on the mounted virtual disk for the home directory.&lt;br&gt;
&lt;/p&gt;

&lt;br&gt;
&lt;/p&gt;

&lt;h2&gt;
  
  
  References &lt;a&gt;&lt;/a&gt;
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://www.ubackup.com/enterprise-backup/windows-11-hyper-v-not-showing.html" rel="noopener noreferrer"&gt;https://www.ubackup.com/enterprise-backup/windows-11-hyper-v-not-showing.html&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://superuser.com/questions/1515246/how-to-add-second-wsl2-ubuntu-distro-fresh-install" rel="noopener noreferrer"&gt;https://superuser.com/questions/1515246/how-to-add-second-wsl2-ubuntu-distro-fresh-install&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://devblogs.microsoft.com/commandline/systemd-support-is-now-available-in-wsl/" rel="noopener noreferrer"&gt;https://devblogs.microsoft.com/commandline/systemd-support-is-now-available-in-wsl/&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://learn.microsoft.com/en-us/windows/wsl/wsl-config#wslconf" rel="noopener noreferrer"&gt;https://learn.microsoft.com/en-us/windows/wsl/wsl-config#wslconf&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://anthony-f-tannous.medium.com/wsl2-how-to-prepare-and-attach-virtual-drives-vhd-ac17b1fc7a61" rel="noopener noreferrer"&gt;https://anthony-f-tannous.medium.com/wsl2-how-to-prepare-and-attach-virtual-drives-vhd-ac17b1fc7a61&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://learn.microsoft.com/en-us/windows/wsl/wsl2-mount-disk" rel="noopener noreferrer"&gt;https://learn.microsoft.com/en-us/windows/wsl/wsl2-mount-disk&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://superuser.com/a/1727367/215993" rel="noopener noreferrer"&gt;https://superuser.com/a/1727367/215993&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/microsoft/WSL/issues/8952#issuecomment-1568212651" rel="noopener noreferrer"&gt;https://github.com/microsoft/WSL/issues/8952#issuecomment-1568212651&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.reddit.com/r/bashonubuntuonwindows/comments/gxbufo/running_arch_on_wsl_from_the_source_images_the/" rel="noopener noreferrer"&gt;https://www.reddit.com/r/bashonubuntuonwindows/comments/gxbufo/running_arch_on_wsl_from_the_source_images_the/&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://wiki.archlinux.org/title/Users_and_groups" rel="noopener noreferrer"&gt;https://wiki.archlinux.org/title/Users_and_groups&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I hope this guide has been helpful in resolving the problem I was stuck in for a while. I will try to keep it updated with new useful information.&lt;/p&gt;

&lt;p&gt;That's all, folks!&lt;/p&gt;

</description>
      <category>windows</category>
      <category>linux</category>
      <category>wsl</category>
      <category>shared</category>
    </item>
  </channel>
</rss>
