Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

Linux rmmod command

Linux rmmod command

Linux Command Reference Linux Command Reference

The Linux rmmod (short for "remove module") command is used to remove modules.

Running the rmmod command removes unneeded modules. The Linux kernel is modular, so when compiling the kernel there is no need to put all features into the kernel. You can compile these features as separate modules and load them individually when needed.

Syntax

rmmod [-as][模块名称...]

Parameters:

Example

Display installed modules



# lsmod

Module         Size Used by

cramfs         39042 1 

nfsd         238935 11 

lockd         64849 1 nfsd

nfs_acl         2245 1 nfsd

auth_rpcgss      33735 1 nfsd

sunrpc        193181 10 nfsd,lockd,nfs_acl,auth_rpcgss

exportfs        3437 1 nfsd

xt_TCPMSS        2931 0 

xt_tcpmss        1197 0 

xt_tcpudp        2011 0 

iptable_mangle     2771 0 

ip_tables        9991 1 iptable_mangle

x_tables        14299 4 



……省略部分结果

pppoe          8943 0 

pppox          2074 1 pppoe

binfmt_misc       6587 1 

snd_ens1371      18814 0 

gameport        9089 1 snd_ens1371

snd_ac97_codec    100646 1 snd_ens1371

ac97_bus        1002 1 snd_ac97_codec

snd_pcm_oss      35308 0 

Unload a module



# rmmod -v pppoe //unload module pppoe

Checking ppoe for persistent data

Load a module



# insmod -v pppoe >1.log //Install module



~# tail -b 30 1.log //显示文件信息

Linux Command Reference Linux Command Reference