lilo Command: Tutorial & Examples

lilo stands for Linux Loader and it's a bootloader for the Linux kernel. Simply put, when your Linux server boots up, the lilo command is used to load the kernel into memory so that it can start up your system. It's an essential part of the boot process for Linux servers.

How it Works

The lilo command works by reading a configuration file called /etc/lilo.conf, which specifies which kernel to boot and any additional options. The command then installs the specified kernel and creates a map file. This map file is then used during the boot process to load the kernel into memory.

What it is Used For

As mentioned, lilo is used to load the Linux kernel during the boot process. It can also be used to manage multiple boot entries, allowing you to choose between different Linux distributions or kernel versions at boot time. This can be useful for testing new kernel versions or for running different systems on the same server.

Why it is Important

Without a boot loader like lilo, the system wouldn't be able to start up. It's the first piece of software that runs when you turn on your computer, and it's responsible for loading the rest of the operating system. Using lilo, you can also manage your boot entries and easily switch between different Linux distributions or kernel versions.

How to Use it

To use lilo, you first need to ensure it's installed on your system. You can then edit the /etc/lilo.conf file to specify your boot entries. Here's a simple example:


In this example, /dev/sda is the disk where the boot loader will be installed, /boot/vmlinuz is the kernel that will be booted, and /dev/sda1 is the root file system.

After editing the lilo.conf file, you can run the lilo command to install the boot loader:

sudo lilo

Common Command Line Parameters

The lilo command supports a variety of command line parameters. Some of the most common ones include:

  • -v: Increases the verbosity level. This can be useful for debugging issues with the boot process.
  • -t: Tests the configuration file without making any changes.
  • -q: Displays the current configuration.

Potential Problems and Pitfalls

While lilo is a powerful tool, it's not without its potential problems and pitfalls. One common issue is that any changes to the lilo.conf file won't take effect until you run the lilo command. If you forget to do this, your system might not boot properly.

Another potential problem is that lilo doesn't support all file systems. If you're using a file system that lilo doesn't support, you'll need to use a different boot loader, such as grub.

Finally, if you're dual booting with another operating system, you need to be careful not to overwrite the other system's boot loader. This can lead to a situation where you can't boot into the other operating system.


In conclusion, lilo is a key component of the boot process on Linux servers. It's a powerful tool that allows you to manage multiple boot entries and switch between different Linux distributions or kernel versions.

Except where otherwise noted, content on this site is licensed under a CC BY-SA 4.0 license CC BY SA