LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
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 05-02-2004, 04:48 PM   #1
rock9604
LQ Newbie
 
Registered: Apr 2004
Location: Anchorage Alaska
Distribution: Fedora Core 1
Posts: 23

Rep: Reputation: 15
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?
 
Old 05-02-2004, 04:49 PM   #2
Komakino
Senior Member
 
Registered: Feb 2004
Location: Somerset, England
Distribution: Slackware 10.2, Slackware 10.0, Ubuntu 9.10
Posts: 1,938

Rep: Reputation: 55
Log in as root or type:
Code:
su -
(note the hyphen) from the console and then try again
 
Old 05-02-2004, 04:50 PM   #3
bruno buys
Senior Member
 
Registered: Sep 2003
Location: Rio
Distribution: Debian
Posts: 1,513

Rep: Reputation: 46
These commands are available only to the root user.
 
Old 05-02-2004, 04:54 PM   #4
rock9604
LQ Newbie
 
Registered: Apr 2004
Location: Anchorage Alaska
Distribution: Fedora Core 1
Posts: 23

Original Poster
Rep: Reputation: 15
Root

Sorry I forgot to say i am login as Root. Thanks for the quick response.
 
Old 05-02-2004, 05:04 PM   #5
bruno buys
Senior Member
 
Registered: Sep 2003
Location: Rio
Distribution: Debian
Posts: 1,513

Rep: Reputation: 46
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.
 
Old 05-02-2004, 05:49 PM   #6
rock9604
LQ Newbie
 
Registered: Apr 2004
Location: Anchorage Alaska
Distribution: Fedora Core 1
Posts: 23

Original Poster
Rep: Reputation: 15
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.
 
Old 05-02-2004, 06:02 PM   #7
bruno buys
Senior Member
 
Registered: Sep 2003
Location: Rio
Distribution: Debian
Posts: 1,513

Rep: Reputation: 46
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".

Last edited by bruno buys; 05-02-2004 at 06:50 PM.
 
Old 05-02-2004, 06:18 PM   #8
btmiller
Senior Member
 
Registered: May 2004
Location: In the DC 'burbs
Distribution: Arch, Scientific Linux, Debian, Ubuntu
Posts: 4,290

Rep: Reputation: 378Reputation: 378Reputation: 378Reputation: 378
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.
 
Old 05-02-2004, 06:52 PM   #9
rock9604
LQ Newbie
 
Registered: Apr 2004
Location: Anchorage Alaska
Distribution: Fedora Core 1
Posts: 23

Original Poster
Rep: Reputation: 15
Thumbs up

Thank you. If I type the path then the commands work. Thanks again.
 
Old 05-02-2004, 07:41 PM   #10
Boneglorious
LQ Newbie
 
Registered: Jan 2004
Distribution: Mandrake 10.0, Debian 3.0
Posts: 14

Rep: Reputation: 0
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
 
Old 05-02-2004, 11:35 PM   #11
rock9604
LQ Newbie
 
Registered: Apr 2004
Location: Anchorage Alaska
Distribution: Fedora Core 1
Posts: 23

Original Poster
Rep: Reputation: 15
Thank you for the path's. It works great now.
 
  


Reply



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
Automating modprobe commands rosspet Linux - Networking 4 08-06-2005 01:09 PM
commands "init" and "modprobe" not working Diagmato Fedora 2 07-22-2005 11:44 PM
modprobe, iwconfig, lsusb and other missing commands dubya Linux - Newbie 3 05-04-2004 09:27 PM
Can't Use lsmod/modprobe... lramos85 Linux - Newbie 2 03-08-2004 08:41 PM
modprobe: modprobe can't locate module ppp0 in redhat 7.1 while shutting down. cyberdude3k Linux - Networking 1 09-08-2003 12:01 PM

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

All times are GMT -5. The time now is 10:13 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
Open Source Consulting | Domain Registration