0

I have a Windows Notepad++ executable whose path is assigned to npp alias. I'm trying to open .bashrc configuration file, but the behavior seems different based on whether my current working directory is in Linux or Windows filesystem:

user@pc:/mnt$ npp ~/.bashrc  # Works, correctly opens file at \\wsl.localhost\Ubuntu\home\user\.bashrc
user@pc:/mnt$ cd c
user@pc:/mnt/c$ npp ~/.bashrc  # "C:\home\user\.bashrc" cannot be opened. Folder "C:\home\user" doesn't exist
user@pc:/mnt/c$ npp //wsl.localhost/Ubuntu/home/user/.bashrc # Works

It seems that while my working directory is in Linux filesystem, the path gets automatically translated into Windows Path and the file opens correctly. This doesn't happen when I'm in Windows working directory. Could someone help me understand how this works?

1 Answer 1

-1

Windows file system, NTFS, and Windows tools, do not reveal the actual file and directory structure on the disk. much of the user storage are links that are named differently than what they link to.

/home/username is not really in a path directly off the Windows root directory, C:. You can try this file manager: https://github.com/adamyg/mcwin32/releases and download an install file, or git clone https://github.com/adamyg/mcwin32.git for source code to compile.

Mc stands for midnight commander. It's a very good file manager. It will show you what the Win directory structure actually looks like.

1
  • "Windows file system, NTFS, and Windows tools, do not reveal the actual file and directory structure on the disk." not true, there's a canonical path on Windows just as well, and you can very well figure these out. Commented Jan 28 at 0:01

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .