Just some notes and references for myself.
- In bash, you can access your
C:\
drive via/mnt/c/
~
=C:\Users\MLM\AppData\Local\lxss\home\mlm
and is different from your Windows user directoryC:\Users\MLM
- Windows Subsystem for Linux
- WSL
- lxss
- https://github.com/Microsoft/BashOnWindows
- https://msdn.microsoft.com/en-us/commandline/wsl/faq#what-is-your-high-priority-feature-set-for-the-windows-10-anniversary-edition-
- Open source documentation: https://github.com/Microsoft/CommandLine-Documentation
- Documentation: https://msdn.microsoft.com/en-us/commandline/wsl/about
- Release Notes: https://msdn.microsoft.com/en-us/commandline/wsl/release_notes
- User Voice: https://wpdev.uservoice.com/forums/266908-command-prompt-console-bash-on-ubuntu-on-windo/category/161892-bash
- WSL Blog: https://blogs.msdn.microsoft.com/wsl
- Console Blog: https://blogs.msdn.microsoft.com/commandline/
- Community powered list of programs that work and don't work: https://github.com/ethanhs/WSL-Programs
- Community powered discussion forum: http://wsl-forum.qztc.io/
https://github.com/Microsoft/BashOnWindows/blob/master/README.md#important-links
Use bash with Cmder
See
- https://conemu.github.io/en/BashOnWindows.html
- cmderdev/cmder#901
- https://amreldib.com/blog/CustomizeWindowsCmderPrompt
Create a new task: Settings -> Startup -> Tasks -> +
button
Name can be {bash}
or whatever.
Task Parameters:
/icon "%USERPROFILE%\AppData\Local\lxss\bash.ico"
Commands
"%windir%\System32\bash.exe" -cur_console:p -new_console:d:%USERPROFILE%
If you want to use zsh
and oh-my-zsh
.
sudo apt install zsh
, https://github.com/robbyrussell/oh-my-zsh/wiki/Installing-ZSHsh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
, https://github.com/robbyrussell/oh-my-zsh#basic-installation
See
Update your {bash}
task command:
"%windir%\System32\bash.exe" ~ -c zsh -cur_console:p -new_console:d:%USERPROFILE%
You can find my full zsh/oh-my-zsh theme config here, https://gist.github.com/MadLittleMods/2dc87634c6f3649852fba89b9b98e366
Don't forget to install some Powerline fonts. note: I have not found a Powerline font that looks quite right on Windows, http://i.imgur.com/BeselzS.png, http://i.imgur.com/ycb10AK.png (Anonymice suggestion courtesy of Amr)
Have not tried yet, see microsoft/WSL#279 (comment)
Looks like my iTerm2 setup on OSX
Install Xming and launch it. You will see a little X icon in your tray.
Install Sublime Text in WSL bash environment:
sudo apt install libgtk2.0-0 wget https://download.sublimetext.com/sublime_text_3_build_3114_x64.tar.bz2 tar xvjf sublime_text_3_build_3114_x64.tar.bz2 DISPLAY=:0.0 ./sublime_text_3/sublime_text
Then you can run the following to launch Sublime Text
DISPLAY=:0.0 ./sublime_text_3/sublime_text
If you want to make an easy shortcut, perhaps this will work for you. It gives me a Unable to Connect to dbus
error though.
C:\Windows\System32\bash.exe ~ -c "DISPLAY=:0 /opt/sublime_text/sublime_text"
echo something | clip.exe
See
Outdated FAQ
See
- https://wpdev.uservoice.com/forums/266908-command-prompt-console-bash-on-ubuntu-on-windo/suggestions/13383789-enable-network-interface-enumeraration
- microsoft/WSL#66
$ ifconfig
Command 'ifconfig' is available in '/sbin/ifconfig'
The command could not be located because '/sbin' is not included in the PATH environment variable.
This is most likely caused by the lack of administrative privileges associated with your user account.
ifconfig: command not found
$ sudo /sbin/ifconfig
Warning: cannot open /proc/net/dev (No such file or directory). Limited output.
Currently only 16-bit color. We need 256-bit color
See