Coding and learning with VS Code on Chromebooks

December 3, 2020 by Alessandro Segala, @ItalyPaleAle

For the last few years, Chromebooks running Google Chrome OS have been providing an alternative to “traditional” laptops. Thanks to lots of choices, from very affordable models to high-end ones, Chromebooks are especially popular among students, who can use them for learning, completing assignments, and attending classes virtually.

While Chromebooks and Chrome OS are typically centered around the web browser, you can also enable a Linux environment that allows installing native desktop applications, including Visual Studio Code!

With VS Code running on your Chromebook, you can start coding easily and quickly in a variety of languages and frameworks. This includes languages such as Python, JavaScript and Node.js, Java, and C#, among many more!

In this article, the first of two, we’ll look at how to install Visual Studio Code on a Chromebook and how to set up an environment to start coding in Python or JavaScript/Node.js. In a later post, we’ll also look at how to leverage the Remote Development extensions for VS Code to connect to more powerful development environments.

What you’ll need

VS Code runs on any recent Chromebook, as long as you are able to enable Linux applications via Crostini, which we’ll look at how to do in just a moment.

Visual Studio Code is a lightweight editor, so you will be able to run it on low-powered Chromebooks, with a minimum of 1 GB of RAM. In addition, VS Code is now available for Linux on ARMv7 and ARM64, which means that you can run it on Chromebooks powered by an ARM chip as well!

For this tutorial, I’ll be using an entry-level Chromebook, with an ARM64 CPU, 4 GB of RAM, and a 32 GB-disk. Despite the modest specs, VS Code runs just fine on this machine!

Enable Linux on your Chromebook

Before we can install VS Code on Chrome OS, we need to enable support for native Linux apps, using Crostini.

First, open your system’s Settings, then look for Linux (Beta) on the sidebar. From there, turn on Linux support.

Follow the instructions on screen to configure the Linux environment (for most people, accepting the default values should be enough). Your Chromebook will then download the tools to create the Linux environment and configure it for you. Behind the scenes, this is actually creating a container running Debian 10, so you get a full Linux distribution to play with!

Once the Linux environment has been set up, you’ll see a new terminal window popping up.

Before we can install VS Code, we need to run a couple of commands in the Linux terminal. We need to update the list of Linux packages and to install the optional (but strongly recommended) dependency gnome-keyring. In the terminal, type the following two commands (press the Enter key at the end of each command to execute them):

sudo apt-get update sudo apt-get install -y gnome-keyring

The output will be similar to this:

As soon as the second command ends, you can move to the next step.

Install VS Code

We’re now ready to install VS Code!

Go to the Visual Studio Code Download page. From there, you need to pick the right package for your Chromebook:

For Chromebooks running an Intel or AMD chip, pick the .deb in variant 64 bit. If your

Continue reading

This post was originally published on this site