Home >Common Problem >How to find WSL home directory using Windows GUI?

How to find WSL home directory using Windows GUI?

WBOY
WBOYforward
2023-09-15 13:17:011909browse

WSL (Windows Subsystem for Linux) is a specially created software layer by Microsoft to run Linux binary executables natively on Windows 11 or 10. When you install a Linux distribution on WSL, it creates a Linux environment in Windows with its own file system and home directory. But how do I find this directory using Windows' Graphics File Explorer? If you don’t know, then in this article, we will learn about it.

The default home directory for user accounts in WSL is located at /home/d6025a37ea8687b5422f951f7288bdc5 and can be accessed using the command line interface of WSL running bash.

For example , if your username is H2s, the home directory in WSL will be located at /home/h2s. By default, when we launch the WSL Linux application, we are in the home directory. You can switch to this state using:

cd /home

Home directories in WSL Linux work similarly to the traditional Linux distributions we run on virtual machines, containers, or bare systems. It saves all files related to the user's personal files and configuration settings. All files in the home directory are only for the WSL instance and will not interfere with the Windows file system and vice versa...

While we show this tutorial for the Ubuntu subsystem, for other subsystems such as those installed on WSL The process is the same for OpenSUSE, Kali and Debian).

Steps to find the WSL home directory using Windows' GUI File Explorer

  1. On Windows 10 or 11, go to File Explorer or open MyPC directly to get it to find the WSL Linux app home folder.
  1. Afterwards, scroll down from the left panel to the end.
  1. Open WSL Linux File Explorer: There you will see the Linux penguin icon, click on it.
  1. Now all the installed Linux applications on WSL (like Ubuntu, Debian, Kali, etc.) will be displayed in the folder.
  1. For example , if we open the Ubuntu folder, then inside it we will have a directory called "home". Open it and you will find the user and other files for this WSL Linux application.
如何使用Windows GUI查找WSL主目录?
  1. After selecting the Linux WSL application, open the home directory that you want to browse manually using the GUI.
如何使用Windows GUI查找WSL主目录?
如何使用Windows GUI查找WSL主目录?

##Additional tips:

Access Ubuntu command terminal

For all Windows 11 or 10 system drives or other Linux environments installed on Windows WSL; we need to follow the mount command for Linux.

Note: One thing that needs to be mentioned is that the Bash Shell for Linux environments should be launched with administrative privileges to access the System Folders of Windows. To grant administrative rights, simply right-click on an installed Linux environment (such as Ubuntu) and select "Run as administrator."

In Linux Bash ShellType the following command to mount C: Drive:

cd /mnt/cls

D:Drive type

cd /mnt/dls

In this way, we can also mount internal and external drives, including network drives, connected to Windows 11 or 10 systems.

The above is the detailed content of How to find WSL home directory using Windows GUI?. For more information, please follow other related articles on the PHP Chinese website!

Statement:
This article is reproduced at:yundongfang.com. If there is any infringement, please contact admin@php.cn delete