Showing results for 
Search instead for 
Did you mean: 

ubuntu kernel ?

Frequent Advisor

ubuntu kernel ?

hi i just create mu ltiboot with windows and ubuntu 11.04


i noticed that my kernel is not compiled by default upon installing one of the rpm packages so im recompiling it


im new to linux, can someone tell me why we need to compile kernel and why it's not compiled by default, how do i find out whata kernel level running and whether it's compiled or not ?



Honored Contributor

Re: ubuntu kernel ?

With modern Linux distributions, you usually don't have to compile the kernel: the distribution builder has already compiled the kernel and a set of kernel modules, and packaged it to .deb (Debian, Ubuntu) or .rpm (most other distributions) packages.


You need to compile the kernel only if you have special requirements: for example, if you want/need to use newer kernel than your distribution has available, or if you want to use experimental drivers, or if you are trying to fix a kernel bug or otherwise participating in the kernel development process.


When a kernel (or any type of software) is compiled, it is transformed from a human-readable source code for to machine-readable binary form. Scripts won't need to be compiled, because they are interpreted at runtime by the appropriate script interpreter, which is normally a binary program. By definition, the kernel is the part of the operating system that runs the actual system hardware: so the kernel must be directly executable by the hardware. Therefore, you cannot ever be "running a kernel that is not compiled": that is absolutely impossible.


In the early days of Linux, compiling a custom kernel for each system was standard procedure: but today, it is no longer necessary in most cases. Of course, if you are a hardcore Linux enthusiast, configuring and building your own kernel may be an interesting learning experience, but if you're new to Linux in general, you might find the required learning curve rather steep. Compiling a custom kernel is like tuning up a car: you can do it if you want (and know how to do it), but with modern hardware, there should be little actual need for it.


To know the version of the current kernel, run "uname -r". To know the name of the hardware architecture (which indicates if your kernel is 32 or 64-bit, among other things), run "uname -m". You can also get all this and more information at once with "uname -a".


If you are installing .rpm packages to an Ubuntu system, you should be aware that .rpm is not Ubuntu's native package format: the rpm packages are usually designed for some other Linux distribution, and will expect the standard features of that distribution to exist. If you install a .rpm package to Ubuntu, some of these expectations may be wrong, and it will be your responsibility to solve any problems that might result. For example, the rpm package might specify a requirement that a kernel package with a particular version (either an exact version, or "this version or newer") must be installed: in a .deb-based system, this check will fail because the package naming scheme is different.


It is usually much easier to install software that is specifically designed for your distribution and using the correct package format.