What is the difference between modprobe and insmod?
While writing IPtables scripts,there are two command: modprobe and insmod.
In some example,some use : modprobe ip_tables,but others use: insmod ip_tables.
Why? Is there difference between them?
Thanks
Quoted 7 lines · bobo
While writing IPtables scripts,there are two command:
modprobe and insmod.In some example,some use : modprobe ip_tables,but others use:
insmodip_tables.Why? Is there difference between them?
For the purpose of loading specified modules you can consider them the same. Modprobe is a higher-level interface that will call insmod. I personally use modprobe since it succeeds silently. IE, if it successfully loads the module, or if the module is already loaded, insmod will report this, while modprobe will not output anything in these situations. They will both, by default, report failure to find/load a module, and the -q option tells them both to be quiet about errors, but insmod will /still/ report success even with -q.
For full details see "man insmod" and "man modprobe"... :^) (under KDE, the default IIRC with RedHat 7.2, using alt-F2 then #insmod in the dialog, or #insmod as a URL in konquerer works nicely)
j
The difference is that lsmod won't insert the dependent modules whereas the modprobe does.
Dharmendra.T
Linux Security Expert
Quoted 12 lines · bobo
While writing IPtables scripts,there are two command: modprobe and insmod.
In some example,some use : modprobe ip_tables,but others use: insmod
ip_tables.Why? Is there difference between them?
Thanks