Personalization Add or Remove "Open Linux shell here" Context Menu in Windows 11


  • Staff
Linux_banner.png

This tutorial will show you how to add or remove the "Open Linux shell here" context menu for all users in Windows 11.

When you install WSL in Windows 11, you can press the Shift key while right clicking on the background of a open folder or drive window to see and use the Open Linux shell here context menu.

When you use the Open Linux shell here context menu, it opens your default WSL distro shell in Windows Terminal at the current location.

This tutorial will also let you add the Open Linux shell here context menu for when you right click on a folder or drive, and click/tap on Show more options. This is in addition to the default of press the Shift key while right clicking on the background of a open folder or drive window.

Since Windows 11 already has a Open in Terminal context menu to use, you can remove the Open Linux shell here context menu if wanted without having to uninstall WSL.

While you must be signed in as an administrator to add or remove the Open Linux shell here context menu, all users can use the context menu.



Contents

  • Option One: Add/Restore Default "Open Linux shell here" context menu
  • Option Two: Add "Open Linux shell here" to "Shift + Right click" context menu
  • Option Three: Add "Open Linux shell here" to "Show more options" context menu
  • Option Two: Remove "Open Linux shell here" from context menu


EXAMPLE: "Open Linux shell here" context menu and Linux shell opened in Windows Terminal

Open_Linux_shell_here_context_menu.png
Linux_shell_opened_in_Windows_Terminal.png





Option One

Add/Restore Default "Open Linux shell here" context menu


This is the default setting.

This option will only let you see the "Open Linux shell here" context menu when you press the Shift key while right clicking on the background of a open folder or drive window.


1 Click/tap on the Download button below to download the file below.

Add_default_Shift+Right-click_Open_Linux_shell_here_context_menu.reg


(Contents of REG file for reference)
Code:
Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\Directory\Background\shell\WSL]
@="@wsl.exe,-2"
"Extended"=""
"NoWorkingDirectory"=""

[HKEY_CLASSES_ROOT\Directory\Background\shell\WSL\command]
@="wsl.exe --cd \"%V\""

[-HKEY_CLASSES_ROOT\Directory\shell\WSL]

[-HKEY_CLASSES_ROOT\Drive\shell\WSL]

2 Save the .reg file to your desktop.

3 Double click/tap on the downloaded .reg file to merge it.

4 When prompted, click/tap on Run, Yes (UAC), Yes, and OK to approve the merge.

5 You can now delete the downloaded .reg file if you like.




Option Two

Add "Open Linux shell here" to "Shift + Right click" context menu


This option will let you see the "Open Linux shell here" context menu when you press the Shift key while right clicking on a folder, drive, or the background of a open folder or drive window.


1 Click/tap on the Download button below to download the file below.

Add_Shift+Right-click_Open_Linux_shell_here_context_menu.reg


(Contents of REG file for reference)
Code:
Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\Directory\Background\shell\WSL]
@="@wsl.exe,-2"
"Extended"=""
"NoWorkingDirectory"=""

[HKEY_CLASSES_ROOT\Directory\Background\shell\WSL\command]
@="wsl.exe --cd \"%V\""

[HKEY_CLASSES_ROOT\Directory\shell\WSL]
@="@wsl.exe,-2"
"Extended"=""
"NoWorkingDirectory"=""

[HKEY_CLASSES_ROOT\Directory\shell\WSL\command]
@="wsl.exe --cd \"%V\""

[HKEY_CLASSES_ROOT\Drive\shell\WSL]
@="@wsl.exe,-2"
"Extended"=""
"NoWorkingDirectory"=""

[HKEY_CLASSES_ROOT\Drive\shell\WSL\command]
@="wsl.exe --cd \"%V\""

2 Save the .reg file to your desktop.

3 Double click/tap on the downloaded .reg file to merge it.

4 When prompted, click/tap on Run, Yes (UAC), Yes, and OK to approve the merge.

5 You can now delete the downloaded .reg file if you like.




Option Three

Add "Open Linux shell here" to "Show more options" context menu


This option will let you see the "Open Linux shell here" context menu when you press the Shift key while right clicking on a folder, drive, or the background of a open folder or drive window.

This option will also let you see the "Open Linux shell here" context menu when you right click on a folder or drive, and click/tap on Show more options.


1 Click/tap on the Download button below to download the file below.

Add_Open_Linux_shell_here_context_menu.reg


(Contents of REG file for reference)
Code:
Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\Directory\Background\shell\WSL]
@="@wsl.exe,-2"
"Extended"=-
"NoWorkingDirectory"=""

[HKEY_CLASSES_ROOT\Directory\Background\shell\WSL\command]
@="wsl.exe --cd \"%V\""

[HKEY_CLASSES_ROOT\Directory\shell\WSL]
@="@wsl.exe,-2"
"Extended"=-
"NoWorkingDirectory"=""

[HKEY_CLASSES_ROOT\Directory\shell\WSL\command]
@="wsl.exe --cd \"%V\""

[HKEY_CLASSES_ROOT\Drive\shell\WSL]
@="@wsl.exe,-2"
"Extended"=-
"NoWorkingDirectory"=""

[HKEY_CLASSES_ROOT\Drive\shell\WSL\command]
@="wsl.exe --cd \"%V\""

2 Save the .reg file to your desktop.

3 Double click/tap on the downloaded .reg file to merge it.

4 When prompted, click/tap on Run, Yes (UAC), Yes, and OK to approve the merge.

5 You can now delete the downloaded .reg file if you like.




Option Four

Remove "Open Linux shell here" from context menu


This option will completely remove the "Open Linux shell here" context menu no matter which option above was used to add it.


1 Click/tap on the Download button below to download the file below.

Remove_Open_Linux_shell_here_context_menu.reg


(Contents of REG file for reference)
Code:
Windows Registry Editor Version 5.00

[-HKEY_CLASSES_ROOT\Directory\Background\shell\WSL]

[-HKEY_CLASSES_ROOT\Directory\shell\WSL]

[-HKEY_CLASSES_ROOT\Drive\shell\WSL]

2 Save the .reg file to your desktop.

3 Double click/tap on the downloaded .reg file to merge it.

4 When prompted, click/tap on Run, Yes (UAC), Yes, and OK to approve the merge.

5 You can now delete the downloaded .reg file if you like.


That's it,
Shawn Brink


 

Attachments

  • Linux.png
    Linux.png
    5.2 KB · Views: 11
  • Add_default_Shift+Right-click_Open_Linux_shell_here_context_menu.reg
    988 bytes · Views: 25
  • Add_Open_Linux_shell_here_context_menu.reg
    1.5 KB · Views: 32
  • Add_Shift+Right-click_Open_Linux_shell_here_context_menu.reg
    1.5 KB · Views: 40
  • Remove_Open_Linux_shell_here_context_menu.reg
    702 bytes · Views: 26
Last edited:

Latest Support Threads

Back
Top Bottom