Iterm2
Index
ใTipใ
The most optimal shell terminal for MacOS system.
Install
Install from the official website
Brew Install
brew install iTerm2
Foundational Setup.
Establish as the default terminal.
Configure the connection information.
Oh-My-ZSH
Install
#Install oh-my-zsh via curl
sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
#Install oh-my-zsh via wget
sh -c "$(wget https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh -O -)"
Switch Shell
# ๆฅ็ๅฝๅไฝฟ็จ็shell
echo $SHELL
# ๆฅ็ๅฏ็จ็shell
cat /etc/Shells
# ไฟฎๆนไธบzsh
chsh -s /bin/zsh
Modify The oh-my-zsh Theme.
View available themes.
ls ~/.oh-my-zsh/themes
Preview the effects of various themes.
Modify the zsh configuration to set up the oh-my-zsh theme.
echo 'ZSH_THEME="agnoster"' >> ~/.zshrc
source ~/.zshrc
Install plugins.
Here, I have installed
zsh-autosuggestions
,git
, andzsh-syntax-highlighting
.
# zsh-syntax-highlighting
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git $ZSH_CUSTOM/plugins/zsh-syntax-highlighting
# zsh-autosuggestions
git clone https://github.com/zsh-users/zsh-autosuggestions.git $ZSH_CUSTOM/plugins/zsh-autosuggestions
# ไฟฎๆน้
็ฝฎ
vim ~/.zshrc
# ๆฐๅข็ปไปถ
plugins=(zsh-autosuggestions git zsh-syntax-highlighting)
# ไฝฟ้
็ฝฎ็ๆ
source ~/.zshrc
Keyboard Shortcuts
Ctrl + b
: Moves the cursor one character backward, akin to the left arrow key.Ctrl + f
: Moves the cursor one character forward, similar to the right arrow key.Ctrl + d
: Deletes the current character.Ctrl + -
: Performs an undo operation.Ctrl + a
: Positions the cursor at the beginning of the line.Ctrl + e
: Positions the cursor at the end of the line.Ctrl + l
: Clears the screen.Ctrl + k
: Cuts all content from the current cursor position to the end of the line.Ctrl + r
: Press to input the command to be searched for, then press to continue searching upward.Ctrl + j
: Utilizes the currently found command to conclude the search.Ctrl + g
: Cancels the search, restoring the command line.