One of the main issues with modern smartphones is the extremely short lifespan of this category of devices, which makes even high-end ones painfully slow within years. In fact, studies have shown that it takes the average European, American or Asian user less than two years to dump their old smartphone and buy a newer, more powerful (yet arguably very similar feature-wise) model.

This, however, is quickly changing thanks to projects like postmarketOS, bringing potentially lightweight Linux environments to new and old (also very old) mobile devices. While it is still early, in most cases, to have an usable Linux "daily driver" smartphone, this page should answer some of your questions regarding how Linux on smartphones work, whether your phone is likely to boot it properly and, if it does, how to choose a Linux distribution and whether it's the case to switch now or to wait some months.

Do not forget that most of the procedures below might void warranty or cause temporary or permanent damage. Any content of this page is to be performed at your own risk.

2009 Nokia N900 running postmarketOS

Buying a Linux smartphone

Thankfully, in 2020 buying a Linux smartphone is much easier than it used to be last year. The earliest Purism Librem 5 and PinePhone devices have already been shipped, and mature releases will probably be available for sale within this summer. We maintain a small list of native Linux smartphones that might be a good starting point if you are willing to buy one.

If, however, you are not ready to go for a full Linux smartphone yet, Can My Phone Run Linux? is a search engine for most known smartphones that can boot Linux. Make sure to check the support level on the distro page in detail before getting one, as most features, like mainline kernel, modem and hardware acceleration are still not supported by most phones.

Hardware requirements

Sure, a lightweight Linux desktop environment might be much faster than most bloated manufacturer customized Android skins running on a Java environment, but there's no black magic in Linux. Which means that expecting to achieve more with your device than what the manufacturer initially designed it to is possible, but not very realistic. Especially if we consider that most smartphones are sadly not designed to be future-proof when it comes to their technical specifications.

Therefore, if your smartphone isn't equipped with at least 512MB of RAM, 4GB of ROM (SD cards also count, but might be less reliable and slower especially on newer devices) and a 32-bit, 1GHz ARM CPU, the device will probably boot, but still be unsuitable for most kinds of smartphone features, such as desktop-like web browsing. In other words, anything older than 2012 will probably not render modern websites faster or more accurately than its original OS.

In addition, you should make sure that your device's mobile modem, GPU, power management and all kinds of hardware drivers you need are available on Linux. This step requires a minimum level of hardware and software (Linux) knowledge, but for most users checking "what works" and "what doesn't" from the wiki page of your device on the website of the Linux distribution you'd like to install should already give a basic idea of the usability status.

If there is already a mature Android port for your smartphone, however, libhybris might allow Android drivers to run on Linux, hopefully without much fuss.

Software requirements

Another thing to remember is that running Linux on an iPhone or iOS device is almost impossible. While some successful attempts have been made in the past, there is currently no usable Linux distribution or porting for modern iDevices. Windows Phone devices that already received unofficial Android support, such as the Lumia 520, 525 and 720, might be able to run Linux with full hardware drivers in the future. In general, if you can find an open source Android kernel (e.g. via LineageOS) for your device, booting Linux on it will be much easier.

If your device is SIM-locked, you might want to unlock your device if possible before flashing Linux on it, as in some cases the necessary software to handle modem unlock codes might not be implemented in Linux.

You should also check if the bootloader for your device is unlocked, and if it isn't, how the bootloader unlock procedure works, preferably from an official source (and don't buy shady "unlock" codes unless you really have no other choice). If it is permanently locked by a carrier or manufacturer, or can't be unlocked for whatever reason, you will not be able to run Linux or any other unsigned custom ROM on it, with the exception of chroot subsystems.

What are the Linux distributions for smartphones, and how should I choose one?

There are several Linux distros that are specifically designed for smartphones, tablets and wearables, which are also listed on a dedicated page of this website.

  • Your best bet at the moment would surely be Ubuntu Touch by Ubports, which is the only distribution to provide a fully-functional Linux desktop environment with a relatively large app ecosystem. To check if your device is one of the lucky ones to be actively (and officially) maintained, you can check the Ubuntu Touch Devices section.
  • Another Linux distribution which is currently in very active development is postmarketOS, which can boast a wide community of users and developers and over 170 booting devices (including smartwatches, x86 tablets and Raspberry Pi boards) at the time of writing. KDE enthusiasts will be happy to hear that postmarketOS is officially recommended by the Plasma Mobile website, and some of its main developers (like bshah) are also active members of the postmarketOS community. This, however, does not mean that postmarketOS is primarily KDE oriented: several Gtk desktops, including Purism Librem 5's "Phosh", are already fully working in postmarketOS on several devices.
    Also the pmbootstrap tool makes porting postmarketOS to new smartphones easier than ever.
  • Last but not least, if your device is one of the few supported ones (spoiler: some Xiaomis and Nexus phones only), you might consider trying LuneOS, a project that brings new life to HP WebOS, the futuristic HTML5-based, open-source iOS competitor that didn't truly make it against the Android hegemony in the first 2010s. Still, chances are it'll be lighter than most Android versions (especially those with manufacturer skins), while open source and fully respectful of your privacy.

Porting Linux to your device

postmarketOS live porting to Nokia 1

If your device is currently not supported by any of the distros mentioned above, porting postmarketOS to it might be a relatively easy task, provided you have experience with compiling Android and Linux kernel, and possibly some minimal knowledge of the C programming language. And, of course, provided there is already one stable Android or Linux kernel you can find the source code for. If you feel brave enough, you can check this page from the postmarketOS wiki and start getting your hands dirty. And if you ever get stuck, don't be shy and ask the postmarketOS community in their chat rooms.

And if, by chance, you manage to get the "mainline" Linux kernel and modem (calls, SMS, mobile data...) to fully work on Linux on your smartphone, you might have just created one of the very few modern "true Linux" Linux smartphones. But that's clearly beyond the point of this article.

Live porting of Ubuntu Touch to Fairphone2

Conclusion

As the brightest reader might have noticed, "real" Linux on most smartphones isn't exactly mature yet. So is it worth installing on your daily driver? Probably not, unless it's one of the few Ubuntu Touch or LuneOS supported devices. But if you've got an older device that's been sitting idle for years, why not experiment with software that might give it new life, without the limits of the OS it was originally released with? Testing and development is essential at a stage where Linux for smartphones is being more actively developed than ever.

You can follow TuxPhones on Twitter and Mastodon.

Cover picture: Purism Librem 5