Terminal setup for zsh in macOS, Linux, and Windows.
- Install iTerm2
- Open your iTerm > Settings > Profiles > Other Actions > Import JSON Profiles > Choose this iTerm Profile
- After you setup: Other Actions > Set as Default
- Restart iTerm
For Windows, see Windows Section
-
To customize your own configs, you can fork this project before running the below installation script
-
Run the below to setup the terminal automatically:
sudo curl -s https://raw.githubusercontent.com/saltchang/terminal-setup/main/auto-install.sh | bash
It will setup the terminal by the below steps:
- Install homebrew, coreutils, python and pipx for macOS
- Install fonts: Meslo & Fira Code
- Install and setup zsh
- Clone this project into
$HOME/projects/personal/terminal-setup
- Create a soft link from
$HOME/.zshrc
to the one in this project - Create a soft link from
$HOME/.p10k.zsh
to the one in this project - Create a soft link from
$HOME/.local/terminal-setup/bin
to the one in this project
-
After the installation, restart your terminal or run
source $HOME/.zshrc
, you should see the new face of the shell
To customize your own configs, you can fork this project before the below steps.
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
brew install coreutils
brew install python
brew install pipx
Please install at least one of the below fonts for your terminal, Menlo is recommended.
See all Nerd Fonts.
Fira Code is recommended for your editor such as VS Code.
brew tap homebrew/cask-fonts
brew install --cask font-fira-code
sudo apt install fonts-firacode
It's recommended to put the project under $HOME/projects/personal
:
mkdir -p $HOME/projects/personal
cd $HOME/projects/personal
Then clone this project (if you forked it, replace the URL with your own):
-
use SSH
git clone git@github.com:saltchang/terminal-setup.git
-
use HTTPS
git clone https://github.com/saltchang/terminal-setup.git
Since Catalina, macOS will use zsh as the default shell, so you should have zsh built-in in your system
sudo apt update && sudo apt -y install zsh
Then restart your terminal
To setup the shell, just run the installation script:
cd terminal-setup
./install.sh
It will create a soft link from ~/.zshrc
to the one in this project, check dotfiles/.zshrc
.
Now restart your terminal or run source ~/.zshrc
, you should see the new face of the shell.
Run the below command to open your .zshrc
:
edit-rc
Or use the shortcut to go to the terminal-setup
repo:
go-rc-repo
The you can start to customize your shell.
If you would like to customize the color scheme of powerlevel10k, please see This chart.
- Open your Windows Terminal > Settings > Open JSON file
- Copy json configs from this config file
- Paste the config to the Windows Terminal config json you just opened
- Restart Windows Terminal
See PowerShell Setup