1. Home
  2. Chromebook
  3. How to install visual studio code on a chromebook

How to install Visual Studio Code on a Chromebook

Visual Studio Code is an extremely popular code editor tool developed by Microsoft. Many people use it for programming. Many people don’t know it, but it is possible to use Visual Studio Code on your Chromebook. Here’s how to get it working on your system.

Enable Linux support on Chrome OS

Linux support must be enabled on your Chromebook before Chrome OS will allow you to set up Visual Studio Code. Thankfully, setting up Linux support on a Chromebook is easy. To start, click on the clock icon in the Chrome OS panel.

After selecting the clock, click on the gear icon to open up the Chrome OS Settings area. Then, find the “Advanced” section. Click on the arrow to reveal the options. Among the available options under “Advanced,” there is “Developers”. Click on it to access the Chrome OS Developers area.

Inside of the Chrome OS Developers area, locate “Linux development environment,” and click on the “turn on” button, to download and install the Chrome OS Debian Linux container. The download should be relatively quick.

When the Debian Linux container is done downloading to your Chromebook, it will launch a terminal. This terminal is used to interact with the Debian Linux container. However, you can also set up SSH connections in it to connect to servers.

With the terminal open, find “penguin,” and click on it to access the Chrome OS Debian Linux container. Then, use the apt update command to check for updates to the container.

sudo apt update

After running the apt update command, you will need to run the apt upgrade command to install any pending upgrades for the Debian Linux container on your Chromebook. These updates should be quick.

sudo apt upgrade

Once everything is up to date, you’ve got Linux running inside of your Chromebook. Enjoy!

How to install Visual Studio Code – DEB

One way to get Visual Studio Code working on your Chromebook is via the downloadable DEB package provided on the Microsoft VS Code website. To start, launch the Chrome OS terminal app. Open it by searching for “Terminal” in the Chrome OS app menu.

Once the terminal window is open, find the “penguin” option, and click on it to load up the Linux terminal interface. Then, use the wget download command to grab the latest VS Code DEB package.

wget https://az764295.vo.msecnd.net/stable/97dec172d3256f8ca4bfb2143f3f76b503ca0534/code_1.74.3-1673284829_amd64.deb

After downloading the VS Code DEB package to your Chromebook, you can install it using the apt install command.

sudo apt install ./code_1.74.3-1673284829_amd64.deb

Once the DEB package is installed on your system, you will be able to launch it on your Chromebook via the Chrome OS “Linux apps” menu.

How to install Visual Studio Code – Flatpak

Another way to install Visual Studio Code on Chrome OS is via Flatpak. The benefit to installing the program as a Flatpak versus the downloadable DEB package is that Flatpak regularly comes with updates, so you won’t have to re-download anything to get the latest VS Code features.

To get the Flatpak release of Visual Studio Code working, you will need to set up the Flatpak runtime. The runtime sits in the background on a Linux system to ensure all Flatpak programs work correctly. Open up the Chrome OS terminal, and select “penguin.”

After loading up the Linux terminal interface on your Chromebook, enter the apt install command and install the “flatpak” package. This package contains everything you need to run Flatpak apps on a Chromebook.

sudo apt install flatpak

Once the Flatpak runtime is working on the Chrome OS Linux container, you must set up the Flathub app store. Flathub is what can provide you with the Visual Studio Code app, so enabling it is important. Enable it with the command below.

flatpak --user remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo

With Flathub enabled, you can install the Visual Studio Code on your Chromebook with the following command.

Note: you may need to enable Nested containers on Chrome OS. To do it, follow these instructions.

flatpak install flathub com.visualstudio.code

How to run Visual Studio Code without installing it

A third way to use Visual Studio Code on Chrome OS is to download the standalone TarGZ from Microsoft. This method of using VS Code should only be used if both the DEB and Flatpak options fail to work.

To start, open up a terminal, and select “penguin.” Then, use the wget command to download VS Code TarGZ archive to your Chromebook.

Note: if you use an ARM Chromebook, you’ll need a different release of VSCode.

wget https://az764295.vo.msecnd.net/stable/97dec172d3256f8ca4bfb2143f3f76b503ca0534/code-stable-x64-1673285154.tar.gz

After downloading, extract it using the tar command.

tar xvf code-stable-x64-1673285154.tar.gz

With everything extracted, access the “VSCode-linux-x64” folder.

cd VSCode-linux-x64/

Finally, start VS Code right from the terminal with:

./code

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.