Unleash Your Code-Wrangling Potential with Chromebooks in 2023

The Ultimate Dev’s Choice: AndroidStudio, IntelliJ, k8, VSCode etc

Aung Baw
9 min readOct 22, 2023

Jump right into env and dev setups.

Photo by Brooke Cagle on Unsplash

Part 1 — Review

1.1 Form factor and Hardware

The Chromebook Flip C434 is a fantastic 2-in-1 laptop. With its sleek design, crisp display, and snappy performance, it’s a winner. The 360-degree hinge is a game-changer, allowing for versatile use. The long battery life keeps you going all day, and Chrome OS’s simplicity is a joy to use. Whether for work or play, the C434 is a top-notch choice.

Specs: Spangle Silver, 8GB RAM, m3–8100Y Processor 1.1 GHz. Works like a normal machine, use Alt + Tab for switching apps, and Ctrl + Tab for in-app tabs (Ctrl + Shift + T for new tab in terminal). These features may be some of the reasons to love the Chromebook, but personal preferences can vary. It ultimately depends on your specific needs and priorities —

  • The physical hinge is smart enough to detect your screen rotation and switch between the desktop and tablet experience.
  • The speakers sound similar to my old 15-inch Mac, but with poorer bass quality.

1.2 Limited Keyboard/Keys

It only have backspace and no delete button, we can do with alt + ⬅ (Backspace)

alt + ⬅ ️ (Left arrow) for page backward

alt + ➡ ️(Right arrow) for page forward

alt + ⬇ (Down arrow) for END

alt + ⬆ (Up arrow) for HOME

The worst thing is instand of useful key like play/pause, next, previous (but they decided to put page forward and backward).

Jump to the start of the line is strange 🔎 + ⬅ or 🔎 + ➡, Alt + ⬅ or Alt + ➡ also work in some apps depend upon context.

CAPS key is now your Window/CMD btn (Will get use to it after a few days).

The usual CTRL shortcuts like Ctl + A (the beginning of the line), Ctl + E (the beginning of the line), Ctl + W (delete a word in front the cursor), Ctl + L (clear the terminal) etc in terminal work seamlessly.

1.3 Pratical physical buttons

Volume: The Chromebook Flip C434 offers excellent volume levels, providing a clear and immersive audio experience for both work and entertainment.

Micro SD Card Slot: The inclusion of a micro SD card slot allows you to easily expand your storage, making it convenient for storing extra files, photos, or videos without relying solely on internal storage limitations. This flexibility can be a significant advantage, especially for those with varying storage needs.

Power button: The Chromebook Flip C434 has a power button on the side for easy access and a lock button on the top left corner.

Lock button: While the top left corner is commonly reserved for fingerprint login buttons on many PCs, the placement of the lock button provides a quick and convenient way to secure your device, ensuring your privacy and data protection. These thoughtful design choices add to the user-friendliness of the Chromebook.

1.4 Reverse patterns

Physical volume buttons: While there are many benefits to having a Pixel phone and a Chromebook in the same ecosystem, there are some downsides to consider as well. For example, the physical volume buttons may be counterintuitively placed, with the top button being “-”, which goes against the typical user expectation of having the volume increase when pressing the top button.

Trackpad’s reverse scrolling behavior: Additionally, the mouse trackpad’s reverse scrolling behavior can be initially disorienting but can be adjusted in the settings (Settings > Device > Enable reverse scrolling). These quirks may require a bit of adjustment but can be managed with settings tweaks.

1.5 Pair with your Pixels family

Owning a Pixel phone and a Chromebook within the Google ecosystem provides seamless synchronization, instant tethering, and integration with Google services, offering a consistent UI experience and cross-device app compatibility. This synergy also brings added security benefits and frequent updates, ensuring a well-rounded and convenient digital experience. Not to mention instant unlocking via Bluetooth, free Minecraft, ton of benefits.

Photo by Nathan Dumlao on Unsplash

Part 2 — Platform/Env setup

2.1 Basic env setup

To keep your Chromebook up to date, always ensure you’re running the latest Chrome OS version. Head to Play Store, select “Manage apps and devices,” and update all apps. Next, let’s install the Linux environment. Go to Settings, navigate to “Developers” (under Advanced), enable “Linux development environment” with at least 10GB of space, and set your username. We’ll determine our environment settings once the installation is complete. Once your Linux VM has booted up, you can access it from the Chrome browser using “chrome-untrusted://terminal” — pretty neat, isn’t it?

user@penguin:~$ dpkg --print-architecture
amd64

user@penguin:~$ uname -a
Linux penguin 5.15.124-20281-g306376f9e9db #1 SMP PREEMPT Sun Oct 1 18:04:00 PDT 2023 x86_64 GNU/Linux

user@penguin:~$ cat /etc/*release*
PRETTY_NAME="Debian GNU/Linux 11 (bullseye)"
NAME="Debian GNU/Linux"
VERSION_ID="11"
VERSION="11 (bullseye)"
VERSION_CODENAME=bullseye
ID=debian
HOME_URL="https://www.debian.org/"
SUPPORT_URL="https://www.debian.org/support"
BUG_REPORT_URL="https://bugs.debian.org/"

According to google it’s isolated sandbox — ¨To protect your computer, your Chromebook typically runs each app in a “sandbox.” However, all Linux apps run inside the same sandbox. This means a harmful Linux app can affect other Linux apps, but not the rest of your Chromebook.¨

What’s not supported yet (from Google)

  • Cameras aren’t yet supported.
  • Android devices are supported over USB, but other devices aren’t yet supported.
  • Android Emulators aren’t yet supported.
  • Hardware acceleration isn’t yet supported, including GPU and video decode.
  • ChromeVox is supported for the default Terminal app, but not yet for other Linux apps.

After your Chromebook restarts, we will update and upgrade our freshly installed VM (Penguin).

sudo apt update && sudo apt-get dist-upgrade -y

sudo apt install --no-install-recommends -y build-essential git gnome-keyring libssl-dev apt-transport-https ca-certificates curl gnupg2 software-properties-common libfuse2

2.2 Copying file/folder

To copy a file or folder from the Chrome OS folder to the Linux folder on your Chromebook, you can just drag and drop, Ctrl + C and Ctrl + V (Ctrl + C + Shift and Ctrl + V + Shift inside your terminal). Your Linux home directory (~) is accessible from the Chrome OS graphical user interface (GUI).

2.3 Running containers

For a lightweight container runtime on a Chromebook that doesn’t rely on VMs like Docker, consider using Podman. Podman is a container management tool that provides a Docker-compatible interface but does not require a separate virtual machine, making it a suitable choice for resource-constrained devices like Chromebooks. It allows you to run containers securely and efficiently without the overhead of a virtual machine. Podman is particularly well-suited for Chrome OS’s Linux (Crostini) environment.

If you’re looking for a k8s local setup, jump right into session 2.4. You will need a VM and a runtime. At the time of writing this article, the valid runtimes are Docker, cri-o, and containerd.

sudo apt install -y podman

podman info
ERRO[0000] cannot find UID/GID for user USERNAME: No subuid ranges found for user "USERNAME" in /etc/subuid - check rootless mode in man pages.
WARN[0000] using rootless single mapping into the namespace. This might break some images. Check /etc/subuid and /etc/subgid for adding sub*ids

Youŕe configuring a container runtime, like Podman or Docker, to control the allocation of sub-UIDs (subordinate user IDs). This is done for security and isolation reasons, and it’s closely related to how containers run with user namespaces.

sudo usermod --add-subuids 10000-75535 $(whoami)
sudo usermod --add-subgids 10000-75535 $(whoami)

sudo echo "$(whoami):10000:65536" >> /etc/subuid
sudo echo "$(whoami):10000:65536" >> /etc/subgid

podman system migrate

Read more about Rootless mode, to run a container as non-root user(read more on Privilege escalation topic) or namespaces automatically create for the user. After that we can specify container capability under /etc/containers/containers.conf like this (optional) —

default_capabilities = [
"CHOWN",
"DAC_OVERRIDE",
"FOWNER",
"FSETID",
"KILL",
"NET_BIND_SERVICE",
"SETFCAP",
"SETGID",
"SETPCAP",
"SETUID",
"SYS_CHROOT",
]

or put some registry/libary under /etc/containers/registries.conf

or simply start running some containers —

podman pull docker.io/library/nginx:alpine   # YES YOU NEED TO EXPLICT docker.io or gcr etc
podman run -d -p 8080:80/tcp nginx:alpine

2.4 Setup K8(Minikube) on Chromebook

Since it’s a Debian-based OS (version 11), you can install virtually anything. Let’s set up a mini cluster on Chrome.

[Updated] Docker CE and Minikube setup doesn’t work on Google Chromebook. Read more about the issues on 763, 6411, 10431. I also spent several hours working on it until I realized that the “Overlayfs kernel module needs to be enabled on ChromeOS.” We have two options here:

Option 1, KVM2 Driver, utilizes the Kernel-based Virtual Machine (KVM) and relies on the Linux kernel’s virtualization support to manage VMs for Minikube clusters. These VMs, where Kubernetes components run, are typically controlled using the virsh command and are usually stored in the default directory /var/lib/libvirt/images, with the option to customize the storage location during Minikube setup.

Option 2, QEMU2 Driver, employs the versatile QEMU virtualization tool to create VMs for Minikube clusters. Similar to KVM2, these VMs host Kubernetes components. QEMU VMs are managed through QEMU’s command-line tools, and the storage location for VM images can vary based on your Minikube and QEMU configurations, offering flexibility in storage management.

This setup is independent of any containerization engines (such as Docker or Podman) and does not require virtual machines (VMs).

sudo apt install --no-install-recommends -y bridge-utils qemu-system-x86 qemu-system libvirt-clients libvirt-daemon-system dnsmasq

Edit this HV driver conf file “/etc/libvirt/qemu.conf”, replace with your USERNAME(whoami or echo $USER).

sudo vi /etc/libvirt/qemu.conf

user = "USERNAME"
group = "libvirt"
remember_owner = 0

Now we will copy/paste following to set up a user for working with virtualization using KVM/QEMU and libvirt on a Linux system.

sudo usermod -aG kvm $USER
sudo adduser $USER libvirt // might already in that group
groups $USER
sudo chmod 0666 /dev/kvm
sudo systemctl restart libvirtd && systemctl status libvirtd

# Checking vmx or svm
egrep -q 'vmx|svm' /proc/cpuinfo && echo yes || echo no

# Checking virt status
virt-host-validate

If we don’t see anything serious “Fail” in virt-host-validate command, we can proceed with minikube installation. And start with desire driver flag, read more about QEMU and KVM2.


curl -LO https://storage.googleapis.com/minikube/releases/latest/minikube-linux-amd64
sudo install minikube-linux-amd64 /usr/local/bin/minikube


minikube start --driver=kvm2
minikube start --driver=qemu2 // https://www.qemu.org/download/

Install kubectl.

curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl"
chmod +x kubectl
sudo mv kubectl /usr/local/bin/

kubectl create deploy hello-nginx --image=nginx:alpine
kubectl create svc clusterip hello-nginx --tcp=8080
kubectl port-forward svc/hello-nginx 8080:8080
Nginx on Minikube

Part 3 — Development Setup

3.1 Editors/IDEs

3.1.1 VSCode

wget -q https://packages.microsoft.com/keys/microsoft.asc -O- | sudo apt-key add -
sudo add-apt-repository "deb [arch=amd64] https://packages.microsoft.com/repos/vscode stable main"
sudo apt update
sudo apt install -y code

3.1.2 Neo VIM

sudo apt install -y neovim

3.1.3 Jetbrains

Download Jetbrain-toolbox for everything, send to “Linux files” > untar > run ./jetbrains-toolbox. All three code editors will be grouped under “Linux apps” on the Chromebook GUI shortcut. For all JVM-based IDEs like IntelliJ CE, UE, or Android Studio, once you open a new project, you can install the SDK via the GUI. Simply go to JDK > Add SDK > Choose from the dropdowns.

tar xvf your-downloaded-file.tar.gz 
chmod +x jetbrains-toolbox

# Make it accessible or simply run
sudo mv jetbrains-toolbox /usr/local/bin/
./jetbrains-toolbox

3.2 General/Web

Since Python 3 is already there, you can install Ruby, Go, or Node.js. It’s super easy to get up and running once you have your VSCode or IDE of choice. For example, if you download IntelliJ CE, you can automatically download Java from the GUI during setup.

python3 --version 
Python 3.9.2

# Go
sudo apt install -y go-lang

# NodeJS
sudo apt install nodejs
sudo apt install npm

# Rust
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
source $HOME/.cargo/env

3.3 Hybird App Development

3.3.1 ReactNative

Once you have set up Node.js on your Chromebook, setting up React Native is as simple as running a one-liner.

npx create-expo-app RNProject

3.3.2 Flutter

Fluter has pretty good documentation here dedicate to ChromeOS setup.

3.4 Andriod Development

As far as I’ve tested, Android development is super easy. A few glitches during Android Studio startup can be easily solved by simply restarting. There are two main methods for debugging Android apps: debugging via ADB over a network or over USB.

Andriod Studio on ChromeBook

Happy coding. If you’ve reached this far, here’s something for your curiosity, Steam on ChromeOS Beta.

--

--

Aung Baw

Focusing on security, cloud, and DevOps, I am a lifelong learner and lazy 徒弟.