Linux equivalent of Windows Device Manager / DevCon utility?

Solution 1:

The functionality provided by Windows devcon is covered by various facilties and commands in Linux.

The "plug and play" manager of Linux is usually udev. udev is responsible for recognizing hardware changes, (possibly) autoloading modules, and creating nodes in /dev if needed. If you wish to do something such as simulate a USB device removal under Linux (something that devcon can do), commands that interact with the running udevd should be used, I believe. I haven't done this under Linux but you can start by learning more about udev.

lsmod will display all currently loaded kernel modules. Device drivers are one function of a kernel module. insmod will load and start a module if possible, and most of the time cause the device to appear in /dev. rmmod does the reverse. If you execute an lsmod you'll notice some modules are dependent on others, rmmod won't let you remove a module if something depends on it. modprobe with its options handles dependencies.

Under Linux, modules can also be "built-in" to the kernel, and they won't appear in any module list. They are immediately and always available the moment the kernel is loaded by the bootloader. Another option is to place modules in a directory within an "initial ramdisk" (initrd) which is also loaded by the bootloader and immediately accessible to the kernel on boot. "Installing" or "updating" device drivers may involve creating a new or updated kernel with the module built-in, or adding/updating it in the initrd if it is not there. Most distributions provide tools and utilties to do this.

You usually would not have to worry about installing or obtaining a third-party driver unless it is not included in the "official" kernel from kernel.org - since kernel modules (including drivers) are part of the kernel, drivers for every supported device are also included, and usually provided with your distribution. So needing to install a "manufacturer-provided driver" under Linux isn't terribly common except possibly for video drivers and some wireless chipsets which still have a lot of legal encumbrances with regard to technical information needed by driver developers.

lshw can give you most of this information in a tree-like format. lspci, lsusb, lsscsi, and lscpu are also very helpful. Most busses such as PCI, SCSI, USB, have a lot of userland utilities available in most Linux distributions that you can use to configure and get information of specific classes of devices (example: hdparm). And almost all mentioned in this paragraph, and more, are just frontends to various files and directories in /proc and /sys; you'll want to use the utilities though in most cases.

Solution 2:

Drivers are not same with Windows and Linux. You can under some circumstances load Windows devices drivers into a Linux kernel however.

About Linux device drivers:

Drivers can be complied into the Linux kernel or as modules. If they are modules, they can be (un)loaded on demand.

You can find information about a machines devices with these commands:

lspci
lsusb

My favorite is

lspci -nn

for names and numers.

Have a look at the man pages for the following commands:

modprobe
rmmod
lsmod
modinfo

In short:

modprobe loads a kernel module. rmmod removes kernel modile. lsmod lists the currently loaded modules. modinfo shows info about a specific module.

There are GUI apps as well. KDE has one in it's control center called kinfocenter I think.

Hope that helps.