On Tue, 2013-11-12 at 07:56 +0000, Alex Naysmith wrote: > linux-headers-$(uname -r|sed 's,[^-]*-[^-]*-,,') It does complete the name "linux-headers-". Run echo $(uname -r|sed 's,[^-]*-[^-]*-,,') or uname -r|sed 's,[^-]*-[^-]*-,,' to see what it does add. "uname -r" does show the kernel release, the sed command does format it.