What is the home directory on Windows Subsystem for Linux?












30















When I start bash on Windows Subsystem for Linux, it drops me in the directory



/mnt/c/Users/<username>


When I ls this directory, I see the directories Desktop, Documents, etc. that I can see are in C:Users<username> using the Windows File Explorer. Since this is where the bash program started, I expected this is my home directory, but when I type either cd or cd ~ I am brought to



/home/<username>


which contains my .bashrc, .profile etc. file which I would expect to find in my home directory in a Linux box. Moreover, entering cd ../.. from here I can see the directories bin, etc and so on, again as expected on a Linux box.



I have two questions regarding all this:




  1. What exactly is /mnt/c/Users/<username> compared with C:Users<username>? It seems they are one in the same---so what is /mnt/c/?

  2. How can I view the files in /home/<username> using the Windows File Explorer? Not that I'd really ever want to---I'm just trying to get a feel for how Windows is organizing this Subsystem for Linux thing.










share|improve this question

























  • Possible duplicate of Where is the Linux Subsystem's filesystem located in Windows 10?

    – Jaime
    Jul 29 '18 at 5:51
















30















When I start bash on Windows Subsystem for Linux, it drops me in the directory



/mnt/c/Users/<username>


When I ls this directory, I see the directories Desktop, Documents, etc. that I can see are in C:Users<username> using the Windows File Explorer. Since this is where the bash program started, I expected this is my home directory, but when I type either cd or cd ~ I am brought to



/home/<username>


which contains my .bashrc, .profile etc. file which I would expect to find in my home directory in a Linux box. Moreover, entering cd ../.. from here I can see the directories bin, etc and so on, again as expected on a Linux box.



I have two questions regarding all this:




  1. What exactly is /mnt/c/Users/<username> compared with C:Users<username>? It seems they are one in the same---so what is /mnt/c/?

  2. How can I view the files in /home/<username> using the Windows File Explorer? Not that I'd really ever want to---I'm just trying to get a feel for how Windows is organizing this Subsystem for Linux thing.










share|improve this question

























  • Possible duplicate of Where is the Linux Subsystem's filesystem located in Windows 10?

    – Jaime
    Jul 29 '18 at 5:51














30












30








30


6






When I start bash on Windows Subsystem for Linux, it drops me in the directory



/mnt/c/Users/<username>


When I ls this directory, I see the directories Desktop, Documents, etc. that I can see are in C:Users<username> using the Windows File Explorer. Since this is where the bash program started, I expected this is my home directory, but when I type either cd or cd ~ I am brought to



/home/<username>


which contains my .bashrc, .profile etc. file which I would expect to find in my home directory in a Linux box. Moreover, entering cd ../.. from here I can see the directories bin, etc and so on, again as expected on a Linux box.



I have two questions regarding all this:




  1. What exactly is /mnt/c/Users/<username> compared with C:Users<username>? It seems they are one in the same---so what is /mnt/c/?

  2. How can I view the files in /home/<username> using the Windows File Explorer? Not that I'd really ever want to---I'm just trying to get a feel for how Windows is organizing this Subsystem for Linux thing.










share|improve this question
















When I start bash on Windows Subsystem for Linux, it drops me in the directory



/mnt/c/Users/<username>


When I ls this directory, I see the directories Desktop, Documents, etc. that I can see are in C:Users<username> using the Windows File Explorer. Since this is where the bash program started, I expected this is my home directory, but when I type either cd or cd ~ I am brought to



/home/<username>


which contains my .bashrc, .profile etc. file which I would expect to find in my home directory in a Linux box. Moreover, entering cd ../.. from here I can see the directories bin, etc and so on, again as expected on a Linux box.



I have two questions regarding all this:




  1. What exactly is /mnt/c/Users/<username> compared with C:Users<username>? It seems they are one in the same---so what is /mnt/c/?

  2. How can I view the files in /home/<username> using the Windows File Explorer? Not that I'd really ever want to---I'm just trying to get a feel for how Windows is organizing this Subsystem for Linux thing.







windows-10 bash windows-subsystem-for-linux






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Mar 4 '17 at 7:19









magicandre1981

81.4k20125203




81.4k20125203










asked Mar 4 '17 at 1:59









bcfbcf

273138




273138













  • Possible duplicate of Where is the Linux Subsystem's filesystem located in Windows 10?

    – Jaime
    Jul 29 '18 at 5:51



















  • Possible duplicate of Where is the Linux Subsystem's filesystem located in Windows 10?

    – Jaime
    Jul 29 '18 at 5:51

















Possible duplicate of Where is the Linux Subsystem's filesystem located in Windows 10?

– Jaime
Jul 29 '18 at 5:51





Possible duplicate of Where is the Linux Subsystem's filesystem located in Windows 10?

– Jaime
Jul 29 '18 at 5:51










6 Answers
6






active

oldest

votes


















40














For 2: The current path is now related to which distribution you have installed from the Microsoft Store rather than one global path. So, for Ubuntu it is now located at:



%LOCALAPPDATA%PackagesCanonicalGroupLimited.UbuntuonWindows_79rhkp1fndgscLocalStaterootfs


I assume the other distributions will be in a similar location under their respective folders under:



%LOCALAPPDATA%Packages





share|improve this answer





















  • 4





    Anyone else find this practice disturbing? Isn't my HOME folder supposed to be the ONE safe place for MY data inside a repo? With this approach, a broken repo and reinstall hoses MY DATA with NO attempt to protect it at all AND it's hidden when I already have a REAL /home. Why isn't data persisted there? This is all the more dangerous because we're now being encouraged to try/use/swap distros (WLinux). Really feels like someone didn't think this whole thing through.

    – rainabba
    Sep 25 '18 at 19:53











  • In my case (1809) the folder is called CanonicalGroupLimited.Ubuntu18.04onWindows_79rhkp1fndgsc

    – jao
    Dec 3 '18 at 13:34






  • 1





    Important Note: You should still not poke around Linux files using Windows tools. See: blogs.msdn.microsoft.com/commandline/2016/11/17/… (also see the blog post itself)

    – coltoneakins
    Dec 11 '18 at 6:14





















16
















  1. /mnt/c is the exact same as C:. It's just the syntax for getting to it from WSL.

  2. Look in C:Users<username>AppDataLocalLxssrootfs.






share|improve this answer





















  • 6





    Warning: blogs.msdn.microsoft.com/commandline/2016/11/17/… that's the place yes but do not change anything.

    – chx
    May 5 '17 at 22:34






  • 5





    As of 2018, this answer is not valid anymore. See @MichaelBond's answer.

    – dr01
    Mar 20 '18 at 9:44






  • 2





    Now it's gone to C:Users[USERNAME]AppDataLocalPackagesCanonicalGroupLimited.UbuntuonWindows_[CODE]LocalStaterootfs You might aware how bad if you edit / manually

    – mementototem
    Jun 21 '18 at 5:41





















6














About the filesystem mounted on /mnt/c





  1. What exactly is /mnt/c/Users/ compared with C:Users? It seems they are one in the same---so what is /mnt/c/?




In contrast to Windows, Linux (and the other systems based on Unix) use a single folder structure independent of the number of disks you have. If you have multiple disks, all these disks must me mounted into the folder structure at some point.




  • Typically, all the disks (different than the used to boot the system) are mounted in a folder named /mnt or /media


WSL has an special type of filesystem named DrvFS that gives you access to the disks used in windows. You can use DrvFS to mount, not only your windows filesystem, but also network disks and other media types.




  • In WSL, by default, the C: disk in windows is mounted under /mnt/c

  • If you have another disk, for instance a D: disk in windows, it will be mounted under /mnt/d


The files you can see in /mnt/c are the same you have in C:. If you modify some file, you will get the changes in the windows too.



You may use the mount command to access other types of media (e.g. removable drives or network shares).





About the location of /home/<username>





  1. How can I view the files in /home/ using the Windows File Explorer? Not that I'd really ever want to---I'm just trying to get a feel for how Windows is organizing this Subsystem for Linux thing.




In WSL, all the linux filesystem is located under a Windows folder. The location of the folder depends on the version of Windows and of the WSL distribution you are using.





  • Initial versions of WSL store the linux filesystem in %LOCALAPPDATA%Lxssrootfs


  • WSL distributions installed from the Windows Store, starting in Windows Build 16215 (mid of 2017), use a folder like %LOCALAPPDATA%Packages...LocalStaterootfs. The name of the package varies depending on the distribution (e.g. it is different for Ubuntu than for Debian)


  • Linux distributions installed using other tools, such as lxRunOffline or WSL-DistroLauncher may store the linux filesystem into any location.


You may check many options to know the location of the WSL folder. For instance, I think the easiest option is to use lxRunOffline to know the installation folder.



## You can use lxrunoffline to check which WSL distributions have installed
## using: lxrunoffline list

C:> lxrunoffline list
backup
Ubuntu-18.04

## And you can use it to get the location of any of these WSL installations
## using: lxrunoffline get-dir -n <name of distribution>

C:> lxrunoffline get-dir -n backup
c:wslinstalledbackup

C:> lxrunoffline get-dir -n Ubuntu
C:UsersJaimeAppDataLocalPackagesCanonicalGroupLimited.UbuntuonWindows_79rhkp1fndgscLocalState


Once you know the location of the installation folder, the /home/<username> is under <installation folder>rootfshomeusername.




  • For instance, if your installation folder is c:wslubuntu

  • the /home/<username> is in c:wslubunturootfshomeusername




NOTE: Both Linux and Windows stores file permissions in different ways. Nowadays, the WSL DrvFS stores the Linux permissions as Streams (metadata) attached to the files you can see in Windows. Microsoft does not recommend to modify linux files using Windows programs. It is possible that some Windows applcations damage the linux permissions without notice it.






