MacOS comes with a default terminal, but it might be convenient to customized it to improve user experience.
Homebrew
Homebrew is a package manager for MacOS, we will use it to install all the software on Mac.
- Open the web browser
- Visite homebrew
- Follow install instructions...
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
- Proceed with installation
- Follow instructions to add homebrew to your PATH
echo 'eval "$(/opt/homebrew/bin/brew shellenv)"' >> /Users/hebrardms/.zprofile
eval "$(/opt/homebrew/bin/brew shellenv)"
To install software using homebrew:
- Open the web browser
- Visite homebrew
- Search for the software
- Copy the recipe
- Open 'Terminal'
- Paste the recipe and run the command.
- Follow installation instructions...
Git
Git is a version control software. It is also wildely use to distribure software.
- Open 'Terminal'
- Install git from homebrew
brew install git
- Check git version
git --version
# git version 2.30.1 (Apple Git-130)
Fonts
We will change the default font of the terminal in preparation for the theme we will install later.
- Open the web browser
- Visit powerlevel10K - Fonts
- Install the recommended fonts (MenloLGS)
- Download the font files from the github links
- Open Font Book
- Click on '+' icon
- Select the MesloLGS files
- Click 'Open'
Color theme
Default terminal colors can be inappropriate. They do not play well with the theme we will install later.
- Open the web browser
- Visit tomorrow theme
- Download the theme for 'OS X Terminal'
- Open 'Terminal'
- Navigate to the menu 'Terminal / Preferences...'
- Navigate to the tab 'Profiles'
- Below the list of profiles, click on '...'
- Select 'Import...'
- Select
Tomorrow Night.terminal
file - Click on 'Open'
- In the list of profiles, select 'Tomorrow Night'
- Click on 'Default'
- Change font to 'Menlo LGS NF'
Oh My Zsh
MacOS come with a minimal terminal. In this section, we will configure the terminal to add some features and style using Oh My ZSH and the theme Powerlevel10k.
- Open the web browser
- Visite Oh My Zsh
- Follow Install instructions...
sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
Powerlevel10K
Theme that add useful infomation right in the prompt.
- Open the web browser
- Visite powerlevel10k
- Follow Powerlevel install instructions...
git clone --depth=1 https://gitee.com/romkatv/powerlevel10k.git ${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/themes/powerlevel10k
- Install zsh-autosuggestions plugin that provides autocompletion based on our previous commands
git clone --depth=1 https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions
- Install exa a modern replacement for ls.
brew install exa
- Edit .zshrc to enable powerlevel theme
vim .zshrc
- Press 'i' to enter insert mode
- Uncomment options and edit file as follow...
# ZSH_THEME="robbyrussell"
ZSH_THEME="powerlevel10k/powerlevel10k"
DISABLE_MAGIC_FUNCTIONS="true"
DISABLE_LS_COLORS="true"
ENABLE_CORRECTION="true"
COMPLETION_WAITING_DOTS="true"
DISABLE_UNTRACKED_FILES_DIRTY="true"
plugins=(git zsh-autosuggestions)
# Alias of ls using exa
if [ -x "$(command -v exa)" ]; then
alias ls="exa --icons"
alias ll="exa --icons --long"
alias la="exa --icons --long --all --group"
alias lt="exa --icons --long --all --group --git --tree"
fi
- Press 'esc' to exit insert mode
- Press ':' and 'x' end 'return' to save and quit the file
- Update Terminal
source .zshrc
- Follow instructions to customise the prompt
Check Config
- Install neofetch from homebrew
brew install neofetch
- Check config
neofetch
Next, I suggest you follow Environment Manager - Conda.
Top comments (3)
I'm being picky, perhaps, but Oh My Zsh isn't a shell, zsh is... and zsh has been the default shell on Macs for a while because Apple doesn't want to use copyleft software.
I bring this up because there are a ton of articles which say the same thing, and it's misleading for new users, who are already going to be confused between the terminal, the shell, the command prompt, etc.
Point taken. I edited the sentence for
Hope that rectify the message.
Thanks for the feedback. Always open to suggestion for improvement
🥷 🧙♀️ wiki.zshell.dev 🧙♀️ 🥷
Some comments have been hidden by the post's author - find out more