Matthew Ayers

I create my ideas with code.

3 minute read

Useful Terminal Configurations

Whenever I use a new machine, there are a few customizations I highly recommend to make the most of the terminal. As time goes on, something like Dotbot would be a useful way to keep all configurations in sync across different machines, especially as you accumulate more dotfiles over time, but for now we'll start with the terminal application itself.

Terminal Application

Default terminal applications can be useful, but as you embrace the functionality of using a Unix-like command prompt more and more, it would be nice to have something that will work for you, not against you.

For macOS, I highly recommend iTerm 2 because of the wealth of features it provides, not to mention the infinite color customization and built-in features that can optimize your workflow. To read more about it and download iTerm 2, go to the link here.

If you are a Linux user, you likely have your own command line preferences, so I will refrain from providing any strong recommendations. For those interested in Linux who do not use it, however, I typically use Debian and install KDE, opting for the built-in Konsole terminal.

Package Managers

Most Linux distributions have their own package manager, such as dpkg, apt, rpm, yum, and pacman, but macOS lacks this. To make up for this, there is a package manager for macOS called Homebrew. Homebrew is useful because it works very similarly to a lot of the package managers available for Linux, not to mention that Homebrew itself is available on Linux. One important distinction to keep in mind, however, is that not all packages available on Homebrew for macOS can be downloaded on Linux, but a lot of packages seem to provide the ability to install packages on Linux. This is known as Linuxbrew, and can be really useful.

To install Homebrew, there is a one line installation script that makes the setup process simple, but you need to have Apple's Xcode Command Line Tools installed if you are trying to install it on macOS, and this can take awhile to install. At the end of the day, it is worth it and Homebrew can really enhance the experience of using a terminal on macOS. My favorite package to install is sl.

Shell Configuration

There are many different shells that exist, such as bash, zsh, csh, and sh, all of which have varying feature sets and use cases, but in general, I like to use zsh as my default shell. One of the biggest reasons I like to use zsh as my default shell is because there are a number of different ways to customize it. My preferred way to customize it is through Oh My Zsh, also known as omz. There is a one line installation script on the website and the linked documentation goes into the different prerequisites that are required to complete the installation process. There are other ways to customize zsh, but I have had a very pleasant experience with omz.

Once you have omz installed, you can look into installing the PowerLevel10K Theme here. This theme is useful because it lets you customize your terminal prompt and how to display information that might be useful for you, such as the git status of a repository you may be working in.

Edit History

  • 2022-05-23: Original post, links only
  • 2022-06-05: Updated to include more information about each way to configure a terminal, added language to make this useful for Linux in addition to macOS.
Tagged with: