Uncategorized

How To Run a Full Linux Desktop on a Chromebook

Linux on Chromebook

Do you want to run a full Linux desktop installation on your Chromebook without giving up ChromeOS? This alteration will give you access to both complete operating systems running simultaneously so you can move between them with a keyboard shortcut.

You may already use the “Crostini” partition to run individual Linux apps alongside ChromeOS. That method forces users to rely mainly on the command line without the added functionality a full Linux desktop environment offers. So installing a complete Linux distribution — desktop and all — may be a better option for you.

A few years ago, I played around with a halfway measure to run a KDE desktop on a Chromebook within the Crostini environment. That method, however, was buggy. Before that, I toyed with running GalliumOS from a USB drive to turn Chromebooks into Linux boxes without removing ChromeOS.

Crostini, Google’s umbrella term for building Linux applications into ChromeOS, installs a command line version of the Linux OS to run Debian Linux apps on supported Chromebooks.

The built-in Crostini partition lets Chromebook users run Linux apps much like Android apps, in a walled-off virtual-machine-like sandbox running on top of ChromeOS.

An alternative approach involves using Crouton. It provides the environment for a full Linux installation, desktop, and all. Crouton is a set of scripts that automatically installs components that create a Chromium OS-centric chroot generator. The term “chroot” is geekspeak for “change root.”

Learning the Lingo

In theory, Chromebook users should be able to use the chroot utility to install most Linux distributions. That, however, requires somebody in those Linux communities to create the scripts based on where each distro stores its files.

So far, the chroot utility scripts readily available for Chromebooks cater to Debian Linux and the Ubuntu Linux distro. Installing Linux distros on some Arm-based Chromebooks may not work. Expect better results using a Chromebook that runs on an Intel processor.

Crouton installs the current Ubuntu Xenial release and your choice of four desktops — LXDE, Unity, Xfce, or Gnome — depending on which command you enter. See the details in the Step Four section.

I installed the Xfce desktop and prefer its added feature set and configuration options. Although I have several newer and more powerful Chromebooks, I did the installation on an Asus Chromebook Flip model C213S.

First released in July 2017, it runs the Intel Celeron CPU N3350 on 4GB RAM. This unit has never buckled under the strain of running ChromeOS with numerous open browser tabs, Android apps in separate windows, and multiple Linux apps under Crostini.

Set Up the Preliminaries

Installing a full Linux distribution on your Chromebook is safe and reliable using the directions below. It is fully reversible.

Before starting, we recommend backing up your existing Chromebook setup. You can restore it with a powerwash or from a recovery USB stick. Check out Google’s help files for details on doing both procedures here.

But typically, all you will have to do should something unexpected happen is go to the Settings menu and turn off the Linux partition. That will remove all traces of the errant Linux installation, and the still-intact ChromeOS will be waiting for you.

To start, ensure that you are running the current version of ChromeOS. Go to Settings > About Chrome OS to check the Chrome OS version or update Chromebook’s operating system. Then make sure that the Linux partition is turned on in the Advanced Settings menu.

Getting Ready for the Crouton Alternative

The built-in Crostini partition cannot handle Linux desktops. It runs Linux commands through the command line interface or CLI and launches installed Linux apps by clicking their launcher icons.

Crouton, as in “Chromium OS Universal Chroot Environment,” goes beyond that limitation. Basically, you must replace Crostini with Crouton.

Do not rush through this process. Double- and triple-check that you are precisely following the instructions.

It is unlikely that a misstep will damage the Chromebook’s core operation. But a mistake will generate an error message. If that happens, redo the failed step until it works.

Be patient while the process proceeds. It will take time for the files to download and install. The Chromebook’s internal hardware and your internet connection speed are factors.

Chromebook, preparing system for Developer mode

The installation should take about 30 to 45 minutes to complete, provided you get everything correct.

Step 1: Set Up Developer Mode

Turn off your Chromebook. Then turn it back on by pressing and holding the Esc, Refresh, and Power keys simultaneously. Release all three keys once the screen shows signs of powering on.

When the Chromebook screen fully displays, it will show the recovery process screen rather than the ChromeOS screen. Select Advanced Options and then choose Developer Mode. Or you can press Ctrl+D.

ChromeOS alert: OS verification is  off

