How to Use Chrome OS Command Line Terminal
In this article
Accessing and using the command line terminal in Chrome OS allows advanced users to run Linux commands, manage files, troubleshoot system issues, and install development tools. This feature, powered by Crostini, enables a full Linux environment without leaving Chrome OS. With the terminal, you can use command-line tools for programming, file manipulation, network testing, and automation. Before starting, ensure your Chromebook supports Linux (most modern models do), and that you're signed in with a Google account.
What You'll Need
- A Chromebook with Chrome OS version 69 or later
- An active Google account signed into the device
- Internet connection (required for initial Linux setup)
- At least 1 GB of free storage (recommended 2+ GB for best performance)
- Administrator access (if your device is managed by a school or organization, Linux may be disabled)
Step-by-Step
- Click the system tray in the bottom-right corner of your screen (where the clock and battery icon are located).
- Click the gear icon to open Settings.
- Scroll down and click Advanced to expand advanced settings.
- Under the Developers section, click Linux development environment.
- Click Turn On. A setup dialog will appear explaining that this installs a Debian-based Linux container.
- Click Next to proceed. You can change the default storage size if needed (minimum 1 GB recommended).
- Click Install. The system will download and configure the Linux environment. This may take 5–10 minutes depending on your internet speed and device performance.
- Once installation completes, a terminal window labeled Terminal will open automatically, and a Linux folder will appear in your Files app.
- To reopen the terminal later, click the app launcher (circle icon in the bottom-left), type Terminal, and click the app icon.
- Use standard Linux commands like
ls,cd,mkdir,cat, andechoto navigate and manage files within the Linux environment. - To install software, use the
aptpackage manager. For example, runsudo apt update && sudo apt install python3to install Python 3. - To access files from Chrome OS, navigate to
/mnt/chromeos/MyDrivefor Google Drive files or/mnt/chromeos/Downloadsfor your Downloads folder. - Close the terminal by typing
exitor closing the window. Your Linux environment remains saved for next use.
Common Mistakes
- Confusing Chrome OS shell (crosh) with Linux terminal: Pressing Ctrl+Alt+T opens crosh, a limited Chrome OS shell. To access the full Linux terminal, you must enable and use the Linux development environment.
- Running GUI apps without display support: While the terminal supports command-line tools, graphical Linux apps may not work unless your Chromebook supports Linux GUI apps (most do, but performance varies).
- Editing system files outside the Linux container: The Linux environment is sandboxed. Changes made inside it do not affect Chrome OS system files, and vice versa.
- Using sudo unnecessarily: While
sudois available, avoid running commands with elevated privileges unless required. Misuse can damage the Linux container. - Ignoring storage limits: The Linux container has a fixed size. Running out of space can break software installations. Monitor usage with
df -hand resize if needed in Settings.
Tips
- Use keyboard shortcuts: Press Ctrl+Shift+T to reopen a closed terminal tab if using a browser-like interface.
- Copy and paste in terminal: Right-click to paste, or use Ctrl+Shift+V. To copy selected text, use Ctrl+Shift+C.
- Access Linux files from Chrome OS: Open the Files app and look for the Linux files section to view and edit files created in the terminal.
- Backup important data: The Linux container can be reset. Regularly back up code or configuration files to Google Drive or external storage.
- Update regularly: Run
sudo apt update && sudo apt upgradeperiodically to keep Linux software secure and up to date. - Use command history: Press the Up arrow key to cycle through previously entered commands.
Troubleshooting
If the Linux environment fails to install, first ensure your Chromebook model supports Linux apps. Check under Settings > About Chrome OS to confirm your device is on a supported list. If installation hangs, restart your Chromebook and try again. If you see an error like "Failed to start VM," go to Settings > Advanced > Developers > Linux development environment and click Remove, then reinstall.
If the terminal opens but commands don’t work, verify internet access and run sudo apt update to refresh package lists. If file permissions are denied, avoid using sudo on mounted Chrome OS files; instead, work within the Linux home directory (~/).
If the terminal app doesn’t appear after installation, search for "Terminal" in the app launcher. If still missing, disable and re-enable Linux in Settings to trigger a reinstallation of the app shortcut.
For slow performance, close other apps, ensure sufficient RAM, and avoid installing large desktop environments like GNOME or KDE unless necessary.