Javatpoint Logo
Javatpoint Logo

How to Setup Linux on Chromebook?

Chromebook allows you to access the Linux (Beta) to run Linux alongside Chrome OS. This feature enables users to run Linux applications within their Chromebook environment. To enable this functionality, you need to turn on the Linux (Beta) feature from Settings. After enabling it, you can seamlessly set up a Linux environment and can easily run Linux applications by utilizing package managers such as apt and yum. Before starting this process, let's have a glance at the basic terms, such as Chromebook and Linux; it is good to have a basic understanding before going to use Linux.

How to Setup Linux on Chromebook?

What is a Chromebook?

Chromebooks are a range of laptops and tablets that run on ChromeOS, the operating system developed by Google in 2009. Unlike other laptops, Chromebooks are specifically designed to be web-centric, focusing on simplicity, speed and security. They run ChromeOS, which is built around the Chrome browser. ChromeOS is known for its light features and for providing powerful web-based apps and other services.

In addition, you can easily get the Android apps from the Google Play Store, that allows you to access multiple applications. Chromebooks tend to be more expensive than traditional laptops and MacBooks. However, they're lightweight and offer very fast startup and performance, even on low-end hardware.

What is Linux?

Linux is a well-known open-source operating system, which means anyone can view, modify, and distribute its source code. Developers or cyber-security professionals mainly use this OS to accomplish their specific tasks. Linux became more popular in the 1990s because of its stability, security, and flexibility. Unlike other operating systems, Linux is built on the principles of free and open-source software, and other OSs do not provide this versatile feature. It is based on Unix-like architecture, which includes a robust kernel, a variety of command-line shells, and a rich ecosystem of desktop environments and applications.

Advantages of Using Linux on Chromebook

There are several advantages of using Linux on a Chromebook. Some of the benefits include:

  • To Access Numerous Software Applications: Linux OS provides lots of free and open-source software with several fascinating premium features. This softwares allows you to perform various tasks such as photo and video editing, document editing, and developing software.
  • To Get into Better Security: Linux OS is known for its security features, including stability, and is not susceptible to malware attacks.
  • Run Chromebook Without Internet: Chromebooks are well suited for web applications. If you don't have proper internet connectivity, a Chromebook might be very limiting. You can enjoy Linux on your Chromebook without having an internet connection.
  • You Can Customize Your Chromebook: ChromeOS doesn't offer many customization options. In contrast, Linux OS offers numerous options to customize it to your needs. This versatility of modifying OS helps users to develop Linux according to their needs.

Enabling Linux (Beta) in Your Chromebook?

If you are using a Chromebook, you can easily develop softwares and execute other relevant tasks. You have the option to install Linux Command Line Tools, Code Editors, and different IDEs. And you can use these tools to write code and create various apps. In Chromebook, Linux is off by default. However, you can turn it on or off anytime.

Steps to Turn on Linux (Beta)

  • On your Chromebook, at the bottom right, select the time.
  • After that, select Settings, then About ChromeOS, and then Developers.
  • Now, go to Next to 'Linux development environment', and select Turn on.
  • Next, follow the instructions which are displaying on your screen.
  • This setup can take around 10 minutes or more.
  • Now, a terminal window will open here. You have a Debian 11 environment. You can run Linux commands as well as install several tools using the APT package manager, and easily customize your shell.

Turning Off Linux (Beta)

  • At the bottom right, select the time.
  • Select Settings then About ChromeOS then Developers, and then Linux Development Environment.
  • Under 'Remove Linux development environment', select Remove.

How to Access Microphone on Linux?

In addition, you can use the microphone on your Chromebook system after enabling the Linux. To enable it, perform the steps below.

  • At the bottom right, select the time.
  • After that, select Settings.
  • Then, on the left, select Linux.
  • Now, turn on Allow Linux to access your microphone.

How to Fix Common Issues with Linux?

If you are facing issues with Linux, try the following steps:

  • Restart your Chromebook.
  • Check that your virtual machine has the latest version: Go to chrome://components in your browser. Under 'cros-termina', select Check for update. If you download an update, you might need to restart your Chromebook.
  • Update your packages: Open the Terminal app, and then run the below command.

Command:

Tip: You might need to restart your Chromebook for making changes and taking into effect. Linux automatically checks for new packages after initial setup and every 24 hours when it is running.

What Does not Support Linux in Chromebook?

  • Cameras aren't yet supported.
  • Android devices are supported only over USB, but other devices aren't.
  • Android Emulators aren't yet supported.
  • Hardware acceleration, including GPU and video decode, isn't yet supported.
  • ChromeVox is supported for the default Terminal app but not yet for other Linux apps.

Install Linux Apps Using Crostini

Crostini is a feature on Chrome OS that allows you to run Linux applications in a containerized environment which was introduced in 2018. This feature mainly expands the capabilities of Chromebooks. It enables users to utilize a wide range of Linux software and applications along with Chrome OS. It runs Linux applications in a virtualized environment within a container, which means that Linux applications are different from the main Chrome OS.

By default, Crostini comes up with a Debian-based environment. It allows you to access a wide number of Linux software packages repository through an apt package manager. You can install and run Linux applications, command line tools, and other development environments. It incorporates seamlessly with Chrome OS and allows you to launch Linux applications directly from the Chrome OS launcher. You can also use the File management apps to access Linux files and share contents between Chrome OS and Linux applications.

