Skip to content

Instantly share code, notes, and snippets.

@adlerweb
Created January 21, 2022 13:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save adlerweb/126ca7546014eef6754823a0234333e4 to your computer and use it in GitHub Desktop.
Save adlerweb/126ca7546014eef6754823a0234333e4 to your computer and use it in GitHub Desktop.
Archlinux: Check if running kernel matches installed kernel (aka: do I need to reboot). Might work for other distros too.
if [ $(file /boot/vmlinuz* | cut -d ' ' -f 9) != $(uname -r) ] ; then echo 'reboot'; else echo 'ok'; fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment