I manadged to open (Windows version of) Atom from my WSL using Josh Brobst's suggestion and improving it a bit.
I was able to come up with 2 different aproaches.
- Make Atom open your current working directory
I did this by upgrading mentioned Josh Brobst's sugestion a little:
alias atom='/mnt/c/Windows/System32/cmd.exe /c "atom /PathToYourWSLRootFs/$PWD"'
this will make Atom to go through windows file system to your WLS directory,
containing root file system
after that you put
/$PWD which will expand into full path to your current directory
(inside your WSL system) and append it to the path to directory containing your WLS
like that Atom will be given full path to your current working directory as argument
and open it as folder
- Make Atom open specific file
To do this I wrote a simple bash script called
atom you can create an alias in WSL
that will run this script instead of going through windows binaries in your
/mnt/c/Windows/System32/cmd.exe /c "atom ./rootfs$PWD/$1"
where "./rootfs" is path (in windows fs) to my ArchLinux root file system. Of course
you need to put yours like this:
$PWD will once again append path to you current working directory (inside WSL)
$1 will then append argument you launched your script with
Usage: of this script is then following:
1) cd to directory containing desired file
Note: to make step 2) work, you need to set up alias for your script, put it
in a directory contained in your
$PATH, or run it by giving full path to your
These two aproaches are both working for me. I don't claim, the script couldn't be written
better, its just that I don't need it better. However I think it should give everyone a
basic idea of solving this problem and oportunity to make their scripts exactly to their
I hope this was helpfull to someone.