Linux上的设备管理器

一般windows上我们用它自带的“设备管理器”来查看,管理,安装,卸载驱动。

那么问题来了,Linux上用什么命令来看呢?

可以用:

lshw   lsusb lspci lsmod

查看特定模块、驱动的详细信息

 modinfo [device name]

显示已加载的模块

$ less /proc/modules

当然,lsmod命令显示已加载模块输出的格式更好。

安装,和卸载模块/驱动:

 一般来说, 所有的Linux内核模块(驱动)都储存在/lib/modules/$(uname -r) 的模块目录下。

可以用以下命令来查看不同设备的驱动程序:

ls /lib/modules/$(uname -r)/kernel/drivers/

安装模块(驱动):

modprobe -v [module name]      (这个命令需要.ko文件被放在/lib/modules/$(uname -r) 目录下,才能找到,不然会报                     FATAL: Module XXX.ko not found.的错误,注意,模块名不能加后缀.ko)

 insmod [module file name]          example: insmod /path/myDriver.ko                     (不建议使用这个命令,因为不解决驱动依赖问题)

删除模块(驱动):

modprobe -r [module name]

rmmod [module name]

references:

http://woshixiguapi.blog.163.com/blog/static/1924996920111121396494/

http://www.linuxquestions.org/questions/linux-software-2/command-to-know-the-list-of-drivers-installed-on-my-linux-system-948384/

http://xmodulo.com/how-to-check-graphics-card-on-linux.html

http://www.cyberciti.biz/faq/howto-display-list-of-modules-or-device-drivers-in-the-linux-kernel/

http://www.cyberciti.biz/faq/add-remove-list-linux-kernel-modules/

原文地址:https://www.cnblogs.com/foohack/p/4091272.html