<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Ethically Sourced Thoughts]]></title><description><![CDATA[Ethically Sourced Thoughts]]></description><link>https://blog.freytes.co</link><generator>RSS for Node</generator><lastBuildDate>Thu, 16 Apr 2026 01:30:20 GMT</lastBuildDate><atom:link href="https://blog.freytes.co/rss.xml" rel="self" type="application/rss+xml"/><language><![CDATA[en]]></language><ttl>60</ttl><item><title><![CDATA[Moving the WSL installation of Kali Linux to a different location]]></title><description><![CDATA[Open PowerShell as an administrator

Run the following command to install Chocolatey via PowerShell (https://chocolatey.org/install)


 - Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.N...]]></description><link>https://blog.freytes.co/moving-kali</link><guid isPermaLink="true">https://blog.freytes.co/moving-kali</guid><category><![CDATA[hacking]]></category><category><![CDATA[Powershell]]></category><dc:creator><![CDATA[Christopher Freytes]]></dc:creator><pubDate>Fri, 10 Dec 2021 16:22:27 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/unsplash/rFnKnVz6XmQ/upload/v1639153861435/jO_n27kW4L.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<ul>
<li><p>Open PowerShell as an administrator</p>
</li>
<li><p>Run the following command to install Chocolatey via PowerShell (https://chocolatey.org/install)</p>
</li>
</ul>
<pre><code> <span class="hljs-operator">-</span> Set<span class="hljs-operator">-</span>ExecutionPolicy Bypass <span class="hljs-operator">-</span>Scope Process <span class="hljs-operator">-</span>Force; [System.Net.ServicePointManager]::SecurityProtocol <span class="hljs-operator">=</span> [System.Net.ServicePointManager]::SecurityProtocol <span class="hljs-operator">-</span>bor <span class="hljs-number">3072</span>; iex ((New<span class="hljs-operator">-</span>Object System.Net.WebClient).DownloadString(<span class="hljs-string">'https://community.chocolatey.org/install.ps1'</span>))
</code></pre><ul>
<li>Set permissions to the target folder.</li>
</ul>
<pre><code><span class="hljs-operator">-</span> Run the following in powershell

<span class="hljs-operator">-</span> whoami

example\chris

<span class="hljs-operator">-</span> icacls D:\<span class="hljs-operator">&lt;</span>example_folder<span class="hljs-operator">&gt;</span> <span class="hljs-operator">/</span>grant <span class="hljs-string">"chris:(OI)(CI)(F)"</span>
</code></pre><ul>
<li>Install lxrunoffline (https://github.com/DDoSolitary/LxRunOffline)</li>
</ul>
<pre><code><span class="hljs-bullet">-</span> choco install lxrunoffline
</code></pre><ul>
<li>Find out your running linux version</li>
</ul>
<pre><code><span class="hljs-operator">-</span> Run the following in powershell

<span class="hljs-operator">-</span> wsl.exe <span class="hljs-operator">-</span>l <span class="hljs-operator">-</span>v

<span class="hljs-operator">*</span>kali<span class="hljs-operator">-</span>linux running
</code></pre><ul>
<li>If your Linux instance is running</li>
</ul>
<pre><code><span class="hljs-operator">-</span> Run the following in powershell

<span class="hljs-operator">-</span> wsl <span class="hljs-operator">-</span><span class="hljs-operator">-</span>shutdown
</code></pre><ul>
<li>Move Kali-Linux to another directory using lxrunoffline</li>
</ul>
<pre><code><span class="hljs-operator">-</span> lxrunoffline move <span class="hljs-operator">-</span>n kali<span class="hljs-operator">-</span>linux <span class="hljs-operator">-</span>d d:\<span class="hljs-operator">&lt;</span>example_folder<span class="hljs-operator">&gt;</span>
</code></pre><ul>
<li>Run the distribution</li>
</ul>
<pre><code><span class="hljs-operator">-</span> Run the following in powershell

<span class="hljs-operator">-</span> lxrunoffline run <span class="hljs-operator">-</span>n kali<span class="hljs-operator">-</span>linux <span class="hljs-operator">-</span>w
</code></pre><ul>
<li>Confirm that the instance is running</li>
</ul>
<pre><code><span class="hljs-operator">-</span> Run the following in powershell

<span class="hljs-operator">-</span> wsl.exe <span class="hljs-operator">-</span>l <span class="hljs-operator">-</span>v
</code></pre><ul>
<li><p>Please note: Once moving over Kali-Linux you may need to set folder exclusions so that pentesting tools would work as expected, see (https://westoahu.hawaii.edu/cyber/best-practices/best-practices-weekly-summaries/how-to-install-kali-linux-as-an-app-in-windows-10/)</p>
</li>
<li><p>Please note: If this a fresh install of Kali-Linux it is recommended that the WSL be upgraded to WSL 2. See (https://winaero.com/update-from-wsl-to-wsl-2-in-windows-10/)</p>
</li>
</ul>
<p>Reasons to move the Kali-Linux install: By default the location of this application is in the root of C. If you are using the windows store to install Kali-Linux, it will use this default location. When using the lxrunoffline tool the registry keys which default the location are changed, and the application is moved without issues.</p>
<p>Sources: https://superuser.com/questions/1113906/can-i-move-the-linux-subsystem-to-a-different-drive</p>
]]></content:encoded></item></channel></rss>