» Linux » Examen sur Linux » Examen 201 : Advanced Administration » Section 5 » Question 17/23
17.How would you find out the version of the kernel in /usr/src/linux?

cat /usr/src/linux/.version
cat /usr/src/linux/VERSION
Look in the README
head -4 /usr/src/linux/Makefile

Explanation: The head command is used to display the first few lines of a file. The default is 10 lines but you can specify a number (in this case 4). The makefile is a script the tells the make utility how to build a program or programs (in this case, the kernel). Most make files contain comments at the top of the file which describe the program and version information.

Reference: http://www.opussoftware.com/tutorial/TutMakefile.htm

Incorrect Answers
A: .version doesn't usually exist as a subdirectory of file. Rather, it is usually a directory /usr/src/linux.version or /usr/src/linux[VERSION] containing the kernel source.
B: VERSION doesn't usually exist as a subdirectory of file. Rather, it is usually a directory /usr/src/linux.version or /usr/src/linux[VERSION] containing the kernel source.
C: There usually isn't a README file containing version information.

« Question 16 Question 18 »