Linux/Centos5.5 Error: "-bash: telnet: command not found"

 
#Title: Linux/Centos5.5 Error: "-bash: telnet: command not found"
#Author: xueyan.lu
#History: 2011-11-09
#CopyLeft: NSN
#Notes: Two conceptions referred: Control PC--- PC do telnet command; Tshark PC---PC be telnetted.

1. Phenomenon:
  1.1 (If you do not use Robot, plz ignore sector 1.1)After running "start tshark", "stop tshark" and "copy log to control PC" in Robot script, there is not any error. But tshark log is 0KB in Control PC.
  1.2 In Control PC, telnet Tshark PC, and input "tshark", error prints: -bash: telnet: command not found;
          In Tshark PC, command tshark can work well.
  1.3 $which tshark
          $/usr/local/bin
  1.4 In Control PC, echo $PATH, which includes /usr/local/bin
          In Tshark PC, echo $PATH, which excludes /usr/local/bin

2. Solution:
  2.1$ vi /etc/profile, and append /usr/local/bin to PATH.
        $ source /etc/profile
       
3. Analysis:

>直接用export命令:
查看是否已经设好,可用命令export查看:

#export

>修改profile文件(应用到所有帐户):
#vi /etc/profile
在里面加入:
export PATH="$PATH:/opt/au1200_rm/build_tools/bin"

>修改.bashrc文件(仅应用到该帐户):
# vi /root/.bashrc
在里面加入:
export PATH="$PATH:/opt/au1200_rm/build_tools/bin"

References:
http://serverfault.com/questions/175041/bash-telnet-command-not-found-error
http://www.cnblogs.com/amboyna/archive/2008/03/08/1096024.html
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值