Linux - NewbieThis 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!
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
Hi, I just want to ask if you know any good links that will completely explain the relationships of these commands ( lsmod, lspci, modprobe ) to each other, when & where to use them. I'm trying to understand whats their purpose, I often see them when I'm installing device drivers, but I never really got the chance of understanding the whole concept behind those commands. Right now I've been scanning thru tldp.org but can't seem to find anything related. Can somebody give me some links on this? Thank you very much.
lsmod = list modules
... a module is like a driver in windows, and is often called that where the module's job is to get some hardware working.
the command returns a list of all the modules that are loaded by the kernel.
lspci = list PCI - where PCI is "Peripheral Component Interconnect".
... the pci interface is how almost all of your hardware is connected, so it is useful for finding out what is installed. Each PCI device (called a "card" as in "sound card", "graphics card" etc) has a ROM built into it which stores a description of what it is. The lspci command returns a list of the contents of the roms.
modprobe = module probe - this is a utility for managing modules. It's job is to ake sure that modules are loaded and unloaded correctly.
The commands are used in basic HW troubleshooting.
lspci is used to identify troublesome hardware by chipset - what the vendor puts on the spec list is seldom useful.
When the chipset is identified, we can find out which module (driver) is needed. Often, the driver is already in the kernel, so many HW devices work out of the box. We use lsmod to check if the kernel is loading the driver.
If it is, there there is another problem. If not, then we try to load the driver manually with modprobe.
thank you very much for the additional explanation. the lspci part really helped a lot. so the lspci can somehow communicate to the "cards" and get some info from them even though you don't have yet the proper drivers for them? can i say lspci is the first step in configuring a hardware on linux? like get first the chipset of the device that you think is not working, then check for the proper module to load for it. thanks again.
@onebuck - thanks guy for the links. very much appreciated.
although i just want to note also that some of the problems i saw on some linux tutorials is that they lack what i call "concepts", there are a lot of good tutorials out there, and there are also some that goes straight up to commands, problem is with newbies like me getting lost on the purpose of each command they give. like whats the idea behind it, why on that sequence, whats the relation of each command to each other. i just don't wanna learn that way, i don't want to just memorize every command, i wanna know the concept behind that command. i hope i've explained it well. thanks again.
thank you very much for the additional explanation. the lspci part really helped a lot. so the lspci can somehow communicate to the "cards" and get some info from them even though you don't have yet the proper drivers for them?
Of course - how else can the computer know what drivers to use?
The computer can already access memory chips. The card has a memory chip on it with the information it needs. The usefulness of the information varies though. For more on the PCI bus standard, see this:
Since you are the type to be interested in this sort of thing, it is probably a good idea to get used to reading the documentation. Things like what you asked is the sort of thing you pick up over time, since not all that info is readily available in one place. But all of it comes from reading the man pages, and reading around the information they contain.
It's daunting at first, but you soon get used to it.