Espressif's ESP32 microcontrollers are a favorite among makers and developers thanks to their low cost, excellent performance, and built-in wireless connectivity. They're great for everything from basic IoT sensors to sophisticated robotics projects, but they aren't the kind of hardware you'd expect to find running a full operating system. That could be changing, however, as the new ESP32-S31 is powerful enough to run Linux, and unlike with past hacks, Espressif is officially supporting the effort.

The ESP32-S31 is a dual-core RISC-V microcontroller running at up to 320 MHz. It supports Wi-Fi 6, Bluetooth, Zigbee, and a wide range of peripherals, including GPIO, SPI, I2C, and Ethernet. Those capabilities alone make it an attractive option for embedded projects, but what makes it suitable for running a full Linux distribution is its memory management unit (MMU).

Unlike most microcontrollers, the ESP32-S31 supports virtual memory through a two-level page table and hardware address translation. It also provides multiple privilege levels, allowing the operating system to separate kernel operations from user applications. These features make it possible to run a full Linux kernel rather than the stripped-down, no-MMU variants sometimes used on less capable hardware.

To support these efforts, Espressif has published an official Linux 6.18 development branch for the ESP32-S31. The project is still in developer preview and isn't recommended for production use, but it will save you a lot of time if your aim is experimentation. Although, you will still need to compile the kernel for yourself.

Fortunately, there's another option that makes getting started even easier. Developer GrieferPig has released an unofficial Linux 6.18 port with precompiled images that can be flashed directly onto compatible ESP32-S31 development boards. The project includes support for dual-core symmetric multiprocessing, persistent storage, Wi-Fi, Bluetooth, GPIO, and UART.

Several of those features are already listed as stable, while others, including I2C, SPI, Ethernet, USB gadget functionality, and audio interfaces, remain experimental. The port also includes BusyBox, providing a familiar Linux command-line environment for interacting with the hardware.

Of course, there are plenty of limitations. The ESP32-S31 has far less memory than a normal Linux computer, and there's no GPU for handling graphical applications. It's not going to replace a Raspberry Pi anytime soon, especially for projects that require a desktop environment or significant processing power.

Still, running a full Linux kernel on a low-cost microcontroller has its applications. Most embedded projects will probably be better served by FreeRTOS or Espressif's ESP-IDF framework, but having Linux as an option opens the door to new possibilities. And as microcontrollers continue getting more powerful, the line separating them from single-board computers is going to become increasingly blurry.