Linux 黑话解释：什么是 Linux 中的 GUI、CLI 和 TUI？
GUI CLI 黑话解释 TUI
![](/data/attachment/album/202011/10/092051zw3ofb365a63fahl.jpg)


当你开始使用 Linux 并关注关于 Linux 的网站和论坛时，你会经常遇到诸如 GUI、CLI 等术语，有时还会遇到 TUI。


这一章的 Linux 黑话解释简要解释了这些术语，以便你作为一个（新的）Linux 用户在使用这些缩写词时能够更好地理解上下文。


说实话，像 GUI、CLI 或 TUI 这样的术语并不是 Linux 的专属术语。这些都是通用的计算术语，你会发现在非 Linux 的讨论中也会用到它们。


### GUI - <ruby> 图形用户界面 <rt>  Graphical User Interface </rt></ruby>


这可能是你在这里最常遇到的词汇。这是因为我们专注于桌面 Linux 用户，并试图涵盖易于使用的图形化方法和应用程序。


GUI 应用程序（或图形应用程序）基本上是指任何可以与你的鼠标、触摸板或触摸屏交互的东西。有了图标和其他视觉概念，你可以使用鼠标指针来访问功能。


![GIMP：一个用于照片编辑的GUI应用程序](/data/attachment/album/202011/10/092158yxnoqgpz77g332qx.jpg)


