终端应用程序是Chrome 操作系统中内置的以生产力为中心的工具(productivity-focused tool built into the Chrome operating system)。它是Chrome OS(Chrome OS)设备上Linux开发环境的接入点。如果您打算在 Chromebook 上开发应用程序、安装 Linux 应用程序(install Linux apps)和其他开发工具,则需要熟悉终端(Terminal)应用程序。
本教程将重点介绍您需要了解的有关在Chromebook上设置和打开Linux 终端(Linux Terminal)的所有信息。您还将学习如何自定义终端的外观和行为。
Chrome 终端(Chrome Terminal)(Crosh)与Chromebook上的Linux 终端(Linux Terminal)
Linux 终端(Linux Terminal)不应与Chrome OS终端相混淆,后者也称为Chrome OS开发人员 shell 或“Crosh”。终端(Terminal)是一个独立的应用程序,用作在 Chromebook 上运行 Linux 命令(running Linux commands on your Chromebook)的环境。当您设置Linux开发环境时,您只能在 Chromebook 上使用该应用程序。
另一方面, Crosh(Crosh)是运行与Chrome OS相关的命令和测试的终端环境。与 Terminal 不同(Unlike Terminal),Crosh不是Google Chrome内置的独立应用程序,您可以通过网络浏览器访问它。
如何在Chromebook上打开(Chromebook)Linux 终端(Linux Terminal)
启动Linux 终端(Linux Terminal)就像在Chromebook上打开任何其他应用程序一样。这很简单,尤其是如果您在设备上设置了Linux开发环境。(Linux)
- 按Chromebook 键盘上的搜索键(Search key),在搜索框中输入终端,然后按(terminal)Enter。
- 如果您尚未在Chromebook上设置(Chromebook)Linux开发环境,系统会提示您这样做。选择下一步(Next)继续。
您还可以从Chrome OS设置菜单安装Linux开发环境。转到设置(Settings)>开发人员(Developers)>点击“Linux开发环境”选项旁边的打开按钮。(Turn on)
请注意,在Chromebook(Chromebook)上设置Linux开发环境需要互联网连接。为确保设置不间断,请检查环境将从您的数据计划中消耗的估计数据量。
- 输入首选用户名,该用户名必须以小写字符或下划线开头,选择推荐的磁盘大小(recommended disk size),然后选择安装(Install)。
等待(Wait)您的Chromebook下载设置Linux环境所需的虚拟机和其他资源,这可能需要几分钟或几小时,具体取决于您的连接速度。安装Linux环境后,您的Chromebook应该会自动启动终端(Terminal)应用程序。
如果应用启动器中缺少终端(Terminal),则您设备的操作系统很可能已过时。Linux开发环境 ( Beta ) 仅适用于运行Chrome OS 69或更高版本的Chromebook 。(Chromebooks)在您的设备上安装最新的Chrome OS版本并检查终端(Terminal)现在是否在启动器中可用。
转到设置(Settings)>关于 Chrome 操作系统(About Chrome OS),然后选择检查更新(Check for updates)。
终端(Terminal)可能不在应用启动器中,因为您的 Chromebook 的硬件不支持Linux ( Beta ) 环境。2019 年(及以后)推出的(Chromebooks launched in 2019 (and later))所有Chromebook 都支持Linux。但是,只有少数2019 年之前推出的Chrome设备支持(Chrome)Linux环境。
如果您有 2019 年之前的Chromebook,请查看此Chromium 项目文档(Chromium Projects documentation)以检查您的设备是否与 Linux 兼容。
Chromebook Linux 终端提示(Chromebook Linux Terminal Tips)和技巧(Tricks)
没有太多Chromebook用户知道,他们可以通过调整Linux 终端(Linux Terminal)的外观、鼠标和键盘行为、文本颜色、背景图像等来为其平淡无奇的图形界面增添趣味。我们在下面分享一些Linux 终端(Linux Terminal)定制和使用技巧。
1.打开多个终端选项卡(1. Open Multiple Terminal Tabs)
终端(Terminal)应用程序就像您的网络浏览器一样工作。您可以打开多个终端(Terminal)选项卡以单独运行不同的命令,而不会影响另一个。
点击plus (+) icon或右键单击活动选项卡并选择右侧的新选项卡(New tab to the right)。
2.引脚端子到架子(2. Pin Terminal to Shelf)
如果您经常使用 Linux终端,请将(Terminal)终端(Terminal)应用固定到 Chromebook 的架子上,以便在桌面上随时使用。
如果终端(Terminal)正在使用中,请右键单击架子上的应用程序图标并选择Pin。
或者,打开应用程序启动器,打开Linux 应用程序(Linux apps)文件夹,右键单击终端(Terminal),然后选择固定到架子(Pin to shelf)。
3.更改字体样式、主题和背景(3. Change Font Style, Theme, and Background)
终端(Terminal)使用带有黑色背景和白色、绿色、蓝色和红色字体颜色的深色主题。如果您觉得这种配色方案很普通,请深入研究终端(Terminal)设置菜单并个性化终端(Terminal)。
- 启动终端(Terminal),右键单击货架(Shelf)上的应用程序图标,然后选择设置(Settings)。
- 选择左侧边栏上的外观(Appearance),然后在“主题”类别中选择您喜欢的主题。
- 滚动到“背景”类别以使用不同的颜色或图像作为终端(Terminal)背景。将颜色HEX代码粘贴到对话框中,然后按Enter。
点击对话框旁边的黑色圆圈,将选择器/滑块移动到您喜欢的背景颜色,然后点击(black circle)OK。
点击“图片”行中的(Image)选择(Select)按钮,将 Chromebook 或Google Drive帐户中的照片用作终端(Terminal)背景。
- 滚动到“文本”部分并更改文本外观以修改字体类型、大小、颜色等。
- 在“光标”部分,您可以更改光标的形状、颜色并选择是否希望光标在终端(Terminal)控制台中闪烁。
- 最后,在“滚动条”部分,如果您想在浏览终端(Terminal)控制台时看到滚动条,请打开“可见”选项。(Visible)
4.修改鼠标和键盘行为(4. Modify Mouse and Keyboard Behavior)
打开终端(Terminal)设置并导航到侧边栏上的键盘和鼠标(Keyboard and mouse)选项卡以激活隐藏的键盘快捷键并配置键盘和鼠标的行为。
查看“键盘”部分并切换您喜欢的快捷键。由于您无法使用键盘快捷键在终端(Terminal)中复制和粘贴命令,我们建议启用 “Ctrl+C”和“Ctrl+V”行为。
在“复制和粘贴”部分,您可以选择自动复制所选内容或使用鼠标右键单击(或在触控板上用两指轻按)粘贴复制的内容。
Linux 终端无法在(Linux Terminal)Chromebook上打开
Chrome OS Linux开发环境仍处于早期(阅读:Beta )(Beta)阶段。这意味着并非所有与 Linux 相关的功能都能始终充分发挥作用。
如果Linux 终端(Linux Terminal)未在您的Chromebook上打开,请尝试以下故障排除建议。
1.重启Linux环境(1. Restart the Linux Environment)
如果Linux环境在后台运行不正常,您的 Chromebook 可能无法启动终端。(Terminal)重新启动Linux虚拟机以解决问题。
右键单击工具架(Shelf)或应用程序启动器中的终端图标(Terminal icon),然后选择关闭 Linux(Shut Down Linux)。
重新启动终端(Terminal)或任何Linux应用程序以重新启动Linux环境。如果这不能解决问题,请重新启动您的Chromebook。
2. 重启你的 Chromebook(2. Restart Your Chromebook)
重新启动Chrome 操作系统(Chrome OS)还可以修复阻止Linux 终端在(Linux Terminal)Chromebook上正常工作的故障。
按Alt + Shift + S并点击状态区域中的(Status)电源图标(Power icon)以关闭 Chromebook。
等待(Wait)几分钟,打开Chromebook电源,然后再次尝试打开终端(Terminal)。
3. 更新您的 Chromebook(3. Update Your Chromebook)
如前所述,Chrome操作系统中过时或错误的代码会导致某些系统应用程序无法使用。
打开设置(Settings )>关于 Chrome 操作系统(About Chrome OS)>检查更新(Check for updates)并为您的设备安装Chrome 操作系统(Chrome OS)更新。
4.重新安装Linux(4. Re-Install Linux)
如果问题仍然存在,作为最后的手段,从头开始删除并重新安装Linux开发环境。(Linux)
进入Settings > Developers > Linux development environment,点击“ Remove Linux development environment”行中的Remove,然后按照提示进行操作。
如果您对在Chromebook上打开(Chromebook)Linux 终端(Linux Terminal)有任何本文未回答的问题,请在下方发表评论或访问Chromebook 帮助中心(Chromebook Help Center)以获得Google或您的 Chromebook 制造商的支持。
How to Open the Linux Terminal on Chromebook
Τhe Terminal app is a productivity-focused tool built into the Chrome operating system. It’s the access point into the Linux development environment on Chrome OS devices. If you intend to develop apps on your Chromebook, install Linux apps and other development tools, you’ll need to get acquainted with the Terminal app.
This tutorial will highlight everything you need to know about setting up and opening the Linux Terminal on Chromebook. You’ll also learn how to customize the Terminal’s appearance and behavior.
Chrome Terminal (Crosh) vs. Linux Terminal on Chromebook
The Linux Terminal shouldn’t be confused with the Chrome OS terminal—otherwise known as the Chrome OS developer shell or “Crosh.” The Terminal is a standalone app that serves as the environment for running Linux commands on your Chromebook. You can only use the app on your Chromebook when you set up the Linux development environment.
Crosh, on the other hand, is the terminal environment for running commands and tests relating to Chrome OS. Unlike Terminal, Crosh isn’t a standalone app built into Google Chrome, and you can access it via the web browser.
How to Open Linux Terminal on Chromebook
Launching the Linux Terminal is like opening any other app on your Chromebook. It’s straightforward, especially if you have the Linux development environment set up on your device.
- Press the Search key on your Chromebook keyboard, type terminal in the search box, and press Enter.
- If you haven’t set up the Linux development environment on your Chromebook, you’ll be prompted to do so. Select Next to proceed.
You can also install the Linux development environment from the Chrome OS settings menu. Go to Settings > Developers > tap the Turn on button next to the “Linux development environment” option.
Note that setting up the Linux development environment on Chromebook requires an internet connection. To ensure an uninterrupted setup, check the estimated amount of data the environment will consume from your data plan.
- Enter a preferred username, which must start with a lowercase character or underscore, select the recommended disk size, and select Install.
Wait for your Chromebook to download the virtual machine and other resources required to set up the Linux environment, which might take a few minutes or hours, depending on your connection speed. Once you’ve installed the Linux environment, your Chromebook should automatically launch the Terminal app.
If Terminal is missing in the app launcher, your device’s operating system is most likely outdated. The Linux development environment (Beta) is only available on Chromebooks running Chrome OS 69 or newer. Install the latest Chrome OS version on your device and check if Terminal is now available in the launcher.
Go to Settings > About Chrome OS and select Check for updates.
Terminal may not be in the app launcher because your Chromebook’s hardware doesn’t support the Linux (Beta) environment. All Chromebooks launched in 2019 (and later) support Linux. However, only a few Chrome devices launched before 2019 support the Linux environment.
If you have a pre-2019 Chromebook, go through this Chromium Projects documentation to check if your device is Linux-compatible.
Chromebook Linux Terminal Tips and Tricks
Not too many Chromebook users know that they can spice up the mundane graphical interface of the Linux Terminal by tweaking its appearance, mouse and keyboard behavior, text color, background image, etc. We share some Linux Terminal customization and usage tricks below.
1. Open Multiple Terminal Tabs
The Terminal app works like your web browser. You can open multiple Terminal tabs to run different commands individually without one affecting the other.
Tap the plus (+) icon or right-click the active tab and select the New tab to the right.
2. Pin Terminal to Shelf
If you use Linux Terminal often, pin the Terminal app to your Chromebook’s shelf so it’s readily available on the desktop.
If Terminal is in use, right-click the app icon on the shelf and select Pin.
Alternatively, open the app launcher, open the Linux apps folder, right-click Terminal, and select Pin to shelf.
3. Change Font Style, Theme, and Background
Terminal uses a dark theme with a black background and white, green, blue, and red font colors. If you find this color scheme mundane, delve into the Terminal settings menu and personalize the Terminal.
- Launch Terminal, right-click the app icon on the Shelf, and select Settings.
- Select Appearance on the left sidebar and select your preferred theme in the “Theme” category.
- Scroll to the “Background” category to use a different color or image as the Terminal background. Paste the color HEX code in the dialog box and press Enter.
Tap the black circle next to the dialog box, move the selector/slider to your preferred background color, and tap OK.
Tap the Select button in the “Image” row to use a photo on your Chromebook or Google Drive account as the Terminal background.
- Scroll to the “Text” section and change the text appearance to modify the font type, size, color, etc.
- In the “Cursor” section, you can change the cursor’s shape, color and choose whether you want the cursor blinking in the Terminal console or not.
- Finally, in the “Scrollbar” section, toggle on the Visible option if you want to see the scrollbar as you navigate the Terminal console.
4. Modify Mouse and Keyboard Behavior
Open the Terminal settings and navigate to the Keyboard and mouse tab on the sidebar to activate hidden keyboard shortcuts and configure the keyboard and mouse behavior.
Review the “Keyboard” section and toggle on your preferred shortcuts. Since you can’t copy and paste commands in Terminal using keyboard shortcuts, we recommend enabling the “Ctrl+C” and “Ctrl+V” behaviors.
In the “Copy and paste” section, you can choose to automatically copy selected content or paste copied content using the mouse right-click (or 2-finger taps on the trackpad).
Linux Terminal Not Opening on Chromebook
The Chrome OS Linux development environment is still in its early (read: Beta) phase. That means not all Linux-related functionalities will adequately work all the time.
Try the troubleshooting recommendations below if the Linux Terminal isn’t opening on your Chromebook.
1. Restart the Linux Environment
Your Chromebook may not launch Terminal if the Linux environment isn’t working correctly in the background. Reboot the Linux virtual machine to fix the problem.
Right-click the Terminal icon in the Shelf or app launcher and select Shut Down Linux.
Relaunch Terminal or any Linux app to restart the Linux environment. If that doesn’t fix the problem, restart your Chromebook.
2. Restart Your Chromebook
Rebooting Chrome OS can also fix glitches preventing the Linux Terminal from working correctly on your Chromebook.
Press Alt + Shift + S and tap the Power icon in the Status area to shut down your Chromebook.
Wait for a couple of minutes, power on your Chromebook, and try opening Terminal again.
3. Update Your Chromebook
As mentioned earlier, outdated or bad code in the Chrome operating system can render some system apps unusable.
Open Settings > About Chrome OS > Check for updates and install the Chrome OS update for your device.
4. Re-Install Linux
If the problem persists, remove and re-install the Linux development environment from scratch as a last resort.
Go to Settings > Developers > Linux development environment, tap Remove in the “Remove Linux development environment” row, and follow the prompt.
If you have any questions about opening the Linux Terminal on Chromebook that this article didn’t answer, drop a comment below or visit Chromebook Help Center to get support from Google or your Chromebook manufacturer.