Advertisement
Guest User

kernel and modules

a guest
Jul 27th, 2017
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.81 KB | None | 0 0
  1. #!/bin/bash
  2.  
  3. #Linux kernel version
  4. kernel_version() {
  5. kernel=`uname -r`
  6. echo "Your current Linux kernel version is: $kernel"
  7. }
  8. kernel_version #run this function to display the Linux kernel version
  9.  
  10. #Current modules
  11. current_modules() {
  12. current=`ls /lib/modules/$(uname -r)`
  13. echo -e "Your current modules list: \n$current"
  14. }
  15. current_modules #run this function to display current modules
  16.  
  17. #Show the status of modules in Linux Kernel
  18. status_modules() {
  19. status=`lsmod`
  20. echo -e "The status of modules in the Linux Kernel: \n$status"
  21. }
  22. status_modules #run this function to list all loaded modules
  23.  
  24. #Info about specific module
  25. module_info() {
  26. echo -e "Please enter module name to see information about this module: "
  27. read name
  28. modinfo $name
  29. }
  30. module_info #run this function to display info about module
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement