Skip to content

Instantly share code, notes, and snippets.

@cjohnson496
Created April 25, 2017 21:33
Show Gist options
  • Save cjohnson496/01cdc9b647504b7ea82ce0eba500594c to your computer and use it in GitHub Desktop.
Save cjohnson496/01cdc9b647504b7ea82ce0eba500594c to your computer and use it in GitHub Desktop.
Script or function listing kernel modules.
#!/bin/bash
. /etc/sysconfig/kernel
for i in $INITRD_MODULES $DOMU_INITRD_MODULES $MODULES_LOADED_ON_BOOT
do
if ! lsmod | grep"^$i[[:space:]]"&>/dev/null; then
echo $i
fi
done; echo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment