How to Completely Disable the ‘lxcfs’ (Linux Containers) Daemon in Ubuntu Server

LXCFS (Linux Containers File System) is a small FUSE (Filesystem in Userspace) daemon designed specifically to make Linux containers (like LXC or LXD) feel more like isolated virtual machines. It achieves this by creating custom, container-specific versions of critical system files like /proc/cpuinfo and /proc/meminfo, ensuring that a container only “sees” the resources allocated to it rather than the total resources of the host server. While essential for a container virtualization host, the lxcfs daemon is completely superfluous if your Ubuntu Server is operating as a standalone application server or a dedicated database node that does not utilize LXC containers.

This guide explains how to completely disable the lxcfs daemon in Ubuntu Server to reduce unnecessary background overhead.

Stop and Disable the LXCFS Daemon

To ensure the daemon does not load into memory and attach to the FUSE mount points, we must halt it and remove it from systemd’s default boot targets.

  1. Log into your Ubuntu Server via SSH or local console using an account with sudo privileges.
  2. First, stop the active service to terminate the daemon immediately:
    sudo systemctl stop lxcfs.service
  3. Next, disable the service so it is not invoked during the next system boot:
    sudo systemctl disable lxcfs.service
  4. To absolutely guarantee that no other dependent service (or accidental administrative command) can start the daemon, mask the service unit:
    sudo systemctl mask lxcfs.service

Verify the Deactivation

By masking the service, you have completely neutralized LXCFS without needing to invoke apt-get remove, preserving the package files should you ever need to pivot the server into a container host in the future.

To verify the lockdown is successful, run the following command to check the status of the unit:

systemctl status lxcfs.service

The output will clearly indicate that the service is masked (symlinked to /dev/null) and the Active state will read inactive (dead). You can also verify that the FUSE mount has been detached by running df -h; you will no longer see the lxcfs mount point (typically located at /var/lib/lxcfs) cluttering your file system hierarchy. Your server is now free of container-specific overhead.

Get the best tech tips delivered straight to your inbox.

Join thousands of readers mastering Apple, Google, Microsoft, and Linux.