Skip to content

Instantly share code, notes, and snippets.

What would you like to do?

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 directory C:\Users\MLM

How to google things



  • Windows Subsystem for Linux
  • WSL
  • lxss




Use bash with Cmder


Create a new task: Settings -> Startup -> Tasks -> + button

Name can be {bash} or whatever.

Task Parameters:

/icon "%USERPROFILE%\AppData\Local\lxss\bash.ico"


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

Want ZSH?

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


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,

Don't forget to install some Powerline fonts. note: I have not found a Powerline font that looks quite right on Windows,, (Anonymice suggestion courtesy of Amr)

Console Z

Have not tried yet, see

Looks like my iTerm2 setup on OSX

Using Sublime Text through WSL

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
tar xvjf sublime_text_3_build_3114_x64.tar.bz2
DISPLAY=:0.0 ./sublime_text_3/sublime_text

@onomatopellan comment

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"

@onomatopellan comment


Command to copy to clipboard

echo something | clip.exe

Shared hosts/hostnames



Outdated FAQ

ifconfig is not supported


$ 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



This comment has been minimized.

Copy link

odalet commented Apr 24, 2017

Hi, I append this to my .bashrc so that Windows directories stop appearing with a green background when I ls --color:
LS_COLORS=$LS_COLORS:'ow=31:tw=31:' ; export LS_COLORS

Btw, I'm not sure what those ow/tw mean, but I now have these folder appear in red and no background
Hope this helps


This comment has been minimized.

Copy link

rivy commented Jul 11, 2017

@odalet ,

ow directory that is other-writable (o+w) and not sticky
tw directory that is sticky and other-writable (+t,o+w)

Basically, they are color warnings that the directories can be modified by "other".[1]

[1] Configuring LS_COLORs [@]

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.