Using Linux on a Chromebook

6 February, 2023

Chances are, you’ve heard of a class of computers called Chromebooks. They’ve been around since 2011 and, in spite of the scorn heaped upon them during that time, Chromebooks have become rather popular devices.

Chromebooks run an operating system called chromeOS which, no matter what some people say, is more than just the Chrome web browser. You can even argue that chromeOS is Linux, at least under the hood. That said, you can tap into more of the power of Linux on a device running chromeOS. At least one manufactured in the last few years. How? By setting up a Linux environment that runs on top of chromeOS.

In a post that I’m sure will trigger more than a couple of people (and probably lose me some readers), I’ll walk you through the basics of enabling and using Linux on a Chromebook.

Why Not Just Use …

It’s not up to me to determine anyone’s use case. For anything. And that includes whether or not they decide to run Linux on a Chromebook. And I’m sure there is more than one such use case.

It could be that, as a Chromebook user, you want to explore Linux a bit before jumping in. Or you might want to use both Linux and chromeOS on the same device, and not install something like GalliumOS (a small Linux distribution rolled especially for Chromebook), which might not be available for their particular Chromebook. Or it could be any other reason you might have.

With that out of the way, let’s continue.

Enabling Linux

While the terminology used is a bit techie (as you’ll see in a moment), setting up and using Linux on a Chromebook isn’t all that onerous. It’s actually quite point and click.

To get going, fire up and log into a Chromebook. While writing this post, I was using one loaned to me by a friend — a Lenovo IdeaPad Duet, in case you’re wondering.

Next, go to the Chromebook’s settings and search for linux, as shown below:

The first step in setting up Linux on a Chromebook

In the Linux development environment section of the screen, click Turn on to start a wizard that walks you through the setup process.

Click Next to display the setup screen. On that screen, you can enter a user name and change the amount of disk space available on the Chromebook for Linux (out of the box, that’s 10 GB). Here are the settings that I used:

The second step in setting up Linux on a Chromebook

Once you’ve done that, click Install. Installation takes a couple of minutes. Once the process is finished, a terminal window like the one below displays.

The Linux terminal that displays once the environment is set up on a Chromebook

Getting Started Using Linux

In that terminal window, you can fiddle with various common Linux commands. Among the applications that are standard kit is the vim text editor. Here’s me embracing my inner geek and editing a draft of this post in vim:

Editing this post in vim under Linux on a Chromebook

And, before you ask, you can install Emacs too …

But, as we all know, Linux is more than just the command line. You can also install desktop applications in your new Linux environment. Let’s look at how to do that.

Installing Applications

The version of Linux that runs on Chromebooks is based on a distribution called Debian, which uses a package manager called apt. To install an application, whether desktop or command line, type this in the terminal window:

sudo apt install [app-name]

Where [app-name] is the name of what you want to install. Let’s say that LibreOffice Writer is what you want to install. To do that, type this command:

sudo apt install libreoffice-writer

Here’s what it looks like running on a Chromebook:

Working with LibreOffice Writer under Linux on a Chromebook

And here’s me browsing the web on a Chromebook using GNOME Web:

Browsing the web under Linux on a Chromebook with Web

If you can’t install something using apt, you can load Flatpak or snap in your Linux environment to widen your choices — learn more about them in this post.

Launching Linux Applications

You can fire up the applications that you’ve installed (including the terminal window) from the Linux Apps group in your Chromebook’s launcher. Here’s an example:

Launching Linux apps using a Chromebook’s launcher

You can also launch desktop applications from a terminal window. Say, for example, you’re working at the command line and need to use LibreOffice Writer. Just type lowriter, press Enter, and away you go.

Working with Files

After you’ve set up Linux and installed your applications, you’re generally good to go. But what about files?

In your Linux environment, you have a /home directory — for example, /home/scott. Any files that you create are saved in this directory. You can, of course, create folders under the directory in a terminal window using the mkdir command.

You can also access your Linux /home directory from your Chromebook’s Files app. You’ll find that directory in the navigation pane of the Files app under Linux files. From within the Files app, you can create folders in your /home directory and copy files into it, as I did:

Accessing your Linux files using the Chromebook Files app

You can also right click on a folder in the Files app and select Share with Linux. Any chromeOS folder that you share is available in your Linux environment under /mnt/chromeos/MyFiles.

Getting Rid of the Linux Environment

I know more than a couple of people who use Linux beside chromeOS on their Chromebooks almost daily. But Linux isn’t for everyone. Maybe after giving it a go, you’ve found that Linux isn’t for you. Maybe your experiment was successful and you want to install Linux on a computer that you have lying around. Or perhaps you want to free up some disk space on your Chromebook after test driving Linux.

To get rid of the Linux environment on your Chromebook, go to Settings and search for linux. Click Linux development environment. Then, click Remove as shown below:

Removing Linux from a Chromebook

On the dialog box that displays, click Delete.

Final Thoughts

Chromebooks aren’t for everyone. I get that. But, as I mentioned earlier in this post, I’m not arrogant enough to view myself as the final arbiter of how anyone gives Linux a test drive or what computer and operating system they use. For those with few technical chops, but who want to give Linux a try, enabling Linux on a Chromebook is a quick and easy way to do that.

Scott Nesbitt