https://segmentfault.com/a/1190000013612471?utm_source=tag-newesthtml
https://ohmyz.sh/node
一:安裝iTerm2終端linux
https://www.iterm2.com/downloads.htmlgit
1:查看當前的shell環境github
echo $SHELL
2: 查看系統自帶哪些shelltypescript
cat /etc/shells
3:切換Zsh shellshell
chsh -s /bin/zsh # Mac以下 # 在 /etc/shells 文件中加入以下一行 /usr/local/bin/zsh # 接着運行 chsh -s /usr/local/bin/zsh
自動安裝oh-my-zsh 插件npm
sh -c "$(curl -fsSL https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
重啓iTerm2終端vim
效果segmentfault
二:vscode中配置shell
vscode中字體及顏色的配置:
{ "editor.fontSize": 14, "editor.tabSize": 2, "workbench.colorTheme": "Monokai", "workbench.startupEditor": "newUntitledFile", "window.zoomLevel": 1, "typescript.check.npmIsInstalled": false, "extensions.ignoreRecommendations": true, "git.ignoreMissingGitWarning": true, "gitlens.advanced.messages": { "suppressShowKeyBindingsNotice": true }, "terminal.integrated.shell.linux": "/bin/zsh", "terminal.integrated.shell.osx": "/bin/zsh" }
效果:
重啓電腦後發現node,nvm命令都沒法識別。
一、編輯 .zshrc 文件
vim ~/.zshrc
二、而後在.zshrc文件末尾加上
source ~/.bash_profile
保存退出
三、讓配置文件修改後生效,執行如下命令
source ~/.bash_profile
這樣node,nvm命令就能夠識別了。