gpt4 book ai didi

bash - 每次打开终端时如何删除这个 [Bash]?

转载 作者:行者123 更新时间:2023-12-04 05:07:20 27 4
gpt4 key购买 nike

这个问题在这里已经有了答案:





Error message on Terminal launch [duplicate]

(2 个回答)


5年前关闭。




bash: /etc/profile.d/sm.sh: No such file or directory bash: /etc/profile.d/rvm.sh: No such file or directory



好吧,我快要解决我的问题了

我刚用

sudo open /etc/profile



我发现这两行,当我尝试编辑时,它说您无权在此文件中进行更改并要求进行复制...

告诉我如何使用管理员权限评论这些行。

有效的解决方案:

“你的最后一个答案奏效了!我的意思是说我做了:
须藤纳米/etc/profile
把 # 放在两条路径之前
按命令 x 保存文件”

最佳答案

从 bash 手册页

FILES
/bin/bash
The bash executable
/etc/profile
The systemwide initialization file, executed for login shells
/etc/bash.bashrc
The systemwide per-interactive-shell startup file
/etc/bash.bash.logout
The systemwide login shell cleanup file, executed when a login shell exits
~/.bash_profile
The personal initialization file, executed for login shells
~/.bashrc
The individual per-interactive-shell startup file
~/.bash_logout
The individual login shell cleanup file, executed when a login shell exits
~/.inputrc
Individual readline initialization file

您将需要检查系统范围的文件并查看它们是否引用了 rvm。如果您是系统上的唯一用户(它是您的工作站或家用计算机),请随时修改这些文件以删除 rvm 引用(假设您不再使用 rvm)。否则,请您的系统管理员修复执行环境。

有关 rvm 的更多信息,请访问 here ,并且您的在线手册页可以提供有关 bash 默认读取的文件的更多详细信息。

如果上述所有条件都失败了,一个快速而肮脏的黑客将是执行
 touch /etc/profile.d/rvm.sh

作为具有适当权限的用户。

关于bash - 每次打开终端时如何删除这个 [Bash]?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15369542/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com