How To Use Linux On Chromebook

How To Use Linux On Chromebook

Reading time1 min
#Linux#Chromebook#Developer#Crostini#Containerization#Coding

Mastering Linux on Chromebook: Unlocking Full Developer Potential Through Containerization

Forget the myth that Chromebooks are limited browsers—discover how containerized Linux environments redefine Chromebook capabilities for serious coding, development, and system customization without dual-boot headaches.


Chromebooks have long carried the reputation of being lightweight, web-centric devices ideal mainly for browsing, streaming, or simple productivity tasks. However, with advancements in ChromeOS, particularly the integration of Linux through containerization, these devices have blossomed into powerful developer machines—at a fraction of the cost of traditional laptops.

If you’re a developer or an enthusiast looking to leverage your Chromebook for serious coding, system customization, or software testing, this post will guide you step-by-step through setting up and mastering Linux on your Chromebook using containerization.


Why Use Linux on Chromebook?

Traditional developer workflows often require a Linux environment due to the wide availability of programming tools, native command-line interfaces, and open-source software. Prior to containerized Linux, developers relied on cumbersome dual-boot setups like Crouton or chroot environments, which were less secure and less stable.

Containerized Linux on ChromeOS, known as Crostini, allows you to run Linux apps inside a lightweight virtual machine that integrates seamlessly with ChromeOS. This approach delivers:

  • Safety: Linux runs isolated from ChromeOS, preventing system breaks.
  • Convenience: No rebooting or partitioning—run ChromeOS and Linux apps side-by-side.
  • Power: Full Linux shell and app compatibility to build, test, and deploy.

Step 1: Enable Linux (Beta) on Your Chromebook

Most Chromebooks released after 2019 support Linux apps using Crostini. Here’s how to activate it:

  1. Open Settings: Click the clock in the bottom-right corner, then the gear icon.
  2. Find Linux (Beta): Scroll in the sidebar or search “Linux.”
  3. Turn On: Click the “Turn On” button next to Linux (Beta).
  4. Set up username and disk size: Pick a Linux username and allocate disk space (default is about 10GB).
  5. Wait for installation: The system will download and install the container.

Once done, a Linux terminal window will open automatically.


Step 2: Update & Upgrade Your Linux Container

Always start by updating the package lists:

sudo apt update && sudo apt upgrade -y

This ensures you have the latest security patches and software versions.


Step 3: Install Developer Tools

Example 1: Set up Git and Vim

Git is essential for version control:

sudo apt install git vim -y

Verify installation:

git --version
vim --version

Example 2: Install Node.js and npm for Web Development

ChromeOS is great for front-end dev, and Linux lets you install Node.js natively:

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

Check versions:

node -v
npm -v

Example 3: Python & Pip

Most Chromebooks come with Python preinstalled, but to ensure you have pip and development headers:

sudo apt install python3 python3-pip python3-dev -y

Step 4: Use Linux IDEs and Editors

You’re not limited to terminal editors like Vim. Thanks to containerization, you can install desktop GUI Linux apps and run them seamlessly.

  • Install VS Code (official Microsoft repo or via snap)
  • Install GIMP for image editing
  • Use Firefox or Chromium browser independent from ChromeOS

Example to install VS Code:

sudo apt install wget gpg -y
wget -qO- https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > microsoft.gpg
sudo install -o root -g root -m 644 microsoft.gpg /etc/apt/trusted.gpg.d/
sudo sh -c 'echo "deb [arch=amd64] https://packages.microsoft.com/repos/vscode stable main" > /etc/apt/sources.list.d/vscode.list'
sudo apt update
sudo apt install code -y

Then launch with:

code &

Step 5: Share Files Between ChromeOS and Linux

The Linux container mounts your “Downloads” folder by default. To access other folders:

  1. Open the Files app in ChromeOS.
  2. Right-click folders you want accessible and select Share with Linux.

Now within the Linux terminal, these paths are available under /mnt/chromeos/MyFiles/.


Step 6: Use Docker for Containerization Inside Linux

You can level up by running Docker containers inside Crostini to replicate production environments or test multi-container applications.

Install Docker:

sudo apt install docker.io -y
sudo usermod -aG docker $USER
newgrp docker
docker run hello-world

If this doesn’t work immediately, Crostini supports nested containers but some configurations may be required depending on your device.


Bonus Tips for Power Users

  • Increase Linux disk size: Stop the container in Settings, then resize and restart.
  • Access Linux from ChromeOS terminal: Press Ctrl + Alt + T, type vmc start termina, then lxc exec penguin -- /bin/bash.
  • Run Linux apps directly from ChromeOS launcher: Installed Linux GUI apps appear in your app drawer.
  • Backup your container: Export the container using lxc commands or copy Linux files to Google Drive.

Summary

With containerized Linux on your Chromebook, you no longer have to settle for lightweight browser-only experiences. You can develop full-stack applications, manage Git repositories, run databases, and use powerful IDEs—all within the secure and integrated environment Crostini provides.

This transforms Chromebooks from casual-use machines into flexible development platforms without needing dual boot or complex setup.


Ready to get started? Enable Linux (Beta) on your Chromebook today, install your favorite tools, and unlock the full potential of your affordable, versatile device for serious development!

Stay tuned for my next post on Dockerizing your Chromebook Linux environment for multi-container development workflows. Happy coding!