简体   繁体   English

oh-my-zsh 无法在 mac 上启动

[英]oh-my-zsh does not start on mac

I installed oh-my-zsh as suggested in http://ohmyz.sh/ .我按照http://ohmyz.sh/ 中的建议安装了 oh-my-zsh。 FYI,仅供参考,

[~]$ zsh --version
zsh 5.0.8 (x86_64-apple-darwin15.0)
[~]$ echo $SHELL
/bin/zsh
[~]$ ls .oh-my-zsh/
LICENSE.txt  cache        lib          oh-my-zsh.sh templates    tools
README.md    custom       log          plugins      themes

Only when I type "zsh" then I can see the oh-my-zsh prompt like:只有当我输入“zsh”时,我才能看到 oh-my-zsh 提示,例如:

[~]$ zsh
➜  ~ 

Also, I tried to change my default shell to zsh:另外,我尝试将我的默认 shell 更改为 zsh:

[~]$ chsh -s /bin/zsh
Changing shell for myUserName.
Password for myUserName: 
chsh: no changes made

How can I use directly oh-my-zsh whenever I start mac terminal?每次启动mac终端时如何直接使用oh-my-zsh?

Not only in System Pref>User and Group>...>User profile's shell settings, but also in Mac's terminal>Preference>ChosenProfile>Shell section, I had to change /bin/bash to /bin/zsh.不仅在 System Pref>User and Group>...>User profile 的 shell 设置中,而且在 Mac 的终端>Preference>ChosenProfile>Shell 部分,我不得不将 /bin/bash 更改为 /bin/zsh。 after that, it works!之后,它的工作原理! Thank you, @RemyJ!谢谢你,@RemyJ!

You have to change the default shell to zsh.您必须将默认 shell 更改为 zsh。
To do so use the following command.为此,请使用以下命令。

chsh -s /bin/zsh
restart your terminal重启你的终端

I took it from here .我从这里拿的。
These were the steps I followed when I installed zsh.这些是我安装 zsh 时遵循的步骤。
I hope it will help you as well.我希望它也能帮助你。

Also, I tried to change my default shell to zsh: [~]$ chsh -s /bin/zsh另外,我尝试将默认 shell 更改为 zsh: [~]$ chsh -s /bin/zsh

try试试

chsh -s $zsh

that worked fine for me这对我来说很好用

在终端中运行以下命令:

sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"

I had a similar issue but I resolved it by executing the command chsh -s /bin/zsh in the terminal,then navigated to我有一个类似的问题,但我通过在终端中执行命令chsh -s /bin/zsh解决了它,然后导航到

Terminal -> Preferences -> General window终端 -> 首选项 -> 常规窗口

and changed the Shells open with: option to Default login shell while the command (complete path) set to /bin/zsh .This should solve your problem.并将Shells open with:选项更改为Default login shell命令(完整路径)设置为/bin/zsh 。这应该可以解决您的问题。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM