Last active
December 1, 2016 16:11
-
-
Save xezpeleta/8df90f43a4dcfaacc8bdad1036b4d37d to your computer and use it in GitHub Desktop.
Bash on Windows installer script (work in progress)
This file contains hidden or 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
REM Uninstall Bash on Windows | |
lxrun /uninstall /full /y | |
REM TODO: Disable WSL feature | |
REM TODO: Disable Developer Mode | |
REM debugging-pause | |
pause |
This file contains hidden or 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
REM Install Bash on Windows | |
@powershell -NoProfile -ExecutionPolicy Bypass -Command "iex ((new-object net.webclient).DownloadString('https://gist.githubusercontent.com/xezpeleta/c253b2cec4df886cefe7030204be9d53/raw/2a5be6b7cc4f0d49bfb8413b3ed37330e482f500/bash-on-windows.ps1'))" | |
REM debugging-pause: the computer will be restarted | |
pause | |
REM Restart computer (required) | |
shutdown -r -f -t 0 |
This file contains hidden or 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
REM Attention! Restart the computer after running the bash-on-windows.bat script | |
REM Enable bash (TODO: assume yes) | |
REM bash | |
lxrun /install /y | |
REM Create default user | |
lxrun /setdefaultuser root /y | |
bash -c "echo 'myuser:mypassword' | chpasswd" | |
lxrun /setdefaultuser myuser /y | |
REM Bash command example | |
bash -c "cat /etc/issue.net" | |
REM debugging-pause | |
pause |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment