Microsoft Windows [Version 10.0.22621.382]

WSL Version

  • [X] WSL 2
  • [ ] WSL 1

Kernel Version

Distro Version

Kali Linux Rolling

Other Software

No response

Repro Steps

On Windows PowerShell:

wsl --update wsl --install kali-linux image

On Kali Linux Window:

After inputting new UNIX username and pass >>


Expected Behavior

The kali-linux distro is successfully installed and runs without any error message every time.

Actual Behavior

Every time when a new kali-Linux window is opening:


Diagnostic Logs


I was customizing zsh shell in kali. When I encountered some error messages and cant anyway get rid of those, I decided to remove the distro completely.

Using following steps:

  1. Uninstalled Kali Linux from Apps
  2. Open PowerShell

run: wsl -l


run: wsl --unregister kali-linux


run: wsl -l



I reinstalled the kali-linux again using wsl --install kali-linux command. And started facing this error. I have tried again to uninstall and reinstall but the issue persists.


Temporary Solution:

When I delved more into this, I found out there is an error in /etc/profile file in the shell at a certain line. I could fix the issue by adding $i in a line after a . as seen in other distros' same file.


The issue is solved temporarily, but further, down the road, it introduces more errors. For example, when I try to reset the Kali Linux app, it'd not reset back to its first state but would not run anymore. Then I would go into further error checking and go into solving the further issues.



Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy