How To Open Linux Terminal On Chromebook

How To Open Linux Terminal On Chromebook

Reading time1 min
#Linux#Chromebook#Programming#Crostini#LinuxTerminal

How To Open Linux Terminal On Chromebook: Practical Guide For Development Workflows

Linux CLI access on a Chromebook is not just a curiosity. For engineers needing *nix toolchains—compilers, git, Docker, or even SSH tunnels—the official Crostini environment bridges the gap between Chrome OS convenience and Linux workflow power. Below: practical steps, field-tested advice, and exactly where typical setups (and errors) occur when you open the Linux terminal on Chrome OS.


Typical Use Cases

  • Running standard development utilities (gcc, Python 3.11+, git, Docker CE)
  • CLI-based automation or scripting (bash, system utilities)
  • Advanced SSH usage and tunneling
  • Teaching or learning actual Linux fundamentals in a sandboxed environment

1. Verifying Hardware and OS Support

Not all Chromebooks ship with Crostini enabled—hardware from ~2019 onwards is typically supported. Chrome OS 69 or later is required, but for VS Code Remote workflows or Docker, Chrome OS 97+ is preferred due to improved VM isolation.

To check support:

  1. Clock > Settings (gear) > Search for "Linux"
  2. If "Developers" or "Linux development environment" appears, your device is supported.

Note: Some managed (enterprise) devices have Crostini disabled by admin policy. Attempting to enable will trigger errors like:

This device is managed and Linux (Beta) is disabled by your administrator.

2. Crostini Installation: Steps and Gotchas

  1. Settings > Developers > "Linux development environment" > Turn On
  2. Assign a username and set disk size (default is 7.5 GB but expandable later via “Resize” in settings; beware that hitting quota will cause random APT failures).
  3. After ~3–5 min, you should see a Terminal window. Initial prompt is usually:
    penguin@penguin:~$
    
    If the install process fails with:
    ERROR: container failed to start
    
    Reboot and retry. Disk encryption issues, or lack of free storage, are common culprits.

3. Opening The Terminal: Methods and Shortcuts

  • App Launcher > “Terminal”
    (This preinstalled shortcut is fastest)
  • For Crosh shell (Ctrl+Alt+T), note: this is a Chrome OS console. To reach bash in Linux, from Crosh, run:
    vmc start termina
    lxc exec penguin -- /bin/bash
    
    Rarely needed. Only use this route for advanced debugging, like inspecting container logs.

4. Filesystem Mapping: Chrome OS ↔ Linux

Chrome OS and Crostini run on separate filesystems. By default:

  • Chrome OS files: /mnt/chromeos/MyFiles/Downloads
  • Linux home: ~/

Practical usage:

cd /mnt/chromeos/MyFiles/Downloads
cp myfile.txt ~/

To expose other directories, right-click in Files app > “Share with Linux”. Watch out for cases where file permissions or symbolic links can cause unexpected “Permission denied” errors.


5. Initial Update and Core Tools Install

After first launch, always update base packages. Skipping this frequently causes SSL, git, or Python pip issues down the line due to outdated CA stores.

sudo apt update
sudo apt upgrade -y
sudo apt install git python3-pip build-essential

Test:

gcc --version       # Should show 10.2.1+
python3 --version   # 3.9.x or newer, depending on image version

6. Essential Terminal Commands

Some CLI commands you’ll need for day-to-day Linux work:

CommandFunctionExample Usage
pwdShow working directoryOften /home/username
ls -alList files (including hidden)Detects dotfiles, permissions
cd <dir>Change directorye.g., cd ~/projects
mkdir <dir>Make directorymkdir test_project
sudo apt install <pkg>Install new packagee.g., sudo apt install nodejs

Non-obvious:
lsof -i :<port> — quickly checks if a service is binding to a network port (useful if Docker or dev servers won’t start).


7. Known Issues and Non-Obvious Tips

  • File Integration: Certain file extensions may not open from the Files app after being edited in Crostini—reset MIME associations or use CLI xdg-open.
  • Performance: Heavy workloads (building node_modules, local Docker images) can stall low-end Chromebooks. Monitor with htop or free -m if the container becomes sluggish.
  • APT Lock Problems: If interrupted during package installs, you may see:
    Could not get lock /var/lib/dpkg/lock-frontend
    
    Resolve by killing stray APT processes or sudo rm the lock file, then rerun update.

8. Quick Practical Example: Editing and Running Python

mkdir ~/devtest
cd ~/devtest
nano test.py
# (add 'print("hello world")' and save)
python3 test.py

Sanity-checks Crostini’s Python setup and filesystem mapping.


9. Optimizing Your Setup

  • VS Code: install Remote - SSH extension; use VS Code on another workstation to connect to Crostini with port forwarding.
  • To expand the Linux container disk size after install, return to Settings > Developers > Linux, then “Resize”.

Tip:
Graphical apps (e.g., GIMP, VS Code native) now work via Crostini/XWayland, but performance is variable. For GUI development, allocate more RAM, or run code remotely.


By unlocking the Linux terminal, a Chromebook shifts from “browser only” to a legitimate lightweight development machine. Some rough edges remain—you may hit limitations versus a native Linux laptop—but for Python, web, or systems work, the Crostini stack is robust and continually improving.

For troubleshooting atypical errors, system logs are under /var/log inside the Linux container, but you may need to inspect Chrome OS side logs via crosh for hardware/device policy blockers.


For deployment workflows or more advanced Linux-on-Chromebook use, consider dual-boot solutions (via MrChromebox/Uyuni) if full device control is required. Often, though, the Crostini container is enough.