9
root@heena:/usr/src# ls
linux-headers-3.8.0-29  linux-headers-3.8.0-29-generic

also:

root@heena:/# uname -a

Linux heena 3.8.0-29-generic #42~precise1-Ubuntu SMP Wed Aug 14 15:31:16 UTC 2013 i686 i686 i386 GNU/Linux

Question #1: Why do I have those two linux folders in /usr

Question #2: What is the meaning of generic version? It seems my version is generic.

2 Answers 2

7

There are several different flavours of the kernel available, but -generic is very likely what you want.

The specialised versions are:

  • linux-image-server: tuned to respond to lots of requests rather than handle real-time interaction with a user. EDIT: This appears to have been discontinued and just points to -generic.
  • linux-image-virtual: I think this mostly just involves removing hardware drivers that are unlikely to be encountered in a virtual machine to save space.
  • linux-image-lowlatency: I think this is intended for eg, audio editing where low latency is important (see Why choose a low latency kernel over a generic or realtime one? ).

As to the folders in /usr/src, all these different kernels are actually very similar except for a few options, so most the the headers are stored in the non-specific /usr/src/linux-headers-x.y.z. The specific folder /usr/src/linux-headers-x.y.z-generic (or -server, -lowlatency) etc consists mostly of links to /usr/src/linux-headers-x.y.z, plus any files (eg .config) changed compared to the non-specific version (to avoid duplication if you have multiple flavours of the same kernel version installed).

2
  • I thought src stands for source code. Are not these files complete source code of the linux? or are they just headers?where is the source code stored then? Jan 7, 2014 at 9:55
  • 1
    The complete source code lives in a different package (linux-source-x.y.z), whereas linux-headers-x.y.z provides the header files necessary to compile new modules for the kernel (eg, the proprietary nvidia driver), but not a complete new kernel. Why this lives in /usr/src rather than /usr/include (the normal location for header files) I'm not entirely certain - I suspect it is because files in /usr/include are to build programs that will run under linux, whereas the kernel headers are for building new parts of linux.
    – chronitis
    Jan 7, 2014 at 12:08
3

Why do I have those two linux folders in /usr

Those are the header files for the kernel(s) you have on your system. Both can be removed through apt-get (do not do it manually). (probably sudo apt-get purge linux-image-3.8.0-29)

What exactly is generic version of ubuntu ? how it differes from other versions?

"generic" means the general usage kernel. It is the kernel used for desktop installations. Before 12.04 we also had a "generic-pae ", "server" and "virtual" version next to "generic" but that distinction was removed. Nowadays we have "omap" (Kernel for TI OMAP3 and OMAP4) and "highbank" (Kernel for Calxeda Highbank).

In general the difference are optimal setttings for that specific hardware. Here is a list for several Ubuntu versions.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .