# Automatically generated file; DO NOT EDIT

Is at the header of the kernel configuration file: /usr/src/linux/.config

My question is why shouldn't you edit this file? If I know exactly what I need, or what I want to remove, then what is the problem with editing this file directly?


It's considered unsafe to edit .config because there are CONFIG-options which have dependencies on other options (needing some to be set, requiring others to be turned off, etc.). Other options aren't meant to be set by the user at all, but are set automatically by make config (resp. Kconfig to be correct) depending on architecture details, e.g. availability of some hardware dependant on architecture variant, like an MMU.

Changing .config without using Kconfig has a high chance of missing some dependency, which will either result in a non-functioning kernel, build failures, or unexpected behaviour (i.e. the change being ignored, which usually is very confusing).


Because it is automatically generated: it is generated from other files, that can be edited.

  • 5
    This isn't the case: you can edit it by hand and then use one of the edit interfaces and it will not overwrite these changes provided they don't conflict (which is the biiger issue, as described in Andreas Wiese's answer.
    – jasonwryan
    Oct 25 '14 at 19:37
  • 1
    That's a rather unsatisfying answer. What if I don't change those files? That's like saying »Don't write your sendmail config yourself, you don't want to do this! You should use m4!« Anyways it would be perfectly fine to write it on your own (there are some really weird guys out there ;) ). The usual case being autogenerating files is not a valid reason for HAVING to use those tools. Oct 25 '14 at 19:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.