
Originally Posted by
pJansson
Question 1: When i typed this line:
Code:
sudo apt-get install linux-headers-'uname -r'
i got the response that ubuntu was unable to find 'uname -r'. Does 'uname -r' stand for the current kernel i'm running or should this command be typed exactly as it says?
The uname -r is supposed to be surrounded with backticks, not single quotes ( ` instead of ' ).
Code:
sudo apt-get install linux-headers-`uname -r`
The section surrounded by backticks will be executed as a separate command, and then replaced by the result from that command. So this will run uname -r to figure out the current kernel version you are using, and then run the apt-get command using that kernel version in the package name.)
edit: if you can't find the backtick key, or you happen to use a keyboard layout that doesn't even have one, the currently recommended syntax for command substitution is actually a bit easier:
Code:
sudo apt-get install linux-headers-$(uname -r)
Bookmarks