create aliases for Linux commands in Windows command line (for WSL)
/etc/wsl.conf
)C:\Users
) to WSL paths (/mnt/c/Users
)(thanks to hustlahusky for above features)
wsl-alias
in installer scriptthe wrong version was being downloaded lol
that regex created the default alias, so this bug made wsl-alias
unusable
if you had installed v2.0 or v2.1, remove all aliases and reinstall wsl-alias
using the script
fixed passing path to wsl, syntax in alias template
changes
b nano ..\file.txt
(or used TAB to autocomplete the command) in Windows command line or PowerShell, the backward slashes \
will automatically be converted to forward slashes /
to reference the same file under wsl
wsl
directory (new location is %userprofiles%\wsl-alias
), this is to avoid the following issue: Microsoft/WSL#3487wsl-alias
now (optionally) adds the default wsl
user permission to mount
a drive without requiring a password, this also results in /mnt
directory requiring 777
permissions (which is also set by the installer)~/.wsl-alias
a note about wslpath
: i was planning to implement it into this release to convert the current working directory from windows
into the wsl
path but came across this issue: Microsoft/WSL#3246
since i'm using a veracrypt container most of the time, this solution wouldn't be suitable for me (and a lot of other people) so that's why i'll wait for wslpath
to be fixed
~/.wsl/bin/win
rm -r ~/.wsl
and remove the old alias directory from the Windows environment var PATHit happens to everyone
we're finally in v1! easyWSLbash
is now known as wsl-alias
.
Fall Creators Update is now out and wsl-alias
can now be used by any Windows 10 user.
this release introduces a major new feature: aliases
upgrading from v0.1:
back up your env.sh
script and reinstall wsl-alias
.
note: check the documentation because some changes aren't backwards compatible!
fully working, tested on builds 16299 and 16215