Install zsh
, and git
package
$sudo apt-get install zsh
$sudo apt-get install git
Check your current client support shell
$cat /etc/shells
Note: It will list down all the shell it support
Check default shell
$echo $SHELLS
or $echo $0
default is /bin/bash
Install oh-my-zsh
You can use either wget
or curl
to download. Default wget
is installed, so I will used it instead of curl
.
via curl
(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
or
via wget (wget https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh -O -)"
Change your default shell to zsh
$chsh -s /bin/zsh
Download your theme
cd to home directory and copy the download theme to zsh folder
edit .zshrc to change your theme
#change ZSH_THEME to bullet-train
nano ZSH_THEME = “bullet-train”
restart your terminal or logout
install poweline else font will be strange, especially logo
$sudo apt-get install powerline
$sudo apt-get install fonts-powerline
安裝 Homebrew
Homebrew 是 Mac OSX 上的的套件管理工具,是方便安裝管理 OSX 裡需要用到但預設沒安裝的套件。
(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh
)"
install iterm2
brew install –cask iterm2
- 背景: command + i or iterms>preferences 選colors 或是下面plugin
iterm color plugin download
color 選import plugin 上面下載 。選schemes裡面的
- spit terminal:
split vertical: ⌘ + D
horizontal: ⌘ + ⇧+D
switch terminal: ⌘ + Option+ right left
max/min terminal:⌘+ shift+ ⏎
- Word Jumps:
perference> keys>natural text editing
add word ex: one two three
switch word: options right or left move word- delete word: delete + backspace
- command history hint: ⌘ ;
安裝 ZSH
echo $SHELL
brew install zsh
csh -s /bin/zsh #method1
sudo sh -c "echo $(which zsh) >> /etc/shells" #method2
chsh -s $(which zsh) #method3
restart itern after setting it
git clone git://github.com/robbyrussell/oh-my-zsh.git
cp ~/.oh-my-zsh/templates/zshrc.zsh-template ~/.zshrc
source ~/.zshrc
cd ~
git clone https://github.com/bhilburn/powerlevel9k.git ~/.oh-my-zsh/custom/themes/powerlevel9k
.zshrc
it will ask you question, press
n
n
y
which style you want?
1unicode or 2ascii? 1
show time
flat or blurred at end?
same line as heading?
compact or space
instant prompt mode? 1
apply?
ZSH_THEME="agnoster"
ZSH_THEME="random" #randome theme
ZSH_THEME="powerlevel9k/powerlevel9k"
ZSH_THEME="powerlevel10k/powerlevel10k"
source ~/.zshrc
cd fonts
./install.sh
edit .zshrc for plugin same as theme
plugins= (osx #type tab will new terminal tab
websearch
vscode #vscode
)
Auto Suggestions Plugin
git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions
plugins=(
git zsh-autosuggestions
)
Syntax Highlighting
brew install zsh-syntax-highlighting
source /usr/local/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
Change the username@hostname
DEFAULT_USER = `whoami`
alias
plugins= (vscode)
>shell #install code command in PATH
code .
will open vscodeterminal with vscode
- go to setting or CMD +
- go to edit setting json
neofetch (fancy )
git clone https://github.com/dylanaraps/neofetc
cd neofetch
make install #install
fzf (history command)
brew install fzf
#To install useful key bindings and fuzzy completion:
$(brew –prefix)/opt/fzf/install
git clone –depth 1 https://github.com/junegunn/fzf.git ~/.fzf
~/.fzf/install
ask you question: press y
rm
with tabls
with tabLinux
Mac
Zsh
terminal
Tool