Beleyenv
A dev-focused, idempotent system bootstrap script for ChromeOS's officially supported Linux container. Designed for me, but flexible enough for you to use too!
Install / Use
/learn @cbeley/BeleyenvREADME
Beleyenv

WARNING: I no longer actively use ChromeOS. I'm now using a mix of MacOS and Ubuntu. Your mileage may vary trying to use these scripts for ChromeOS. Ultimately, much of this is very personalized to my own use-cases, but there still may be things of interest in here for others.
Beleyenv is a series of scripts to quickly bootstrap a very opinionated developer-centric environment for ChromeOS's officially supported Debian-based Linux container (Crostini). However, while it is primarily to bootstrap a newly created container, it is 100% idempotent. You can re-run the script (or any of the individual ones) as many times as you want, with the only side-effect being that packages will be updated if a newer one is available. Beleyenv was also designed to make minimal changes to the container to ensure that ChromeOS is still able to manage the container automatically. It is possible to run alternate distributions or switch to Debian's testing or unstable channels, but it is not supported by ChromeOS and you'll likely run into problems down the road.
First and foremost, Beleyenv was created to bootstrap and maintain my personal set-up in a reproducible way. However, the project has been designed to be easily used by others either as-is or with small modifications. Any files containing sensitive information are encrypted in this repo (for example config.json). However, sample replacements or ways to disable features relying on encrypted files are provided and enabled by default.
What Beleyenv Gets You
This is not a complete list, but includes the interesting things. Start reading from index.sh to get the full story.
- Automatic incremental daily home backups via Borg
- Complete with status notifications that will show up along-side all your other chromeOS notifications!
- Automatic backup rotation
- Read more about how to set this up here
- Latest Kitty Terminal
- There are no up to date Debian packages for kitty, so Beleyenv has custom scripts to retrieve the latest kitty, install it globally, and ensure the icon is properly configured.
- FYI, kitty is very fast -- much faster than the ChromeOS terminal app.
- A comprehensive Zsh set-up, configured in an opinionated way
- Oh My Zsh
- Powerlevel10k
- The best mono-space font, Fantasque Sans Mono, patched with Nerd Fonts for an amazing icon-rich terminal experience.
lsis aliased to lsd, which takes advantage of nerd font's added icons.- Todo.txt-cli
- Powerlevel10k plugin for it is also enabled.
- ChromeOS Alt-+ (The maximize/minimize keyboard shortcut)
- Configures Sommolier to allow ChromeOS to handle the Alt-+ shortcut.
- Note that Crostini by default now forwards the other window management shortcuts to ChromeOS.
- Dark Theme
- Installs the Adapta Nokto theme
- Theme set up to work to the full extent possible with both qt and gtk.
- Crostini's Sommelier is configured to make X apps use a title-bar color that matches Adapta Nokto
- Sublime Text
- Automatic license file installation if you added it to
config.json. - Also includes Sublime Merge, but I'm still evaluating whether I want to purchase it or not, so no automatic license installation yet.
- Automatic license file installation if you added it to
- Docker
- Automatically configured for use without sudo.
- Steam
- To not break my rule of making major system changes, it is installed via flatpak
- Overall I've had good luck with flatpak and steam. Your millage may vary for some games. Installing steam directly involves making some significant system changes that may cause issues down the road for you.
- You may need to do the following:
- Uncomment the GDK_SCALE change in index.sh if you have a low DPI screen.
- Disable hardware accelerated web frames in the steam preferences. It performed better for me with it off.
- Systemd journald tweaks
- By default, the Crostini container saves no logs to disk. This also makes it impossible for users to view logs for their user's systemd services. Beleyenv turns logging to disk back on.
- This may be undesirable if your Chromebook has limited storage.
- The Fuck: One of the most useful CLI tools ever.
- Latest Node 12.x.x via the NodeSource repo
- Includes latest Yarn from the official Yarn repo
Why make this public?
Apart from acting as an inspiration for setting up your own Linux environment on ChromeOS and overall just being an interesting project, I wanted to demonstrate how far Crostini has gotten. Crostini is built into ChromeOS and can be turned on with the click of a button. It can also be destroyed and re-created just as easily. Once it's enabled, all your Linux apps show up alongside your Android and ChromeOS apps. When opening a file, the open with dialog will show you options from your Linux environment and the application launcher shows all applications, regardless of their environment. Also, with the inclusion of new quality of life features in ChromeOS such virtual desks, it's quickly becoming my new favorite OS for overall software development (Though, it's not quite ready to replace my day-job's MacBook). I'm also a huge fan of having a real, seamlessly integrated Linux distro I can set up my environment in, but still have a stable OS as the parent that runs great on laptops and lets me run Android apps for more casual things. I still use a MacBook professionally, but I've always felt it's been more of a fight than I'd like to get my dev setup how I like, let alone keep it maintained and up to date.
A note on performance
You should still have realistic expectations about how well Linux will run for you on ChromeOS based on the hardware you have. You can't expect a cheap, low-powered Chromebook to have stellar performance. I personally have the Galaxy Chromebook, which everything in this repo runs extremely well on. If performance is important to you, you should consider some of the newer higher-end Chromebooks with the latest generation CPUs. Also, while the Pixelbook (my previous Chromebook) is still excellent, the newer generation CPU in the Galaxy Chromebook and other newer laptops completely blows it out of the water performance-wise.
Security Implications
Beleyenv does a few things that can be considered fundamentally insecure:
- Installs apt repos from other sources
- Installs non-Debian package managers (ie: flatpak)
- Pulls latest release tarballs from github
- Executes install scripts pulled at runtime
- If you run this blind, you are also trusting what I wrote
You should also remember that ChromeOS's Debian container has no root password and that sudo does not prompt (I'm considering changing this behavior with Beleyenv).
Ultimately, there is a balance between security and convenience. You should do your own diligence and decide what level of security is required for you. Investigating Beleyenv's source code as well as the scripts it pulls down is a good start.
Also note that Beleyenv runs some scripts by doing curl x | bash. This is something I may adjust, but you should be aware that even if you download it to inspect ahead of time, that it may be possible for the remote server to detect whether you are downloading the file vs. piping it into bash. See Detecting the use of "curl | bash" server side
Quick Start
This will give you my opinionated set-up on your Chromebook. You'll likely want to read further down, fork this repo, then adjust it to your liking. However, it has been designed to be able to run by default without relying on any of the encrypted configuration in this repo.
WARNING: If you do not run this on a clean-setup, this script will overwrite any existing configuration that Beleyenv manages without warning and without a backup!
- Set up Linux on your Chromebook and then launch the terminal app.
- Run
mkdir .beleyenv && cd .beleyenv && git clone https://github.com/cbeley/beleyenv.git - Run
mv sample-config.json config.json. Editconfig.jsonin your favorite editor (nano is one option:sudo apt-get install nano). You only need to updateemailandname. Everything else can be left alone. See Forking & Using Beleyenv For Your Own Profit to learn how to customize Beleyenv for your own use. - Run
./index.sh. Note that the script will open Chrome for you and navigate to Github's SSH Keys page. Your SSH key should already be in your clipboard at this point. Simply paste it in and save it if you'd like to associate your newly generated ssh key with your github account. If you don't care about doing this, you can just ignore it. - You'll recei
Related Skills
openhue
352.0kControl Philips Hue lights and scenes via the OpenHue CLI.
sag
352.0kElevenLabs text-to-speech with mac-style say UX.
weather
352.0kGet current weather and forecasts via wttr.in or Open-Meteo
casdoor
13.3kAn open-source AI-first Identity and Access Management (IAM) /AI MCP & agent gateway and auth server with web UI supporting OpenClaw, MCP, OAuth, OIDC, SAML, CAS, LDAP, SCIM, WebAuthn, TOTP, MFA, Face ID, Google Workspace, Azure AD
