0% found this document useful (0 votes)
16 views5 pages

Run Linux Programs On Chromebook With Crostini: Mental Flow

The document discusses running Linux programs on a Chromebook using Crostini, highlighting the author's experience with different setups and the advantages of Crostini, such as easy installation and Docker support. It compares the author's previous Samsung Chromebook Pro with a new HP Chromebook x360 that supports Crostini, detailing pros and cons of both devices. The document also provides a setup guide for the development environment, including installation steps for various tools like Python, Docker, and VS Code.

Uploaded by

clinysmar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
16 views5 pages

Run Linux Programs On Chromebook With Crostini: Mental Flow

The document discusses running Linux programs on a Chromebook using Crostini, highlighting the author's experience with different setups and the advantages of Crostini, such as easy installation and Docker support. It compares the author's previous Samsung Chromebook Pro with a new HP Chromebook x360 that supports Crostini, detailing pros and cons of both devices. The document also provides a setup guide for the development environment, including installation steps for various tools like Python, Docker, and VS Code.

Uploaded by

clinysmar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

8/23/24, 10:43 PM Run Linux programs on ChromeBook with Crostini

mental flow About Blog Categories Projects

Run Linux programs on ChromeBook


with Crostini
Sep 5, 2019 chromeOS development environment

I bought a Samsung ChromeBook Pro about two years ago as my coding laptop. To set up the
development environment, I tried Termux, Crouton, and Chromebrew (aka crew ), and finally
settled on crew. You can find more details in the following posts.

Termux article
Crouton and Chromebrew article

Overall I am very satisfied with ChromeOS and this Samsung device. One missing piece,
however, is Docker. (I heard it’s possible to run Docker inside Crouton with compromised
performance, but I never tried.) The good news is that Google started a project called Crostini a
few years ago to enable Linux container inside ChromeOS. It can do what Termux, Crouton, and
Crew can do. In addition,

There is no need to switch to developer mode.


We get easy installation and fast execution of Docker.

The bad news is that not all Chromebooks are supported. For example, my Samsung
ChromeBook Pro is not. However, (to my annoyance), the cheaper variants of this device, i.e.,
Samsung Chromebook Plus and Samsung Chromebook Plus V2, are both supported.

In late August, I got a deal for HP Chromebook x360 (14-da0021nr), which has Crostini support.
Compared to the Samsung device, its pros and cons are

pros
Good price: I paid $349, whereas the Samsung Chromebook Pro costed me $520 in
2017.
Intel 8th gen i3 processor + 8G memory + 64 GB storage
The 14 inch display is wide enough for 160 columns.
The keyboard is pleasant to type on and has backlit.
The speaker is slightly louder, but still not as loud as I want.
Besides two USB-C ports, there is also a USB-A port.
cons
It’s quite heavy: 3.7 pounds.
https://nosarthur.github.io/coding/2019/09/05/crostini.html 1/5
8/23/24, 10:43 PM Run Linux programs on ChromeBook with Crostini

The hinge of the screen is loose. As I move the laptop, the screen dangles.

If you are interested in buying a Chromebook to run Crostini, check out the following links

List of Crostini enabled devices


Auto Update policy for all Chromebooks: Google provides support for each Chromebook for
a limited years. After that time span, the device won’t be able to get ChromeOS upgrade.
Chrome Unboxed: This is a Youtube channel with Chromebook reviews.

In the rest of the post, I will go over the setup for the development environment. The main
pieces are

Vim 8.1
Python 3.7
Go 1.12
Docker 19.03.1
VS Code

my setup procedure
To enable Crostini, go to Settings, search for Linux (Beta) and enable it. Alternatively, it can
be accessed with this address chrome://settings/?search=linux .

After that, you will be able to access Terminal as an app. By default, the Linux distribution is
Debian 9 stretch, which you can check with

cat /etc/issue

To make the installation easier (i.e., avoid compilation), I add the following line in
/etc/apt/sources.list

deb http://ftp.de.debian.org/debian testing main

Then run

echo 'APT::Default-Release "stable";' | sudo tee -a /etc/apt/apt.conf.d/00


sudo apt-get update
sudo apt-get -t testing install python3
sudo apt-get -t testing install python3-pip
sudo apt-get -t testing install vim
sudo apt-get -t testing install texlive

https://nosarthur.github.io/coding/2019/09/05/crostini.html 2/5
8/23/24, 10:43 PM Run Linux programs on ChromeBook with Crostini

sudo apt-get -t testing install golang


sudo apt-get -t testing install golang-go.tools

It installs Python 3.7, Vim 8.1, Go 1.12, and Latex. I want Vim 8.1 because it supports
embedded terminal (try vert ter command).

The last line is to make godoc --http :8888 to work. This command has been removed
from the normal distribution package. Also go get golang.org/x/tools/cmd/godoc
probably won’t work. See this issue for details.

Docker
To install Docker, I basically followed the official installation guild for Debian. To avoid using root
(i.e., docker ... instead of sudo docker ... ), run

sudo usermod -aG docker $USER


sudo chmod 666 /var/run/docker.sock

Some Docker resources are listed here too

docker-curriculum
docker cheatsheet
Intro Guide to Dockerfile Best Practices

VS Code
Installing VS Code is simple. After downloading the installable for Debian, move it from
Downloads to Linux files (Alternatively, you can run wget or curl inside the
Terminal ). Then run

sudo dpkg -i code_1.37.1-1565886362_amd64.deb

It will show up as an app.

Github blog
I also installed jekyll to run my blog. However, the default port doesn’t work. I thus use port
8000 as it’s automatically exposed.

jekyll serve --draft -P 8000

Below is a list of the exposed ports

https://nosarthur.github.io/coding/2019/09/05/crostini.html 3/5
8/23/24, 10:43 PM Run Linux programs on ChromeBook with Crostini

// TCP ports to statically forward to the container over SSH.


const uint16_t kStaticForwardPorts[] = {
3000, // Rails
4200, // Angular
5000, // Flask
8000, // Django
8008, // HTTP alternative port
8080, // HTTP alternative port
8085, // Cloud SDK
8888, // ipython/jupyter
9005, // Firebase login
};

You can find more details in this post

“Well-known” ports are now auto-forwarded to the default penguin container on 70.0.3524.2

Tips
Open a new terminal window:
While the focus is on the terminal window, press ctrl + shift + n
Right click (or alt + left click) the ‘terminal’ logo in the status bar, and choose ‘New
Window’ (It doesn’t work every time though)
Access ChromeOS folders from Crostini terminal: Right click the folder and choose share
with Linux . It then shows up in /mnt/chromeos/ .
Stay on the stable channel. I am usually on the dev channel, and often times the bluetooth,
ear phone break. Sometimes the Chrome browser crashes every few minutes.
Do not use USB-A / USB-C converter. I think it destroyed the ports of my Samsung
Chromebook Pro.

Wish list
Multiple tab for Linux terminal
Embed the Linux app, e.g., VS Code, inside Chrome tab

Share it on →

https://nosarthur.github.io/coding/2019/09/05/crostini.html 4/5
8/23/24, 10:43 PM Run Linux programs on ChromeBook with Crostini

What do you think?


2 Responses

Upvote Funny Love Surprised Angry Sad

0 Comments 
1 Login

G Start the discussion…

LOG IN WITH OR SIGN UP WITH DISQUS ?

Name

 Share Best Newest Oldest

Be the first to comment.

Subscribe Privacy Do Not Sell My Data

2016-2024 © Dong Zhou nosarthur ▲


nosarthur

https://nosarthur.github.io/coding/2019/09/05/crostini.html 5/5

You might also like