macOS: How to Install an Alternative Terminal Shell

The Mac Terminal is an extremely useful multi-purpose tool. You don’t have to be satisfied with it straight out of the box though; you can add your own customizations, such as using a different shell. In this guide we’ll show you how to install an alternative Terminal shell called fish.

What is a Shell?

A shell is any program that you use to type commands in a command-line interface. Think of it like a skin that you can put on the Terminal. Different shells have different purposes, but they all give you access to the command line. The default shell for macOS is called bash, which stands for Bourne-Again Shell.

Fish, and alternative terminal shell, can autocomplete commands.
fish can autocomplete commands

I briefly talked about the fish shell on Friday’s Daily Observations podcast episode. I like fish mainly for its ability to suggest commands and auto-complete them. Some features that fish has include:

  • Autosuggestions: fish suggests commands as you type based on history and completions, like how Safari autocompletes URLs.
  • Scripting: fish is fully scriptable and its syntax is “simple, clean, and consistent.”
  • Man page completions: fish generates man pages automatically by parsing your installed man pages.
  • VGA color: fish gives you a colorful command line in 24-bit true color.
  • Web-based configuration: Set your colors, view functions, variables, and history from a web page.
  • Easy to use: fish works out of the box

Installing Fish

There are multiple ways to install fish: using Homebrew, MacPorts, an installer, or downloading the app. The commands for Homebrew and MacPorts are below.

Homebrew

brew install fish

MacPorts

sudo port install fish

Once fish is installed, you’ll see the word “fish” in the Terminal tab at the top. You can type “help” at any time, and it will open a webpage to the fish tutorial. If you installed fish using HomeBrew or MacPorts, it plugs into Terminal so you don’t need a separate app.

Fish, an alternative Terminal shell, works in the background.
fish works in the background so you can use Terminal as you normally would

Using Fish

Think of fish as a tool that works behind the scenes. Using fish means using Terminal like you normally would, except now you get extra functionality. Fish has documentation, as well as an FAQ.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.