Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/bash/18.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Macos 如何卸载Bash呢?_Macos_Bash_Bash It - Fatal编程技术网

Macos 如何卸载Bash呢?

Macos 如何卸载Bash呢?,macos,bash,bash-it,Macos,Bash,Bash It,我还没有完全准备好,希望回到原来的CLI。任何关于如何删除Bash的建议都将非常棒。多谢各位 编辑:很想知道为什么我会被否决,这样我就不会再犯同样的错误了。更改默认shell 系统首选项>用户和组>单击锁定进行更改>右键单击(或控制单击)当前用户图像>选择“高级选项” 然后,您将看到一个允许您更改默认shell的选项。重置外壳后,它将更改为选定的外壳 这也可以通过以下方式在终端中完成: sudo chsh shell user 其中,shell是您想要使用的shell(zsh,bash),而

我还没有完全准备好,希望回到原来的CLI。任何关于如何删除Bash的建议都将非常棒。多谢各位


编辑:很想知道为什么我会被否决,这样我就不会再犯同样的错误了。

更改默认shell

系统首选项>用户和组>单击锁定进行更改>右键单击(或控制单击)当前用户图像>选择“高级选项”

然后,您将看到一个允许您更改默认shell的选项。重置外壳后,它将更改为选定的外壳

这也可以通过以下方式在终端中完成:

sudo chsh shell user
其中,shell是您想要使用的shell(zsh,bash),而您案例中的用户是waymond

如果使用iTerm,还可以根据要在新窗口中打开的shell选择默认shell<代码>命令+,将使您获得这些首选项


我不熟悉bash_-it作为一个shell,也没有发现任何明确的删除工具。每一个贝壳的分枝方式都略有不同,因此很难按照另一个贝壳移除说明进行操作——例如鱼:

我想做同样的事情。以下是删除bash-it的链接:

我通过转到GitHub存储库上的“问题”选项卡,然后选择“已关闭”问题找到了它

我使用了我的主目录中的以下命令列表:

ls -1a
这将显示目录中的文件列表,包括隐藏文件。您应该在列表中看到以下内容:

  • .bash它
    (将要删除的目录)
  • .bash\u配置文件
    (您当前的bash配置文件)
  • .bash\u profile.bak
    (在安装bash-it之前请先查看您的bash配置文件)
这将删除bash-it目录。系统将提示您输入密码

mv .bash_profile.bak .bash_profile
这将用原始bash概要文件覆盖由bash-it创建的bash概要文件

ls -1a
您现在应该只能从上面的列表中看到此文件:

  • .bash\u配置文件

然后重新启动终端。

Bash它现在有一个卸载脚本。要卸载Bash-it,请执行以下操作:

# CD into the Bash-it directory
cd $BASH_IT

# Make sure you have the latest version that includes the uninstall script
git pull origin master

# Run the uninstall script
./uninstall.sh

# Remove the ~/.bash_it folder
cd ..
rm -rf $BASH_IT

# Now close this shell and open a new one
卸载脚本将尝试恢复您以前的Bash配置文件(Mac OS X上的
.Bash\u profile
,Linux上的
.bashrc


运行卸载脚本后,只需打开一个新的shell并Bash它就不应该再使用了。

设置终端的默认shell或删除Bash\u it?删除Bash\u it有困难。当我删除.bash_it文件夹时,我得到了:-bash:/Users/waymond/.bash_it/bash_it.sh:在您的/Users/waymond/.bash_it/目录中没有这样的文件或目录way MacBook Pro:~waymond1$。目前还有其他文件吗?没有。顺便说一句,谢谢你的回复。不用担心。你能确认只需在终端中键入“bash”即可切换到默认的bash shell吗?谢谢你的帮助,Pippin!帮助很大。@Waymond Shells有时会是一个混乱的地狱。向前!没有回答问题-它没有告诉用户如何卸载Bash。问题不是关于使用不同的外壳…公认的答案实际上没有回答问题?这是正确的答案。您不必使用
sudo
删除
~/.bash\u it
文件夹,除非您使用
sudo
克隆它。
# CD into the Bash-it directory
cd $BASH_IT

# Make sure you have the latest version that includes the uninstall script
git pull origin master

# Run the uninstall script
./uninstall.sh

# Remove the ~/.bash_it folder
cd ..
rm -rf $BASH_IT

# Now close this shell and open a new one