linux 解决 " command not found: shopt "的 "~/.bashrc" 配置问题
程序员文章站
2022-07-12 13:41:25
...
之前使用的是 bash,自从使用 zsh 后,在执行 source ~/.bashrc 的时候出现下面的 command not found 的错误。
下面是错误信息
/home/trsky/.bashrc:16: command not found: shopt
/home/trsky/.bashrc:33: command not found: shopt
/home/trsky/.bashrc:116: command not found: shopt
/usr/share/bash-completion/bash_completion:51: command not found: shopt
/usr/share/bash-completion/bash_completion:57: command not found: complete
/usr/share/bash-completion/bash_completion:62: command not found: complete
/usr/share/bash-completion/bash_completion:65: command not found: complete
/usr/share/bash-completion/bash_completion:68: command not found: complete
/usr/share/bash-completion/bash_completion:71: command not found: complete
/usr/share/bash-completion/bash_completion:74: command not found: complete
/usr/share/bash-completion/bash_completion:77: command not found: complete
/usr/share/bash-completion/bash_completion:80: command not found: complete
/usr/share/bash-completion/bash_completion:83: command not found: complete
/usr/share/bash-completion/bash_completion:86: command not found: complete
/usr/share/bash-completion/bash_completion:89: command not found: complete
/usr/share/bash-completion/bash_completion:92: command not found: complete
/usr/share/bash-completion/bash_completion:1996: parse error near `\n'
输出错误信息
这里有个 stack overflow 的回应信息
shopt command not found in .bashrc after shell updation
解决
博主在 linux 上利用 Anaconda 同时配置了多个版本的 python ,在修改了~/.bashrc 文件企图更改系统默认的 python 之后 ,在 zsh 上执行了 source ~/.bashrc 。很明显这是个错误的认识
好吧,正确的做法如下:
将所需配置修改写入~/.zshrc
执行 source ~/.zshrc
---------------------
作者:种子选手
来源:CSDN
原文:https://blog.csdn.net/qq_36148847/article/details/79261067
版权声明:本文为博主原创文章,转载请附上博文链接!
推荐阅读
-
解决安装Domino for Linux时配置的Web服务器无法启动的问题
-
linux安装mysql5.7.22配置文件my.cnf配置细节及修改密码时出现的问题解决
-
一次Linux修改MySQL配置不生效的问题解决
-
解决:-bash: unzip: command not found (Linux 中 unZip/Zip 的安装及使用)
-
mac ls: command not found的问题与解决
-
linux 解决 " command not found: shopt "的 "~/.bashrc" 配置问题
-
command not found: shopt linux 配置./bashrc 错误
-
linux/centos “command not found: shopt “ “~/.bashrc“
-
Linux基本命令执行报错:command not found 的解决办法
-
linux常用命令command not found的解决方案(自己整理)