LOGO

Manage Crouton Linux on Chromebook - A Comprehensive Guide

February 23, 2015
Manage Crouton Linux on Chromebook - A Comprehensive Guide

Running Linux on Chromebooks with Crouton: Essential Commands

Crouton, initially developed by a Google employee, presents a streamlined method for utilizing a Linux environment on your Chromebook.

For those already leveraging Crouton, familiarity with specific commands can significantly enhance the user experience.

Installing and Managing Linux with Crouton

Previously, we detailed the process of installing Linux on a Chromebook using Crouton and demonstrated how to execute the Linux desktop within a Chrome browser window.

Crouton utilizes "chroots" as containers for the Linux systems you install. Multiple chroots can be established, allowing for diverse Linux distributions and configurations.

The following commands are instrumental in effectively working with and administering these chroots.

Understanding Chroots

A chroot creates a confined environment, isolating the Linux installation from the core Chrome OS. This ensures stability and prevents conflicts.

You can switch between different chroots to access various Linux environments without rebooting your Chromebook.

Native Linux Support in Chrome OS

It's important to note that Google has since integrated native support for Linux applications directly into Chrome OS.

This functionality is now available on a wide range of Chromebook models, eliminating the necessity for Crouton to run Linux software in many cases.

However, Crouton remains a viable option for users who prefer its specific features or require compatibility with older Chromebooks.

Key Considerations

  • Updates: Regularly update your chroots to maintain security and stability.
  • Backups: Consider backing up your chroots to prevent data loss.
  • Resource Usage: Be mindful of resource consumption when running Linux applications alongside Chrome OS.

Selecting a Target Environment in Crouton

When initiating the Crouton installation process, defining a target is a necessary step. For instance, the command "sudo sh ~/Downloads/crouton -t xfce,xiwi" will install the Xfce desktop environment alongside the components required for Chrome OS extension functionality.

A variety of targets are available for selection. These include desktop environments such as Ubuntu’s Unity, KDE, GNOME, and LXDE, as well as more lightweight options like Enlightenment.

Command-Line Targets

For users who do not require a graphical desktop interface, Crouton offers command-line only targets. These include "core" and "cli-extra," providing a minimal Linux environment.

Important Update: The installation procedure has been updated. The Crouton installer must now be relocated to the /usr/local/bin directory prior to execution. Refer to Crouton’s README file for detailed instructions.

To view a comprehensive list of available targets, execute the following command after downloading the Crouton script to your Downloads folder:

sh ~/Downloads/crouton -t help

This command will display all supported targets, allowing you to choose the environment best suited to your needs.

how-to-manage-the-crouton-linux-system-on-your-chromebook-1.jpg

Selecting a Linux Distribution and Version

Related: Utilizing a Complete Linux Desktop Environment Directly Within Your Chromebook's Browser

While Crouton defaults to Ubuntu 12.04 as its primary Linux distribution, alternative releases of Ubuntu, Debian, or Kali Linux are also installable. The desired release can be specified during Crouton execution using the `-r` flag followed by the release name. For instance, the command "sudo sh ~/Downloads/crouton -r trusty -t unity,xiwi" will establish a chroot environment featuring Ubuntu Trusty, the Unity desktop, and the necessary components for browser tab integration.

To view a comprehensive listing of available Linux distributions and their corresponding releases, execute the following command:

sh ~/Downloads/crouton -r list

This command will output a detailed list, enabling you to choose the most suitable distribution for your needs.

Understanding Release Options

The `-r` option is crucial for customizing your Crouton installation.

It allows for greater flexibility and ensures compatibility with specific software requirements.

  • Ubuntu: A popular and user-friendly distribution.
  • Debian: Known for its stability and extensive package repository.
  • Kali Linux: A distribution geared towards penetration testing and security auditing.

Selecting the appropriate release is vital for a smooth and functional Crouton experience.

Crouton Chroot Updates

