我是 CentOS 新手,正在设置 Rancid(只使用过 rancid,但设置得很新)。我遇到了一个问题,当我clogin
以 rancid 用户身份输入时,我得到了command not found
[[email protected]:/]$ clogin
bash: clogin: command not found
我收到与 root 用户相同的消息。
我能得到帮助来解决这个问题吗?
文件存在,但不是可执行文件
[[email protected]:/usr/libexec/rancid]# ls | grep clogin
clogin
我该如何启用它以便能够使用它?
答案1
错误command not found
是由于你的 shell 无法clogin
在你的指定目录中找到$PATH
。你可以clogin
使用指定完整路径运行
# /usr/libexec/rancid/clogin
或者,你可以将 /usr/libexec/rancid/ 添加到你的 PATH
# PATH=$PATH:/usr/libexec/rancid
# export PATH
更新
为了获得永久效果,请将此行放入您的~/.profile
export PATH=$PATH:/usr/libexec/rancid