Installing Fish Shell on Ubuntu on Windows 10
So hopefully by now you've heard that you can run Bash via Ubuntu on Windows...and not in a VM. You can run the Bash Shell and real ELF Linux Binaries (this is not emulation) on Windows 10.
I've recorded a 30 min video with developers from the project and there's a blog post from Dustin from Ubuntu about HOW this works if you want more technical details. You should also check out the Command Line Blog and subscribe and head over to User Voice to help pick the next features.
It's beta, but it's super fun. A common question is "hey bash is lovely but what about _____ shell." Right now as I understand it supports bash and adding other shells may not work, and if it does, you're hacking around. So, let's hack around.
I noticed this shell called Fish Shell and noticed that Ruby Nealon had Fish tweaked and running. I asked for some more detail and they were happy to oblige with a medium post. Thanks Ruby!
Let me give it a try.
Add the Fish Apt Repo and install.
I headed over to the fish site and did this.
sudo apt-add-repository ppa:fish-shell/release-2
sudo apt-get update
sudo apt-get install fish
Oh, and I also changed my Console Font to use Ubuntu Mono because
Note: I'm hearing it will be WAY easier to add new fonts as the console continues improving. The conhost.exe stuff improves console for everyone, including cmd.exe, powershell.exe, and bash. That console work includes VT100, ANSI, and other stuff, and is separate, but complementary to the bash work.
Because we're still launching bash, we need to use the .bashrc today to launch fish, so you'll need to add ssh-agent fish, and exit to your .bashrc if you want to try this.
OK, next, kind of unrelated to fish, but still useful, I wanted to setup git and ssh-agent, so I generate a new key, add it to ssh agent, following these guides.
- Generating a new SSH key and adding it to the ssh-agent
- Then go into GitHub and add your key https://github.com/settings/ssh. There isn't xclip support yet, but you can just cat ~/.ssh/id_rsa.pub for now.
Ruby also points out that Fish has a "Oh My Fish" framework for packages and themes. You can get it easily:
curl -L https://github.com/oh-my-fish/oh-my-fish/raw/master/bin/install | fish
Ruby also included their own fish_prompt.sh file here for the "chain" theme that I installed with "omf install chain" as some glyphs rendered weird. If you want unicode characters like → in your prompt, make sure your files are UTF-8 and not ANSI or you'll get squares!
Now my prompt uses fish, has cool auto complete, nice colors, shows the git dirty bit and branch.
Yes, I realize there are literally fiftyleven billion ways to customize bash, zsh, and lots of other shells to do much cooler stuff than this. I too, am old, and I to have used *nix for years. But it was fun and easy to get fish running on Ubuntu on Windows. Thanks Ruby!
Sponsor: Quality instrumentation is critical for modern applications. Seq helps .NET teams make sense of complex, asynchronous, and distributed apps on-premises or in the cloud. Learn more about structured logging and try Seq free for 30 days at https://getseq.net.