我的功能丰富却又保持简约的 Linux 终端
终端

> 
> 这些应用和主题可以你真正拥有你的终端。
> 
> 
> 


![](/data/attachment/album/202007/22/123206g5t5mmz5ozdt5f5m.jpg)


每个人都喜欢以特定的方式设置他们的工作区：它可以帮助你提高效率，并使生活更容易以一种感觉有机的方式组织事物，并拥有一个对你来说感觉良好的环境。这也绝对适用于终端。这可能就是为什么有这么多可用终端的原因。


在使用新的计算机时，我做的第一件事就是设置我的终端，让它成为我自己的终端。


我最喜欢的终端应用是 [Terminator](https://terminator-gtk3.readthedocs.io/en/latest/)，因为它的设计简约，并且内置了窗口选项。但从这里开始变得更加复杂。我将自己喜欢的终端风格描述为“功能丰富却又保持简约”。这种平衡是我经常在微调的。


我使用 zsh 作为默认 shell，并使用 Ohmyzsh 来提供额外的功能。可以下载它的安装脚本来安装 Ohmyzsh：



```
$ curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh --output install-zsh.sh

```

查看一遍脚本了解它做什么，并确保你有信心在计算机上运行该脚本。完成后，运行脚本：



```
$ sh ./install-zsh.sh

```

我最喜欢的主题/提示符是 [Powerlevel 10k](https://github.com/romkatv/powerlevel10k)，它是一个非常详细的环境视图。它包含了从命令的颜色高亮到运行时间的时间戳等所有内容。所有细节都集成到一个优雅的、具有上下文感知的提示符中。


要安装 Powerlevel10k，请先在 `.oh-my-zsh/` 自定义主题目录中下载源码。



```
git clone --depth=1 https://github.com/romkatv/powerlevel10k.git
${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/themes/powerlevel10k

```

但是，为了让 Powerlevel10k 看起来如其存储库中所示，我们需要添加一些默认不包括的字体。它们是：


* [MesloLGS NF Regular.ttf](https://github.com/romkatv/powerlevel10k-media/raw/master/MesloLGS%20NF%20Regular.ttf)
* [MesloLGS NF Bold.ttf](https://github.com/romkatv/powerlevel10k-media/raw/master/MesloLGS%20NF%20Bold.ttf)
* [MesloLGS NF Italic.ttf](https://github.com/romkatv/powerlevel10k-media/raw/master/MesloLGS%20NF%20Italic.ttf)
* [MesloLGS NF Bold Italic.ttf](https://github.com/romkatv/powerlevel10k-media/raw/master/MesloLGS%20NF%20Bold%20Italic.ttf)


这将产生一个美观且具有上下文感知的终端（如 [screenfetch](https://github.com/KittyKatt/screenFetch) 所示）：


![terminator terminal shot via screenFetch](/data/attachment/album/202007/22/123237vma2gpvy2a2ggua4.png "terminator terminal shot via screenFetch ")


我已经习惯了这个特殊的设置，但是，把工作环境变成自己的环境固然重要，但这也并不是一个固执地尝试新事物的理由。新终端的出现，是为了满足新一代用户的需求和要求。这意味着，即使一开始不熟悉，但最近开发的一种终端可能比你的老旧备用机更适合当今的环境和职责。


我最近一直在考虑其他选择。我开始关注 [Starship](https://starship.rs/) 的开发情况，它将自己描述为简约的、快速的、可无限定制的提示符，适用于任何 shell。它仍然有很多在视觉上可以身临其境的细节，而不会像 Powerlevel10k 那样使人分心。


你最喜欢的终端是什么？为什么？请在评论栏分享！




---


via: <https://opensource.com/article/20/7/minimal-linux-terminal>


作者：[Sumantro Mukherjee](https://opensource.com/users/sumantro) 选题：[lujun9972](https://github.com/lujun9972) 译者：[geekpi](https://github.com/geekpi) 校对：[wxy](https://github.com/wxy)


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


OK
Everyone likes to set up their workspaces in a specific way; it helps your productivity and makes life easier to have things organized in a way that feels organic and to have an environment that feels good to you. That definitely applies to terminals too; that's probably why there are so many terminal options available.

When starting on a new computer, the very first thing I do is set up my terminal to make it my own.

My preferred terminal app is [terminator](https://terminator-gtk3.readthedocs.io/en/latest/) because of its minimalist design and built-in windowing options. But it gets more complex from there. I would describe my preferred terminal style as "feature-rich yet, keeping it minimal." That balance is one I'm often fine-tuning.

I use zsh as my default shell, and Ohmyzsh to give is additional features. One can install Ohmyzsh by downloading its install script:

```
$ curl -fsSL \
https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh \
--output install-zsh.sh
```


Read the script over to see what it does, and to ensure you feel confident in running it on your computer. Once you're ready, run the script:

`$ sh ./install-zsh.sh`


My favorite theme/prompt is [Powerlevel 10k](https://github.com/romkatv/powerlevel10k), which is an incredibly detailed view of my environment. It includes everything from color highlighting of commands to timestamps for when they were run. All the details integrate into an elegant, context-aware prompt. [context-aware is used as a benefit twice, here and below, can author provide more here on what that means and why it is a good thing in a terminal?}

Installing Powerlevel10k begins with downloading the source code in the `.oh-my-zsh/`

custom theme directory.

```
git clone --depth=1 https://github.com/romkatv/powerlevel10k.git
${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/themes/powerlevel10k
```


However, to make Powerlevel10k look as it is shown in the repository, we need to add some fonts that are not included by default; these are listed below:

This results in a beautiful and context-aware terminal (as shown by [screenfetch](https://github.com/KittyKatt/screenFetch))

![terminator terminal shot via screenFetch terminator terminal shot via screenFetch](https://opensource.com/sites/default/files/uploads/osdc00_edit.png)


I've become accustomed to this particular setup, but, as important as it is to make your work environment your own, that's also not a reason to be stubborn about trying new things. New terminals emerge in order to answer the needs and demands of new generations of users. That means that, even if it's unfamiliar at first, one of the more recently developed terminals could be better suited to today's environments and responsibilities than your old standby.

I have been considering other options recently. I started watching the development of [Starship](https://starship.rs/), which describes itself as a minimal, blazing-fast, and infinitely customizable prompt for any shell. It still has a lot of visually immersive details without as much of what some might find distracting from Powerlevel10k.

What's your favorite terminal, and why? Share in the comments!

## 14 Comments