Crostini is especially useful for developers and those users who need access to Linux-specific tools and communities. It enables functions such as software development, coding, managing servers, accessing the command line and much more.

As a next step, we need to enable Linux (Beta) from the system's Settings, but we have already done it at the beginning. Now, we'll move on to the next step, which will require us to run some commands. Once Linux is enabled on your Chromebook, you will see the Terminal app. Open it and run the following command to update the package listings.

Command

After running the above command, run the below command again to ensure all the apps you are using on Linux are up to date.

Command

Install desired Applications

To install the desired Linux apps, run the package manager apt. For example, to install the text editor vim, the command will be:

Command

Get Linux Using Crouton

Crouton is a tool used in Chromebooks to get Linux distributions along with Chrome OS. It's a popular and easy method to increase the functionality of your Chromebook OS. Crouton works by using chroot command to create a sandbox environment within Chrome OS. It will allow you to run a entire Linux distribution like Ubuntu or Debian alongside Chrome OS.

To use Crouton, you need to enable Developer Mode on your Chromebook. Once Developer Mode is enabled, you can download the Crouton script and run it in a terminal to set up your Linux environment.

Enabling Developer Mode

To enable Developer Mode on a Chromebook, make sure to back up any important files or data stored on your Chromebook. Enabling Developer Mode will erase all local data.

  1. Enter Recovery Mode: To enter Recovery Mode, turn off your Chromebook. Once it's powered off, press and hold the Esc and Refresh keys and the Power button simultaneously after seeing the recovery screen release the keys.
  2. Enable Developer Mode: On the recovery screen, you'll see a message with a piece of information, "Chrome OS is missing or damaged." Press Ctrl + D on your keyboard. Then, press Enter to confirm when prompted. This action will initiate the transition to Developer Mode.
  3. Wait for the transition: Your Chromebook will now transition to Developer Mode. This process may take several minutes, and your Chromebook will restart during this time. You'll see a warning screen stating that OS verification is off each time you boot up your Chromebook in Developer Mode.
  4. Enable OS verification: If you want to re-enable OS verification (which is recommended for security reasons), you can do so by pressing the spacebar when prompted during boot-up. This will initiate a process that will reset your Chromebook back to its original state and disable Developer Mode.
  5. After getting to Chrome OS, download Crouton by accessing the link provided at the top of this page.
    • Subsequently, open the Chrome OS terminal by pressing Ctrl + Alt + T, then type 'shell' and hit Enter to initiate a shell session.
    • Following this, execute the provided command to copy the Crouton installer to the /usr/local/bin directory, enabling its execution:

Command

  • Then run this command to install Crouton with the XFCE desktop environment:

Command

After completing the current process, you can get into Linux by running the below command:

Command

You can also cycle between Chrome OS and Linux by pressing Ctrl + Alt + Shift + Back and Ctrl + Alt + Shift + Forward on your keyboard. You do not need to reboot your system. From the Linux desktop to Chromebook OS, you can easily choose the place where you want to stay.

If you want to go back to pure Chrome OS, shut down your laptop and restart it using the ESC and Refresh keys with the Power button. Now, insert the recovery drive you made and follow the instructions to start.

Dual Boot ChromeOS with Gallium

You can run Linux on your Chromebook using another method called Dual-Boot with Chromebook OS. This method requires making a partition your drive to successfully setup of Linux on your Chromebook OS.

However, installing Linux will require more space also this process will delete all your existing data, so it is a good idea to back up your data on a hard drive or using USB. To dual-boot Linux, you can utilize the tool named chrx. This tool installs Gallium by default. GalliumOS is a lightweight distro based on Xubuntu, which is known for its low-power Chromebook hardware. GalliumOS can be a better choice if you want a seamless OS and to operate it easily.

Before using the chrx tool, enable developer mode, as we did while installing Crueton.

You may also need to disable write protection and install custom firmware, Depending on your laptop's CPU. Go to the GalliumOS Wiki website to get right information regarding your specific laptop and what you'll need to do.

Once firmware modifications are done, use Ctrl + Alt + T keys to open the Terminal and type shell to access the Bash. After that, to install the Chromebook, run the below command:

Command

After that, the chrx will help you through partitioning your drive before rebooting. At this point, you can open the terminal and run the command again to install Linux. After finishing the setup, your Chromebook will reboot, and you can use Ctrl + L at startup to boot into your chosen Linux distro. You can use Ctrl + D to boot back into Chrome OS.

Conclusion

Installing Linux on a Chromebook is straightforward and increases the device's power. By enabling the Linux (Beta) feature in Chrome OS configuration, users can use Linux applications alongside Chrome OS for a more versatile and powerful computing environment. This configuration is especially useful for developers and advanced developers who want to harness the strengths of both application systems. Overall, adding Linux to a Chromebook greatly expands its functionality.







Youtube For Videos Join Our Youtube Channel: Join Now

Feedback


Help Others, Please Share

facebook twitter pinterest

Learn Latest Tutorials


Preparation


Trending Technologies


B.Tech / MCA