How To Install Ubuntu Linux On Any Chromebook Model Without Replacing Chrome OS (Crouton)

Chromebook Linux

I have a HP Chromebook G4 from 2014 that won't receive official Linux (Crostini) support, so I decided to use Crouton to install Ubuntu instead.

I thought some of you might be interested in this, so this article presents step by step instructions for installing Ubuntu on any Chrombook model, using Crouton. There are also a few tweaks / tips, and instructions for removing it.

Crouton, or Chromium OS Universal Chroot Environment, makes it easy to install Ubuntu or Debian in a chroot environment on Chromebooks, no matter the Chromebook model or architecture. Using Crouton, you continue to use Chrome OS, but you can easily switch between Ubuntu and Chrome OS when needed.

Compared to the Crostini solution for Chrome OS offered by Google, Crouton has wider device compatibility, and it enables direct hardware access. Also, compared to virtualization, Crouton has zero speed penalty since it runs natively.

On the other hand, Crostini is an official project and doesn't need enabling developer mode (which is required to be able to install Ubuntu or Debian on a Chromebook using Crouton). Since your Chromebook runs in verified mode, it also means Crostini is more secure.

Install Ubuntu on a Chromebook using Crouton


Switching your Chromebook to developer mode is insecure! Crouton supports encryption, but as the Crouton wiki page mentions, "the encryption is only as strong as the quality of your passphrase".

Before you proceed:

  • Backup your data. Google backs up your passwords, browser extensions and so on, but you may want to back up the files that you've saved in your Downloads folder though.
  • You may want to create a restore image for Chrome OS by installing the Chromebook Recovery Utility extension. You'll need a 4 GB or larger USB flash drive or SD card.

1. Switch your Chromebook to developer mode.

Installing Ubuntu on your Chromebook with Crouton requires switching the Chromebook to developer mode.

Enabling developer mode may vary depending on the Chromebook model you're using. You can find out the instructions for switching your Chromebook to developer mode by visiting this page, clicking on your Chromebook model, then follow the instructions.

From what I've seen, these are the instructions for most models: invoke Recovery mode by holding down the ESC and Refresh (F3) keys, and poking the Power button. After entering Recovery, press Ctrl + D (there's no information about this displayed on the screen - you have to know this to use it). It will ask you to confirm and then reboot into developer mode.

This may take a while!

From now on, each time your Chromebook boots up, you'll need to press Ctrl + D or wait 30 seconds to continue. Don't press the SPACE key as it will reset!

2. Download Crouton.

Go to the Crouton GitHub project page and click the goo.gl link at the top of the page to download the latest version of Crouton. This is a direct link to the latest Crouton download (it may change though). Leave the downloaded file in the Downloads folder.

3. Install Ubuntu


Crouton install Ubuntu Chromebook

Now it's time to install Ubuntu on your Chromebook. To do this, open the crosh shell by pressing Ctrl + Alt + T. This should open a terminal-like tab. Type:

shell

Next, install the Crouton executable:

sudo install -Dt /usr/local/bin -m 755 ~/Downloads/crouton

You can type the following command to see the Crouton help text:

sudo crouton

To install Ubuntu 16.04 with the Xfce desktop (a lightweight desktop environment), and enable encryption, use this command (don't run it before reading what everything does and how to customize it):

sudo crouton -e -t extension,keyboard,audio,xfce

-e adds encryption and -t specifies installing the following targets:

  • extension: clipboard synchronization and URL handling between Chrome OS and Linux (requires installing the Crouton Integration Chrome extension)
  • keyboard: adds support for Chromebook keyboard special keys
  • audio: adds support for audio playback via Chromium OS's audio system
  • xfce: the Xfce desktop environment

Xfce desktop running on a Chromebook (via Crouton)

You can see all the available targets (which are not just desktop environments, but may also be predefined package lists, like touch for touchscreen gesture support, etc.) by running:

crouton -t help

Crouton can also install e17, Gnome, KDE, LXDE, and Unity desktops. Also, you can specify multiple targets by separating them using a comma.

You can also install the xiwi target to allow running Ubuntu in a Chrome OS tab or window (unaccelerated). This requires installing the Crouton Integration Chrome extension. A screenshot of this can be found at the top of the article.

While Crouton installs Ubuntu 16.04 by default, you can specify a different Ubuntu version (either older, like 14.04 - trusty, or newer like Ubuntu 18.04 - bionic), and even Debian or Kali Linux. To change the installed Ubuntu (or Debian / Kali) version, append -r <version> to the installation command. For example, to install Ubuntu 18.04 Bionic Beaver instead of 16.04 Xenial Xerus, the command to install Ubuntu on your Chromebook becomes:

sudo crouton -e -r bionic -t extension,keyboard,audio,xfce

You can see all the available Ubuntu, Debian and Kali releases that you can install on a Chromebook, use this command:

crouton -r list

Some versions are not officially supported though, but they may work. This includes Ubuntu 18.04 Bionic Beaver!

How to use Ubuntu installed on a Chromebook using Crouton


To start Ubuntu (with Xfce desktop environment) on your Chromebook, press Ctrl + Alt + T to open a crosh shell, then type:

shell
sudo startxfce4

You'll be prompted to enter your password, encryption password, and then Ubuntu will start.

The command used to start it varies with the desktop environment you've installed, and is displayed after completing the installation. So if you've installed KDE, use sudo startkde, and so on.

Switch between Chrome OS and Ubuntu using Ctrl + Alt + Shift + Back and Ctrl + Alt + Shift + Forward. This way you switch between Ubuntu and Chrome OS without exiting Ubuntu.

To exit Ubuntu, log out from the menu present on the top panel.

A few tweaks for your new Ubuntu (Xfce) desktop running on a Chromebook


1. There's no graphical tool installed by default to find and install new applications. You can install Ubuntu / Gnome Software application by opening a terminal on your Ubuntu desktop running on top of Chrome OS, and typing the following command:

sudo apt install gnome-software

Normally you could now launch the "Software" application from your applications menu (System -> Software). But launching the Software application from the menu doesn't allow you to install any packages, displaying an error about not having permissions to install any packages, and I didn't find any way to fix this. But there is a workaround that can be used. Instead of launching Gnome / Ubuntu Software from the menu, you can launch it like this:

  • In Ubuntu 16.04 Xenial Xerus (default Crouton Ubuntu version):
gksu gnome-software

sudo -H gnome-software

If you still can't install applications using the Software app, log out (and make sure you don't enable saving your current session on the Xfce logout screen) and try again. Or try killing any background-running gnome-software instances using killall gnome-software, and try again to install some software.

You will only be able to install regular (DEB) packages using Gnome Software. Installing snap packages doesn't seem to work, or at least I couldn't find a way to make it work. Installing snap packages doesn't using any installation method you may try - using Ubuntu Software or from the command line.

2. You might want to add third-party PPA repositories, which you'll find in many online guides for installing various software that's not available in Ubuntu directly. But this command does not work by default when installing Ubuntu on a Chromebook using Crouton.

To enable the add-apt-repository command you'll need to install a package called software-properties-common. Open a terminal on your Ubuntu desktop and use this command to install it:

sudo apt install software-properties-common

3. The default Crouton setup for Xfce may be a bit... ugly. To fix this, go to the applications menu -> Settings -> Settings Manager and change:

  • Appearance -> Icon tab: change the icon theme to elementary Xfce darker
  • Window Manager -> Style tab: change the theme to Greybird

This is how the window borders and icons will look after this change:

Crouton Xfce theme tweaks

You may also try the other themes to see which one you like the most, or install more themes.

How to uninstall Ubuntu (installed using Crouton) from Chromebook


If you want to completely remove Crouton, you can reboot your Chromebook and press SPACE while booting to turn on OS verification. This will reset the Chromebook / Chrome OS.

You can also recover your original Chrome OS installation, in case you've created a backup using the Chromebook Recovery Utility.

If you only want to delete the chroot created when you installed Ubuntu with Crouton, exit Ubuntu (by logging out), and in Chrome OS press Ctrl + Alt + T, then type:

shell

Next, use this command to remove Ubuntu:

sudo delete-chroot <ubuntucodename>

Replacing <ubuntucodename> with the Ubuntu version codename. By default this is xenial. If you've installed Ubuntu 18.04 Bionic Beaver, its codename is bionic

If you don't know the Ubuntu version / chroot name, you can get a list of the chroot names you have installed by using this command:

sudo edit-chroot -a