DEV Community

Cover image for Turn your Chromebook into a .Net developer machine!
Bruno Silva
Bruno Silva

Posted on

Turn your Chromebook into a .Net developer machine!

If you'd like to skip the intro and head straight to the step by step, click here.

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

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

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

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 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 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
Enter fullscreen mode Exit fullscreen mode

and then this command:

sudo apt-get update && \
  sudo apt-get install -y dotnet-sdk-7.0
Enter fullscreen mode Exit fullscreen mode

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 🐧

VSCode running in ChromeOS

As always, follow me here or on LinkedIn for more tips. And let's build cool stuff!

Top comments (0)