zsh配置
- 查看本机自带的shell脚本解释器:cat /etc/shells
- 安装oh-my-zsh,项目github地址:https://github.com/robbyrussell/oh-my-zsh
- shell脚本由/bin/bash切换为/usr/local/bin/zsh: chsh -s /usr/local/bin/zsh(查看chsh具体用法可以使用man chsh)
问题记录
配置Path
- 问题描述:首先在~/.bash_profile中配置ADB_PATH路径,并source ~/.bash_profile,在zsh中执行adb,提示zsh: command not found: adb
- 问题原因:zsh读取的配置文件为/.zshrc,而不是/.bash_profile
- 解决方法:
方法一:
1.~/.zshrc:添加source ~/.bash_profile
2.在shell中执行source ~/.zshrc
方法二:
1.打开新增ADB_PATH=/Users/jiaozi/develop/android/tools/sdk/platform-tools/(本地的路径)
2.打开PATH的注释并且添加ADB_PATH
3.在shell中执行source ~/.zshrc
网友评论