Next, you may see a message asking you to verify the operating system. If so, press Enter.

Then use the arrow keys to scroll down to Advanced options and choose Developer Mode or just press the Ctrl and D keys. The Chromebook should now start in Developer Mode.

NOTE 1: From this point forward, every time you power on the Chromebook, it will load into the OS verification warning screen. No problem. Just wait 30 seconds for the device to start automatically in ChromeOS or press Ctrl+D to boot immediately.

NOTE 2: You can always disable the Chromebook’s Developer Mode status. Do this:

  • First, power it off. Then press the power-on button or raise the clamshell lid from its closed position.
  • When the Chromebook boots and displays the OS verification message, press the space bar.

Your Chromebook will factory reset and return to its standard configuration. Easy Peasy!

NOTE 3: After the reset, you must go through the first-time user setup. This is where having the backup files mentioned above comes in handy. If your previous configuration had the desktops feature enabled, you will have to reset those flags again to access desktops. But all of your Chrome browser tools and settings will be installed.

Step 2: Download Crouton

This part of the process is quick and straightforward. Download the Crouton files to create the chroot environment. This will create a pure Linux environment on the Chromebook.

 Follow this link to download the Crouton files.

Make absolutely sure that you direct it to your Chromebook’s Downloads folder and NOT your Google Drive storage.

Step 3: Completing the Installation

Power off the Chromebook and restart it. Remember, the Chromebook will not load into the expected ChromeOS web browser screen just yet. Instead, it will display the Developer Mode screen. Just press the Ctrl+D keys. When the screen updates, press Ctrl + Alt + T and press Enter to open the Chrome OS terminal.

Crosh welcome

Now type (without quotation marks) the word “shell” and press Enter.

 IMPORTANT: Be sure to enter the commands EXACTLY as shown. Omitting or adding spaces not indicated will result in error messages.

Next, enter or paste this command in the terminal to download the Crouton text file to automatically convert it into an executable file:

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

Press Enter.

Crosh welcome

You can encrypt with a passphrase the chroot partition for added security. Just add -e to the end of the installation command before executing it.

Be aware, however, this will require that you type in the encryption password you create each time you enter the chroot environment.

Step 4: Pick Your Desktop Pleasure

This is where you must decide which desktop environment you want Ubuntu Xenial to run. The core command to enter in the terminal is:

sudo crouton -t XXXX

Press Enter. Or, if your Chromebook has a touchscreen, use instead:

sudo crouton -t touch,XXXX

Replace XXXX after -t with the desktop you want to install (all lowercase).

As the installation nears completion, you must set up a password to enter the Linux distro each time.

Crosh install

Don’t worry about the reference to UNIX here. Just create a password and repeat it at the next prompt.

Crouton User Tips

Congratulations! You have successfully altered your Chromebook’s configuration to run a full Linux distribution and desktop. Familiarize yourself with these basic processes to ensure a hassle-free Linux experience on your Chromebook.

I. To enter the Linux distribution, follow these steps:

  1. Upon powering up the Chromebook, press Ctrl+D on the first screen (OS Verification Off).
  2. Press Ctrl + Alt + T
  3. Type: shell and press Enter
  4. Type: sudo enter-chroot startXXXX and press Enter

IMPORTANT: Do NOT use the XXXX’s. Instead, with no space after the word “start,” enter the name of the installed desktop in lowercase. For instance:

sudo enter-chroot startxfce4
sudo enter-chroot startgnome
sudo enter-chroot startlxde
sudo enter-chroot startunity

Linux running on an Asus Chromebook Flip model C213S

II. Cycle between the Chrome OS and Linux desktops without rebooting the Chromebook.

The keys involved vary slightly depending on your device’s architecture:

  • For Arm-based machines, use Ctrl+Alt+Shift+Forward and Ctrl+Alt+Shift+Back.
  • For Intel-based machines, use Ctrl+Alt+Back and Ctrl+Alt+Forward; then Ctrl+Alt+Refresh. (I did not have to use the Refresh shortcut on my Intel-powered Asus Chromebook.)

How To Remove a Crouton Installation

If you decide that keeping the full Linux installation on your Chromebook is not for you, you can easily remove it. One method was mentioned above, hitting the space bar when the OS verification screen appears. Here is a second option:

