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/

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM