Last active
November 12, 2022 20:42
-
-
Save davidmyersdev/1a1473ea36906c8f6830a17701e7fd21 to your computer and use it in GitHub Desktop.
Launch Atom from the Windows Subsystem for Linux (WSL)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# only convert the path if one is provided | |
if [ ! -z $1 ] | |
then | |
linuxPath="$(realpath $1)" | |
windowsPath="$(wslpath -w $linuxPath)" | |
fi | |
# avoid the UNC path warning | |
cd /mnt/c/Windows | |
# launch atom on Windows | |
cmd.exe /c "atom $windowsPath" |
Hey there, @drosanda. Does it work if you use the full /c/Windows/System32/cmd.exe
path instead of just cmd.exe
inside this script?
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi, i've just your tutorial but I've got an error
/usr/local/bin/atom: line 14: cmd.exe: command not found