Programming Locally on a Chromebook
This article will teach you how to set up the Linux environment on your Chromebook so you can program and do Codecademy off-platform projects on your Chromebook.
Do you have a Chromebook? Are you looking to write code locally or do a Codecademy off-platform project? Then you’ve come to the right place!
First, let’s start with a few questions to determine what set of instructions you should follow.
Was your Chromebook Launched Before 2019?
No, it was launched after 2019: Skip to “Setting Up Your Linux Environment” below.
Yes, it was launched before 2019: If it was launched before 2019, please check this article to see if your Chromebook is listed.
If you found your Chromebook on that list, skip to “Setting Up Your Linux Environment” below.
If you did not find your Chromebook on that list, and it was launched before 2019, unfortunately, we don’t have setup instructions for you yet! We will be creating some soon.
Setting Up Your Linux Environment
This process will involve some settings and features you may not have used before. In order to run many of your programs, we’ll need to have Linux set up so we can have access to a Linux terminal. We will use this to download languages, libraries, and IDEs (Integrated Development Environments).
Let’s get started!
- First, click on the gear icon in your taskbar to open the “Settings” menu. If you don’t see this, click on your clock to find the gear to open the “Settings” menu.
- Before we set up your Linux environment, let’s make sure your Chromebook is up to date. At the bottom of your settings menu, you’ll see an “About Chrome OS” option. Click on “About Chrome OS”. This will open a section with a “Check for updates” button. Click “Check for updates” to install any necessary updates to your computer.
- Next, near the bottom of your main settings menu, you will see a little penguin next to an option that says “Linux (Beta)”. Click the “Linux (Beta)” menu item.
- You should now see a section that says: “Linux - Run Linux tools, editors, and IDEs on your Chromebook”. Click the “Turn on” button to turn this setting on.
- A popup window will appear asking if you want to install Linux. Click the “Install” button.
- Wait while Linux installs on your computer.
- Once it completes, a Linux terminal will open on your computer.
- To finish this section, we’ll check for updates to any current packages and dependencies you have installed by typing
sudo apt-get update. On Chromebooks, we will often be using
sudo, a command meaning “superuser do”, to tell our terminal that we are the superuser and that we have permission to run this command.[email protected]:~$ sudo apt-get update
How Do I Access a File from the Terminal?
You can use your Linux terminal to access files stored in the “Linux files” section of “My files”. To move files you’ve downloaded from Codecademy into this folder there are a few steps:
- Share your “Downloads” folder with your “Linux Files” folder by right-clicking on “Downloads” and then pressing “Share with Linux”.
- Now, you can move your file to “Linux files” and it will be accessible from your terminal!
- You can also view the files in “Linux files” by going to your terminal and using the
lscommand.[email protected]:~$ ls move_me.py my_first_program.py
While there are some limitations to programming locally on your Chromebook, you can still program in many languages.
The following articles will help you set up a specific language or tool on your Chromebook: