I want to edit linux os, How should i edit?
please help me!

Recommended Answers

All 3 Replies

It really depends on what you want to change. You will have to be more specific. In general, you find the source code for the part that you want to change, modify it to suit your needs, recompile and deploy.

I presume you want to reconfigure your kernel, perhaps to remove unneeded drivers, and such? You need to visit www.tldp.org and your Linux distribution's web site for "building a kernel" FAQ. In any case, you need to do the following at a minimum:

  1. Download and install the kernel sources.
  2. Go to the source code root directory.
  3. Run the command "make menuconfig" or "make xconfig".
  4. Run the make command to build the kernel.
  5. Run "make install" as root the install the kernel and drivers.

Do 1-4 as a regular user. #5 needs to be done as root, or sudo.

The "make menuconfig" in #3 will present you with a text-based (ncurses) form to edit the kernel configuration. The "make xconfig" will present you with an X-Windows based GUI to do the same. I prefer the xconfig myself since it has more useful help information.

Doing a manual kernel configuration is mostly useful when you need non-standard file system drivers automatically installed, or if you want to configure a minimal kernel for an embedded device or other small system.

All that said - RTFM! DO NOT DO THIS WITHOUT PREPARATION! Also, study the documentation for your boot loader, and remember that the above comments and instructions may NOT be complete for your distribution! Caveat user! :-)

FWIW, I only do this now for embedded systems that I am building. The last custom kernel that I built for my workstation/server was 3-4 years ago, though I have done this for specialized servers many times since then. Usually, if you need some driver installed that is not part of the default kernel or installation, that can be done by building the driver and installing it with the modprobe or insmod commands. So, exactly why do you want to "edit" your kernel?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.