搞砸了我的 .bashrc 文件

yay*_*ayu 1 bashrc

我试图在最后添加源命令,这样我就不必在每个会话的命令行中输入它,我所做的添加是,在文件的末尾,

# Load Root Files
source /home/user/file/blah/blah/thisroot.sh
Run Code Online (Sandbox Code Playgroud)

看来我搞砸了。现在当我运行标准命令来运行程序时,我得到

user@user-laptop:~$ root -l
bash: /home/user/Downloads/root/bin/root: No such file or directory
Run Code Online (Sandbox Code Playgroud)

我想我可能会恢复我所做的任何更改。但现在我什至无法打开.bashrc文件。

$ emacs .bashrc&
[1] 2478
user@user-laptop:~$ Command 'emacs' is available in '/usr/bin/emacs'
The command could not be located because '/usr/bin' is not included in the PATH environment variable.
emacs: command not found
Run Code Online (Sandbox Code Playgroud)

现在你可能通过这一切意识到我是这里的 n00b。请帮帮我。

tgm*_*883 5

你搞砸了你的 PATH,所以这就是为什么你不能通过运行该命令来启动 emacs。您将需要使用完整路径来启动 emacs。您需要在您的主目录中才能运行此命令。

尝试这个

/usr/bin/emacs .bashrc
Run Code Online (Sandbox Code Playgroud)