在 Linux 上，[桌面环境](https://itsfoss.com/what-is-desktop-environment/)为你提供了与系统交互的图形界面，然后，你可以使用 GUI 应用程序，如 GIMP，VLC、Firefox、LibreOffice、文件管理器等来完成各种任务。


GUI 使普通用户的计算机使用变得更加容易，否则它将仍然是一个极客专用区。


### CLI - <ruby> 命令行界面 <rt>  Command Line Interface </rt></ruby>


CLI 基本上是一个接受输入来执行某种功能的命令行程序。基本上，任何可以在终端中通过命令使用的应用程序都属于这一类。


![apt-cache 是一个 CLI 工具，用于在基于 Debian 的系统上与 APT 缓存交互](/data/attachment/album/202011/10/092159x2r1z377u82otjzr.png)


早期的电脑与操作系统交互没有鼠标，你必须使用命令与机器互动。


如果你认为这都算困难，那你应该知道，早期的计算机甚至没有一个屏幕可以看到正在输入的东西，他们用实体的纸质打印机看到他们的输入命令。我从来没有用过这样的电脑，也没有在现实生活中看到过。我用过的最接近的东西是学习期间的单片机套件。


![](/data/attachment/album/202011/10/092334ajqr7oknn6wun7qn.jpg)


现在的 CLI 还有用吗？当然有。命令总是有它的好处，特别是当你处理操作系统的核心功能和配置时，比如设置防火墙、管理网络甚至[包管理](https://itsfoss.com/package-manager/)。


你可能会有一个基于 GUI 的应用程序来完成同样的任务，但命令可以让你更精细地访问这些功能。在一些情况下，你会发现 GUI 应用程序也会用命令（在它们的代码中使用）与操作系统交互。


![Handbrake GUI 应用程序在底层使用 FFMPEG CLI 工具](/data/attachment/album/202011/10/092209gn5cx0k03looxx45.png)


许多流行的 GUI 应用程序往往是基于 CLI 工具的。以[Handbrake](https://itsfoss.com/handbrake/) 为例。这是一个流行的开源媒体转换器，它底层使用的是 [FFMPEG 命令行](https://itsfoss.com/ffmpeg/)工具。


很明显，使用命令行工具没有图形工具那么简单。不要担心。除非你有特殊需要，否则你应该可以用图形化的方式使用 Linux 系统。然而，了解基本的 Linux 命令会有很大的帮助。


### TUI - <ruby> 终端用户界面 <rt>  Terminal User Interface </rt></ruby>（也称为<ruby> 基于文本的用户界面 <rt>  Text-based User Interface </rt></ruby>）


这是三者中最不常见的名词。TUI 基本上部分是 GUI，部分是 CLI。糊涂了吗？让我为你解释一下。


你已经知道，早期的计算机使用 CLI。在实际的 GUI 出现之前，基于文本的用户界面在终端中提供了一种非常基本的图形交互。你会有更多的视觉效果，也可以使用鼠标和键盘与应用程序进行交互。


![终端中的 nnn 文件浏览器](/data/attachment/album/202011/10/092211gwaayt5i1boiaaz9.jpg)


TUI 是基于文本的用户界面或终端用户界面的缩写。“基于文本”这个说法主要是因为你在屏幕上有一堆文本，而“终端用户界面”的说法是因为它们只在终端中使用。


TUI 的应用虽然不是那么常见，但你还是有一些的。[基于终端的 Web 浏览器](https://itsfoss.com/terminal-web-browsers/)是 TUI 程序的好例子。[基于终端的游戏](https://itsfoss.com/best-command-line-games-linux/)也属于这一类。


![CMUS 是基于终端的音乐播放器](/data/attachment/album/202011/10/092212w038002qk0hp0qgr.png)


当你在 [Ubuntu 中安装多媒体编解码器](https://itsfoss.com/install-media-codecs-ubuntu/)时，你可能会遇到 TUI，你必须接受 EULA 或做出选择。


TUI 应用程序不像 GUI 应用程序那样用户友好，它们经常会有学习曲线，但它们比命令行工具更容易使用一些。


### 最后……


TUI 应用程序通常也被认为是 CLI 应用程序，因为它们被限制在终端上。在我看来，你是否认为它们与 CLI 不同，这取决于你。


我希望你喜欢这篇 Linux 黑话解释。如果你对这个系列的主题有什么建议，请在评论中告诉我，我将在以后尽量涵盖它们。




---


via: <https://itsfoss.com/gui-cli-tui/>


作者：[Abhishek Prakash](https://itsfoss.com/author/abhishek/) 选题：[lujun9972](https://github.com/lujun9972) 译者：[wxy](https://github.com/wxy) 校对：[wxy](https://github.com/wxy)


本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译，[Linux中国](https://linux.cn/) 荣誉推出


OK
![Warp Terminal](/assets/images/warp-terminal.webp)


![Warp Terminal](/assets/images/warp-terminal.webp)

When you start using Linux and following Linux-based websites and forums, you’ll often come across terms like GUI, CLI and sometimes TUI.

This chapter of Linux Jargon Buster briefly explains these terms so that you, as a (new) Linux user, can understand the context better when these acronyms are used.

To be honest, the terms GUI, CLI, and TUI are not exclusive to Linux. These are generic computing terms that you’ll find used in non-Linux discussions as well.

## GUI – Graphical User Interface

“GUI” is probably the most common term you’ll come across on It’s FOSS because we focus on desktop Linux users and try to cover the [easy-to-use graphical methods and applications](https://itsfoss.com/essential-linux-applications/).

A GUI application or graphical application is basically anything that you can interact with using your mouse, touchpad, or touch screen. You have icons and other visual prompts that you can activate with your mouse pointer to access the functionalities.

![A GIMP interface, which is an example of Graphical User Interface in Computer Systems.](https://itsfoss.com/content/images/2024/02/gimp-2-10-interface.jpg)

In a Linux distribution, a [desktop environment](https://itsfoss.com/what-is-desktop-environment/) provides the graphical interface for you to interact with your system. Then you can use GUI applications such as GIMP, VLC, Firefox, LibreOffice, and file manager for various tasks.

The GUI has made computing easier for the average user.

## CLI – Command Line Interface

CLI is basically a command line program that accepts inputs to perform a certain function. Any application that you can use via commands in the terminal falls into this category.

![A Command Line Interface (Linux Terminal), where an apt-cache command has been executed. The apt-cache is a CLI tool for interacting with APT cache on Debian-based systems.](https://itsfoss.com/content/images/2024/02/apt-cache-search-names-only.webp)

*command executed*

*apt-cache*Early computers didn’t have a mouse to interact with the operating system, only keyboards.

If you think that’s difficult, you should know that the earlier computers didn’t even have a screen to see what was being typed; they had actual paper printers to display the typed commands. I have never used such a computer, or even seen one. The closest thing I used were the microcontroller kits during my studies.

![Ken Thompson And Dennis Ritchie Working on developing UNIX operating system on PDP 11 computer.](https://itsfoss.com/content/images/2024/02/Ken_Thompson_and_Dennis_Ritchie_at_PDP-11.jpg)


*Ken Thompson And Dennis Ritchie Working on developing UNIX operating system on PDP 11 computer. |*[Image Credit](https://liucs.net/cs101f16/n8-os.html?ref=itsfoss.com)

Is CLI relevant these days? Absolutely. Commands always have benefits, especially when you are dealing with the core functioning and configuration of the operating system, such as [setting up a firewall](https://itsfoss.com/ufw-ubuntu/), managing a network or [package management](https://itsfoss.com/package-manager/).

You may have a GUI-based application to do the same task, but commands give you more granular access to those features. In any case, you’ll find that GUI applications also interact with the operating system with commands (used in their code).

![Handbrake GUI app uses FFMPEG CLI tool underneath](https://itsfoss.com/content/images/2024/02/handbrake.webp)

Many popular GUI applications are often based on CLI tools. Consider [Handbrake](https://itsfoss.com/handbrake/) for example. It’s a popular open source media converter that uses the [FFMPEG command](https://itsfoss.com/ffmpeg/) line tool underneath.

Quite evidently, using command line tools is not as easy as the graphical ones. Don’t worry. Unless you have specific needs, you should be able to use your Linux system graphically. However, [knowing the basic Linux commands](https://itsfoss.com/essential-ubuntu-commands/) helps a great deal.

**Suggested Read 📖**

[Getting Started With Linux TerminalWant to know the basics of the Linux command line? Here’s a tutorial series with a hands-on approach.](https://itsfoss.com/linux-terminal-basics/)![](https://itsfoss.com/content/images/2023/07/getting-started-with-linux-terminal.png)


![](https://itsfoss.com/content/images/2023/07/getting-started-with-linux-terminal.png)

## TUI – Terminal User Interface

TUI is also known as Text-based User Interface. This is the most uncommon term of the three. TUI is basically part GUI and part CLI. Confused? Let me explain it for you.

You already know that early computers used CLI. Before the advent of the GUI, the text-based user interface provided a very basic kind of graphical interaction in the terminal. You have more visuals and could use a mouse and keyboard to interact with the application.

![nnn File Browser in terminal](https://itsfoss.com/content/images/2024/02/nnn-file-browser.jpg)


*nnn File Browser in terminal*TUI stands for text-based user interface or terminal user interface. Text-based because primarily, you have a bunch of text on the screen and terminal user interface because they are used only in the terminal.

TUI applications are not well-known to many users, but there are a bunch of them. [Terminal-based web browsers](https://itsfoss.com/terminal-web-browsers/) are a good example of TUI programs. [Terminal-based games](https://itsfoss.com/best-command-line-games-linux/) also fall into this category.

![CMUS is a terminal-based music player](https://itsfoss.com/content/images/2024/02/cmus-interface.webp)


*CMUS is a terminal-based music player*You may come across TUI when you are [installing multimedia codecs in Ubuntu](https://itsfoss.com/install-media-codecs-ubuntu/) where you have to accept EULA or make a choice.

![TUI interface to accept EULA during the installation of ubuntu-restricted-extras in Ubuntu.](https://itsfoss.com/content/images/2024/02/ubuntu-restricted-extras-eula.png)

TUI apps are not as user-friendly as GUI applications, and they often have a learning curve involved, but they are a bit easier to use than the command line tools.

## In the end …

TUI apps are often also considered as CLI applications because they are restricted to the terminal. In my opinion, it’s up to you if you consider them different from CLI.

I hope you liked this part of Linux Jargon Buster. If you have any suggestions for topics in this series, please let me know in the comments, and I’ll try to cover them in the future.