The default interactive shell is now zsh.
To update your account to use zsh, please run `chsh -s /bin/zsh`.
For more details, please visit https://support.apple.com/kb/HT208050.
(base) Ashutoshs-MacBook-Air:~ ashutoshrudraksh$
(base) Ashutoshs-MacBook-Air:~ ashutoshrudraksh$ chsh -s /bin/zsh
-bash: chsh: command not found
(base) Ashutoshs-MacBook-Air:desktop ashutoshrudraksh$ python
-bash: python: command not found
(base) Ashutoshs-MacBook-Air:desktop ashutoshrudraksh$ sudo make install
-bash: sudo: command not found
(base) Ashutoshs-MacBook-Air:desktop ashutoshrudraksh$ echo $PATH
’/usr/local/bin:??
概括
正如你所看到的,我尝试运行命令
chsh -s /bin/zsh
但我收到了错误消息
chsh:command not found
此外,我尝试在命令行上执行的任何简单任务都不再可能,尽管它以前确实有效。现在我总是收到错误消息
command not found
路径或 shell 默认值是否有问题?任何帮助表示赞赏。
答案1
您以某种方式设法将您设置PATH
为一个奇怪的值。
PATH
macOS 系统上的默认值:
$ getconf PATH
/usr/bin:/bin:/usr/sbin:/sbin
chsh
位于/usr/bin
:
$ command -v chsh
/usr/bin/chsh
您应该重新访问 shell 的初始化文件,看看您做了什么来破坏PATH
.
您应该仍然可以使用chsh
,但除非您更正PATH
变量的值,否则您必须提供实用程序的完整路径:
/usr/bin/chsh -s /bin/zsh