If you are already using MacOS, Ubuntu, or an official flavor of Ubuntu as your operating system and have Google Chrome as an installed browser, you can skip this section. Otherwise, click on the small arrow to the left of the method you would like to use below to expand that section, and then follow the installation instructions.
Please Note: We can only support the operating systems indicated above. Our instructions have been tested with MacOS, Ubuntu, and official flavors of Ubuntu. We do not recommend installing an OS that is only based on Ubuntu (like Mint, Pop!_OS, ElementaryOS, etc).
This curriculum only supports using a laptop, desktop or supported Chromebook. We cannot help you set up a developer environment on a RaspberryPi or any other device.
Installing a Virtual Machine (VM) is the easiest and most reliable way to get started creating an environment for web development. A VM is an entire computer emulation that runs inside your current Operating System (OS), like Windows. The main drawback of a VM is that it can be slow because you’re essentially running two computers at the same time. We’ll do a few things to improve its performance.
Installing a VM is a simple process. This guide uses Oracle’s VirtualBox program to create and run the VM. This program is open-source, free, and simple. What more can you ask for? Now, let’s make sure we have everything downloaded and ready for installation.
Once you have completed these instructions, you are expected to work entirely in the VM. Maximize the window, add more virtual monitors if you have them, fire up the Internet Browser in the Whisker Menu on the top left of the desktop. You should not be using anything outside of the VM while working on The Odin Project. If you feel like you have a good understanding after using the VM for a while, and or want to improve your experience, we recommend dual-booting Ubuntu, which there are instructions for below.
Windows 11 released in October 2021. VirtualBox (the program that runs your Virtual Machine) does not currently support Windows 11 as a host operating system. This means that VirtualBox may not properly install or run on Windows 11, or that you could face serious bugs that hinder performance or cause crashes. It is recommended that you remain on Windows 10 until VirtualBox is supported or consider installing Linux using Dual-Boot with the assistance of the second guide on this lesson page.
You can see the currently supported operating systems for VirtualBox hosting in this section of their documentation.
Click here and download VirtualBox for Windows hosts.
There are thousands of distributions of Linux out there, but Ubuntu is undoubtedly one of the most popular and user friendly. When installing Linux on a VM, we recommend downloading Xubuntu 20.04. Xubuntu uses the same base software as Ubuntu but has a desktop environment that requires fewer computer resources and is therefore ideal for virtual machines.
Installing VirtualBox is very straightforward. It doesn’t require much technical knowledge and is the same process as installing any other program on your Windows computer. Double clicking the downloaded VirtualBox file will start the installation process. During the installation, you’ll be presented with various options. Leave them in their default state unless you are certain about their behavior. As the software installs, the progress bar might appear to be stuck; just wait for it to finish.
Now that you have VirtualBox installed, launch the program. Once open, you should see the start screen.
Click on the “New” button to create a virtual operating system. Give it a name of “Xubuntu”, leave the “Machine Folder” as is, set the “Type” to “Linux” and be sure “Version” is set to “Ubuntu (64-bit)”. If the 64-bit option is not present, you’ll likely need to enable virtualization in your computer’s BIOS/UEFI settings. Continue by pressing “Next”, and choose the following options in the next steps:
Memory size: Use 2048 MB or more if possible. Ideally, you want this amount to be somewhere between 2048 (the recommended amount by Xubuntu) and half of your computer’s maximum memory. For example, if you have 8 GB (8192 MB respectively) of RAM, you could allocate up to 4096 MB (1024 MB to 1 GB) to your VM’s operating system. If you do not know how much RAM is available to you, please click here. If the VM runs a bit slow, try allocating more memory!
Note: Difficulty converting your GigaBytes into MegaBytes? 1 GB of RAM is equal to 1024 MB. Therefore, you can say that 8 GB = 8 x 1024 = 8192 MB.
Hard disk: Click “Create a virtual hard disk now”.
Hard disk file type: Choose the VDI (VirtualBox disk image) option.
Storage on physical hard disk: “Dynamically allocated”.
File location and size: We recommend at least 20 GB for the virtual hard disk.
After completing the last step, click the “Create” button. Your new virtual OS should now appear in the menu. With Xubuntu selected, click on the “Settings” button on the navigation bar, highlighted in red below.
Click on the “System” tab and then the “Processor” tab. Increase the Processor(s) to 2. If this screen prevents you from increasing processors, you likely need to enable virtualization in your computer’s BIOS/UEFI settings. If you have a single core processor, you will not be able to change this setting.
If you have more than one monitor, you can create additional monitors by increasing the “Monitor Count” attribute in the “Display” tab. Please be sure to increase the “Video Memory” slider until it is in the green. All other settings should remain default.
With all that complete, click “OK” to save the changes.
You cannot install Xubuntu without mounting the ISO you downloaded earlier. We will do that now. Click on the section labeled [Optical Drive] Empty to the right of the text labeled IDE Secondary Master under Storage at the main VirtualBox screen, while Xubuntu is selected. This will open up a dropdown menu, click Choose/Create a disk image….
The next window that opens, click on the Blue Circle with the Green Plus labeled Add, and locate your Xubuntu ISO file you downloaded earlier. Choose the ISO and click open.
You should now see the ISO on the Disk Selector screen. Click it and hit the Choose button at the bottom.
You can now start the VM by right clicking on the icon in the menu and by clicking the large “Start” arrow at the top.
When the VM starts up, you’ll be asked to install Xubuntu. All of the default options can be left alone, including the Installation type (“Erase disk and install Ubuntu”). It may sound dangerous, but the VM can only see the “Hard Drive” of the VM. This is the beauty of VMs: the ability to separate the physical space of your computer across many VMs. While installing, be sure to take note of the password and username you chose, we will need these later.
The rest of the installation is pretty straightforward, but if you have any questions, you can find Ubuntu’s official installation guide for Ubuntu here.
When the installation is finished and asks you to “Please remove the installation medium, then press ENTER”, simply press ENTER. No need to remove anything.
Your regular operating system (Windows in this case) is called the Host, and all other operating systems that run as VMs are called Guests. To make working in your Guest OS easier, you need to install Guest Additions. It adds useful functionality to the Guest OS, such as full-screen guest mode.
While your VM is running, do the following steps:
Software Updaterin the text field that opens up and click on the item with the same name.
ctrl + alt + tor opening the Whisker Menu and typing in Terminal (the shortcut is obviously faster).
sudo apt install linux-headers-$(uname -r) build-essential dkms. (note: You cannot copy and paste between your guest OS and host OS (Windows), so when copying these commands you need to open this page in your VM through your
Web Browserby pressing
Windows + w(the Windows key should be between the left ctrl and alt keys) or opening the Whisker Menu and typing in Web Browser.)
sudo apt install build-essentialand enter your password. Otherwise, move on to Step 9.
Ywhen it asks you to and let it finish installing. Close the terminal when it is finished.
VBoxLinuxAdditions.run. If that file is present, you can move on to step 13. If you do not see a File Manager window appear, then navigate to the desktop by minimizing all opened windows, and then double-click on the CD icon on the VM desktop. Now you can confirm that the file
VBoxLinuxAdditions.runis present. If you see that file, move on to step 13.
VBox_GAs_x.x.xwhere the x’s are the version number.
sudo ./VBoxLinuxAdditions.runand hit enter.
rebootand hitting enter in a terminal).
If you receive an error when trying to mount the Guest Additions CD image (“Unable to insert the virtual optical disk”):
Suggestion 1: Reboot your host (Windows/OSX) operating system. Afterward, ensure that there is no image file mounted in both Virtual Box as well as in the file system of the VM.
Suggestion 2: In VirtualBox Manager, while the VM is not running, select Xubuntu then click Settings. In the Storage tab, under Controller: IDE, click on VBoxGuestAdditions.iso and make sure “Live CD/DVD” is ticked. Enabling this option causes the image to not be removed upon ejection, therefore it should be removed as the final step. To do so, once you have completed the Guest Additions installation and shut down your VM, you can find the image where you enabled “Live CD/DVD”: under Controller: IDE, by selecting the blue circle dropdown on the right side of the window and clicking “Remove Disk from Virtual Drive”. It is also suggested to uncheck “Live CD/DVD” at this point.
Here are some tips to help you get started in a virtual environment:
All your work should happen in the VM. You will install everything you need for coding, including your text editor, Ruby, and Rails inside the VM. The Xubuntu installation inside of your VM also comes with a web browser pre-installed.
To install software on your VM, you will follow the Ubuntu installation instructions from inside the Xubuntu VM.
To take a screenshot (which you might need when asking for help on our Discord), you can either press the Host Key (Right Ctrl) + E or click “View -> Take Screenshot” for a full screenshot, or you can click the “Whisker Menu” and type in “Screenshot”, in which you can choose to take a screenshot of your entire screen, the current window you are on or to select a certain area to capture.
All of the development that you’ll do related to TOP will be done in the VM.
We recommend going full screen (View > Full-screen Mode) and forgetting about your host OS (Windows). For best performance, close all programs inside of your host OS when running your VM.
If you added additional monitors in the “Display” tab of your VM settings, with the VM running, clicking “View” -> “Virtual Screen 2” -> “Enable”. You can run fullscreen with multiple monitors, but it may ask for more “Video Memory”, which you should have increased when adding more monitors. Upon exiting fullscreen, your secondary display may close. You can reopen it with these instructions.
You don’t pull the plug on your everyday use computer, right? Why would you do the same to your virtual computer? When you click the X button and just close out your VM, you might as well say goodbye to your files. In this section, you’ll understand three ways you can shut off your VM.
Clicking on the Whisker Menu and clicking the power icon will give you several options on how to modify your session, including Shutting Down.
Simply enough, typing
poweroff will do in this case. Your system will immediately shutdown.
The last way to accomplish this goal of safely shutting down is by using the VM interface. Clicking on the File tab and hitting the close button (which also has a Power Icon) will bring up a popup titled “Close Virtual Machine”. This popup asks if you want to “Save the machine state”, “Send the shutdown signal”, or “Power off the machine”.
To be safe, click the “Send the shutdown signal” radio and hit OK. This will safely power down your VM and your files will not get corrupted.
Read this entire section before starting
Dual-booting provides two operating systems on your computer that you can switch between with a simple reboot. One OS will not modify the other unless you explicitly tell it to do so. Before you continue, be sure to back up any important data and to have a way to ask for help. If you get lost, scared, or stuck, we’re here to help in the Odin Tech Support chat room. Come say “Hi”!
First, you need to download the version of Ubuntu you want to install on your computer. Ubuntu comes in different versions (“flavors”), but we suggest the standard desktop Ubuntu. If you’re using an older computer, we recommend Xubuntu. Be sure to download the 64-bit version of Ubuntu or Xubuntu.
Next, follow this guide to create a bootable flash drive so that you can install Ubuntu on your hard drive. If you don’t have a flash drive, you can also use a CD or DVD.
Note: You can use this method to try out different flavors of Ubuntu if you’d like. These images allow you to try out different flavors without committing to an installation. Be aware that running the OS from a flash drive will cause the OS to be slow and can decrease the life of your flash drive.
First, you need to boot Ubuntu from your flash drive. The exact steps may vary, but in general, you will need to do the following:
For example, on a Dell computer, you would need to plug in the flash drive, reboot the computer, and press the F12 key while the computer is first booting up to bring up the boot menu. From there, you can select to boot from the flash drive. Your computer may not be exactly the same, but Google can help you figure it out.
If you would like to test out the version of Ubuntu on the flash drive, click ‘Try me’. When you have found a flavor of Ubuntu you like, click ‘Install’ and continue to the next step.
Installing Ubuntu is where the real changes start happening on your computer. The default settings are mostly perfect, but be sure to “Install Ubuntu alongside Windows” and change the allocated disk space allowed for Ubuntu to 30 GB (or more if you can).
For step-by-step instructions, please follow this installation guide from the creators of Ubuntu.
If you encounter an error requesting you to disable Intel RST while attempting to install Ubuntu, follow these instructions from Stack Exchange, specifically Choice #2. The process forces Windows to boot into safemode after you switch your motherboard storage driver to work with Ubuntu. Once it boots into Windows, the forced-on safemode is disabled and you are free to attempt an installation of Ubuntu once again.
With the recent addition of Linux (Beta), the Chrome OS platform has been opened up to the ability to install native Linux applications. If you wish to use your Chromebook to complete The Odin Project, you will need to ensure you meet a couple requirements:
Once you have successfully met both of these requirements, you should be able to follow along with the Linux instructions throughout the entire curriculum.
Note for CloudReady users
Currently there is a bug preventing CloudReady v83.4 from successfully installing Linux (Beta). This was resolved in version 85.2.
Because our lessons use Google Chrome, and Chrome/Chromium are overwhelmingly used by developers and consumers, the recommendations we make are very intentional. Look at this usage share of web browsers and see what other folks are using the most.
Choose your Operating System:
sudo apt install ./google-chrome-stable_current_amd64.deb
You can start chrome in two ways,
google-chromecommand from the terminal (Don’t worry about the messages printed in the terminal)
This section contains helpful links to related content. It isn’t required, so consider it supplemental.