Press Ctrl+Alt+T to enter the ChromeOS shell. Then enter this command:

cd /usr/local/chroots

Press Enter. Then type:

sudo delete-chroot *

Press Enter. Then type:

rm -rf /usr/local/bin

Press Enter.

Chromebook Restoration Option

If something goes astray along the way, you can restore your Chromebook by retrieving the backup files stored on Google Drive. But this method only works if you have already configured your device to back up automatically.

Enter Recovery Mode by pressing and holding the Esc + Refresh keys simultaneously. Then press the Power button and release it.

Final Note

Numerous variables can affect how the Linux distro loads. These include the make and model of your Chromebook and interim updates in the Crouton installation files that interfere with these current directions.

If you are unable to enter the chroot partition or load Ubuntu, search the internet for help, as your Chromebook’s manufacturer or even Google’s assistance will not be able to answer your questions.

A starting point to research a solution is GitHub.


Suggest a Topic

Is there a tutorial you’d like to see featured?

Email your ideas to me and I’ll consider them for a future column.

And use the Reader Comments feature below to provide your input!

Jack M. Germain

Jack M. Germain has been an ECT News Network reporter since 2003. His main areas of focus are enterprise IT, Linux and open-source technologies. He is an esteemed reviewer of Linux distros and other open-source software. In addition, Jack extensively covers business technology and privacy issues, as well as developments in e-commerce and consumer electronics. Email Jack.

