Coding on a Chromebook
Recently, I was faced with a decision — I had done away with a Mac Air laptop, and had to decide if I should go about purchasing another, or if I should give things a try on my Chromebook. At the end of the day, I need to be able to clone a repository to my local machine, make changes to the files, and then upload those changes to the remote repository on Github. For the record, this is the Chromebook that I purchased about a year and a half ago: https://www.amazon.com/gp/product/B0796681PX/ref=ppx_yo_dt_b_asin_title_o09_s00?ie=UTF8&psc=1. Honestly, I don’t have too many hours spent on this Chromebook, or on any Chromebook for that matter, so my experience is limited. That being said, I was able to purchase the computer on a sale and my records show that it only cost $188 at the time. But as I was deciding what to do about my predicament, I had to consider the pros and cons of each choice.
Pros
I prefer to use a mac.
Cons
I don’t want to spend hundreds of dollars for a used computer, let alone nearly $1000 for a new one.
With my pros and cons thought out, I decided to give coding a go on my Chromebook, and since I had a bit of trouble getting it going, I thought I would detail my steps for future reference. I am mostly concerned with getting things linked up with my Github account so I can continue to work on my personal projects, but for completion’s sake, I will start from the beginning. It’s worth mentioning that there almost certainly are different ways to achieve what I was going for, I definitely hope so — let me know if you find out a better way!
The first thing that I wanted to do was to set up a code editor. I’ve only ever really used Microsoft’s Visual Studio code, so I was pleased to find out that it is possible to install it on the notoriously limited Chromebook. To install the program, I followed the steps that are listed here: https://www.windowscentral.com/how-install-microsoft-visual-studio-code-chromebook. Any time I make what seem like big changes to the operating system of my computers, I always worry about the potential of turning my computer into an expensive paperweight, but I haven’t experienced issues yet as a result of following these instructions. Here, I should say that not all Chromebooks have the ability to enable Linux. If that’s the case for the reader, then I’d have to suggest that you stop reading at this point. It seems as though there may still be options to do things with some applications from the Andriod app store, but for me, it’s not worth getting in to since I don’t have to. From there, I was able to launch VsCode, and went about installing a few of my preferred extensions. These extensions generally aren’t required but are helpful. I would suggest doing your own research on which extensions to install, but one that I really like is called GitLens, which places a little text after your code which indicates when the line was last changed, by whom, and includes the commit message if applicable. I also rely on an extension called BracketPair Colorizer, which does exactly as the title suggests.
Next step that I wanted to take care of sooner rather than later was to set up a basic file structure, where if everything works as I hope, I can save my files to be accessed at any time. Most users of a Chromebook will not do this, as the computer is designed to integrate with the Google office suite, which saves everything via the cloud, but with Linux enabled (see link above for installing VsCode) I was able to run some terminal commands to get some basic folders set up, where I hope to be able to save my code. Specifically, in my terminal, I ran the commands “mkdir Development”, “cd Development”, “mkdir code”, and then “cd code”. The titles of the folder are really not important, and really only one folder titled something like “Development” would suffice, but I was hoping to create a faithful recreation of my setup on my beloved mac air, so that’s what I ended up going with.
However, now, with VsCode runnning, my color palettes and extensions neatly picked, comes the tricky part. First, setting up a link between my machine, and my Github account. There are a few things that I did in order to achieve this. I had thought the first thing that I would need to do would be to install Git. However, it immediately became apparent to me that I didn’t when I ran the command “git” in my terminal, and immediately received some helpful suggestions from my computer, rather than an obnoxious error message. Maybe this was something I had previously taken care of, or maybe it just comes that way out of the box. I prefer to go with the simpler explanation so installing Git was not necessary. Moving on from that, I configured my username and email by following the directions listed here: https://git-scm.com/book/en/v2/Getting-Started-First-Time-Git-Setup under the heading “Your Identity.”
At this point I thought that I might have been ready to clone a repository from my Github account, and so I went to attempt just that — I went to the repo that I wanted to work on, clicked the big green button that says “code”, and importantly, I had the tab selected that says “SSH.” The other option, “HTTPS” should also work, however I believe that choosing that option will result in having to enter a username and password for each cloned repo, whereas with the SSH option, I only really have to set it up once per machine. As I attempted to clone the repo, I received an error. Sadly, I did’t save the error message, but essentially it was telling me that I needed to set up a new SSH key on my computer/Github before proceeding. To add and then link this new SSH key there are just a few basic steps. On my Github account, I navigated to my profile settings, then selected the menu option “SSH and GPG Keys.” I clicked the big green button to add a new SSH key, and when prompted, gave it the title “Jacob’s Chromebook.” I shouldn’t have to say this, but since I like to write as if I am trying to reach a minimum word count, the title can be anything, so long as you wouldn’t be embarrassed if someone else managed to catch a glimpse of it. The site then requests that I input the SSH key, which at least for me, must be generated first. To generate my key, I followed the steps listed here: https://docs.github.com/en/free-pro-team@latest/github/authenticating-to-github/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent, being sure to look at the Linux tabs as opposed to the Mac or Windows options. I suggest reading the entire section dedicated to setting up the SSH key, as it also tells us how we can run a test to make sure that it is properly set up.
Once I had followed the steps listed above, I was able to successfully clone the repository that I was looking to edit. Moving forward, I will need to figure out how to actually run my apps locally so I can test my changes, but I decided to make an arbitrary change to a project’s Readme just to make sure that everything was working as I hoped it would be, and lo and behold, success!

Overall, I was able to follow the instructions provided to me by various sites to get this up and running, although I suspect that there is more work to be done if I actually want to be able to do anything productive on this computer, and I also think that these steps, although they worked well for me, will not work for everyone with a Chromebook. As always, let me know if I’ve missed anything, or if you have any helpful insights!