Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我遵循了一些关于如何删除别名并在其上运行 unalias 的建议。现在每次我打开一个外壳我都会收到这个消息:
-bash: unalias: emacs: not found
请帮忙!
看起来您已经放入unalias emacs了每次登录时都会运行的脚本——也许是在~/.bashrc. 每次登录时,它都会在别名已被删除的情况下尝试运行 unalias 命令。尝试从任何启动脚本中删除此命令,看看是否能解决您的问题。
unalias emacs
~/.bashrc
如果找不到放置unalias命令的位置,可以尝试通过文件系统 grep'ing,但这可能需要很长时间:grep -rn / -e "unalias emacs" 2>/dev/null
unalias
grep -rn / -e "unalias emacs" 2>/dev/null
狩猎愉快!