Interview Prep/Linux/Packages, kernel and boot

You need to change kernel boot parameters (e.g. add `transparent_hugepage=never`) persistently. How?

IntermediateScenarioPackages, kernel and boot
Answer

Situation read → Edit the kernel command line and regenerate the bootloader config.

What I'd do →

  • RHEL 8/9: sudo grubby --update-kernel=ALL --args="transparent_hugepage=never".
  • Debian/Ubuntu: add to GRUB_CMDLINE_LINUX in /etc/default/grub and run sudo update-grub.
  • Reboot, verify with cat /proc/cmdline and cat /sys/kernel/mm/transparent_hugepage/enabled.

Why → Some settings must be applied at boot; editing grub.cfg directly gets overwritten.

Interview tip → Explain why DBs like MongoDB/Redis recommend disabling THP (latency spikes from compaction).

All Linux questions Roadmap: Linux

More on Packages, kernel and boot