Turn your Chromebook into a .Net developer machine!
Tags: dotnet, csharp, chromeos, programming
Published: 2023-07-23 23:34:07

If you'd like to skip the intro and head straight to the step by step, click [here](#setup).

Did you know Chromebooks are present in more than half schools in the US? I'm not making that up: according to CNBC, the lightweight laptops have overtaken Apple and Windows based computers. [Source](https://www.cnbc.com/2019/03/20/apple-google-microsoft-are-battling-for-dominance-in-education.html#:~:text=In%202018%2C%20Chromebooks%20made%20up,to%20data%20from%20Futuresource%20Consulting.)

But what's a Chromebook anyway? It's a generally modest laptop that runs ChromeOS, a Linux based operating system that bases itself on the Google Chrome browser. Most applications run on the browser and the UI is very similar to Chrome itself.

Modest, you say? So could it possibly be used as a developer machine? The answer is **yes**! We're going to cover here the steps in order to setup a dev environment and start coding with a simple Chromebook!

But why would one do that, you ask. There are many reasons: maybe you've wanted to start studying software development but has been putting it off because you don't have a good computer. Maybe you have a friend or family member who wants to learn how to code but they don't have access to the latest tech. And maybe you have a Chromebook laying around anyway.

As a #dotnet developer, obviously I'm going to focus on setting up a C# development environment. But wait a minute, isn't dotnet a Windows-only endeavor??? No! And it hasn't been for quite a while. The .NET ecosystem is free, cross platform and open source. For the last decade it's been possible to build .NET apps using C# on Mac and Linux, not just on Windows.

And I'm not even getting into the job opportunities for C# developers. In a market saturated with JavaScript aspirers, there's a world of .Net systems that will continue to need developers for the foreseeable future. As usual, one of my target audiences for my articles here is the older C# developers who have been through the .Net Framework 3.5 days and may not be aware of all the new things the ecosystem has to offer these days. So come along and let's get set up!

### Setup <a name="setup"></a>

The first thing you'll need is to enable Linux in your ChromeOS. This is a really nice feature that's available to most Chromebooks made these days.  go to Settings, expand the “Advanced” menu and go to “Developers”. Then click “Turn on” to enable Linux. More details here: https://chromeos.dev/en/linux/setup


![Pretty easy to spot inside Advanced Settings](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ot1r69hfmkonoio8f4wj.png)


It'll give you access to the Linux terminal. If you've worked in a Linux based environment before, you'll feel right at home. My favorite code editor is VSCode, so let's hop over to [this page](https://code.visualstudio.com/download) and download the deb version. ChromeOS's Linux subsystem is based on the Debian system.

After it's installed, either click the icon or just type `code ` in the terminal. We're almost there! Next, I'm going to install the dotnet runtime. This is necessary in order to run our C# applications. On [this page](https://learn.microsoft.com/en-us/dotnet/core/install/linux-debian) there's all the steps, but basically we'll need to add the Microsoft package source for apt-get and run a `sudo apt-get install`.

It should be as simple as running this command:

```
wget https://packages.microsoft.com/config/debian/11/packages-microsoft-prod.deb -O packages-microsoft-prod.deb
sudo dpkg -i packages-microsoft-prod.deb
rm packages-microsoft-prod.deb
```

and then this command:

```
sudo apt-get update && \
  sudo apt-get install -y dotnet-sdk-7.0
```

If everything is working fine, you should be able to run dotnet new and create your first application on the Chromebook! It's really that simple. If you're new to the dotnet CLI, head over to my other article. I focused on older C# developers who have relied on Visual Studio and Windows for years (which was my case a few years ago) but it will be helpful for newcomers as well.



![The terminal in ChromeOS is called Penguin 🐧](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/4t8qi657fwzqu765dv6r.png)


![VSCode running in ChromeOS](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/7hr0yk24ng77jfvw69p8.png)

As always, follow me here or on [LinkedIn](https://www.linkedin.com/in/brunosilvadev/) for more tips. And let's build cool stuff!