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, 03: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, 04:46 AM   #2
arashi256
Member
 
Registered: Jan 2008
Location: Brighton, UK
Distribution: Ubuntu 18.04 / CentOS 7.6
Posts: 397

Rep: Reputation: 62
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, 05: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, 05:25 AM   #4
cola
Senior Member
 
Registered: Sep 2007
Posts: 1,034

Rep: Reputation: 65
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, 05:31 PM   #5
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 7.7 (?), Centos 8.1
Posts: 18,238

Rep: Reputation: 2712Reputation: 2712Reputation: 2712Reputation: 2712Reputation: 2712Reputation: 2712Reputation: 2712Reputation: 2712Reputation: 2712Reputation: 2712Reputation: 2712
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 01:45 PM
bash command not found gobicse Linux - Newbie 3 12-19-2007 05:46 PM
bash -command not found- ALInux Linux - Newbie 3 12-30-2006 12:41 PM
bash: rpm: command not found && sudo: alien: command not found Java_Code Ubuntu 7 07-27-2006 11:57 PM
bash: command not found jc80 Fedora 3 03-14-2004 03:11 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 11:51 AM.

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
Open Source Consulting | Domain Registration