6 Comments

  • joshualukehart,

    Your lengthy additional information filled in some critical gaps. From what you described, you can not install Kali Linux with the standard ISO file. The good news is it should eventually work because Kali is based on Debian Linux, which is the Linux base used with ChromeOS. The bad news is that you must create a special custom image to handle the Chromebook installation. First, I would check with tech support about the Chromebook model you have. Depending on its internal hardware, it may not be compatible.

    There is no simple, quick set of instructions I can give you for how to do this. But if you do the proper research and be persistent, you should be able to make it work. As a starting point, try searching the internet for “How do I install Kali Linux on my Chromebook?” The search results will lead to numerous YouTube videos explaining the process in detail along with other sources of information.

    Again, good luck!

  • joshualukehart, You are limited to running Linux from the internal stage device only. You can store non-application files like music and documents on the SD card if you mark the storage location in the Chromebook Files app as “share with Linux.”

    By design, the ChromeOS cannot run apps (Android or Linux) from anything but internal storage capacity. The reason relates to maintaining security on removable drives. I’m told you can do this in developer mode, but doing so does not come with directions and still makes the Chromebook vulnerable. I would not recommend that approach unless you are familiar with the architecture.

    You can change the size of the internal storage from the ChromeOS settings menu. But you might have to play around with the remaining space for the ChromeOs and Android partitions. Or you could remove the Android Partition to free up more storage space. That leaves some fiddling on your part with the 16GB drive. Opting for the 32GB internal storage option will give you more wiggle room.

    Be sure to back up your Linux partition before you experiment. You can do that from the settings menu. If something goes wrong, you can always powerwash the Chromebook to reset the ChromeOS installation. Then return to the settings menu to reinstall the Linux partition. Then try again.

    Good luck. I hope this helps.

    • thank you jack this did help me with understanding the chromeos better. So I have went ahead and put it in developer mode which I was fearful to do only because i read that there could be some criminal type ramifications from it but from further investigation it seems that there isnt and if there is then a lot of other people would be in the same boat making me think that they would have to go through a lot of resources to bring everyone to justice if that is truly the case. And i am sorry but i think i must have worded my comment wrong because i have not made a linux partition yet i only have the 32gb micro sd external right now but i have formatted it to fat32 and labled it kali linux for my project and I have the 16 gb internal storage which it looks like roughtly aroung 5gb are already being occupied by the chromeos leaving me with 9gb and some change. I would like to make myself more clear by saying that i was wondering if i made the 32gb micro sd switched over to internal storage adding the 32gb to my remainder of the 16gb that is alraedy present. The literature says that you should be able to make micro sd’s into internal storage but you will not be able to remove them after that to keep the data stored on it intact with the system as internal storage and would lose the data if removed. So i was thinking that since I have to put the chromebook in developer mode anyways to run an image from any type of external drive and I guess the micro sd is the only one that gives the option to switch from external to internal and the usb flash drives cant. Ive had my kali rolling in dual boot before on windows operating systems and also have had a persistant bootable flash drive as well to carry with me which was unfortunately stolen along with my back pack a couple laptops and many important personal paperwork and miscellaneous hardware nodes and layer one devices and cables that i used to help people in my travels with different technological computer problems. But I was wondering would it be more effective and efficient to make the micro sd internal and attempting to make a dual boot chromebook that has the advantage i guess of easily switching across the two OS almost seamless with just the hot keys to do so from what i am reading instead of attempting to boot a kali image from the micro sd on to the hp chromebook that seems new but from my understanding and investigation is actually quite older and dont recieve AUE’s any more ever since sometime in 2021. i also couldnt format the micro sd into ext4 like i wanted but only had the choices of NTFS, exfat, and fat32 before i put it into developer mode. This system actually just finished booting up into developer mode now right before i started writing this and i havent checked yet if it is true that after it is in this mode the option for ext4 filesystem formatting should be available in developer mode but again I am reading that the chromeos cant even run compatible with the ext4 filesystem. So I dont understand how it will format read and write this system and run kali unless I am able to run a linux terminal to do the reading and writing benefiting from the fact that linux uses this architecture more effective and efficient benefiting from it more compared to other filesystem formats. I am so glad to read and hear that the system can be stored quite easily with the push of a button compared to other OS meaning if I mess up I can regain stability as you mentioned and informed me with confidence making me feel more reassured that i can fail and restart reasonably quickly without messing up the machine completely.. I really would like to have the benefits of this dual boot system with ease of access to both with hot keys instead of booting from an image on a external drive which I would like to make a bootable usb flashdrive with kali rolling persistent to boot on other devices excluding my phones and tablets i suppose which do have micro sd connections making me think that I could run kali rolling on those devices along with all others if i had it on a external micro sd instead of making it internal storage basically locking it in this machine not being able to remove it without ruining the kali OS.if it is even possible to do so like the claims that are being made that it can be. I am having a little trouble making the decision of which way will be the best and most rewarding when running kali and its powerful programs. I am sorry if i have worded my comment wrong before leading you to believe i had a linux partition already. But i greatly appreciate the insight and information you have given me and id still like to here more insight into this seemingly little dilemma of mine compared to what others are working on. Thank you so much and if you have any more insight id be gladly to soak it up especially if it leads me to the best most effective and efficient way to run kali rolling on my hp chromebook. GOD Bless you and have a blessed day!!!

  • If my chromebook only had 16gb of storage is that enough to run the kali rolling environment this way? Or should I add this 32gb micro sd card to the internal storage? Im really debating if it is more efficient and effective to attempt to run this distro like this or attempt to run it from the sd card itself as exrternal strorage. Please if anyone could help me in making this choice before i attempt to do this. I really almost want to just play around and see if I can do it both ways in different scenarios to increase my knowledge and hands on except Im a little worried about messing up the system and its environment making it unstable do to the fact i think this hp chromebook kip14 is older and got its final update way back in 2021. I would really appreciate any ones help and knowledge to move forward understanding how to get kali rolling on to this chromebook working at its best possible state. Thank you very much to whom this may concern. GOD Bless everyone and have a blessed day!!! I am praying for a fast response and one or multiple solutions if any at all are capable.

  • deepseajay62, thank you for your note. From the limited description you provided, it appears that you missed a key step in transitioning from ChromeOS terminal to the Crosh shell. Please look closely at Step 3. When you get to the “Welcome to Crosh” window, you then enter the command: shell and press the enter key. The screen will change slightly and you will be in the Croswh shell environment. It is there that you enter the SUDO commands. Sudo does not work in the Crosh terminal until you enter the “SHELL” window.

    I hope this solves your problem. Good Luck.

    Jack

  • I got as far as crosh> shell and enter
    but i cant use sudo so i cant get the crouton installed

    i followed the crosh tip to go into the developer shell to disable the no sudo user but the suggested command dont work there. . im stuck at that???

Leave a Comment

Please sign in to post or reply to a comment. New users create a free account.

LinuxInsider Channels