Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?

Just some notes and references for myself.

  • In bash, you can access your C:\ driver via /mnt/c/
  • ~ = C:\Users\MLM\AppData\Local\lxss\home\mlm and is different from your Windows user directory C:\Users\MLM

How to google things

See https://github.com/Microsoft/BashOnWindows/issues/490

Terms

  • Windows Subsystem for Linux
  • WSL
  • lxss

Resources

https://github.com/Microsoft/BashOnWindows/blob/master/README.md#important-links

Terminals/Shells

Cmder

Use bash with Cmder

See

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%

Want ZSH?

If you want to use zsh and oh-my-zsh.

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)

Open ~/.zshrc and set ZSH_THEME="agnoster"

Update your {bash} task command:

"%windir%\System32\bash.exe" ~ -c zsh  -cur_console:p -new_console:d:%USERPROFILE%

Console Z

Have not tried yet, see https://github.com/Microsoft/BashOnWindows/issues/279#issuecomment-218726174

Looks like my iTerm2 setup on OSX

FAQ

ifconfig is not supported

See

$ 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.

Colors are weird (syntax highlighting, etc)

Currently only 16-bit color. We need 256-bit color

See

Shared hosts/hostnames

See

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.