Skip to content

Latest commit

 

History

History
48 lines (34 loc) · 717 Bytes

cheatsheet-linux-driver.md

File metadata and controls

48 lines (34 loc) · 717 Bytes

Linux Driver Related Command

Insert a Module only

insmod *.ko
insmode *.ko <KEY>=<VALUE> <KEY>=<VALUE>    # insert a module with parameters

Remove a Module

rmmod <MODULE NAME>
rmmod -f <MODULE NAME>  # force remove

List Dynamically Loaded Modules

lsmod

Process Dependency Information

depmod -n   # show dependency information only

Load/Remove Module with Dependencies

modprobe <MODULE NAME>
modprobe -r <MODULE NAME>   # remove a module

Print Info About Modules

modinfo <MODULE NAME>
modinfo -p <MODULE NAME>    # list modules parameters

Module Info in sysfs

ls /sys/module/<MODULE NAME>/*