How To Install Linux On Chromebook

How To Install Linux On Chromebook

Reading time1 min
#Linux#Chromebook#OpenSource#Crostini#Crouton

Mastering Chromebook Freedom: Step-by-Step Guide to Installing Linux Seamlessly


Repurposing Chromebooks for legitimate development tasks comes down to one question: can it reliably run a Linux environment with usable package management, isolated networking, and a decent terminal emulator? Chrome OS provides security and simplicity, but serious engineering work requires more. Crostini (Linux (Beta)) and Crouton both bridge that gap — albeit imperfectly.


Why Run Linux on a Chromebook?

A standard Chromebook is ideal for single-user, web-centric workflows. As soon as there's a need for Python 3.11, Docker Compose v2, or a toolchain like build-essential, Chrome OS alone falls short. Native Linux opens up:

  • POSIX-compliant CLI workflows.
  • Compilation with GCC/Clang.
  • Support for libraries missing in Chrome OS, e.g., libxml2, OpenSSL, Docker Engine.
  • Proper Git SSH access, VS Code, and even exploratory ML work (albeit on meager hardware).

If you're maintaining container images, doing embedded cross-compilation, or responding to CI builds en route, these tools become indispensable.


Step 1: Confirm Chrome OS Linux Support

Verify whether your device supports Crostini:

Simple check:
Go to chrome://settingsDevelopers.
If Linux development environment is present, Crostini is supported.
If missing, the device requires Crouton or other unsupported workarounds.

Note: Nearly all Chromebooks released since 2019 support Crostini. For reference, see the official Crostini device list.


Step 2: Enable Crostini (Linux (Beta))

Minimum Chrome OS version: 89+ recommended.

  1. In system settings, find Developers → Linux development environment.
  2. Select Turn On.
  3. Allocate disk space—default is 5GB, but 10GB+ is realistic for dev workflows.
  4. Proceed; this launches a Debian 11 (bullseye) container within a VM.
  5. After setup, a terminal (vm: penguin) appears.

Known bug: Occasionally, Crostini stalls on "Setting up...". A hard reboot or Chrome OS update often resolves this.


Step 3: Base OS Update and Customization

Default Crostini uses a minimal Debian 11 userland.

sudo apt-get update
sudo apt-get dist-upgrade -y

Consider switching to buster-backports or sid if you require bleeding-edge packages, though stability will suffer.

Gotcha: Certain drivers (e.g. for audio/video acceleration) remain unavailable within Crostini. USB device passthrough is limited — Yubikeys work, but serial adapters often do not.


Step 4: Essential Development Tools

Typical stack for an engineering workflow:

sudo apt-get install git build-essential python3 python3-pip \
    docker.io openssh-client tmux htop -y
  • For Node.js:
    Use NodeSource binaries — Debian’s default Node.js version lags.
  • For advanced editors:
    • Visual Studio Code (Deb package from Microsoft):

      sudo apt-get install ./code_*.deb
      

      If dependencies are missing:

      sudo apt-get -f install
      
    • Or use flatpak for wider app availability, though integration with Chrome OS is spottier.


Step 5: GUI Applications — Trade-offs

Crostini supports X11 forwarding out-of-the-box. Performance for graphical apps is sufficient for lightweight editors and terminals (e.g., VS Code, GIMP). Do not expect flawless video playback or GPU-accelerated 3D.

To launch a GUI app (example: VS Code):

code

If $DISPLAY errors occur, restart the VM or verify that the application is in /usr/bin.


Step 6: File Integration

  • The Linux files folder maps to ~/ in Crostini.
  • Drag-and-drop via Chrome OS Files app moves files into the Linux VM.
  • Mount additional directories by right-clicking in the Files app and selecting Share with Linux.

Non-obvious tip: For large datasets or frequent builds, use external storage shared with Linux. Crostini disk allocation is fixed post-setup and resizing involves tedious lvm manipulations.


Step 7: Advanced — Crouton for Full Linux Environments

Prerequisite: Device must be in Developer Mode. This disables verified boot and wipes local data.

Install process:

  1. Enter Developer Mode:
    Esc + Refresh + Power ⟶ On prompt, Ctrl + D (all local data erased).

  2. Download Crouton:

    wget https://goo.gl/fd3zc -O ~/Downloads/crouton
    
  3. Launch Crosh (Ctrl + Alt + T), then:

    shell
    sudo sh ~/Downloads/crouton -t xfce
    
  4. Start Linux desktop with:

    sudo startxfce4
    

Trade-offs:
Crouton offers deeper hardware access and can run full desktop sessions, but reduces Chrome OS security and is more fragile after Chrome OS updates.

Known issue:
Suspend/resume can break X, requiring manual intervention (sudo restart ui).


Troubleshooting

ProblemSolution
Crostini setup stallsReboot, update Chrome OS
“No space left on device” errorResize Crostini disk or clear unused packages
Can’t access external media in CrostiniShare via Files app or remount in Crostini
Docker fails to startEnable nested virtualization if available; not supported on all models

Logs:
Check ~/.crostini.log and /var/log/syslog for errors during container startup.


Conclusions

Deploying full Linux on a Chromebook isn't perfect. Crostini is stable for lightweight builds, scripting, and non-GPU workloads. For kernel access, privileged containers, or GUI app performance, Crostini is restrictive, and Crouton introduces security liabilities. Consider the trade-offs in production software engineering.


Practical Example: CI/CD on a Chromebook
Built a staging branch using Python 3.10 and Docker Compose in Crostini, deployed test containers to Docker Hub, and pushed via Git with SSH keys stored in the Chrome OS keyring. Performance is modest but functional for iterative dev/test.


Questions? Uncovered edge cases? Input welcome below.