尽管Chromebook(Chromebooks)附带Chrome OS,这是一种开箱即用的基于 Linux 的操作系统,但它们也可以毫无问题地运行纯正的 Linux 发行版(unadulterated Linux distributions)。事实上,您可以在同一台 Chromebook上同时运行(Chromebook)Chrome OS和另一个Linux发行版。
在本教程中,我们将向您展示如何在不影响Chrome 操作系统(Chrome OS)的情况下在Chromebook上安装(Chromebook)Linux。您还将学习如何安装内置于Chrome OS和第三方Linux发行版 ( Ubuntu )中的实验性Linux环境。(Linux)
(Install Linux Beta)在 Chromebook 上安装 Linux Beta ( Crostini )
Crostini描述了谷歌的官方项目,该项目允许Chromebook用户在不进入Chrome OS 开发者模式的情况下运行(Chrome OS Developer Mode)Linux。此功能的主要优点是您可以在安全的环境中享受基于Linux的应用程序和工具。可以将其视为在Chrome OS中运行(Chrome OS)Linux的包含虚拟机,而无需处理Linux代码和命令。
这个Linux环境得到了Google的官方支持,并且几乎不会破坏您的 Chromebook 或使其保修失效。该环境还通过沙盒((Sandboxing—one)Chromebook 内置(security features built into Chromebooks)的安全功能之一)保护环境免受恶意应用程序和文件的侵害。
在您的Chromebook(Chromebook)上安装此Linux环境取决于您设备的硬件和软件配置。并非所有较旧的Chromebook型号都支持开箱即用的Linux Beta ( Crostini ) 功能。
此外,在Chromebook上安装此(Chromebook)Linux环境需要Chrome OS 69或更高版本。前往“设置”(Settings) > “关于 Chrome 操作系统(About Chrome OS)”以检查Chrome 操作系统(Chrome OS)版本或更新 Chromebook 的操作系统。安装任何可用的更新或重新启动您的设备以完成挂起的更新。
该环境是实验性的,默认情况下是锁定的。所以,第一招就是激活Linux开发环境。将您的Chromebook连接到互联网并按照以下步骤操作:
- 启动Settings应用程序,展开Advanced类别,滚动到Developers部分,然后选择“Linux development environment ( Beta )”行上的Turn on按钮。(Turn on)
- 选择下一步(Next)继续。
- 创建用户名,选择推荐的磁盘空间,然后选择Install。
现在让我们向您展示如何在您的Chromebook(Chromebook)上安装第三方Linux发行版。
首先要做的事(First Things First):创建恢复(Recovery)驱动器
尽管在Chromebook(Chromebook)上安装第三方Linux发行版非常简单,但在此过程中有时会出现问题。因此,我们强烈建议您使用Chromebook 恢复实用程序(Chromebook Recovery Utility)为您的设备创建备份。这需要具有至少 8GB 可用存储空间的外部存储磁盘。
- 启动 Chrome,前往Chrome网上商店的 Chromebook 恢复实用程序页面,然后选择添加到(Chromebook Recovery Utility page)Chrome(Add to Chrome)。
- 在确认提示中选择添加应用程序。(Add app)
您应该会在 Chromebook 屏幕的左下角看到下载进度。当您在通知区域中收到安装成功警报时,将具有 8GB 或更大存储空间的外部存储驱动器插入您的 Chromebook 。(Plug)
请注意,恢复实用程序将擦除驱动器上的所有数据和分区。因此,在将驱动器用作 Chromebook 的恢复磁盘之前,请确保将驱动器上的所有重要数据备份到另一台设备。
- 在应用启动器中启动Chrome 恢复实用(Chrome Recovery Utility)程序。
- 等待(Wait)应用程序准备好您的设备以进行恢复,然后选择开始(Get started)。
- 屏幕上的字母数字是 Chromebook 的型号。在提供的对话框中输入数字,然后选择(Enter)继续(Continue)继续。
- 选择您要用于创建恢复映像的媒体设备,然后选择继续(Continue)。
- 选择立即创建(Create now)按钮。
等待(Wait)实用程序下载必要的文件并将其写入恢复媒体。这可能需要几分钟或几小时,具体取决于您的Chromebook型号和Chrome 操作系统(Chrome OS)版本等因素。移除恢复驱动器会中断下载过程,因此请确保驱动器与Chromebook的USB端口紧密配合。
您还需要快速的互联网连接来下载构成恢复媒体的文件。因此,请确保您的 Chromebook 已连接到Wi-Fi或以太网(Ethernet)。
如果在安装Linux时出现问题,请关闭 Chromebook,启动进入恢复模式(按Esc +刷新(Refresh)+电源(Power)按钮),插入恢复媒体,然后按照屏幕上的说明进行操作。
在 Chromebook 中启用开发者模式
您需要让Chromebook处于开发者模式(Developer Mode)才能安装任何Linux发行版。这将清除Chromebook存储中存储的所有数据,因此请确保在激活(Chromebook)开发人员模式(Developer Mode)之前将文件备份到云或外部磁盘。
同样重要的是要声明激活开发者模式(Developer Mode)将禁用您设备上的许多内置安全功能。同样(Likewise),该操作也可能会使您的Chromebook的保修失效。关闭您的Chromebook并按照以下步骤操作。
- 按住Esc + Refresh(或F3)键并按住电源(Power)按钮。
- 当 Chromebook 显示屏上出现恢复屏幕时松开按钮。
- 忽略屏幕上的“请插入恢复U(USB)盘或 SD 卡”指令。按Ctrl + D激活开发者模式。
- 按Enter关闭操作系统验证。这将“解锁”您的Chromebook以启动非 Google 操作系统。
- 再次按Ctrl + D并等待几分钟以在启用开发人员模式的情况下启动(Developer Mode)Chromebook。
您将在屏幕上收到一条通知,告知您的Chromebook现在正在转换为开发者模式(Developer Mode)。请勿在此过程中关闭Chromebook,并确保其拥有足够的电池电量(50% 或更多)。
(Set)从头开始设置您的Chromebook ,就好像它是一台新设备一样,然后继续下一部分了解如何在您的Chromebook上安装(Chromebook)Ubuntu Linux。
(Install Ubuntu Linux)在Chromebook上(Chromebook)安装 Ubuntu Linux(使用 Crouton(Using Crouton))
通过Crouton安装(Crouton)Linux的一大优势是您无需重新启动Chromebook即可在(Chromebook)Chrome OS和Linux之间切换。您可以使用组合键或快捷键来做到这一点。此外,Linux发行版可以直接访问您的Chromebook的硬件和文件。因此,您可以切换到Linux并仍然访问在Chrome OS中创建的文件。
Crouton通过创建在Chrome OS上运行的“chroot”二进制环境来实现这一点。与 Google 的“Crostini”项目不同,Crouton提供了一个“纯”Linux环境。唯一的限制是它仅限于Ubuntu。Crouton(目前)不支持其他Linux发行版。访问GitHub 上的 Crouton 目录,(Crouton directory on GitHub)了解有关Chroot环境以及它如何为Chromebook上的(Chromebook)Ubuntu Linux发行版提供支持的更多信息。
- 下载 crouton 文件并将其保存(Download and save the crouton file)到 Chromebook 的下载(Downloads)文件中。
- 按Ctrl + Alt + T启动 Crosh — Chrome OS 的 Command Shell 环境。
- 在终端中键入或粘贴shell ,然后按(shell)Enter。
- 然后,在终端中粘贴sudo install -Dt /usr/local/bin -m 755 ~/Downloads/crouton并按Enter。该命令会将下载的面包块文本文件转换为可执行文件。
- 现在,在终端中键入或粘贴sudo crouton -t xfce并按Enter。如果您的Chromebook有触摸屏,请改为运行以下命令:sudo crouton -t touch,xfce。
这将使用XFCE在您的(XFCE)Chromebook上下载并安装(Chromebook)Ubuntu Linux软件包——这是一个快速、轻量级的桌面环境,消耗的系统资源很少。您可以使用Unity(Unity)、GNOME或LXDE等其他桌面环境在Chromebook上安装Linux。但是,建议使用XFCE,因为它要快得多。此外(Besides),Chromebook(Chromebooks)是系统资源有限的低端设备。这使得XFCE成为最合适的选择。
如果您觉得是实验性的,您可以通过在Crosh终端中运行以下命令来将Linux与其他桌面环境一起安装:(Linux)
- Unity 桌面环境:粘贴sudo crouton -t unity并按Enter。
- GNOME 桌面环境:粘贴sudo crouton -t gnome并按Enter。
- LXDE:粘贴sudo crouton -t lxde并按Enter。
安装程序将下载必要的Ubuntu软件包。确保(Make)您的Chromebook在下载和安装过程中保持连接到互联网。整个操作将需要几分钟或几小时,具体取决于您的连接速度。
- 输入首选用户名,然后按Enter。
- 输入密码并按Enter。
- 重新输入密码并按Enter继续。
当您收到“密码更新成功”消息时,您可以开始在 Chromebook 上使用Ubuntu Linux 。
按Ctrl + Alt + T启动 Crosh,在终端中输入shell,按Enter,输入/粘贴sudo startxfce4,然后按Enter。
如果Ubuntu Linux环境正在加载空白屏幕,请输入您的用户名,按Enter,输入您的密码,然后按Enter。如果问题仍然存在,请切换回Chrome OS并切换回Ubuntu。
使用键盘快捷键Ctrl + Alt + Shift + Back或Ctrl + Alt + Shift + Forward在两个操作系统之间来回切换。
(Remove)在Chromebook上(Chromebook)删除或卸载 Linux(Uninstall Linux)
Linux发行版是否会使您的设备崩溃?或者您不再想在Chromebook上运行(Chromebook)Linux。删除Linux发行版所需(Linux)要做(All)的就是禁用开发人员模式(Developer Mode)并重新启用操作系统验证。关闭Chromebook电源,在显示“操作系统验证已关闭(OFF)”的页面上按空格(Space Bar)键,然后按Enter确认操作。
这将重新启用操作系统验证并正常启动Chrome 操作系统(Chrome OS)。请注意,禁用开发者模式(Developer Mode)也会清除您 Chromebook 的数据。
How to Install a Linux Distro on Your Chromebook
Although Chromeboоks ship with Chrome OS, a Linux-based operating system, out-of-the-box, they сan also run unadulterated Linux distributions without issues. In fact, you can run Chrome OS and another Linux distro simultaneously on the same Chromebook.
In this tutorial, we’ll show you how to install Linux on a Chromebook without affecting the Chrome OS. You’ll also learn how to install the experimental Linux environment built into Chrome OS and a third-party Linux distro (Ubuntu).
Install Linux Beta (Crostini) on Chromebook
Crostini describes Google’s official project that allows Chromebook users to run Linux without entering the Chrome OS Developer Mode. The major advantage of this feature is that you get to enjoy Linux-based apps and tools in a secured environment. Think of it as a contained virtual machine for running Linux in Chrome OS without having to deal with Linux codes and commands.
This Linux environment has official support from Google and has very little chance of breaking your Chromebook or voiding its warranty. The environment is also protected from malicious apps and files through Sandboxing—one of the security features built into Chromebooks.
Installing this Linux environment on your Chromebook depends on your device’s hardware and software configurations. Not all older Chromebook models support the Linux Beta (Crostini) feature out-of-the-box.
Additionally, installing this Linux environment on Chromebook requires Chrome OS 69 or later. Head to Settings > About Chrome OS to check the Chrome OS version or update your Chromebook’s operating system. Install any available update or restart your device to finish pending updates.
The environment is experimental and locked by default. So, the first line of action is to activate the Linux development environment. Connect your Chromebook to the internet and follow these steps:
- Launch the Settings app, expand the Advanced category, scroll to the Developers section, and select the Turn on button on the “Linux development environment (Beta)” row.
- Select Next to continue.
- Create a username, select the recommended disk space, and select Install.
Now let’s show you how to install a third-party Linux distro on your Chromebook.
First Things First: Create a Recovery Drive
Although installing a third-party Linux distro on Chromebook is pretty straightforward, things can sometimes go south during the process. Therefore, we strongly advise creating a backup of your device using the Chromebook Recovery Utility. This requires an external storage disk with at least 8GB of free storage space.
- Launch Chrome, head to the Chromebook Recovery Utility page on the Chrome web store, and select Add to Chrome.
- Select Add app on the confirmation prompt.
You should see the download progress at the bottom-left corner of your Chromebook’s screen. Plug an external storage drive with 8GB or larger storage into your Chromebook when you get an installation success alert in the notification area.
Note that the recovery utility will erase all data and partitions on the drive. So, make sure you back up any important data on the drive to another device before using it as your Chromebook’s recovery disk.
- Launch the Chrome Recovery Utility in the app launcher.
- Wait for the app to prepare your device for recovery and select Get started.
- The alphanumeric digit on the screen is your Chromebook’s model number. Enter the digits in the provided dialog box and select Continue to proceed.
- Select the media device you’d like to use to create the recovery image and select Continue.
- Select the Create now button.
Wait for the utility to download and write the necessary files to the recovery media. This might take several minutes or hours depending on factors like your Chromebook model and Chrome OS version. Removing the recovery drive will interrupt the download process, so ensure the drive fits tightly in your Chromebook’s USB port.
You’ll also need a fast internet connection to download files that’ll constitute the recovery media. So, make sure your Chromebook is connected to a Wi-Fi or an Ethernet network.
If something ever goes wrong while installing Linux, shut down your Chromebook, boot into recovery mode (press Esc + Refresh + Power button), insert the recovery media, and follow the on-screen instructions.
Enable Developer Mode in Chromebook
You need to have your Chromebook in Developer Mode to install any Linux distribution. That will erase all data stored on your Chromebook’s storage, so ensure you backup your files to the cloud or an external disk before activating Developer Mode.
It’s also important to state that activating Developer Mode will disable many built-in security features on your device. Likewise, the operation might also void your Chromebook’s warranty. Power off your Chromebook and follow the steps below.
- Press and hold the Esc + Refresh (or F3) keys and hold the Power button.
- Release the buttons when a recovery screen comes on the Chromebook’s display.
- Ignore the “Please insert a recovery USB stick or SD card” instruction on the screen. Press Ctrl + D to activate Developer Mode.
- Press Enter to turn off OS verification. That will “unlock” your Chromebook to boot non-Google operating systems.
- Press Ctrl + D again and wait for a couple of minutes to boot your Chromebook with Developer Mode enabled.
You’ll get an on-screen notification that your Chromebook is now transitioning into Developer Mode. Do not turn off your Chromebook during the process and make sure it holds enough battery power (50% or more).
Set up your Chromebook from scratch as though it is a new device and proceed to the next section to learn how to install Ubuntu Linux on your Chromebook.
Install Ubuntu Linux on Chromebook (Using Crouton)
One major advantage of installing Linux via Crouton is that you don’t need to reboot your Chromebook to switch between Chrome OS and Linux. You can do that using key combinations or shortcuts. Additionally, the Linux distro has direct access to your Chromebook’s hardware and files. So you can switch to Linux and still access files created in Chrome OS.
Crouton achieves this by creating a “chroot” binary environment that runs on the Chrome OS. Unlike Google’s “Crostini” project, Crouton provides a “pure” Linux environment. The only limitation is that it is limited to Ubuntu only. Crouton (presently) doesn’t support other Linux distributions. Visit the Crouton directory on GitHub to learn more about the Chroot environment and how it powers the Ubuntu Linux distro on Chromebook.
- Download and save the crouton file to your Chromebook’s Downloads files.
- Press Ctrl + Alt + T to launch Crosh—Chrome OS’ Command Shell environment.
- Type or paste shell in the terminal and press Enter.
- Afterward, paste sudo install -Dt /usr/local/bin -m 755 ~/Downloads/crouton in the terminal and press Enter. The command will convert the downloaded crouton text file into an executable file.
- Now, type or paste sudo crouton -t xfce in the terminal and press Enter. If your Chromebook has a touchscreen, run this command instead: sudo crouton -t touch,xfce.
That’ll download and install the Ubuntu Linux package on your Chromebook using the XFCE—a fast and lightweight desktop environment that consumes low system resources. You can install Linux on your Chromebook using other desktop environments like Unity, GNOME, or LXDE. However, XFCE is recommended because it is a lot faster. Besides, Chromebooks are low-end devices with limited system resources. That makes XFCE the best-suited option.
If you’re feeling experimental, you can install Linux with other desktop environments by running the following commands in the Crosh terminal:
- Unity Desktop environment: paste sudo crouton -t unity and press Enter.
- GNOME Desktop environment: paste sudo crouton -t gnome and press Enter.
- LXDE: paste sudo crouton -t lxde and press Enter.
The installer will download the necessary Ubuntu packages. Make sure your Chromebook stays connected to the internet during the download and installation process. The entire operation will take a couple of minutes or hours depending on your connection speed.
- Type a preferred username and press Enter.
- Type a password and press Enter.
- Re-enter the password and press Enter to continue.
You can start using Ubuntu Linux on your Chromebook when you get a “password updated successfully” message.
Press Ctrl + Alt + T to launch Crosh, type shell in the terminal, press Enter, type/paste sudo startxfce4 and, press Enter.
If the Ubuntu Linux environment is loading a blank screen, type your username, press Enter, type your password, and press Enter. If the problem persists, switch back to Chrome OS and back to Ubuntu.
Use the keyboard shortcuts Ctrl + Alt + Shift + Back or Ctrl + Alt + Shift + Forward to switch back and forth between both operating systems.
Remove or Uninstall Linux On Chromebook
Is the Linux distribution crashing your device? Or you no longer want to run Linux on your Chromebook. All you need to remove the Linux distro is to disable Developer Mode and re-enable OS verification. Power off your Chromebook, press Space Bar on the page that displays “OS verification is OFF,” and press Enter to confirm the action.
That’ll re-enable OS verification and boot Chrome OS normally. Note that disabling Developer Mode will also erase your Chromebook’s data.