lsmod and modprobe commands
I am trying to use lsmod and modprobe commands. They are giving me an error command not found. What do I do?
|
Log in as root or type:
Code:
su - |
These commands are available only to the root user.
|
Root
Sorry I forgot to say i am login as Root. Thanks for the quick response.
|
Here in my suse, modprobe and lsmod are provided by a package named modutils. Ask rpm if modutils is installed:
rpm -q modutils If not, install it and try again. |
Yes modutils is installed version 2.4.25-13 it says. I can launch the man pages and read everything about them. Should I be in a certion directory or what directory do they live in.
|
Try to locate the binaries:
whereis modprobe whereis lsmod It will answer sommething like modprobe: /sbin/modprobe.old /sbin/modprobe /sbin/modprobe.static /etc/modprobe.conf /usr/share/man/man8/modprobe.8.gz So, you can run the command by typing "/sbin/modprobe". |
On at least one of my systems modprobe and lsmod are in /sbin so you would type /sbin/modprobe and /sbin/lsmod. If you're ever curious about where commands are you can try typing whereis <command> or locate <command>.
Also, it's possible to run lsmod as a non-root user, but non-root users tend not to have /sbin or /usr/sbin in their path. |
Thank you. If I type the path then the commands work. Thanks again.
|
So now you want to edit your .bash_profile so you don't have to type the path. Look in it, and see that some lines are of form:
PATH=$PATH:/la la la. You want these lines to include all the paths for commands you use. My .bash_profile contains: PATH=$PATH:/bin PATH=$PATH:/sbin PATH=$PATH:$HOME/bin PATH=$PATH:$HOME/sbin and that appears to be sufficient. --boneglorious the vainglorious newbie |
Thank you for the path's. It works great now.
|
All times are GMT -5. The time now is 06:46 PM. |