Distribution kernel-header
packages contain, as their name implies, only kernel header files (plus the necessary plumbing) that are required to build software like kernel modules.
You shouldn't expect to find binary files at all in a kernel source directory, except for build output. (If you configure and build a kernel yourself, the kernel source directory will also contain the compiled objects, modules, the built kernel itself and a few other binary bits and pieces that make it work.)
KConfig
files are a description of the kernel configuration options (and their dependencies) that are available for a given directory/module.
Apart from that, it's all (mostly) C source code, header files and Makefile
s. There are a few helper scripts here and there, and assembly source too.
Header packages (what you installed) only contain the header part of the above (and not all of that - only the "exported" headers), and some of the build infrastructure. So what you are seeing is expected. Header packages do not contain C source code (except for some stubs and build infrastructure code). The whole point of having this type of package is to save space (and bandwidth) - the whole Linux kernel source tree is rather large, and completely unnecessary if you don't intend to compile the kernel yourself. The header packages are built and shipped by distributions to provide just the right things necessary to build modules, but no more. (They certainly do not contain the compiled kernel.)
Addressing your comment: header packages don't relocate anywhere. They are built for specific versions of the kernel, packaged in a specific directory, and that's that. It's just a set of files. (Note that the header packages don't necessarily have the same version as the current stable kernel binary packages - the header packages are generic, and can lag behind the actual kernel you're running. They should not, however, be from a kernel version that is more recent than the current installed (or target) kernel.)
Installed kernel binaries are usually installed in the /boot
directory, along with bootloader binaries and configuration files. (This is sometimes an independent filesystem, not mounted by default.) The exact name of the files depends on the kernel and distribution. (So does the bootloader.)
Installed kernel modules reside in sub-directories of:
/lib/modules/`uname -r`/
So for instance on my system, they are currently in
/lib/modules/3.1.4-gentoo/
Full kernel source code: On Ubuntu, if you want the full kernel sources to build a kernel yourself, you should install following the instructions here.
You could also download a source tarball from kernel.org
and unpack it somewhere (do not overwrite Ubuntu-installed files if you use this tarball, keep your personal stuff and the stuff managed by RPM separate).
/usr/src/linux
is a traditional place to put kernel sources, but nothing prevents you from putting kernel sources elsewhere. This path is also often just a symbolic link to a directory. e.g. I have this on my machine:
$ ls -l /usr/src/linux
lrwxrwxrwx 1 root root 18 Dec 7 17:03 /usr/src/linux -> linux-3.1.4-gentoo
The symlink is there to simplify building applications that depend on the kernel source. You link that path to your running (or target) kernel so that you don't have to specify exact version or path information when you build a module out-of-tree. Helps a bunch for source-based distributions at least.
The kernel is written in C. "Kernel data structures" would just refer to various formations (trees, lists, arrays, etc.) of mostly compound types (struct
s and union
s) defined in the source, which C code is normally filled with stuff like that. If you don't understand C, they will not be meaningful to you.
Data structures structure the storage of information in memory or address space. There is nothing particularly special about the ones used by the linux kernel. Some of them can/must be used if you are writing a kernel module, but their use is completely internal to the kernel. Kernel memory is only accessed by the kernel and it's structure has no relevance to anything else.
Best Answer
In case you're referring Linux virtual consoles as TTYs, their number by default is 64 and this is defined in
include/uapi/linux/vt.h
inside the Linux kernel source tree. The thing you're looking for isNR_CONSOLES
.