Linux with windows system files

Where is the Ubuntu file system root directory in Windows Subsystem for Linux and vice versa?

I have installed Ubuntu subsystem on Windows 10 (after enabling feature in settings), but where is the Ubuntu file system root directory located in the drive?

PLEASE NOTE We (the WSL team) STRONGLY recommend you do NOT spelunk into the Linux distro data folders ). If you do, data loss and/or corruption is VERY likely We are working to improve this interop scenario and will announce any progress on our blog: blogs.msdn.microsoft.com/commandline

@RichTurner I’ve found there’s a very specific (and annoying) reason — corporate policies marking the .ssh folder with the wrong permissions repeatedly means needing to mark the structure as «off limits» to the corporate scripts. But generally — I’d agree with you.

@DannyStaple If you need to change the permissions on files/folders in your Linux distro from Windows, use wsl.exe , e.g. wsl chmod 600 ~/.ssh/id* — do not copy files into these folders via the Windows filesystem.

@mehrdad WSL implements a P9 fileserver, exposing/marshalling files from/to the distro’s filesystem as any P9 fileserver would. This way there is no NTFS metadata to marshal. Please watch Craig Loewen & Ben Hillis’ session at Build 2919 for more info

6 Answers 6

For Ubuntu installed from the Windows store:

Each distribution you install through the store is installed to that application’s appdata directory. For example: C:\Users\\AppData\Local\Packages\CanonicalGroupLimited.UbuntuonWindows_79rhkp1fndgsc\LocalState — benhillis

For WSL2 you can access to home directory from windows (Windows 10 build 18342) like this :

Читайте также:  Samsung m3870fw драйвер linux

In earlier iterations of Windows Subsystem for Linux, the Ubuntu file system was at %localappdata%\Lxss (e.g., C:\Users\Username\AppData\Local\Lxss — replace the Username with your Username on Windows). See the WSL blog post on File System Support:

The primary file system used by WSL is VolFs. It is used to store the Linux system files, as well as the content of your Linux home directory. As such, VolFs supports most features the Linux VFS provides, including Linux permissions, symbolic links, FIFOs, sockets, and device files.

VolFs is used to mount the VFS root directory, using %LocalAppData%\lxss\rootfs as the backing storage. In addition, a few additional VolFs mount points exist, most notably /root and /home which are mounted using %LocalAppData%\lxss\root and %LocalAppData%\lxss\home respectively. The reason for these separate mounts is that when you uninstall WSL, the home directories are not removed by default, so any personal files stored there will be preserved.

CAUTION

Creating/modifying any files within the Linux subsystem using Windows apps & tools can cause Data corruption and data loss in Ubuntu subsystem! (Thanks to Rich Turner for suggesting these words of caution!) This is absolutely not supported. From the same blog post:

Interoperability with Windows

While VolFs files are stored in regular files on Windows in the directories mentioned above, interoperability with Windows is not supported. If a new file is added to one of these directories from Windows, it lacks the EAs needed by VolFs, so VolFs doesn’t know what to do with the file and simply ignores it. Many editors will also strip the EAs when saving an existing file, again making the file unusable in WSL.

Читайте также:  Linux os for android phones

Your Windows file system is located at /mnt/c in the Bash shell environment.

Источник

What filesystem to use when using both Windows and Linux? [duplicate]

I will be buying a 2TB hard drive soon, and would like to use it as media storage. I would like to be able to read/write from both Windows (version 7, 64bit) and Ubuntu Linux, and I need support for files greater than 4GB in size (so I think this rules out FAT32). I’m using IFS drives at the moment to access my linux ext4 partitions, and I find it unstable. Does this mean NTFS? Is there something else I’m missing?

4 Answers 4

There are tools for using ext* under windows. but I would recommend NTFS as the *x-driver is quite stable nowadays.

The package is called ntfs-3g. Depending on the Destribution you use you can find it in the repository. Or else: tuxera.com/community/ntfs-3g-download

I mount a NTFS partition on Linux and is working very good, so i wouldn’t touch nor convert because I tried some solutions for EXT* on Windows and the most of them are not easy to setup, or doesn’t work as expected. My choice for a shared FS drive is NTFS.

@GeorgeProfenza Seems that him cut the term ext*. x-driver sound more like the X printer/screen driver of the X System OR . There’s no x-driver term assign OR i cannot found them googling 2 minutes.

First off, there will be some problems with NTFS if you use it in Linux:

  1. NTFS doesn’t support file permission mode very well, so you’ll lose the executable bit, setuid bit, etc.
  2. The ACL system in NTFS is not so comfortable with Linux, and you can’t disable it like you can with FAT32.
  3. Currently, the performance of the NTFS implementation in Linux is not very good. For example, I found if I build a Maven project with NTFS, it is 3 more times slower than ext4.
Читайте также:  Установка vmware tools alt linux

Personally, I run Windows OS in VirtualBox, and make the virtual disk a raw NTFS image (see here). Since the NTFS image is now in raw format rather than.VDI, you can access the NTFS by mounting it directly, without loading the VM instance.

By using VirtualBox instead of Dual boots, there are several advantages:

  1. You don’t have to convert your Linux partition to the NTFS file system. In VirtualBox, you can use Share Folder to access the host OS’s file system. And it’s very fast. Map it to a drive letter if necessary.
  2. You can work with both OSes concurrently, without needing to restart in order to switch from one to the other.
  3. Your GRUB loader will never be overwritten by Windows. Windows always overwrites your boot record and never prompts you with a yes or no.
  4. You will pay more attention to Linux, and then you’ll learn the Linux way to do most of your work. In fact, I found it’s rarely needed to turn on the Windows VM. Because people are lazy about learning new things if you install a dual system, and Windows is enough, why would you bother to boot into another OS?

I found this is the best way to make both Linux and Windows coexist. I have built several Windows VM instances for different usages, and because I don’t install too many applications in each VM, they run fast and it doesn’t feel too different from non-virtual machines.

Источник

Оцените статью
Adblock
detector