First thoughts and a quick setup guide on Bash for Windows

My current shell

So I installed the Windows 10 Insider Previews to try out Bash for Windows, and I have to say I love it! Microsoft have really done a great job on this and it has supported everything I tried (so far) out of the box. Here’s a little guide to get something cool going like mine ;^).

Get fish shell

I’m not keen on the default bash shell, so to pretty things up and get a lot of useful features such as auto suggestions, try out fish shell! Installation instructions are literally adding the repo to apt-get, updating apt-get and installing. Follow the instructions here to do that.

Install Oh My Fish!

Oh My Fish! is a community framework for fish shell that makes installing themes and packages for fish super easy. Follow the instructions on the GitHub (you may need to install git with apt-get install git) and you’re all up and running. I’ve noticed themes that use multiple lines for the prompt don’t work. Right now I’m using the “chain” theme (with some mods detailed later) and it works mostly fine!

Setup Git

I’m using GitHub so I followed their guide here. Don’t do the ssh-agent part just yet, I’ll go over that later.

Make fish default

This is a bit of a hack around as you still have to launch the bash.exe but is the most graceful way of doing it. Open .bashrc in your favorite text editor and add the contents of this gist to the top of the file.

Finish setting up Git

Reload your shell and fish should now launch by default. There will be some missing icons we can sort later. You can now add your ssh key to the ssh agent using the 2nd step of the SSH Agent part of the guide I linked earlier.

Theme tweaks

I’m not that fussy about design but some things in the chain theme weren’t working for me. I’ve posted my version of my theme file here. The location of the file is “$OMF_PATH/themes/chain/”.

Final other tweaks

Right now your shell should be looking pretty dope, some other suggestions are:

  1. Change the terminal font — I changed mine to Source Code Pro by Adobe. There are guides on how to do this on the web, note you need to change the terminal properties separately for your bash/fish console.
  2. Change the shortcut name/icon — this is fairly straight forwards in windows.

Happy hacking! Let me know how you setup your terminal and if you have any questions :)

sometimes I do bug bounty writeups. most of the time i dont.