Skip to content

Instantly share code, notes, and snippets.

@Brainiarc7
Last active September 20, 2023 10:09
Show Gist options
  • Star 15 You must be signed in to star a gist
  • Fork 6 You must be signed in to fork a gist
  • Save Brainiarc7/5181484e7189faf78ea6 to your computer and use it in GitHub Desktop.
Save Brainiarc7/5181484e7189faf78ea6 to your computer and use it in GitHub Desktop.
One line to rebuild all DKMS modules on Ubuntu
Here goes.
ls /usr/src/linux-headers-* -d | sed -e 's/.*linux-headers-//' | \
sort -V | tac | sudo xargs -n1 /usr/lib/dkms/dkms_autoinstaller start
Run as root.
@memory-thrasher
Copy link

Amazing. Definitely saving this for future use (without sort tac and sudo because I don't care about order and sudo when root is kinda pointless)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment