Run Linux Programs On Chromebook With Crostini: Mental Flow
Run Linux Programs On Chromebook With Crostini: Mental Flow
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,
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
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
Then run
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
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
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
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.
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
“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
0 Comments
1 Login
Name
https://nosarthur.github.io/coding/2019/09/05/crostini.html 5/5