Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- #Linux kernel version
- kernel_version() {
- kernel=`uname -r`
- echo "Your current Linux kernel version is: $kernel"
- }
- kernel_version #run this function to display the Linux kernel version
- #Current modules
- current_modules() {
- current=`ls /lib/modules/$(uname -r)`
- echo -e "Your current modules list: \n$current"
- }
- current_modules #run this function to display current modules
- #Show the status of modules in Linux Kernel
- status_modules() {
- status=`lsmod`
- echo -e "The status of modules in the Linux Kernel: \n$status"
- }
- status_modules #run this function to list all loaded modules
- #Info about specific module
- module_info() {
- echo -e "Please enter module name to see information about this module: "
- read name
- modinfo $name
- }
- module_info #run this function to display info about module
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement