Views:
1,461,217
Votes: 2
Tags:
windows-10
bash
windows-subsystem-for-linux
Link:
🔍 See Original Answer on Super User ⧉ 🔗
URL:
https://superuser.com/q/1425611
Title:
What is the home directory on Windows Subsystem for Linux?
ID:
/2019/04/15/What-is-the-home-directory-on-Windows-Subsystem-for-Linux_
Created:
April 15, 2019
Edited: April 16, 2019
Upload:
October 19, 2025
Layout: post
TOC:
false
Navigation: false
Copy to clipboard: false
I just needed to find /etc/environment using Ubuntu 16.04 looking into Windows 10 NTFS storage. I found it here:
C:\Users\USER_NAME\AppData\Local\Packages\CanonicalGroupLimited.Ubuntu16.04onWindows_79rhkp1fndgsc\LocalState\rootfs\etc\environment
- I changed
/mnt/c/toC:\for Windows nomenclature. - I also changed all occurrences of
/to\for same reason. - You need to replace
USER_NAMEwith your Windows User Name. - I had to use
sudo -H Nautilusto get permissions to view the User Files stored in WSL. - NEVER update your Linux files in WSL using a Windows application. It will corrupt your Linux data.
From the Linux (Ubuntu 16.04) side the nomenclature would be:
$ sudo cat /mnt/c/Users/USER_NAME/AppData/Local/Packages/CanonicalGroupLimited.Ubuntu16.04onWindows_79rhkp1fndgsc/LocalState/rootfs/etc/environment
PATH="/mnt/e/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games"
export LIBGL_ALWAYS_INDIRECT=Yes
export DISPLAY=localhost:0.0