- Enable WSL on Windows 10 through 'Programs and Features'.
- Install WSL Ubuntu from the Windows Store.
- Launch ubuntu.exe and do initial 'Properties/Defaults' config:
- Right click on the title bar, select Defaults:
- Under the Options tab, select
Use Ctrl+Shift+C/V as Copy/Paste
- You might want to increase Buffer Size for Command History under the Options tab, and Height under Layout > Screen Buffer Size: 9001 seems like enough 😄
- Under the Options tab, select
- Right click on the title bar, select Defaults:
- Install zsh:
sudo apt-get install zsh
- After it installs, type
zsh
and choose a configuration (I chose 2)
- Install oh-my-zsh:
- Using
curl
:
sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
- This will clone the repo and replace the existing
~/.zshrc
with a template from oh-my-zsh.
- Using
- Configuring zsh/oh-my-zsh:
- The install might have made
zsh
your Login Shell, you can check with:chsh
, it will print something like:Changing the login shell for <name> Enter the new value, or press ENTER for the default Login Shell [/usr/bin/zsh]:
- If it already says, as above, /usr/bin/zsh, then you're good to go, if not:
- Make
zsh
the default for Bash:chsh -s $(which zsh)
- Since the Windows 10 Spring 2018 Creator's Update, you can use
cshs
like you would in mainline Linux systems.
- Since the Windows 10 Spring 2018 Creator's Update, you can use
- Make
- The install might have made
- Changing directory colors:
- The default colors used in
ls
at this point have some bad background highlighting issues, let's fix that. - Create a
.dircolors
file as follows:dircolors -p > ~/.dircolors
- You now have a .dircolors file containing the color configuration for
ls
, which is stored in the env variable LS_COLORS. What we need to do next is make a change to the colors, and save it back to LS_COLORS.
- You now have a .dircolors file containing the color configuration for
- Edit ~/.dircolors, we're removing the background from OTHER_WRITABLE, and fixing the font color for the rest:
- Change
SETUID
to:SETUID 00;30;41
- Change
SETGID
to:SETUID 00;30;43
- Change
CAPABILITY
to:CAPABILITY 00;30;41
- Change
STICKY_OTHER_WRITABLE
to:STICKY_OTHER_WRITABLE 00;30;42
- Change
OTHER_WRITABLE
to:OTHER_WRITABLE 01;32
- Change
STICKY
to:STICKY 00;30;44
- Save
- Change
- Edit
~/.zshrc
and add the following:eval `dircolors ~/.dircolors`
- Save and restart ubuntu.exe
- The default colors used in
- Change the overall terminal Color theme:
- There's an external tool called
ColorTool
which customizes the settings found in terminal's Properties/Defaults (mostly the Colors tab) - https://github.com/Microsoft/Console/tree/master/tools/ColorTool - Download the tool in Windows: https://github.com/Microsoft/console/releases
- Unzip it and move it to a location you're happy with, then add it to your PATH variable.
- This will enable it to be accessible from the WSL terminal (make sure to use the full name with .exe:
colortool.exe
- This will enable it to be accessible from the WSL terminal (make sure to use the full name with .exe:
- Open up ubuntu.exe, and run:
colortool.exe -b OneHalfDark
- This will set your current terminal to the /schemes/solarized_dark.itermcolors scheme, and set it as the default.
- You can try other schemes or get more from: https://github.com/mbadolato/iTerm2-Color-Schemes
- There's an external tool called
- Change themes and colors of oh-my-zsh:
- Edit the
~/.zshrc
file to change the theme (I like https://github.com/agnoster/agnoster-zsh-theme):
# Find and change this: ZSH_THEME="robbyrussell" # To this: ZSH_THEME="agnoster"
- External themes: https://github.com/robbyrussell/oh-my-zsh/wiki/External-themes
- Save and restart ubuntu.exe.
- Edit the
- Fix missing font symbols:
- You'll notice some symbols are missing, this is because you need a Powerline font that will work for Windows + Windows Consoles.
- Download/clone the following repo: https://github.com/powerline/fonts
- Open the DejaVuSansMono folder, and install
DejaVu Sans Mono for Powerline.ttf
- This is the only font I found that actually works with all the symbols used in oh-my-zsh agnoster.
- Right-click on the title-bar of your Ubuntu terminal, select Defaults:
- In the Font tab, select
DejaVu Sans Mono for Powerline
- In the Colors tab, set Opacity to 90%, you're a real hipster now.
- Hit OK, then restart ubuntu.exe
- In the Font tab, select
- Vim comes with some default color schemes that you can change, which are found here:
/usr/share/vim/vim80/colors
- You can try a scheme out in vim with:
:colorscheme <theme>
- To have it launch with a given theme, add it to ~/.vimrc:
colorscheme elflord
- You can also grab any number of other vim themes and put them in ~/.vim/colors, where
colorscheme
will find them by name.
- You can try a scheme out in vim with:
- Gruvbox theme: https://github.com/morhetz/gruvbox
- https://blog.joaograssi.com/windows-subsystem-for-linux-with-oh-my-zsh-conemu/
- https://medium.com/@Andreas_cmj/how-to-setup-a-nice-looking-terminal-with-wsl-in-windows-10-creators-update-2b468ed7c326
- https://nickjanetakis.com/blog/conemu-vs-hyper-vs-terminus-vs-mobaxterm-terminator-vs-ubuntu-wsl
- https://devblogs.microsoft.com/commandline/introducing-the-windows-console-colortool/
- Awesome WSL:
- Keeping Ubuntu WSL up to date:
- tmux setup:
- tmux cheatsheet:
- Backing up packages and dotfiles: