A Linux-Like Shell for Your Old Arduino UNO R3

Renovation

© Lead Image © Nelli Valova, 123RF.com

© Lead Image © Nelli Valova, 123RF.com

Article from Issue 311/2026
Author(s):

Install the KernelUNO firmware on your Arduino UNO R3 and get a Linux-like shell that lets you access files and talk to the GPIO pins. You can even extend the current feature set.

The Arduino platform is an excellent environment for building lightweight microcontroller applications. Unfortunately, it's missing one nice feature that is available on Raspberry Pi OS, and that's a shell with command-line tools for accessing the hardware. Linux tools like the gpio commands from the WiringPi library [1] and I2C bus scanning using i2cdetect [2] allow Pi users to quickly find and test their hardware before they even start writing code.

The KernelUNO project [3] addresses this deficiency by offering a Linux-like shell for older Arduino modules. Features like a file/directory structure, controlling GPIO pins, reading sensors, and running simple scripts are available from the serial terminal (Figure 1). KernelUNO has the following 23 built-in commands:

  • Filesystem commands: ls, cd, pwd, mkdir, touch, cat, echo [text] > [file], rm, info [name]
  • Hardware commands: pinmode [pin] [in/out], gpio [pin] [on/off], read [pin], write [pin] [high/low]
  • System commands: uptime, uname, dmesg, df, free, whoami (hardcoded to root), clear, reboot, help, sh

[...]

Use Express-Checkout link below to read the full article (PDF).

Buy this article as PDF

Download Article PDF now with Express Checkout
Price $2.95
(incl. VAT)

Buy Linux Magazine

Related content

  • Low-Code with Snap4Arduino

    Snap4Arduino brings the power of low-code programming to the Arduino hardware environment.

  • Arduino CLI

    When programming an Arduino microcontroller board for the first time, most people use the Arduino IDE, a graphical development environment. However, if you prefer the command line, you have a powerful alternative: Arduino CLI.

  • Snek

    Reuse your old Arduino hardware while learning Python.

  • littleBits and Python

    Communicate with your littleBits sensors and devices through Python programs.

  • Perl: Arduino Project

    With a few lines of self-written firmware and a simple Perl script, Perlmeister Mike Schilli trains one of his Linux computers with a plugged in Arduino board to switch electrical equipment on and off using a relay. Enchanting.

comments powered by Disqus
Subscribe to our Linux Newsletters
Find Linux and Open Source Jobs
Subscribe to our ADMIN Newsletters

Support Our Work

Linux Magazine content is made possible with support from readers like you. Please consider contributing when you’ve found an article to be beneficial.

Learn More

News