Following the release of a new Crouton version, the software within your chroot environment may become outdated. Automatic updates are not performed; however, a relatively swift update process is available.

Initially, access your chroot and execute the subsequent command. This command is specifically designed to be run from within the Crouton Linux installation.

croutonversion -u -d -c

Subsequently, exit the chroot and, from the Chrome OS shell, implement the following command. Ensure you substitute "name" with the identifier of your chroot. If no name was assigned during setup, it likely corresponds to the release version initially installed, such as "trusty" or "precise."

sudo sh ~/Downloads/crouton -u -n name

This process ensures your Crouton chroot remains current with the latest software versions.

Maintaining an updated chroot is crucial for security and optimal performance.

how-to-manage-the-crouton-linux-system-on-your-chromebook-3.jpg

Chroot Encryption

During the installation of a Crouton chroot utilizing the installation script, incorporating the '-e' flag into the command initiates encryption for your chroot environment.

Alternatively, an existing chroot can be encrypted by re-executing the Crouton installer script while including the '-e' switch.

Encrypting an Existing Chroot

To both update a currently established chroot and simultaneously enable encryption, employ the identical command previously used, but ensure the inclusion of the '-e' parameter.

sudo sh ~/Downloads/crouton -u -e -n name

This command will update the chroot and then encrypt it, safeguarding the data within.

Important: Remember the encryption passphrase, as data recovery will be impossible without it.

The process ensures that your Linux environment within the Chromebook remains secure.

Establishing Multiple Chroots with Crouton

Crouton provides the functionality to establish several chroots, enabling experimentation with diverse Linux desktop environments and distributions. Should you wish to generate an additional chroot following an initial setup using Crouton, simply re-execute the Crouton installation script, incorporating the '-n' flag into the command.

For instance, the subsequent command will instantiate a new chroot designated 'testchroot', featuring the LXDE desktop environment:

sudo sh ~/Downloads/crouton -r trusty -t lxde,xiwi -n testchroot

This allows for isolated testing and use of different Linux environments without impacting the primary Crouton installation.

how-to-manage-the-crouton-linux-system-on-your-chromebook-5.jpg

Chroot Backup Procedures

To create a backup of your Crouton chroot environment, execute the following command. Remember to substitute "name" with the specific identifier of your chroot.

sudo edit-chroot -b name

This action will generate an archive containing your chroot's files within the current working directory.

Restoring a Chroot Backup

The previously created backup can be restored using this command:

sudo edit-chroot -r name

This process reinstates your chroot to its previously saved state.

Restoring During New Installation

If you are reinstalling Crouton – for example, after a powerwash of your Chromebook – you can leverage your backup file to quickly re-establish your Linux environment.

During the Crouton installation process, utilize the following command. Ensure you replace "backupfile.tar.gz" with the actual filename of your backup archive.

sudo sh ~/Downloads/crouton -f backupfile.tar.gz

The Crouton installer will then restore your chroot from the provided backup.

how-to-manage-the-crouton-linux-system-on-your-chromebook-6.jpg

Removing a Chroot Environment

Deactivating developer mode on your Chromebook initiates an automatic powerwash, effectively resetting the device to its original factory settings. This process also results in the removal of Crouton and all associated Linux chroot installations.

However, if the intention is solely to eliminate a single Linux chroot, the following command can be executed within the Chrome OS shell, substituting "name" with the specific identifier of the chroot you wish to remove.

sudo delete-chroot name

It's important to note that this command targets only the specified chroot, leaving other installations unaffected.

Source of Information

The details provided here are derived directly from the official Crouton documentation available on the Crouton GitHub page.

To ensure clarity and accessibility for our audience, we have presented this information in a more easily understandable format.

Should any command fail to function as expected, it is advisable to consult the official Crouton site for the most current and accurate documentation, as changes may have occurred.

Image attribution: TechnologyGuide TestLab, via Flickr.

#Crouton#Chromebook#Linux#dual boot#chroot#Ubuntu