LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Bash commands not include??? (https://www.linuxquestions.org/questions/linux-newbie-8/bash-commands-not-include-7961/)

fxlee 10-26-2001 06:45 AM

Bash commands not include???
 
Hi!

I'm using the RH7.1 distro and when I type (in root) in the console "modprobe ..." or "lsmod ...", there's a message : "Command not found"... ???
What does that mean? These commands aren't installed by default???
THX for help!

acid_kewpie 10-26-2001 08:54 AM

does grep, chown, ls etc.. work?

if so, it'll be your path statement, as those system programs are in /sbin/ which is frequently not on your path, i think if you su to root from a normal user, you still often won't have your path changed totally

dorward 10-26-2001 10:26 AM

I'll just clarify:

The commands are for system administration and are placed in /sbin or sometimes /usr/sbin.

You can only run programs that you specify the path to, or are in directories that are specified in your $PATH variable.

To change to root and execute root's logon scripts, which should let you run these commands without speficy the path manually use this command:

Code:

su -
As you need to be root to make use of those commands anyway there is no point in adding /sbin to your normal user $PATH.

fxlee 10-26-2001 07:52 PM

Commands OK!
 
Hi guys!

To answer to Acid_Kewpie: the "grep", "ls", "chown" commands work with $user but "lsmod" and "modprobe" don't...
Anyway, with the root "su -" user, these two commands work great!
THX for help guys !!!

gummi 10-26-2001 10:51 PM

Check out whether you have 'slocate' on your system or not, it keeps a database of all files on your system once you run the correct command (usually 'updatedb'). I use it pretty much constantly if I have to find a file.


All times are GMT -5. The time now is 07:04 PM.