MacOS
iterm2 (終端工具)
image.png
image.png
zsh (shell的工具) 和 oh my zsh(zsh的插件)
安裝Zsh
查看所有shell
類型:
inkedeMacBook-Pro:~ inke$ cat /etc/shells
# List of acceptable shells for chpass(1).
# Ftpd will not allow users to connect who are not using
# one of these shells.
/bin/bash
/bin/csh
/bin/ksh
/bin/sh
/bin/tcsh
/bin/zsh
Mac的10.14.6已經自動zsh
了,查看當前使用shell
inkedeMacBook-Pro:~ inke$ echo $SHELL
/bin/bash
切換默認shell為zsh
chsh -s /bin/zsh
重新打開iterm2終端查看,切換成功。
inkedeMacBook-Pro% echo $SHELL
/bin/zsh
安裝Oh My Zsh
sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
如果電腦沒有安裝
image.png
這個時候最好安裝 xcode 并且打開一次,如果只是使用zsh,那么只安裝編譯工具也行,好像叫build xxx tools 。
命令最好加上 -v 參數,可以看到腳本執行的輸出信息,不然就會一直等待中。
inkedeMacBook-Pro% sh -c "$(curl -fsSL https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
Cloning Oh My Zsh...
Cloning into '/Users/inke/.oh-my-zsh'...
看到下面信息表示安裝完成,終端的用戶名前綴也都變成了? ~
。
Looking for an existing zsh config...
Using the Oh My Zsh template file and adding it to ~/.zshrc.
__ __
____ / /_ ____ ___ __ __ ____ _____/ /_
/ __ \/ __ \ / __ `__ \/ / / / /_ / / ___/ __ \
/ /_/ / / / / / / / / / / /_/ / / /_(__ ) / / /
\____/_/ /_/ /_/ /_/ /_/\__, / /___/____/_/ /_/
/____/ ....is now installed!
Please look over the ~/.zshrc file to select plugins, themes, and options.
p.s. Follow us on https://twitter.com/ohmyzsh
p.p.s. Get stickers, shirts, and coffee mugs at https://shop.planetargon.com/collections/oh-my-zsh
? ~
? ~
使用 SDK MAN 安裝 JDK 和 Gradle,可以看SDK MAN 教程
。
image.png
安裝 SDK MAN
curl -s "https://get.sdkman.io" | zsh
sdk list java
sdk install java 8.0.222-zulu
如果下載慢,使用代理。
設置終端中的 wget、curl 等都走 SOCKS5 代理(只對當前終端有效):
export ALL_PROXY=socks5://127.0.0.1:1086
再次執行安裝jdk命令,通過監控軟件看到網絡走了代理如下:
image.png
速度剛剛的。