The command line, also known as "the shell" is accessed on the Mac using an application in the /Applications/Utilities directory called "Terminal". It works great, but there is a more feature-rich, and free version called iTerm2 that a lot of people like to use. Configuring your shell is a personal preference issue, but at a base level the modifications below are a good starting point. You'll probably want auto-completions and suggestions, syntax-highlighting, etc. With Catalina, Apple changed the default shell from bash to zsh. Our lab computers are from 2013, so there were some adjustments that had to be made to accommodate this change. If you're setting up your personal computer and it's fairly new, some of the stuff we do below may not be necessary (e.g. #1). We've installed the Mac package-manager called Homebrew in FAC302, so you'd need to do that if you want to set up your personal computer. Because the lab is a multi-user environment, we added a usergroup called "brew", and you wouldn't need to do that on your own machine (see #3). Otherwise, this is a pretty standard setup for most uses circa 2021.
1. Check Terminal Preferences->General and set zsh as shell if it's not already set as default.
2. Install iTerm2 if it's not already installed. https://iterm2.com/
3. <FOR ADMIN ONLY>Open Preferences->Users&Groups-> authenticate as admin->check student account as member of "brew" group.
4. Change directories to your home with (or, just "cd"):
Code: Select all
cd ~
Code: Select all
sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
7. Install Powerline fonts. These allow special characters to show up in oh-my-zsh themes like Agnoster.
Code: Select all
git clone https://github.com/powerline/fonts.git --depth=1
cd fonts
./install.sh
9. Install "antigen" oh-my-zsh plugin manager with Homebrew (already installed on lab computers):
Code: Select all
brew install antigen
Code: Select all
# Configure Antigen ZSH plugin manager.
source $(brew --prefix)/share/antigen/antigen.zsh
# Load Antigen configurations
antigen init ~/.antigenrc
Code: Select all
pico .antigenrc
Code: Select all
# Load the oh-my-zsh's library
antigen use oh-my-zsh
# Load bundles from the default repo (oh-my-zsh)
antigen bundle git
antigen bundle command-not-found
# Load bundles from external repos
antigen bundle zsh-users/zsh-syntax-highlighting
antigen bundle zsh-users/zsh-autosuggestions
antigen bundle zsh-users/zsh-completions
antigen bundle osx
# Load your favorite theme. With antigen you can change these on they fly with
# commands like: antigen theme robbyrussell
# For themes see: https://github.com/ohmyzsh/ohmyzsh/wiki/Themes
antigen theme agnoster
# Tell antigen that you're done
antigen apply
Code: Select all
source .zshrc