Skip to content

Instantly share code, notes, and snippets.

@voraciousdev

voraciousdev/atom.sh

Last active Dec 31, 2020
Embed
What would you like to do?
Launch Atom from the Windows Subsystem for Linux (WSL)
#!/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"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment