

On my Linux machine, I could do this via Edit > Preferences > Colors. You might also like to alter the color scheme for your terminal. For example, setting ZSH_THEME="avit" will cause Oh My Zsh to use the avit theme.
#Makes zsh as default bash on mac install#
To install a different theme, pick one from the link above and change the value of the ZSH_THEME variable, before restarting your shell. This is the default theme that the creator of Oh My Zsh uses. If you look in the ~/.zshrc file for the ZSH_THEME variable, you’ll find it’s set to robbyrussel. Luckily Oh My Zsh ships with a whole bunch of themes. If you spend a lot of time in the terminal, it’s worth investing some effort in making it visually appealing.

If you experience any problems, try creating a topic on SitePoint’s forums and ask for help there. Check Your Progressīy this point you should have zsh installed and set as your default shell. You can also do this with a command: source ~/.zshrc. Note: We’ll be reloading our shell several times through out the tutorial. Currently it should contain two lines, namely myip and exit. This is where zsh stores a list of your previous terminal commands. zsh_history file, which is also in your home directory. Shut the terminal by typing exit, then locate the. If you’d like to experiment more with aliases, check out 7 Super Useful Aliases to make your development life easier. Providing you have the cURL program installed, you should see your current public IP address output to the terminal. Restart your shell (for example, by closing it then opening it again), then type myip. zshrc and save the file: alias myip = "curl echo" In their simplest form, aliases are terminal shortcuts for regular commands. We can demonstrate how this file works by creating an alias. If you’re not sure how, search for “Show hidden dot files mac/Linux etc”. Note: file names that begin with a dot are hidden by default on most operating systems, so you’ll need to make it visible before you can edit it. This file is run whenever you start zsh and is the place where any custom configuration lives. Now let’s have a look at the file that zsh just created. However, I suggest selecting (2) which will create a configuration profile with the recommended default settings. If you select (1) you’ll be taken to a menu that allows you to configure history, keybindings and a bunch of other things. When you first open zsh, you’ll be greeted by the following menu. Note that it is also possible to get zsh running with Cygwin.
#Makes zsh as default bash on mac how to#

If at any point you decide you don’t like zsh, you can revert to Bash using: chsh -s $(which bash).

After issuing this command, you’ll need to log out, then log back in again for the changes to take effect. Once installed, you can set zsh as the default shell using: chsh -s $(which zsh). If not, you can follow this guide to install a more recent version of zsh using homebrew. If the version is 4.3.9 or higher, you should be good to go (we’ll need at least this version to install Oh My Zsh later on). You can check if this is the case and if so, which version you are running using the command: zsh -version. Most versions of macOS ship with zsh pre-installed. If you get stuck installing zsh, there is plenty of help available online.Īt the time of writing the current zsh version is 5.7.1. I don’t want to offer in-depth installation instructions for each operating system, rather some general guidelines instead.
