📘 Free Linux Kernel Development Course — Chapter 2
What Will You Learn in This Free Linux Kernel Development Lecture?
In Lecture 5 of this free Linux kernel development course you learned what Kconfig and Kbuild are. Now it is time to get hands-on with the make menuconfig interface itself. By the end of this lecture you will be able to confidently navigate any kernel configuration menu, find any option, understand what every symbol means, and make targeted changes without accidentally breaking dependencies.
- What every bracket symbol in menuconfig means ([*], [ ], <*>, <M>, < >, {*}, -*-)
- Every keyboard shortcut you need for efficient navigation
- How to search for any config option using the / key
- How to use the Help button to understand options and find CONFIG_ names
- How to navigate submenus and return to parent menus
- How to save your configuration correctly
- How the dependency system works and why options appear greyed out
- How to set CONFIG_LOCALVERSION to name your custom kernel
Key Concepts in This Lecture
[*] bool ON
[ ] bool OFF
<*> tristate built-in
<M> module
{*} dependency forced
-*- hard dependency
/ search
? help
CONFIG_LOCALVERSION
1. Launching make menuconfig for the First Time
Navigate to your kernel source directory and run the command. On a fresh source tree, Kbuild first compiles a handful of host tools before displaying the menu — this is normal and takes about a minute.
cd /path/to/linux-6.x
make menuconfig
You will see the build system compile the menuconfig frontend tools:
HOSTCC scripts/kconfig/mconf.o
HOSTCC scripts/kconfig/lxdialog/checklist.o
HOSTCC scripts/kconfig/lxdialog/menubox.o
HOSTCC scripts/kconfig/lxdialog/textbox.o
HOSTLD scripts/kconfig/mconf
After compilation the ncurses-based menu fills your terminal. The very first screen shows top-level kernel configuration categories.
.config file exists yet, make menuconfig automatically starts from the architecture default config (make defconfig) as a baseline. This gives you a sensible starting point with most essential options already set correctly.2. Every menuconfig Symbol Explained
Every line in the menuconfig interface begins with a symbol in brackets. These symbols are the most important thing to understand in this free Linux kernel programming course section — they tell you the option type and its current state at a glance.
| Symbol | Type | Meaning | In .config |
|---|---|---|---|
| [*] | Boolean — ON | Feature is enabled and compiled into the kernel image | CONFIG_FOO=y |
| [ ] | Boolean — OFF | Feature is disabled. Not compiled at all. Zero overhead. | # CONFIG_FOO is not set |
| <*> | Tristate — Built-in | Feature compiled into the kernel image. Available immediately at boot. | CONFIG_FOO=y |
| <M> | Tristate — Module | Compiled as a loadable .ko file. Load with modprobe at runtime. |
CONFIG_FOO=m |
| < > | Tristate — OFF | Tristate feature that is currently disabled. Not compiled at all. | # CONFIG_FOO is not set |
| {*} {M} | Dependency forced | Another enabled option depends on this one. You cannot turn it off without first disabling its dependent. | CONFIG_FOO=y or m |
| -*- | Hard dependency | Must be compiled built-in (y). Cannot be a module. Required by another option. | CONFIG_FOO=y |
| ( ) | Text input | Requires you to type a value (a string or number). Press Enter to open an input prompt. | CONFIG_FOO=”value” |
Here is what a typical section of the General setup menu looks like and how to read the symbols:
<*> = Tristate built-in
<M> = Module
( ) = Text input
{*} = Dependency locked
3. Keyboard Shortcuts for Fast Navigation
The menuconfig UI is entirely keyboard-driven. Mastering these shortcuts is essential for efficient kernel configuration work — a skill central to any free Linux device driver development course.
| Key | Action |
|---|---|
| ↑ / ↓ | Move up and down through menu entries |
| Enter | Enter a submenu (on entries with —>), or activate the highlighted bottom button |
| Space | Toggle the option state: n → y → m → n (tristate) or n → y → n (boolean) |
| Y | Directly set the highlighted option to y (built-in) |
| M | Directly set a tristate option to m (module) |
| N | Directly set an option to n (disabled) |
| / (slash) | Search — opens a search box to find any config option by name or keyword |
| ? or H | Show the help text for the currently highlighted option |
| Esc Esc | Go back to the previous (parent) menu. Press Escape twice. |
| ← / → | Move between bottom buttons: <Select>, <Exit>, <Help>, <Save> |
4. The Help Button — Your Most Important Tool
When you highlight any menu item and press ? (or navigate to the < Help > button at the bottom), a help screen appears. This screen does two essential things that every student in a free Linux kernel development course depends on:
- It explains in plain language what the feature does and what enabling or disabling it affects
- It reveals the exact CONFIG_ symbol name — for example,
CONFIG_IKCONFIG
Knowing the CONFIG_ symbol name lets you search the kernel source, set the option in a script, or verify its value with grep CONFIG_IKCONFIG .config.
5. Searching for Config Options with /
With thousands of options in a modern Linux 6.x kernel, navigating by hand is impractical. The / search key is the most efficient way to find any option. Press / from anywhere in the menu, type the CONFIG_ name or a keyword, and the tool shows matching results with the exact menu path to find them.
CONFIG_ in the search box — just type the rest of the name. Searching for IKCONFIG finds CONFIG_IKCONFIG and all related entries.
6. Navigating Submenus and the Menu Tree
Menu entries ending with —> lead to submenus. Press Enter on such an entry to navigate into it. Press Esc Esc (Escape twice) to return to the parent menu. The kernel configuration menu tree is deeply nested — here is the approximate structure of the sections you will work with most:
Main Menu
📁 Networking support
📁 Device Drivers
📁 File systems
📁 Kernel hacking
7. Understanding and Setting CONFIG_LOCALVERSION
One of the first changes most students make in this free Linux kernel development course is setting a custom kernel version suffix using CONFIG_LOCALVERSION. Navigate to General setup → Local version – append to kernel release. This is a text input field shown as ( ).
Press Enter on that entry, type your suffix (for example -embeddedpathashala), and press Enter again to confirm.
# After building and booting your custom kernel:
$ uname -r
6.12.0-embeddedpathashala
This corresponds to the following line in your .config file:
CONFIG_LOCALVERSION="-embeddedpathashala"
CONFIG_LOCALVERSION_AUTO which appends a git commit hash automatically. If you are building from a git clone, disable this for a clean version string. With it enabled, the version looks like 6.12.0-g3a1b2c3d-embeddedpathashala.8. The Dependency System — Why Options Are Greyed Out
You will sometimes find options that cannot be selected or that appear faded. This happens because of dependencies — one option requires another to be enabled first. The Kconfig system enforces these automatically.
❌ /proc/config.gz option: not visible
✅ /proc/config.gz: now appears and is selectable
If you cannot select an option, press ? on it. The help screen will show the depends on line listing what must be enabled first. Enable those parent options, then come back.
9. Saving Your Configuration and Exiting
When you are done making changes, use the ← / → arrow keys to navigate to < Exit > at the bottom of the main screen and press Enter. You will be asked whether to save.
(Press <ESC><ESC> to continue kernel config
without saving your changes)
< No >
Select < Yes > and press Enter. Your choices are written to .config. Back up this file immediately:
# Always back up your working .config
cp .config ~/my-kernel-6.12-config-backup
Best Practices for make menuconfig
- Always use / search instead of navigating manually. A 5-second search beats 3 minutes of clicking through menus.
- Press ? before changing anything you are not 100% sure about. One wrong dependency can break your boot.
- Make changes incrementally — change a few options, build, test, then change more. Do not change 50 things at once.
- Back up .config after every successful build. Use a naming convention like
config-6.12-YYYY-MM-DD. - Do not use make mrproper unless you intend to delete your .config — it performs a deep clean.
- Use make olddefconfig when moving to a newer kernel version to keep your settings.
🎯 Key Takeaways — Lecture 6
[*]= boolean ON,[ ]= boolean OFF,<*>= tristate built-in,<M>= module,< >= tristate OFF.- Press Space to cycle states, Y/M/N to set directly, Enter to enter submenus.
- Press / to search for any config option by name — the fastest way to find anything.
- Press ? to read the help text and learn the exact CONFIG_ symbol name.
- Press Esc Esc to go up one menu level. Navigate to
< Exit >when done. - Greyed-out options have unmet dependencies — press ? to find out what they need.
- Always save when exiting — your choices go into the
.configfile, which you should back up.
Frequently Asked Questions — make menuconfig
Q1. What is the difference between [*] and <*> in menuconfig?
Both mean a feature is enabled and built into the kernel image. The difference is the option type. [*] is a boolean — it can only be ON or OFF. <*> is a tristate — it can be built-in, module, or off. Pressing Space on <*> will cycle it to <M> (module) then to < > (off) and back.
Q2. How do I find a specific config option if I only know part of its name?
Press / (forward slash) from any menu to open the search box. Type the config symbol name or keyword — you do not need the CONFIG_ prefix. The search shows matching options with their current values, types, and the exact menu path. Press Jump to option to navigate there directly.
Q3. What does it mean when an option shows {M} or {*}?
Curly braces mean the option is locked by a dependency. Another enabled option requires this one, so you cannot turn it off without first disabling the thing that depends on it. -*- is even stricter — the option must be built-in (y) and cannot even be a module.
Q4. Why is an option I want to enable greyed out?
The option has a dependency that is not yet met. Press ? on the greyed option — the help screen shows depends on CONFIG_XXX. Go enable CONFIG_XXX first, then return to your target option. Once the dependency is satisfied, the option becomes selectable.
Q5. How do I set CONFIG_LOCALVERSION to name my custom kernel?
Navigate to General setup → Local version – append to kernel release. Press Enter on the ( ) text field, type your suffix (like -mykernel), and press Enter. After building and booting, uname -r will show the suffix appended to the kernel version number.
Q6. Where does menuconfig save the configuration?
To a file named .config in the root of your kernel source directory. It is a plain text file where enabled options appear as CONFIG_NAME=y or CONFIG_NAME=m and disabled ones as # CONFIG_NAME is not set. Always back up this file after a successful configuration.
Q7. Can I use make menuconfig over SSH without a graphical desktop?
Yes — that is one of the main reasons make menuconfig is the most popular choice in this free Linux kernel development course. It uses ncurses, a terminal drawing library, not a graphical display. You need the terminal to be at least 80 columns wide. If the display looks garbled, run resize or expand your terminal window and try again.
