Wednesday, February 19, 2020

Remove “Open Linux Shell Here” Option from Folder Context Menu

0
SUMMARY: This tutorial will help you in removing "Open Linux shell here" option from folder context menu (right-click menu) in Windows 10. It'll also help you in always showing "Open Linux shell here" option in folder context menu without pressing SHIFT key.

windows 10 tips
windows 10 tips

If you are using a newer Windows 10 version and you installed and enabled "Windows Subsystem for Linux" (WSL) (also known as Bash on Ubuntu) feature, you might have noticed a new option "Open Linux shell here" in folder context menus (right-click menus).


The new option appears in context menu when you press and hold SHIFT key and right-click on a folder or empty area (white space) in a folder in File Explorer. It's called extended context menu option which is only shown if SHIFT key is pressed.


Following screenshots show the new "Open Linux shell here" option in folder context menus:
Option appearing when right-clicked on a folder:


Open_Linux_Shell_Here_Directory_Right_Click_Menu_Windows_10.png


Option appearing when right-clicked on empty area in a folder:


Show_Open_Linux_Shell_Here_Option_Folder_Context_Menu_Windows_10.png


Windows 10 displays this new option only if you have activated and enabled WSL feature, otherwise it's not shown in context menus.

If you are using WSL feature in Windows 10 but don't want to use this new option in folder context menus, this tutorial will help you in getting rid of this new option.
You can remove the new "Open Linux shell here" option from folder context menu by modifying Windows Registry.

If you also want to delete the  "Open Linux shell here" option from context menu, check out following steps:


1. Press WIN+R keys together to launch RUN dialog box. Now type regedit in RUN and press Enter. It'll open Registry Editor.
2. Now go to following key:
HKEY_CLASSES_ROOT\Directory
Under "Directory" key, you'll see the following 2 sub-keys:
  • Background
  • shell
The "Background" key also contains "shell" key under it.
Both "shell" keys i.e. "HKEY_CLASSES_ROOT\Directory\Background\shell\" and "HKEY_CLASSES_ROOT\Directory\shell\" contain a sub-key "WSL".


Remove_Open_Linux_Shell_Here_Option_Folder_Context_Menu_Windows_10.png


WSL is the main key which is responsible for showing "Open Linux shell here" option in folder context menus.


The WSL key present under "HKEY_CLASSES_ROOT\Directory\Background\shell\" key shows the "Open Linux shell here" option when you right-click on empty area in a folder.
The WSL key present under "HKEY_CLASSES_ROOT\Directory\shell\" key shows the "Open Linux shell here" option when you right-click directly on a folder.


3. To remove "Open Linux shell here" option from folder context menu, we'll need to delete WSL key present under both keys.


Windows 10 will not allow you to delete the key as you wouldn't have required permissions.
You'll need to take ownership and full control of "WSL" (and "command" key present under it) to be able to delete it. You can take help of following guides to take ownership of the Registry key:

After taking ownership and full control, delete WSL key.


That's it. Close Registry Editor and "Open Linux shell here" option will disappear from folder context menus. You can check by pressing SHIFT key and right-clicking on a folder or empty area in a folder and the "Open Linux shell here" option will no longer appear in context menu.
BONUS TIP: Always Show "Open Linux Shell Here" Option


If you don't want to delete "Open Linux shell here" option in folder context menu but want to always show it in context menu without any need of pressing SHIFT key, delete "Extended" string present in right-side pane of WSL key. Now the option will always appear when you right-click on a folder or empty area in a folder. You'll not need to press and hold SHIFT key to make the option available.
Author Image

About Adam stiffman
Soratemplates is a blogger resources site is a provider of high quality blogger template with premium looking layout and robust design

No comments:

Post a Comment