share|improve this answer































    5















    1. Using WSL bash console, in your home directory, create a file with an arbitrary specific name such as "test_here.txt".

    2. Then using Windows Explorer, using the search box, search for the file test_here.txt.

    3. On the found file > right-click > Open file location.






    share|improve this answer
























    • I tried this. It doesn't work. I don't see the file in search. However, if I drop the file in /mnt/c/Users/<username> it obviously works.

      – Eamonn Kenny
      Jan 11 at 16:39











    • I'm afraid I tried the WSL but I don't use this anymore. I didn't find it much useful. (I use cygwin daily, instead of WSL, and I find it very useful.) So I cannot verify it anymore, sorry ;)

      – Ellis
      Jan 13 at 7:54













    • Searching for rootfs works. you can then navigate the unbuntu file system from there.

      – tigr
      Jan 21 at 4:14



















    3














    I suppose it might depend on which windows build you are on, but for me in 2018 on Windows 10 Pro 64-bit, Version 1709 (OS Build 16299.522) and also Version 1803 (OS Build 17134.165) [a windows update ironically occurred as I was typing this]
    the location is still:



    C:Users<username>AppDataLocallxss



    The trick is when you're at C:Users<username>AppDataLocal you will not see an lxss folder (unless you happen to have unchecked "Hide protected operating system files (Recommended)" in your folder options).



    However just append lxss in the windows explorer address bar and it will take you to the folder.



    (Note I did not have a %LOCALAPPDATA%PackagesCanonicalGroupLimited.UbuntuonWindows_79rhkp1fndgsc or anything similar that was mentioned in Michael Bonds answer)



    Update



    Turns out there is legacy WSL which is what I had installed. Now WSL is provided via a Microsoft store app. There are versions for Ubuntu 18.04 LTS and also now a few other flavors of Linux (e.g. Debian). If you want to be up-to-date you might want to uninstall legacy WSL and install the Microsoft store version.



    Where your home folder is will depend on which of these types of WSL you have installed.






    share|improve this answer

































      0














      Four steps for windows 10 pro to pin your Debian/Ubuntu/OpenSUSE $HOME to the start menu of Windows:




      1. From start menu start File Explorer

      2. In address bar (not search bar) type %LOCALAPPDATA%.

      3. In search bar look for your $HOME directory name, in my case it was ekenny. There will be about 3 versions of this but you want the one with really long path.

      4. Right click your home directory and click "Pin to Start".


      Now you have your home directory pinned to your start menu. I tried creating a shortcut but that doesn't go anywhere intelligible.






      share|improve this answer































        6 Answers
        6






        active

        oldest

        votes








        6 Answers
        6






        active

        oldest

        votes









        active

        oldest

        votes






        active

        oldest

        votes









        40














        For 2: The current path is now related to which distribution you have installed from the Microsoft Store rather than one global path. So, for Ubuntu it is now located at:



        %LOCALAPPDATA%PackagesCanonicalGroupLimited.UbuntuonWindows_79rhkp1fndgscLocalStaterootfs


        I assume the other distributions will be in a similar location under their respective folders under:



        %LOCALAPPDATA%Packages





        share|improve this answer





















        • 4





          Anyone else find this practice disturbing? Isn't my HOME folder supposed to be the ONE safe place for MY data inside a repo? With this approach, a broken repo and reinstall hoses MY DATA with NO attempt to protect it at all AND it's hidden when I already have a REAL /home. Why isn't data persisted there? This is all the more dangerous because we're now being encouraged to try/use/swap distros (WLinux). Really feels like someone didn't think this whole thing through.

          – rainabba
          Sep 25 '18 at 19:53











        • In my case (1809) the folder is called CanonicalGroupLimited.Ubuntu18.04onWindows_79rhkp1fndgsc

          – jao
          Dec 3 '18 at 13:34






        • 1





          Important Note: You should still not poke around Linux files using Windows tools. See: blogs.msdn.microsoft.com/commandline/2016/11/17/… (also see the blog post itself)

          – coltoneakins
          Dec 11 '18 at 6:14


















        40














        For 2: The current path is now related to which distribution you have installed from the Microsoft Store rather than one global path. So, for Ubuntu it is now located at:



        %LOCALAPPDATA%PackagesCanonicalGroupLimited.UbuntuonWindows_79rhkp1fndgscLocalStaterootfs


        I assume the other distributions will be in a similar location under their respective folders under:



        %LOCALAPPDATA%Packages





        share|improve this answer





















        • 4





          Anyone else find this practice disturbing? Isn't my HOME folder supposed to be the ONE safe place for MY data inside a repo? With this approach, a broken repo and reinstall hoses MY DATA with NO attempt to protect it at all AND it's hidden when I already have a REAL /home. Why isn't data persisted there? This is all the more dangerous because we're now being encouraged to try/use/swap distros (WLinux). Really feels like someone didn't think this whole thing through.

          – rainabba
          Sep 25 '18 at 19:53











        • In my case (1809) the folder is called CanonicalGroupLimited.Ubuntu18.04onWindows_79rhkp1fndgsc

          – jao
          Dec 3 '18 at 13:34






        • 1





          Important Note: You should still not poke around Linux files using Windows tools. See: blogs.msdn.microsoft.com/commandline/2016/11/17/… (also see the blog post itself)

          – coltoneakins
          Dec 11 '18 at 6:14
















        40












        40








        40







        For 2: The current path is now related to which distribution you have installed from the Microsoft Store rather than one global path. So, for Ubuntu it is now located at:



        %LOCALAPPDATA%PackagesCanonicalGroupLimited.UbuntuonWindows_79rhkp1fndgscLocalStaterootfs


        I assume the other distributions will be in a similar location under their respective folders under:



        %LOCALAPPDATA%Packages





        share|improve this answer















        For 2: The current path is now related to which distribution you have installed from the Microsoft Store rather than one global path. So, for Ubuntu it is now located at:



        %LOCALAPPDATA%PackagesCanonicalGroupLimited.UbuntuonWindows_79rhkp1fndgscLocalStaterootfs


        I assume the other distributions will be in a similar location under their respective folders under:



        %LOCALAPPDATA%Packages






        share|improve this answer














        share|improve this answer



        share|improve this answer








        edited Aug 13 '18 at 12:17









        tuomastik

        1035




        1035










        answered Dec 29 '17 at 12:07









        Michael BondMichael Bond

        50132




        50132








        • 4





          Anyone else find this practice disturbing? Isn't my HOME folder supposed to be the ONE safe place for MY data inside a repo? With this approach, a broken repo and reinstall hoses MY DATA with NO attempt to protect it at all AND it's hidden when I already have a REAL /home. Why isn't data persisted there? This is all the more dangerous because we're now being encouraged to try/use/swap distros (WLinux). Really feels like someone didn't think this whole thing through.

          – rainabba
          Sep 25 '18 at 19:53











        • In my case (1809) the folder is called CanonicalGroupLimited.Ubuntu18.04onWindows_79rhkp1fndgsc

          – jao
          Dec 3 '18 at 13:34






        • 1





          Important Note: You should still not poke around Linux files using Windows tools. See: blogs.msdn.microsoft.com/commandline/2016/11/17/… (also see the blog post itself)

          – coltoneakins
          Dec 11 '18 at 6:14
















        • 4





          Anyone else find this practice disturbing? Isn't my HOME folder supposed to be the ONE safe place for MY data inside a repo? With this approach, a broken repo and reinstall hoses MY DATA with NO attempt to protect it at all AND it's hidden when I already have a REAL /home. Why isn't data persisted there? This is all the more dangerous because we're now being encouraged to try/use/swap distros (WLinux). Really feels like someone didn't think this whole thing through.

          – rainabba
          Sep 25 '18 at 19:53











        • In my case (1809) the folder is called CanonicalGroupLimited.Ubuntu18.04onWindows_79rhkp1fndgsc

          – jao
          Dec 3 '18 at 13:34






        • 1





          Important Note: You should still not poke around Linux files using Windows tools. See: blogs.msdn.microsoft.com/commandline/2016/11/17/… (also see the blog post itself)

          – coltoneakins
          Dec 11 '18 at 6:14










        4




        4





        Anyone else find this practice disturbing? Isn't my HOME folder supposed to be the ONE safe place for MY data inside a repo? With this approach, a broken repo and reinstall hoses MY DATA with NO attempt to protect it at all AND it's hidden when I already have a REAL /home. Why isn't data persisted there? This is all the more dangerous because we're now being encouraged to try/use/swap distros (WLinux). Really feels like someone didn't think this whole thing through.

        – rainabba
        Sep 25 '18 at 19:53





        Anyone else find this practice disturbing? Isn't my HOME folder supposed to be the ONE safe place for MY data inside a repo? With this approach, a broken repo and reinstall hoses MY DATA with NO attempt to protect it at all AND it's hidden when I already have a REAL /home. Why isn't data persisted there? This is all the more dangerous because we're now being encouraged to try/use/swap distros (WLinux). Really feels like someone didn't think this whole thing through.

        – rainabba
        Sep 25 '18 at 19:53













        In my case (1809) the folder is called CanonicalGroupLimited.Ubuntu18.04onWindows_79rhkp1fndgsc

        – jao
        Dec 3 '18 at 13:34





        In my case (1809) the folder is called CanonicalGroupLimited.Ubuntu18.04onWindows_79rhkp1fndgsc

        – jao
        Dec 3 '18 at 13:34




        1




        1





        Important Note: You should still not poke around Linux files using Windows tools. See: blogs.msdn.microsoft.com/commandline/2016/11/17/… (also see the blog post itself)

        – coltoneakins
        Dec 11 '18 at 6:14







        Important Note: You should still not poke around Linux files using Windows tools. See: blogs.msdn.microsoft.com/commandline/2016/11/17/… (also see the blog post itself)

        – coltoneakins
        Dec 11 '18 at 6:14















        16
















        1. /mnt/c is the exact same as C:. It's just the syntax for getting to it from WSL.

        2. Look in C:Users<username>AppDataLocalLxssrootfs.






        share|improve this answer





















        • 6





          Warning: blogs.msdn.microsoft.com/commandline/2016/11/17/… that's the place yes but do not change anything.

          – chx
          May 5 '17 at 22:34






        • 5





          As of 2018, this answer is not valid anymore. See @MichaelBond's answer.

          – dr01
          Mar 20 '18 at 9:44






        • 2





          Now it's gone to C:Users[USERNAME]AppDataLocalPackagesCanonicalGroupLimited.UbuntuonWindows_[CODE]LocalStaterootfs You might aware how bad if you edit / manually

          – mementototem
          Jun 21 '18 at 5:41


















        16
















        1. /mnt/c is the exact same as C:. It's just the syntax for getting to it from WSL.

        2. Look in C:Users<username>AppDataLocalLxssrootfs.






        share|improve this answer





















        • 6





          Warning: blogs.msdn.microsoft.com/commandline/2016/11/17/… that's the place yes but do not change anything.

          – chx
          May 5 '17 at 22:34






        • 5





          As of 2018, this answer is not valid anymore. See @MichaelBond's answer.

          – dr01
          Mar 20 '18 at 9:44






        • 2





          Now it's gone to C:Users[USERNAME]AppDataLocalPackagesCanonicalGroupLimited.UbuntuonWindows_[CODE]LocalStaterootfs You might aware how bad if you edit / manually

          – mementototem
          Jun 21 '18 at 5:41
















        16












        16








        16









        1. /mnt/c is the exact same as C:. It's just the syntax for getting to it from WSL.

        2. Look in C:Users<username>AppDataLocalLxssrootfs.






        share|improve this answer

















        1. /mnt/c is the exact same as C:. It's just the syntax for getting to it from WSL.

        2. Look in C:Users<username>AppDataLocalLxssrootfs.







        share|improve this answer














        share|improve this answer



        share|improve this answer








        edited Nov 22 '17 at 23:27

























        answered Mar 4 '17 at 2:59









        Joseph SibleJoseph Sible

        991114




        991114








        • 6





          Warning: blogs.msdn.microsoft.com/commandline/2016/11/17/… that's the place yes but do not change anything.

          – chx
          May 5 '17 at 22:34






        • 5





          As of 2018, this answer is not valid anymore. See @MichaelBond's answer.

          – dr01
          Mar 20 '18 at 9:44






        • 2





          Now it's gone to C:Users[USERNAME]AppDataLocalPackagesCanonicalGroupLimited.UbuntuonWindows_[CODE]LocalStaterootfs You might aware how bad if you edit / manually

          – mementototem
          Jun 21 '18 at 5:41
















        • 6





          Warning: blogs.msdn.microsoft.com/commandline/2016/11/17/… that's the place yes but do not change anything.

          – chx
          May 5 '17 at 22:34






        • 5





          As of 2018, this answer is not valid anymore. See @MichaelBond's answer.

          – dr01
          Mar 20 '18 at 9:44






        • 2





          Now it's gone to C:Users[USERNAME]AppDataLocalPackagesCanonicalGroupLimited.UbuntuonWindows_[CODE]LocalStaterootfs You might aware how bad if you edit / manually

          – mementototem
          Jun 21 '18 at 5:41










        6




        6





        Warning: blogs.msdn.microsoft.com/commandline/2016/11/17/… that's the place yes but do not change anything.

        – chx
        May 5 '17 at 22:34





        Warning: blogs.msdn.microsoft.com/commandline/2016/11/17/… that's the place yes but do not change anything.

        – chx
        May 5 '17 at 22:34




        5




        5





        As of 2018, this answer is not valid anymore. See @MichaelBond's answer.

        – dr01
        Mar 20 '18 at 9:44





        As of 2018, this answer is not valid anymore. See @MichaelBond's answer.

        – dr01
        Mar 20 '18 at 9:44




        2




        2





        Now it's gone to C:Users[USERNAME]AppDataLocalPackagesCanonicalGroupLimited.UbuntuonWindows_[CODE]LocalStaterootfs You might aware how bad if you edit / manually

        – mementototem
        Jun 21 '18 at 5:41







        Now it's gone to C:Users[USERNAME]AppDataLocalPackagesCanonicalGroupLimited.UbuntuonWindows_[CODE]LocalStaterootfs You might aware how bad if you edit / manually

        – mementototem
        Jun 21 '18 at 5:41













        6














        About the filesystem mounted on /mnt/c





        1. What exactly is /mnt/c/Users/ compared with C:Users? It seems they are one in the same---so what is /mnt/c/?




        In contrast to Windows, Linux (and the other systems based on Unix) use a single folder structure independent of the number of disks you have. If you have multiple disks, all these disks must me mounted into the folder structure at some point.




        • Typically, all the disks (different than the used to boot the system) are mounted in a folder named /mnt or /media


        WSL has an special type of filesystem named DrvFS that gives you access to the disks used in windows. You can use DrvFS to mount, not only your windows filesystem, but also network disks and other media types.




        • In WSL, by default, the C: disk in windows is mounted under /mnt/c

        • If you have another disk, for instance a D: disk in windows, it will be mounted under /mnt/d


        The files you can see in /mnt/c are the same you have in C:. If you modify some file, you will get the changes in the windows too.



        You may use the mount command to access other types of media (e.g. removable drives or network shares).





        About the location of /home/<username>





        1. How can I view the files in /home/ using the Windows File Explorer? Not that I'd really ever want to---I'm just trying to get a feel for how Windows is organizing this Subsystem for Linux thing.




        In WSL, all the linux filesystem is located under a Windows folder. The location of the folder depends on the version of Windows and of the WSL distribution you are using.





        • Initial versions of WSL store the linux filesystem in %LOCALAPPDATA%Lxssrootfs


        • WSL distributions installed from the Windows Store, starting in Windows Build 16215 (mid of 2017), use a folder like %LOCALAPPDATA%Packages...LocalStaterootfs. The name of the package varies depending on the distribution (e.g. it is different for Ubuntu than for Debian)


        • Linux distributions installed using other tools, such as lxRunOffline or WSL-DistroLauncher may store the linux filesystem into any location.


        You may check many options to know the location of the WSL folder. For instance, I think the easiest option is to use lxRunOffline to know the installation folder.



        ## You can use lxrunoffline to check which WSL distributions have installed
        ## using: lxrunoffline list

        C:> lxrunoffline list
        backup
        Ubuntu-18.04

        ## And you can use it to get the location of any of these WSL installations
        ## using: lxrunoffline get-dir -n <name of distribution>

        C:> lxrunoffline get-dir -n backup
        c:wslinstalledbackup

        C:> lxrunoffline get-dir -n Ubuntu
        C:UsersJaimeAppDataLocalPackagesCanonicalGroupLimited.UbuntuonWindows_79rhkp1fndgscLocalState


        Once you know the location of the installation folder, the /home/<username> is under <installation folder>rootfshomeusername.




        • For instance, if your installation folder is c:wslubuntu

        • the /home/<username> is in c:wslubunturootfshomeusername




        NOTE: Both Linux and Windows stores file permissions in different ways. Nowadays, the WSL DrvFS stores the Linux permissions as Streams (metadata) attached to the files you can see in Windows. Microsoft does not recommend to modify linux files using Windows programs. It is possible that some Windows applcations damage the linux permissions without notice it.






        share|improve this answer




























          6














          About the filesystem mounted on /mnt/c





          1. What exactly is /mnt/c/Users/ compared with C:Users? It seems they are one in the same---so what is /mnt/c/?




          In contrast to Windows, Linux (and the other systems based on Unix) use a single folder structure independent of the number of disks you have. If you have multiple disks, all these disks must me mounted into the folder structure at some point.




          • Typically, all the disks (different than the used to boot the system) are mounted in a folder named /mnt or /media


          WSL has an special type of filesystem named DrvFS that gives you access to the disks used in windows. You can use DrvFS to mount, not only your windows filesystem, but also network disks and other media types.




          • In WSL, by default, the C: disk in windows is mounted under /mnt/c

          • If you have another disk, for instance a D: disk in windows, it will be mounted under /mnt/d


          The files you can see in /mnt/c are the same you have in C:. If you modify some file, you will get the changes in the windows too.



          You may use the mount command to access other types of media (e.g. removable drives or network shares).





          About the location of /home/<username>





          1. How can I view the files in /home/ using the Windows File Explorer? Not that I'd really ever want to---I'm just trying to get a feel for how Windows is organizing this Subsystem for Linux thing.




          In WSL, all the linux filesystem is located under a Windows folder. The location of the folder depends on the version of Windows and of the WSL distribution you are using.





          • Initial versions of WSL store the linux filesystem in %LOCALAPPDATA%Lxssrootfs


          • WSL distributions installed from the Windows Store, starting in Windows Build 16215 (mid of 2017), use a folder like %LOCALAPPDATA%Packages...LocalStaterootfs. The name of the package varies depending on the distribution (e.g. it is different for Ubuntu than for Debian)


          • Linux distributions installed using other tools, such as lxRunOffline or WSL-DistroLauncher may store the linux filesystem into any location.


          You may check many options to know the location of the WSL folder. For instance, I think the easiest option is to use lxRunOffline to know the installation folder.



          ## You can use lxrunoffline to check which WSL distributions have installed
          ## using: lxrunoffline list

          C:> lxrunoffline list
          backup
          Ubuntu-18.04

          ## And you can use it to get the location of any of these WSL installations
          ## using: lxrunoffline get-dir -n <name of distribution>

          C:> lxrunoffline get-dir -n backup
          c:wslinstalledbackup

          C:> lxrunoffline get-dir -n Ubuntu
          C:UsersJaimeAppDataLocalPackagesCanonicalGroupLimited.UbuntuonWindows_79rhkp1fndgscLocalState


          Once you know the location of the installation folder, the /home/<username> is under <installation folder>rootfshomeusername.




          • For instance, if your installation folder is c:wslubuntu

          • the /home/<username> is in c:wslubunturootfshomeusername




          NOTE: Both Linux and Windows stores file permissions in different ways. Nowadays, the WSL DrvFS stores the Linux permissions as Streams (metadata) attached to the files you can see in Windows. Microsoft does not recommend to modify linux files using Windows programs. It is possible that some Windows applcations damage the linux permissions without notice it.






          share|improve this answer


























            6












            6








            6







            About the filesystem mounted on /mnt/c





            1. What exactly is /mnt/c/Users/ compared with C:Users? It seems they are one in the same---so what is /mnt/c/?




            In contrast to Windows, Linux (and the other systems based on Unix) use a single folder structure independent of the number of disks you have. If you have multiple disks, all these disks must me mounted into the folder structure at some point.




            • Typically, all the disks (different than the used to boot the system) are mounted in a folder named /mnt or /media


            WSL has an special type of filesystem named DrvFS that gives you access to the disks used in windows. You can use DrvFS to mount, not only your windows filesystem, but also network disks and other media types.




            • In WSL, by default, the C: disk in windows is mounted under /mnt/c

            • If you have another disk, for instance a D: disk in windows, it will be mounted under /mnt/d


            The files you can see in /mnt/c are the same you have in C:. If you modify some file, you will get the changes in the windows too.



            You may use the mount command to access other types of media (e.g. removable drives or network shares).





            About the location of /home/<username>





            1. How can I view the files in /home/ using the Windows File Explorer? Not that I'd really ever want to---I'm just trying to get a feel for how Windows is organizing this Subsystem for Linux thing.




            In WSL, all the linux filesystem is located under a Windows folder. The location of the folder depends on the version of Windows and of the WSL distribution you are using.





            • Initial versions of WSL store the linux filesystem in %LOCALAPPDATA%Lxssrootfs


            • WSL distributions installed from the Windows Store, starting in Windows Build 16215 (mid of 2017), use a folder like %LOCALAPPDATA%Packages...LocalStaterootfs. The name of the package varies depending on the distribution (e.g. it is different for Ubuntu than for Debian)


            • Linux distributions installed using other tools, such as lxRunOffline or WSL-DistroLauncher may store the linux filesystem into any location.


            You may check many options to know the location of the WSL folder. For instance, I think the easiest option is to use lxRunOffline to know the installation folder.



            ## You can use lxrunoffline to check which WSL distributions have installed
            ## using: lxrunoffline list

            C:> lxrunoffline list
            backup
            Ubuntu-18.04

            ## And you can use it to get the location of any of these WSL installations
            ## using: lxrunoffline get-dir -n <name of distribution>

            C:> lxrunoffline get-dir -n backup
            c:wslinstalledbackup

            C:> lxrunoffline get-dir -n Ubuntu
            C:UsersJaimeAppDataLocalPackagesCanonicalGroupLimited.UbuntuonWindows_79rhkp1fndgscLocalState


            Once you know the location of the installation folder, the /home/<username> is under <installation folder>rootfshomeusername.




            • For instance, if your installation folder is c:wslubuntu

            • the /home/<username> is in c:wslubunturootfshomeusername




            NOTE: Both Linux and Windows stores file permissions in different ways. Nowadays, the WSL DrvFS stores the Linux permissions as Streams (metadata) attached to the files you can see in Windows. Microsoft does not recommend to modify linux files using Windows programs. It is possible that some Windows applcations damage the linux permissions without notice it.






            share|improve this answer













            About the filesystem mounted on /mnt/c





            1. What exactly is /mnt/c/Users/ compared with C:Users? It seems they are one in the same---so what is /mnt/c/?




            In contrast to Windows, Linux (and the other systems based on Unix) use a single folder structure independent of the number of disks you have. If you have multiple disks, all these disks must me mounted into the folder structure at some point.




            • Typically, all the disks (different than the used to boot the system) are mounted in a folder named /mnt or /media


            WSL has an special type of filesystem named DrvFS that gives you access to the disks used in windows. You can use DrvFS to mount, not only your windows filesystem, but also network disks and other media types.




            • In WSL, by default, the C: disk in windows is mounted under /mnt/c

            • If you have another disk, for instance a D: disk in windows, it will be mounted under /mnt/d


            The files you can see in /mnt/c are the same you have in C:. If you modify some file, you will get the changes in the windows too.



            You may use the mount command to access other types of media (e.g. removable drives or network shares).





            About the location of /home/<username>





            1. How can I view the files in /home/ using the Windows File Explorer? Not that I'd really ever want to---I'm just trying to get a feel for how Windows is organizing this Subsystem for Linux thing.




            In WSL, all the linux filesystem is located under a Windows folder. The location of the folder depends on the version of Windows and of the WSL distribution you are using.





            • Initial versions of WSL store the linux filesystem in %LOCALAPPDATA%Lxssrootfs


            • WSL distributions installed from the Windows Store, starting in Windows Build 16215 (mid of 2017), use a folder like %LOCALAPPDATA%Packages...LocalStaterootfs. The name of the package varies depending on the distribution (e.g. it is different for Ubuntu than for Debian)


            • Linux distributions installed using other tools, such as lxRunOffline or WSL-DistroLauncher may store the linux filesystem into any location.


            You may check many options to know the location of the WSL folder. For instance, I think the easiest option is to use lxRunOffline to know the installation folder.



            ## You can use lxrunoffline to check which WSL distributions have installed
            ## using: lxrunoffline list

            C:> lxrunoffline list
            backup
            Ubuntu-18.04

            ## And you can use it to get the location of any of these WSL installations
            ## using: lxrunoffline get-dir -n <name of distribution>

            C:> lxrunoffline get-dir -n backup
            c:wslinstalledbackup

            C:> lxrunoffline get-dir -n Ubuntu
            C:UsersJaimeAppDataLocalPackagesCanonicalGroupLimited.UbuntuonWindows_79rhkp1fndgscLocalState


            Once you know the location of the installation folder, the /home/<username> is under <installation folder>rootfshomeusername.




            • For instance, if your installation folder is c:wslubuntu

            • the /home/<username> is in c:wslubunturootfshomeusername




            NOTE: Both Linux and Windows stores file permissions in different ways. Nowadays, the WSL DrvFS stores the Linux permissions as Streams (metadata) attached to the files you can see in Windows. Microsoft does not recommend to modify linux files using Windows programs. It is possible that some Windows applcations damage the linux permissions without notice it.







            share|improve this answer












            share|improve this answer



            share|improve this answer










            answered Aug 9 '18 at 12:58









            JaimeJaime

            497210




            497210























                5















                1. Using WSL bash console, in your home directory, create a file with an arbitrary specific name such as "test_here.txt".

                2. Then using Windows Explorer, using the search box, search for the file test_here.txt.

                3. On the found file > right-click > Open file location.






                share|improve this answer
























                • I tried this. It doesn't work. I don't see the file in search. However, if I drop the file in /mnt/c/Users/<username> it obviously works.

                  – Eamonn Kenny
                  Jan 11 at 16:39











                • I'm afraid I tried the WSL but I don't use this anymore. I didn't find it much useful. (I use cygwin daily, instead of WSL, and I find it very useful.) So I cannot verify it anymore, sorry ;)

                  – Ellis
                  Jan 13 at 7:54













                • Searching for rootfs works. you can then navigate the unbuntu file system from there.

                  – tigr
                  Jan 21 at 4:14
















                5















                1. Using WSL bash console, in your home directory, create a file with an arbitrary specific name such as "test_here.txt".

                2. Then using Windows Explorer, using the search box, search for the file test_here.txt.

                3. On the found file > right-click > Open file location.






                share|improve this answer
























                • I tried this. It doesn't work. I don't see the file in search. However, if I drop the file in /mnt/c/Users/<username> it obviously works.

                  – Eamonn Kenny
                  Jan 11 at 16:39











                • I'm afraid I tried the WSL but I don't use this anymore. I didn't find it much useful. (I use cygwin daily, instead of WSL, and I find it very useful.) So I cannot verify it anymore, sorry ;)

                  – Ellis
                  Jan 13 at 7:54













                • Searching for rootfs works. you can then navigate the unbuntu file system from there.

                  – tigr
                  Jan 21 at 4:14














                5












                5








                5








                1. Using WSL bash console, in your home directory, create a file with an arbitrary specific name such as "test_here.txt".

                2. Then using Windows Explorer, using the search box, search for the file test_here.txt.

                3. On the found file > right-click > Open file location.






                share|improve this answer














                1. Using WSL bash console, in your home directory, create a file with an arbitrary specific name such as "test_here.txt".

                2. Then using Windows Explorer, using the search box, search for the file test_here.txt.

                3. On the found file > right-click > Open file location.







                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered Jan 15 '18 at 12:07









                EllisEllis

                6112




                6112













                • I tried this. It doesn't work. I don't see the file in search. However, if I drop the file in /mnt/c/Users/<username> it obviously works.

                  – Eamonn Kenny
                  Jan 11 at 16:39











                • I'm afraid I tried the WSL but I don't use this anymore. I didn't find it much useful. (I use cygwin daily, instead of WSL, and I find it very useful.) So I cannot verify it anymore, sorry ;)

                  – Ellis
                  Jan 13 at 7:54













                • Searching for rootfs works. you can then navigate the unbuntu file system from there.

                  – tigr
                  Jan 21 at 4:14



















                • I tried this. It doesn't work. I don't see the file in search. However, if I drop the file in /mnt/c/Users/<username> it obviously works.

                  – Eamonn Kenny
                  Jan 11 at 16:39











                • I'm afraid I tried the WSL but I don't use this anymore. I didn't find it much useful. (I use cygwin daily, instead of WSL, and I find it very useful.) So I cannot verify it anymore, sorry ;)

                  – Ellis
                  Jan 13 at 7:54













                • Searching for rootfs works. you can then navigate the unbuntu file system from there.

                  – tigr
                  Jan 21 at 4:14

















                I tried this. It doesn't work. I don't see the file in search. However, if I drop the file in /mnt/c/Users/<username> it obviously works.

                – Eamonn Kenny
                Jan 11 at 16:39





                I tried this. It doesn't work. I don't see the file in search. However, if I drop the file in /mnt/c/Users/<username> it obviously works.

                – Eamonn Kenny
                Jan 11 at 16:39













                I'm afraid I tried the WSL but I don't use this anymore. I didn't find it much useful. (I use cygwin daily, instead of WSL, and I find it very useful.) So I cannot verify it anymore, sorry ;)

                – Ellis
                Jan 13 at 7:54







                I'm afraid I tried the WSL but I don't use this anymore. I didn't find it much useful. (I use cygwin daily, instead of WSL, and I find it very useful.) So I cannot verify it anymore, sorry ;)

                – Ellis
                Jan 13 at 7:54















                Searching for rootfs works. you can then navigate the unbuntu file system from there.

                – tigr
                Jan 21 at 4:14





                Searching for rootfs works. you can then navigate the unbuntu file system from there.

                – tigr
                Jan 21 at 4:14











                3














                I suppose it might depend on which windows build you are on, but for me in 2018 on Windows 10 Pro 64-bit, Version 1709 (OS Build 16299.522) and also Version 1803 (OS Build 17134.165) [a windows update ironically occurred as I was typing this]
                the location is still:



                C:Users<username>AppDataLocallxss



                The trick is when you're at C:Users<username>AppDataLocal you will not see an lxss folder (unless you happen to have unchecked "Hide protected operating system files (Recommended)" in your folder options).



                However just append lxss in the windows explorer address bar and it will take you to the folder.



                (Note I did not have a %LOCALAPPDATA%PackagesCanonicalGroupLimited.UbuntuonWindows_79rhkp1fndgsc or anything similar that was mentioned in Michael Bonds answer)



                Update



                Turns out there is legacy WSL which is what I had installed. Now WSL is provided via a Microsoft store app. There are versions for Ubuntu 18.04 LTS and also now a few other flavors of Linux (e.g. Debian). If you want to be up-to-date you might want to uninstall legacy WSL and install the Microsoft store version.



                Where your home folder is will depend on which of these types of WSL you have installed.






                share|improve this answer






























                  3














                  I suppose it might depend on which windows build you are on, but for me in 2018 on Windows 10 Pro 64-bit, Version 1709 (OS Build 16299.522) and also Version 1803 (OS Build 17134.165) [a windows update ironically occurred as I was typing this]
                  the location is still:



                  C:Users<username>AppDataLocallxss



                  The trick is when you're at C:Users<username>AppDataLocal you will not see an lxss folder (unless you happen to have unchecked "Hide protected operating system files (Recommended)" in your folder options).



                  However just append lxss in the windows explorer address bar and it will take you to the folder.



                  (Note I did not have a %LOCALAPPDATA%PackagesCanonicalGroupLimited.UbuntuonWindows_79rhkp1fndgsc or anything similar that was mentioned in Michael Bonds answer)



                  Update



                  Turns out there is legacy WSL which is what I had installed. Now WSL is provided via a Microsoft store app. There are versions for Ubuntu 18.04 LTS and also now a few other flavors of Linux (e.g. Debian). If you want to be up-to-date you might want to uninstall legacy WSL and install the Microsoft store version.



                  Where your home folder is will depend on which of these types of WSL you have installed.






                  share|improve this answer




























                    3












                    3








                    3







                    I suppose it might depend on which windows build you are on, but for me in 2018 on Windows 10 Pro 64-bit, Version 1709 (OS Build 16299.522) and also Version 1803 (OS Build 17134.165) [a windows update ironically occurred as I was typing this]
                    the location is still:



                    C:Users<username>AppDataLocallxss



                    The trick is when you're at C:Users<username>AppDataLocal you will not see an lxss folder (unless you happen to have unchecked "Hide protected operating system files (Recommended)" in your folder options).



                    However just append lxss in the windows explorer address bar and it will take you to the folder.



                    (Note I did not have a %LOCALAPPDATA%PackagesCanonicalGroupLimited.UbuntuonWindows_79rhkp1fndgsc or anything similar that was mentioned in Michael Bonds answer)



                    Update



                    Turns out there is legacy WSL which is what I had installed. Now WSL is provided via a Microsoft store app. There are versions for Ubuntu 18.04 LTS and also now a few other flavors of Linux (e.g. Debian). If you want to be up-to-date you might want to uninstall legacy WSL and install the Microsoft store version.



                    Where your home folder is will depend on which of these types of WSL you have installed.






                    share|improve this answer















                    I suppose it might depend on which windows build you are on, but for me in 2018 on Windows 10 Pro 64-bit, Version 1709 (OS Build 16299.522) and also Version 1803 (OS Build 17134.165) [a windows update ironically occurred as I was typing this]
                    the location is still:



                    C:Users<username>AppDataLocallxss



                    The trick is when you're at C:Users<username>AppDataLocal you will not see an lxss folder (unless you happen to have unchecked "Hide protected operating system files (Recommended)" in your folder options).



                    However just append lxss in the windows explorer address bar and it will take you to the folder.



                    (Note I did not have a %LOCALAPPDATA%PackagesCanonicalGroupLimited.UbuntuonWindows_79rhkp1fndgsc or anything similar that was mentioned in Michael Bonds answer)



                    Update



                    Turns out there is legacy WSL which is what I had installed. Now WSL is provided via a Microsoft store app. There are versions for Ubuntu 18.04 LTS and also now a few other flavors of Linux (e.g. Debian). If you want to be up-to-date you might want to uninstall legacy WSL and install the Microsoft store version.



                    Where your home folder is will depend on which of these types of WSL you have installed.







                    share|improve this answer














                    share|improve this answer



                    share|improve this answer








                    edited Dec 28 '18 at 10:05

























                    answered Jul 16 '18 at 8:06









                    UserUser

                    1,77052237




                    1,77052237























                        0














                        Four steps for windows 10 pro to pin your Debian/Ubuntu/OpenSUSE $HOME to the start menu of Windows:




                        1. From start menu start File Explorer

                        2. In address bar (not search bar) type %LOCALAPPDATA%.

                        3. In search bar look for your $HOME directory name, in my case it was ekenny. There will be about 3 versions of this but you want the one with really long path.

                        4. Right click your home directory and click "Pin to Start".


                        Now you have your home directory pinned to your start menu. I tried creating a shortcut but that doesn't go anywhere intelligible.






                        share|improve this answer




























                          0














                          Four steps for windows 10 pro to pin your Debian/Ubuntu/OpenSUSE $HOME to the start menu of Windows:




                          1. From start menu start File Explorer

                          2. In address bar (not search bar) type %LOCALAPPDATA%.

                          3. In search bar look for your $HOME directory name, in my case it was ekenny. There will be about 3 versions of this but you want the one with really long path.

                          4. Right click your home directory and click "Pin to Start".


                          Now you have your home directory pinned to your start menu. I tried creating a shortcut but that doesn't go anywhere intelligible.






                          share|improve this answer


























                            0












                            0








                            0







                            Four steps for windows 10 pro to pin your Debian/Ubuntu/OpenSUSE $HOME to the start menu of Windows:




                            1. From start menu start File Explorer

                            2. In address bar (not search bar) type %LOCALAPPDATA%.

                            3. In search bar look for your $HOME directory name, in my case it was ekenny. There will be about 3 versions of this but you want the one with really long path.

                            4. Right click your home directory and click "Pin to Start".


                            Now you have your home directory pinned to your start menu. I tried creating a shortcut but that doesn't go anywhere intelligible.






                            share|improve this answer













                            Four steps for windows 10 pro to pin your Debian/Ubuntu/OpenSUSE $HOME to the start menu of Windows:




                            1. From start menu start File Explorer

                            2. In address bar (not search bar) type %LOCALAPPDATA%.

                            3. In search bar look for your $HOME directory name, in my case it was ekenny. There will be about 3 versions of this but you want the one with really long path.

                            4. Right click your home directory and click "Pin to Start".


                            Now you have your home directory pinned to your start menu. I tried creating a shortcut but that doesn't go anywhere intelligible.







                            share|improve this answer












                            share|improve this answer



                            share|improve this answer










                            answered Jan 11 at 16:56









                            Eamonn KennyEamonn Kenny

                            1212




                            1212















                                Popular posts from this blog

                                If I really need a card on my start hand, how many mulligans make sense? [duplicate]

                                Alcedinidae

                                Can an atomic nucleus contain both particles and antiparticles? [duplicate]