Skip to content

Instantly share code, notes, and snippets.

@cibyr
Created March 20, 2013 08:20
Show Gist options
  • Save cibyr/5203121 to your computer and use it in GitHub Desktop.
Save cibyr/5203121 to your computer and use it in GitHub Desktop.
Shell script fragment to get the latest installed kernel version. Useful for building dkms packages in chroots.
ls /usr/src/ | grep linux-headers | awk -F '-' '{print $3"-"$4}' | sort | tail -n1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment