LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 01-24-2010, 04:44 AM   #1
rohit0825
LQ Newbie
 
Registered: Jan 2010
Posts: 23

Rep: Reputation: 15
bash: command not found


Hello everybody !!!
I am very new to linux so please help me asap.

I am issuing following command from a windows pc to linux pc(192.168.16.251) running fc4.

c:\>rsh 192.168.16.251 -l root "ethtool"

and the reply is

bash: ethtool: command not found.

the reply is same whatever command i type.

But it work fine if issue following command:

c:\>rsh 192.168.16.251 -l root "/usr/sbin/ethtool"

I want the first command to work and can't supply the full path everytime.

When i run the command in linux pc logged in as root:
echo PATH.
All the directories are displayed.

Now i am confused where the problem is ?
 
Old 01-24-2010, 05:46 AM   #2
arashi256
Member
 
Registered: Jan 2008
Location: Brighton, UK
Distribution: Ubuntu 12.04 / CentOS 6.5
Posts: 394

Rep: Reputation: 61
Are you logged in as root from the Windows PC in the first instance? Because the root PATH is not necessarily the same for whomever you're logged in as in the first part of your post.
 
Old 01-24-2010, 06:23 AM   #3
rohit0825
LQ Newbie
 
Registered: Jan 2010
Posts: 23

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by arashi256 View Post
Are you logged in as root from the Windows PC in the first instance? Because the root PATH is not necessarily the same for whomever you're logged in as in the first part of your post.
the problem was solved by editing .bashrc file.
i added the following line :

export PATH=$PATH:/usr/sbin
 
Old 01-24-2010, 06:25 AM   #4
cola
Senior Member
 
Registered: Sep 2007
Location: Dhaka,Bangladesh
Distribution: Debian
Posts: 1,031

Rep: Reputation: 63
Quote:
Originally Posted by rohit0825 View Post
the problem was solved by editing .bashrc file.
i added the following line :

export PATH=$PATH:/usr/sbin
Yes, you needed to export path.
Mark the thread as "[SOLVED]".It's under the "Thread Tools" above.
 
0 members found this post helpful.
Old 01-24-2010, 06:31 PM   #5
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.8, Centos 5.10
Posts: 17,254

Rep: Reputation: 2328Reputation: 2328Reputation: 2328Reputation: 2328Reputation: 2328Reputation: 2328Reputation: 2328Reputation: 2328Reputation: 2328Reputation: 2328Reputation: 2328
The problem with rsh is it's plaintext; try to use ssh (eg Putty) if possible.
http://www.informit.com/articles/art...p=169465&rll=1
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
bash: g++: command not found m_lp_ql_m Linux - Software 8 07-08-2010 02:45 PM
bash command not found gobicse Linux - Newbie 3 12-19-2007 06:46 PM
bash -command not found- ALInux Linux - Newbie 3 12-30-2006 01:41 PM
bash: rpm: command not found && sudo: alien: command not found Java_Code Ubuntu 7 07-28-2006 12:57 AM
bash: command not found jc80 Fedora 3 03-14-2004 04:11 PM


All times are GMT -5. The time now is 01:54 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration