How To Open Linux On Chromebook

How To Open Linux On Chromebook

Reading time1 min
#Linux#Chromebook#Development#Crostini#LinuxOnChromebook#ChromebookLinux

Chromebooks with Linux: Practical Integration for Real Development

Out of the box, Chromebooks are tightly locked into Chrome OS—effective for web-centric workflows but far too limiting for anything beyond light scripting. For developers who need local compilation, version control with Git, or container builds, Crostini (Linux on Chrome OS) finally addresses most of those constraints with minimal compromise on security or stability.

Direct Use-Cases: Why Bother?

  • Onsite troubleshooting: SSH, tcpdump, nmap, or even Wireshark via GUI—all possible from a Chromebook if Linux is enabled.
  • Build/test pipeline prototypes: Python, Node.js, or Go builds can run locally without an external dev server.
  • Education/demos: Install VS Code, Gephi, or even JupyterLab for teaching or workshop purposes.

0. Prerequisite: Hardware & OS Compatibility

Not all Chromebooks offer Linux support. Certain ARM-based models, and some education-focused devices, lack Crostini. Fast check:

Settings → About ChromeOS → Check for updates

Critically, ensure Chrome OS 69 or later (practically, most features stabilize at 92+). To verify hardware, consult Google’s compatibility list.

1. Update Chrome OS (Non-Optional)

Updates regularly include kernel, container, and security enhancements. Run an explicit update:

chrome://settings/help

This triggers a version check and immediate update prompt if available.

2. Enable the Linux (Beta) Environment

Navigation:

Settings → Developers → Linux development environment → Turn On

Configure disk size—default (10 GB) is sufficient for most workflows, but image-based devs (Docker, Android Studio) should assign at least 20 GB to avoid running out during heavy builds. Username is cosmetic; feel free to set it to match your Git identity.

Installation takes 2–8 minutes depending on network and device IOPS.

3. First-Run: Terminal, Package Update, & Permissions

Open Terminal from the launcher. Expect a classic Debian shell (beyond the startup delay on lower-end eMMC storage). Immediately check and patch the environment:

sudo apt-get update && sudo apt-get upgrade -y

If you see:

W: Failed to fetch http://deb.debian.org/... Temporary failure resolving 'deb.debian.org'

Likely a proxy/network issue. Restarting the Linux container from Settings → Developers can resolve transient DNS errors.

4. Essential Build Tools

Even minimal workflows demand build utilities. Install using:

sudo apt-get install -y git build-essential curl
  • build-essential covers GCC/g++ and make.
  • curl is required for fetching scripts/binaries.

Diagnostics:

gcc --version
git --version

For JavaScript work (Node.js), avoid the apt repo’s outdated version. Instead:

curl -fsSL https://deb.nodesource.com/setup_18.x | sudo -E bash -
sudo apt-get install -y nodejs

This yields Node.js 18.x—LTS as of mid-2024.

5. Installing GUI Software

Many graphical Linux apps are supported, though 3D acceleration is experimental. Example: install Gedit, a basic graphical text editor.

sudo apt-get install -y gedit
gedit &

For VS Code (OSS build):

sudo apt-get install -y wget gpg
wget -qO- https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > microsoft.gpg
sudo install -o root -g root -m 644 microsoft.gpg /usr/share/keyrings/
echo "deb [arch=amd64 signed-by=/usr/share/keyrings/microsoft.gpg] https://packages.microsoft.com/repos/code stable main" | sudo tee /etc/apt/sources.list.d/vscode.list
sudo apt-get update
sudo apt-get install -y code
code &

If menus don’t appear in your launcher, use ln -s from /usr/share/applications/ to ~/Desktop/ for quick access.

6. File Integration—Practical Details

By default, /mnt/chromeos/MyFiles/Downloads is automatically bridged. However, for larger or persistent datasets (e.g., codebases, images), you may want to “share” custom folders:

  • Right-click any Chrome OS folder in Files
  • Select “Share with Linux”
  • Result: Folder appears under /mnt/chromeos/removable/

Note: File metadata (permissions, symlinks) may not be preserved—don’t store code repos directly on Chrome filesystem if you care about Unix permissions.

7. Known Issues, Side Effects, Mitigations

  • Disk resizing is now supported post-install (Settings → Developers → Linux → Change disk size), but still fails if Linux container is almost full (fix: clean up ~/.cache before resizing).
  • USB device forwarding: Only mass storage and some serial devices work, and not always reliably.
  • Performance: Crostini is containerized, not true dual boot. Intensive workloads (Rust builds, ML training) will hit processor throttling or RAM limits on most midrange Chromebooks.

Gotcha: System time discrepancies between Chrome OS and Linux container occasionally break container builds relying on makefile timestamps.

Final Note

Enabling Linux on Chromebooks expands their role from “browser appliances” to viable secondary engineering systems for embedded programming, devops, and quick prototyping. Edge cases remain (no systemd, restricted Docker), but for day-to-day software development, Crostini fits the bill.

Side tip: Consider aliasing apt commands in .bashrc if you routinely install the same packages across containers.

alias apt-search='apt-cache search'
alias apt-install='sudo apt-get install -y'

If you need more depth—such as custom kernel modules, access to advanced virtualization, or graphical/3D-intensive workflows—consider alternatives like a USB-booted GalliumOS, but know you’ll sacrifice the security architecture and fast suspend/resume of stock Chrome OS. Sometimes, good enough is better than perfect.