mirror of
https://github.com/LCTT/TranslateProject.git
synced 2025-01-25 23:11:02 +08:00
Merge remote-tracking branch 'LCTT/master'
This commit is contained in:
commit
87ccd1e4f5
@ -1,18 +1,20 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: (geekpi)
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
[#]: reviewer: (wxy)
|
||||
[#]: publisher: (wxy)
|
||||
[#]: url: (https://linux.cn/article-12425-1.html)
|
||||
[#]: subject: (openSUSE Leap 15.2 Released With Focus on Containers, AI and Encryption)
|
||||
[#]: via: (https://itsfoss.com/opensuse-leap-15-2-release/)
|
||||
[#]: author: (Ankush Das https://itsfoss.com/author/ankush/)
|
||||
|
||||
openSUSE Leap 15.2 发布,重点关注容器,AI 和加密
|
||||
openSUSE Leap 15.2 发布:重点关注容器、AI 和加密
|
||||
======
|
||||
|
||||
![](https://img.linux.net.cn/data/attachment/album/202007/16/230428vklhwrzllll2eu82.jpg)
|
||||
|
||||
[openSUSE][1] Leap 15.2 最终带来了一些有用的变化和改进。
|
||||
|
||||
同样,考虑到[消除 Leap 差异][2]这篇让人激动的公告,openSUSE Leap 15.2 的发布使我们下一步将 SLE([SUSE Linux Enterprise][3])二进制文件集成到 openSUSE Leap 15.3 更加近了一步。
|
||||
同时,我想到 SUSE 这篇让人激动的公告《[消除 Leap 差异][2]》,openSUSE Leap 15.2 的发布使我们下一步将 SLE([SUSE Linux Enterprise][3])二进制文件集成到 openSUSE Leap 15.3 更加近了一步。
|
||||
|
||||
让我们看一下 openSUSE Leap 15.2 中发生了哪些变化和改进。
|
||||
|
||||
@ -20,17 +22,17 @@ openSUSE Leap 15.2 发布,重点关注容器,AI 和加密
|
||||
|
||||
![][4]
|
||||
|
||||
总体而言,openSUSE Leap 15.2 发行版涉及安全更新、主要的新软件包、bug 修复以及其他改进。
|
||||
总体而言,openSUSE Leap 15.2 发行版涉及安全更新、新的主要软件包、bug 修复以及其他改进。
|
||||
|
||||
该项目的开发人员 **Marco Varlese** 在新闻稿中提到:
|
||||
该项目的开发人员 Marco Varlese 在新闻稿中提到:
|
||||
|
||||
>“ Leap 15.2 代表了人工智能领域的巨大进步,我很高兴 openSUSE 用户现在终于可以通过我们的仓库使用机器学习/深度学习框架和应用,以享受稳定和最新的生态系统。”
|
||||
|
||||
尽管这暗示了可能涉及一些变化,以下是 openSUSE Leap 15.2 中的新功能:
|
||||
尽管这暗示了可能涉及的一些变化,以下是 openSUSE Leap 15.2 中的新功能:
|
||||
|
||||
#### 添加人工智能 (AI) 和机器学习包
|
||||
#### 添加人工智能(AI)和机器学习包
|
||||
|
||||
毫无疑问,人工智能 (AI) 和机器学习是一些最划时代的技术。
|
||||
毫无疑问,人工智能(AI)和机器学习是最具颠覆性的技术。
|
||||
|
||||
为了向用户提供便利,openSUSE Leap 15.2 为新的开源技术添加了许多重要的软件包:
|
||||
|
||||
@ -40,23 +42,21 @@ openSUSE Leap 15.2 发布,重点关注容器,AI 和加密
|
||||
* [Grafana][8]
|
||||
* [Prometheus][9]
|
||||
|
||||
|
||||
|
||||
#### 引入实时内核
|
||||
|
||||
![][10]
|
||||
|
||||
在 openSUSE Leap 15.2 中,将引入实时内核来管理[微处理器][11]的时序,以有效处理时间严格的事件。
|
||||
在 openSUSE Leap 15.2 中,将引入实时内核来管理[微处理器][11]的时序,以有效处理时间关键的事件。
|
||||
|
||||
实时内核的添加对于现实意义重大。 项目委员会主席 **Gerald Pfeifer** 的讲话如下:
|
||||
实时内核的添加对于现实意义重大。项目委员会主席 Gerald Pfeifer 的讲话如下:
|
||||
|
||||
>“将实时内核添加到 openSUSE Leap 释放了新的可能性。想想边缘计算、嵌入式设备、数据抓取,所有这些都在飞速发展。从历史上看,其中很多都是专有领域。现在,openSUSE 为有兴趣测试实时功能的开发者、研究人员和公司甚至贡献者将打开了通道。另一个领域开源帮助开放!”
|
||||
>“将实时内核添加到 openSUSE Leap 开启了新的可能性。想想边缘计算、嵌入式设备、数据抓取,所有这些都在飞速发展。从历史上看,其中很多都是专有领域。现在,openSUSE 为有兴趣测试实时功能的开发者、研究人员和公司甚至贡献者将打开了通道。这是另一个开源帮助开放的领域!”
|
||||
|
||||
#### 包含容器技术
|
||||
#### 纳入容器技术
|
||||
|
||||
在最新版本中,你会注意到 [Kubernetes][12] 作为官方包装随附。这让用户可以轻松地自动化部署、扩展和管理容器化的应用。
|
||||
在最新版本中,你会注意到 [Kubernetes][12] 作为官方包而纳入其中。这让用户可以轻松地自动化部署、扩展和管理容器化的应用。
|
||||
|
||||
[Helm][13] (Kubernetes 的包管理器)也加入了进来。不仅于此,你还可以在此找到其他一些软件,从而可以更轻松地保护和部署容器化应用。
|
||||
[Helm][13](Kubernetes 的包管理器)也是内置的。不仅于此,你还可以在此找到其他一些附加功能,从而可以更轻松地保护和部署容器化应用。
|
||||
|
||||
#### 更新的 openSUSE 安装程序
|
||||
|
||||
@ -68,7 +68,7 @@ openSUSE 的安装程序已经非常不错。但是,在最新的 Leap 15.2 版
|
||||
|
||||
尽管 [YaST][15] 已经是一个非常强大的安装和配置工具,但是此发行版增加了创建和管理 Btrfs 文件系统以及实施高级加密技术的能力。
|
||||
|
||||
当然,你肯定想到 [OpenSuse 在 WSL][16] 的可用性。因此,根据 Leap 15.2 的发行说明,YaST 与 WSL 的兼容性得到了改善。
|
||||
当然,你肯定知道 [openSUSE 在 WSL][16] 的可用性。因此,根据 Leap 15.2 的发行说明,YaST 与 WSL 的兼容性得到了改善。
|
||||
|
||||
#### 桌面环境改进
|
||||
|
||||
@ -76,19 +76,19 @@ openSUSE 的安装程序已经非常不错。但是,在最新的 Leap 15.2 版
|
||||
|
||||
可用的桌面环境已更新为最新版本,包括 [KDE Plasma 5.18 LTS][18] 和 [GNOME 3.34][19]。
|
||||
|
||||
你还能发现在 openSUSE Leap 15.2 可用 [XFCE 4.14][20] 桌面。
|
||||
你还能发现更新的 [XFCE 4.14][20] 桌面在 openSUSE Leap 15.2 上也是可用的。
|
||||
|
||||
如果你想知道最新版本的所有详细信息,可以参考[官方发布公告][21]。
|
||||
|
||||
### 下载和可用性
|
||||
|
||||
目前,你可以找到 Linode 云镜像中找到 Leap 15.2。另外,你会注意到其他云托管服务(如 AWS、Azure 和其他服务)也提供了它。
|
||||
目前,你可以找到 Leap 15.2 的 Linode 云镜像。另外,你会注意到其他云托管服务(如 AWS、Azure 和其他服务)也提供了它。
|
||||
|
||||
你还可以从官方网站获取 DVD ISO 或网络镜像文件。
|
||||
|
||||
要升级你当前的安装,我建议按照[官方说明][22]操作。
|
||||
|
||||
[openSUSE Leap 15.2][23]
|
||||
- [openSUSE Leap 15.2][23]
|
||||
|
||||
你尝试过 openSUSE Leap 15.2 了么?请随时让我知道你的想法!
|
||||
|
||||
@ -99,7 +99,7 @@ via: https://itsfoss.com/opensuse-leap-15-2-release/
|
||||
作者:[Ankush Das][a]
|
||||
选题:[lujun9972][b]
|
||||
译者:[geekpi](https://github.com/geekpi)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
校对:[wxy](https://github.com/wxy)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
@ -1,5 +1,5 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: ( )
|
||||
[#]: translator: (JonnieWayy)
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
|
@ -1,5 +1,5 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: ( )
|
||||
[#]: translator: (geekpi)
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
|
@ -1,292 +0,0 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: (nophDog)
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
[#]: subject: (Customizing Bash)
|
||||
[#]: via: (https://fedoramagazine.org/customizing-bash/)
|
||||
[#]: author: (Stephen Snow https://fedoramagazine.org/author/jakfrost/)
|
||||
|
||||
Customizing Bash
|
||||
======
|
||||
|
||||
![][1]
|
||||
|
||||
The outermost layer of your operating system – the part you interact with – is called the [shell][2]. Fedora comes with several preinstalled shells. Shells can be either graphical or text-based. In documentation, you will often see the acronyms GUI (Graphical User Interface) and CLI (Command-Line Interface) used to distinguish between graphical and text-based shells/interfaces. Other [GUI][3] and [CLI][4] shells can be used, but [GNOME][5] is Fedora’s default GUI and [Bash][6] is its default CLI.
|
||||
|
||||
The remainder of this article will cover recommended dotfile practices for the Bash CLI.
|
||||
|
||||
### Bash overview
|
||||
|
||||
From the Bash reference manual:
|
||||
|
||||
> At its base, a shell is simply a macro processor that executes commands. The term macro processor means functionality where text and symbols are expanded to create larger expressions.
|
||||
>
|
||||
> Reference Documentation for Bash
|
||||
> Edition 5.0, for Bash Version 5.0.
|
||||
> May 2019
|
||||
|
||||
In addition to helping the user start and interact with other programs, the Bash shell also includes several built-in commands and keywords. Bash’s built-in functionality is extensive enough that it is considered a [high-level programming language][7] in its own right. Several of Bash’s keywords and operators resemble those of [the C programming language][8].
|
||||
|
||||
Bash can be invoked in either interactive or non-interactive mode. Bash’s interactive mode is the typical terminal/command-line interface that most people are familiar with. [GNOME Terminal][9], by default, launches Bash in interactive mode. An example of when Bash runs in non-interactive mode is when commands and data are [piped][10] to it from a file or shell script. Other modes of operation that Bash can operate in include: login, non-login, remote, POSIX, unix sh, restricted, and with a different UID/GID than the user. Various combinations of these modes are possible. For example interactive+restricted+POSIX or non-interactive+non-login+remote. Which startup files Bash will process depends on the combination of modes that are requested when it is invoked. Understanding these modes of operation is necessary when modifying the startup files.
|
||||
|
||||
According to the Bash reference manual, Bash …
|
||||
|
||||
> 1\. Reads its input from a file …, from a string supplied as an argument to the -c invocation option …, or from the user’s terminal.
|
||||
>
|
||||
> 2\. Breaks the input into words and operators, obeying [its] quoting rules. … These tokens are separated by metacharacters. Alias expansion is performed by this step.
|
||||
>
|
||||
> 3\. Parses the tokens into simple and compound commands.
|
||||
>
|
||||
> 4\. Performs the various shell expansions …, breaking the expanded tokens into lists of filenames … and commands and arguments.
|
||||
>
|
||||
> 5\. Performs any necessary redirections … and removes the redirection operators and their operands from the argument list.
|
||||
>
|
||||
> 6\. Executes the command.
|
||||
>
|
||||
> 7\. Optionally waits for the command to complete and collects its exit status.
|
||||
>
|
||||
> Reference Documentation for Bash
|
||||
> Edition 5.0, for Bash Version 5.0.
|
||||
> May 2019
|
||||
|
||||
When a user starts a terminal emulator to access the command line, an interactive shell session is started. GNOME Terminal, by default, launches the user’s shell in non-login mode. Whether GNOME Terminal launches the shell in login or non-login mode can be configured under _Edit_ → _Preferences_ → _Profiles_ → _Command_. Login mode can also be requested by passing the _–login_ flag to Bash on startup. Also note that Bash’s _login_ and _non-interactive_ modes are not exclusive. It is possible to run Bash in both _login_ and _non-interactive_ mode at the same time.
|
||||
|
||||
### Invoking Bash
|
||||
|
||||
Unless it is passed the ***—***_noprofile_ flag, a Bash login shell will read and execute the commands found in certain initialization files. The first of those files is _/etc/profile_ if it exists, followed by one of _~/.bash_profile_, _~/.bash_login_, or _~/.profile_; searched in that order. When the user exits the login shell, or if the script calls the _exit_ built-in in the case of a non-interactive login shell, Bash will read and execute the commands found in _~/.bash_logout_ followed by _/etc/bash_logout_ if it exists. The file _/etc/profile_ will normally source _/etc/bashrc_, reading and executing commands found there, then search through _/etc/profile.d_ for any files with an _sh_ extension to read and execute. As well, the file _~/.bash_profile_ will normally source the file _~/.bashrc_. Both _/etc/bashrc_ and _~/.bashrc_ have checks to prevent double sourcing.
|
||||
|
||||
An interactive shell that is not a login shell, will source the _~/.bashrc_ file when it is first invoked. This is the usual type of shell a user will enter when opening a terminal on Fedora. When Bash is started in non-interactive mode – as it is when running a shell script – it will look for the _BASH_ENV_ variable in the environment. If it is found, will expand the value, and use the expanded value as the name of a file to read and execute. Bash behaves just as if the following command were executed:
|
||||
|
||||
```
|
||||
if [ -n "$BASH_ENV" ]; then . "$BASH_ENV"; fi
|
||||
```
|
||||
|
||||
It is important to note that the value of the _PATH_ variable is not used to search for the filename.
|
||||
|
||||
### Important user-specific dotfiles
|
||||
|
||||
Bash’s best-known user dotfile is _~/.bashrc_. Most user customization is done by editing this file. Most user customization, may be a stretch since there are reasons to modify all of the mentioned files; as well as other files that have not been mentioned. Bash’s environment is designed to be highly customizable in order to suit the needs of many different users with many different tastes.
|
||||
|
||||
![][11]
|
||||
|
||||
When a Bash login shell exits cleanly, _~/.bash_logout_ and then _/etc/bash_logout_ will be called if they exist. The next diagram is a sequence diagram showing the process Bash follows when being invoked as an interactive shell. The below sequence is followed, for example, when the user opens a terminal emulator from their desktop environment.
|
||||
|
||||
![][12]
|
||||
|
||||
Armed with the knowledge of how Bash behaves under different invocation methods, it becomes apparent that there are only a few typical invocation methods to be most concerned with. These are the non-interactive and interactive login shell, and the non-interactive and interactive non-login shell. If global environment customizations are needed, then the desired settings should be placed in a uniquely-named file with a _.sh_ extension (_custom.sh_, for example) and that file should be placed in the _/etc/profile.d_ directory.
|
||||
|
||||
The non-interactive, non-login invocation method needs special attention. This invocation method causes Bash to check the _BASH_ENV_ variable. If this variable is defined, the file it references will be sourced. Note that the values stored in the _PATH_ environment variable are not utilized when processing _BASH_ENV_. So it must contain the full path to the file to be sourced. For example, if someone wanted the settings from their _~/.bashrc_ file to be available to shell scripts they run non-interactively, they could place something like the following in a file named _/etc/profile.d/custom.sh_ …
|
||||
|
||||
```
|
||||
# custom.sh
|
||||
.
|
||||
.
|
||||
.
|
||||
#If Fedora Workstation
|
||||
BASH_ENV="/home/username/.bashrc"
|
||||
.
|
||||
.
|
||||
.
|
||||
#If Fedora Silverblue Workstation
|
||||
BASH_ENV="/var/home/username/.bashrc"
|
||||
|
||||
export BASH_ENV
|
||||
```
|
||||
|
||||
The above profile drop-in script will cause the user’s _~/.bashrc_ file to be sourced just before every shell script is executed.
|
||||
|
||||
Users typically customizie their system environment so that it will better fit their work habits and preferences. An example of the sort of customization that a user can make is an alias. Commands frequently run with the same set of starting parameters are good candidates for aliases. Some example aliases are provided in the _~/.bashrc_ file shown below.
|
||||
|
||||
```
|
||||
# .bashrc
|
||||
# Source global definitions
|
||||
if [ -f /etc/bashrc ];
|
||||
then . /etc/bashrc
|
||||
fi
|
||||
.
|
||||
.
|
||||
.
|
||||
# User specific aliases and functions
|
||||
alias ls='ls -hF --color=auto'
|
||||
alias la='ls -ahF --color=auto'
|
||||
# make the dir command work kinda like in windows (long format)
|
||||
alias dir='ls --color=auto --format=long'
|
||||
# make grep highlight results using color
|
||||
alias grep='grep --color=auto'
|
||||
```
|
||||
|
||||
Aliases are a way to customize various commands on your system. They can make commands more convenient to use and reduce your keystrokes. Per-user aliases are often configured in the user’s _~/.bashrc_ file.
|
||||
|
||||
If you find you are looking back through your command line history a lot, you may want to configure your history settings. Per-user history options can also be configured in _~/.bashrc_. For example, if you have a habit of using multiple terminals at once, you might want to enable the _histappend_ option. Bash-specific shell options that are [boolean][13] in nature (take either _on_ or _off_ as a value) are typically enabled or disabled using the _shopt_ built-in command. Bash settings that take a more complex value (for example, _HISTTIMEFORMAT_) tend to be configured by assigning the value to an environment variable. Customizing Bash with both shell options and environment variable is demonstrated below.
|
||||
|
||||
```
|
||||
# Configure Bash History
|
||||
|
||||
# Expand dir env vars on tab and set histappend
|
||||
shopt -s direxpand histappend
|
||||
|
||||
# - ignoreboth = ignorespace and ignoredup
|
||||
HISTCONTROL='ignoreboth'
|
||||
|
||||
# Controls the format of the time in output of `history`
|
||||
HISTTIMEFORMAT="[%F %T] "
|
||||
|
||||
# Infinite history
|
||||
# NB: on newer bash, anything < 0 is the supported way, but on CentOS/RHEL
|
||||
# at least, only this works
|
||||
HISTSIZE=
|
||||
HISTFILESIZE=
|
||||
|
||||
# or for those of us on newer Bash
|
||||
HISTSIZE=-1
|
||||
HISTFILESIZE=-1
|
||||
```
|
||||
|
||||
The _direxpand_ option shown in the example above will cause Bash to replace directory names with the results of word expansion when performing filename completion. This will change the contents of the readline editing buffer, so what you typed is masked by what the completion expands it to.
|
||||
|
||||
The _HISTCONTROL_ variable is used to enable or disable some filtering options for the command history. Duplicate lines, lines with leading blank spaces, or both can be filtered from the command history by configuring this setting. To quote Dusty Mabe, the engineer I got the tip from:
|
||||
|
||||
> _ignoredup_ makes history not log duplicate entries (if you are running a command over and over). _ignorespace_ ignores entries with a space in the front, which is useful if you are setting an environment variable with a secret or running a command with a secret that you don’t want logged to disk. _ignoreboth_ does both.
|
||||
>
|
||||
> Dusty Mabe – Redhat Principle Software Engineer, June 19, 2020
|
||||
|
||||
For users who do a lot of work on the command line, Bash has the _CDPATH_ environment variable. If _CDPATH_ is configured with a list of directories to search, the _cd_ command, when provided a relative path as its first argument, will check all the listed directories in order for a matching subdirectory and change to the first one found.
|
||||
|
||||
```
|
||||
# .bash_profile
|
||||
|
||||
# set CDPATH
|
||||
CDPATH="/var/home/username/favdir1:/var/home/username/favdir2:/var/home/username/favdir3"
|
||||
|
||||
# or could look like this
|
||||
CDPATH="/:~:/var:~/favdir1:~/favdir2:~/favdir3"
|
||||
|
||||
export CDPATH
|
||||
```
|
||||
|
||||
_CDPATH_ should be updated the same way _PATH_ is typically updated – by referencing itself on the right hand side of the assignment to preserve the previous values.
|
||||
|
||||
```
|
||||
# .bash_profile
|
||||
|
||||
# set CDPATH
|
||||
CDPATH="/var/home/username/favdir1:/var/home/username/favdir2:/var/home/username/favdir3"
|
||||
|
||||
# or could look like this
|
||||
CDPATH="/:~:/var:~/favdir1:~/favdir2:~/favdir3"
|
||||
|
||||
CDPATH="$CDPATH:~/favdir4:~/favdir5"
|
||||
|
||||
export CDPATH
|
||||
```
|
||||
|
||||
_PATH_ is another very important variable. It is the search path for commands on the system. Be aware that some applications require that their own directories be included in the _PATH_ variable to function properly. As with _CDPATH_, appending new values to _PATH_ can be done by referencing the old values on the right hand side of the assignment. If you want to prepend the new values instead, simply place the old values (_$PATH_) at the end of the list. Note that on Fedora, the list values are separated with the colon character (**:**).
|
||||
|
||||
```
|
||||
# .bash_profile
|
||||
|
||||
# Add PATH values to the PATH Environment Variable
|
||||
PATH="$PATH:~/bin:~:/usr/bin:/bin:~/jdk-13.0.2:~/apache-maven-3.6.3"
|
||||
|
||||
export PATH
|
||||
```
|
||||
|
||||
The command prompt is another popular candidate for customization. The command prompt has seven customizable parameters:
|
||||
|
||||
> **PROMPT_COMMAND** If set, the value is executed as a command prior to issuing each primary prompt ($PS1).
|
||||
>
|
||||
> **PROMPT_DIRTRIM** If set to a number greater than zero, the value is used as the number of trailing directory components to retain when expanding the \w and \W prompt string escapes. Characters removed are replaced with an ellipsis.
|
||||
>
|
||||
> **PS0** The value of this parameter is expanded like _PS1_ and displayed by interactive shells after reading a command and before the command is executed.
|
||||
>
|
||||
> **PS1** The primary prompt string. The default value is ‘**\s-\v\$** ‘. …
|
||||
>
|
||||
> **PS2** The secondary prompt string. The default is ‘_**>**_ ‘. _PS2_ is expanded in the same way as _PS1_ before being displayed.
|
||||
>
|
||||
> **PS3** The value of this parameter is used as the prompt for the _select_ command. If this variable is not set, the _select_ command prompts with ‘**#?** ‘
|
||||
>
|
||||
> **PS4** The value of this parameter is expanded like _PS1_ and the expanded value is the prompt printed before the command line is echoed when the _-x_ option is set. The first character of the expanded value is replicated multiple times, as necessary, to indicate multiple levels of indirection. The default is ‘_**+**_ ‘.
|
||||
>
|
||||
> Reference Documentation for Bash
|
||||
> Edition 5.0, for Bash Version 5.0.
|
||||
> May 2019
|
||||
|
||||
An entire article could be devoted to this one aspect of Bash. There are copious quantities of information and examples available. Some example dotfiles, including prompt reconfiguration, are provided in a repository linked at the end of this article. Feel free to use and experiment with the examples provided in the repository.
|
||||
|
||||
### Conclusion
|
||||
|
||||
Now that you are armed with a little knowledge about how Bash works, feel free to modify your Bash dotfiles to suit your own needs and preferences. Pretty up your prompt. Go nuts making aliases. Or otherwise make your computer truly yours. Examine the content of _/etc/profile_, _/etc/bashrc_, and _/etc/profile.d/_ for inspiration.
|
||||
|
||||
Some comments about terminal emulators are fitting here. There are ways to setup your favorite terminal to behave exactly as you want. You may have already realized this, but often this modification is done with a … wait for it … dotfile in the users home directory. The terminal emulator can also be started as a login session, and some people always use login sessions. How you use your terminal, and your computer, will have a bearing on how you modify (or not) your dotfiles.
|
||||
|
||||
If you’re curious about what type session you are in at the command line the following script can help you determine that.
|
||||
|
||||
```
|
||||
#!/bin/bash
|
||||
|
||||
case "$-" in
|
||||
(*i*) echo This shell is interactive ;;
|
||||
(*) echo This shell is not interactive ;;
|
||||
esac
|
||||
```
|
||||
|
||||
Place the above in a file, mark it executable, and run it to see what type of shell you are in. _$-_ is a variable in Bash that contains the letter **i** when the shell is interactive. Alternatively, you could just echo the $- variable and inspect the output for the presence of the **i** flag:
|
||||
|
||||
```
|
||||
$ echo $-
|
||||
```
|
||||
|
||||
### Reference information
|
||||
|
||||
The below references can be consulted for more information and examples. The Bash man page is also a great source of information. Note that your local man page is guaranteed to document the features of the version of Bash you are running whereas information found online can sometimes be either too old (outdated) or too new (not yet available on your system).
|
||||
|
||||
<https://opensource.com/tags/command-line>
|
||||
|
||||
<https://opensource.com/downloads/bash-cheat-sheet>
|
||||
|
||||
You will have to enter a valid email address at the above site, or sign up, to download from it.
|
||||
|
||||
<https://opensource.com/article/19/12/bash-script-template>
|
||||
|
||||
Community members who provided contributions to this article in the form of example dotfiles, tips, and other script files:
|
||||
|
||||
* Micah Abbott – Principal Quality Engineer
|
||||
* John Lebon – Principal Software Engineer
|
||||
* Dusty Mabe – Principal Software Engineer
|
||||
* Colin Walters – Senior Principal Software Engineer
|
||||
|
||||
|
||||
|
||||
A repository of example dotfiles and scripts can be found here:
|
||||
|
||||
<https://github.com/TheOneandOnlyJakfrost/bash-article-repo>
|
||||
|
||||
Please carefully review the information provided in the above repository. Some of it may be outdated. There are many examples of not only dotfiles for Bash, but also custom scripts and pet container setups for development. I recommend starting with John Lebon’s dotfiles. They are some of the most detailed I have seen and contain very good descriptions throughout. Enjoy!
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://fedoramagazine.org/customizing-bash/
|
||||
|
||||
作者:[Stephen Snow][a]
|
||||
选题:[lujun9972][b]
|
||||
译者:[译者ID](https://github.com/译者ID)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]: https://fedoramagazine.org/author/jakfrost/
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://fedoramagazine.org/wp-content/uploads/2020/05/bashenvironment-816x346.png
|
||||
[2]: https://en.wikipedia.org/wiki/Shell_(computing)
|
||||
[3]: https://fedoramagazine.org/fedoras-gaggle-of-desktops/
|
||||
[4]: https://en.wikipedia.org/wiki/Comparison_of_command_shells
|
||||
[5]: https://en.wikipedia.org/wiki/GNOME
|
||||
[6]: https://en.wikipedia.org/wiki/Bash_(Unix_shell)
|
||||
[7]: https://en.wikipedia.org/wiki/High-level_programming_language
|
||||
[8]: https://en.wikipedia.org/wiki/C_(programming_language)
|
||||
[9]: https://en.wikipedia.org/wiki/GNOME_Terminal
|
||||
[10]: https://en.wikipedia.org/wiki/Pipeline_(Unix)
|
||||
[11]: https://fedoramagazine.org/wp-content/uploads/2020/06/bash-initialization-1-1024x711.png
|
||||
[12]: https://fedoramagazine.org/wp-content/uploads/2020/06/bash-initialization-2-1024x544.png
|
||||
[13]: https://en.wikipedia.org/wiki/Boolean_data_type
|
@ -1,88 +0,0 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: (geekpi)
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
[#]: subject: (My feature-rich and minimal Linux terminal)
|
||||
[#]: via: (https://opensource.com/article/20/7/minimal-linux-terminal)
|
||||
[#]: author: (Sumantro Mukherjee https://opensource.com/users/sumantro)
|
||||
|
||||
My feature-rich and minimal Linux terminal
|
||||
======
|
||||
These apps and themes help make my terminal my own.
|
||||
![Digital images of a computer desktop][1]
|
||||
|
||||
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][2] 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][3], 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:
|
||||
|
||||
* [MesloLGS NF Regular.ttf][4]
|
||||
* [MesloLGS NF Bold.ttf][5]
|
||||
* [MesloLGS NF Italic.ttf][6]
|
||||
* [MesloLGS NF Bold Italic.ttf][7]
|
||||
|
||||
|
||||
|
||||
This results in a beautiful and context-aware terminal (as shown by [screenfetch][8])
|
||||
|
||||
![terminator terminal shot via screenFetch ][9]
|
||||
|
||||
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][10], 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!
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://opensource.com/article/20/7/minimal-linux-terminal
|
||||
|
||||
作者:[Sumantro Mukherjee][a]
|
||||
选题:[lujun9972][b]
|
||||
译者:[译者ID](https://github.com/译者ID)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]: https://opensource.com/users/sumantro
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/computer_desk_home_laptop_browser.png?itok=Y3UVpY0l (Digital images of a computer desktop)
|
||||
[2]: https://terminator-gtk3.readthedocs.io/en/latest/
|
||||
[3]: https://github.com/romkatv/powerlevel10k
|
||||
[4]: https://github.com/romkatv/powerlevel10k-media/raw/master/MesloLGS%20NF%20Regular.ttf
|
||||
[5]: https://github.com/romkatv/powerlevel10k-media/raw/master/MesloLGS%20NF%20Bold.ttf
|
||||
[6]: https://github.com/romkatv/powerlevel10k-media/raw/master/MesloLGS%20NF%20Italic.ttf
|
||||
[7]: https://github.com/romkatv/powerlevel10k-media/raw/master/MesloLGS%20NF%20Bold%20Italic.ttf
|
||||
[8]: https://github.com/KittyKatt/screenFetch
|
||||
[9]: https://opensource.com/sites/default/files/uploads/osdc00_edit.png (terminator terminal shot via screenFetch )
|
||||
[10]: https://starship.rs/
|
181
sources/tech/20200716 Summarizing your command usage on Linux.md
Normal file
181
sources/tech/20200716 Summarizing your command usage on Linux.md
Normal file
@ -0,0 +1,181 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: ( )
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
[#]: subject: (Summarizing your command usage on Linux)
|
||||
[#]: via: (https://www.networkworld.com/article/3567050/summarizing-your-command-usage-on-linux.html)
|
||||
[#]: author: (Sandra Henry-Stocker https://www.networkworld.com/author/Sandra-Henry_Stocker/)
|
||||
|
||||
Summarizing your command usage on Linux
|
||||
======
|
||||
With a modest string of commands, you can get a quick look at what commands you're using on your Linux system and how often.
|
||||
Getty Images
|
||||
|
||||
Getting a summary of the commands you use on a Linux system requires only a relatively modest string of commands along with a couple pipes to tie them all together. When your history buffer preserves the most recent 1,000 or 2,000 commands, summarizing command activity can get rather tedious. This post provides a handy way to summarize command usage and highlight those commands used most frequently.
|
||||
|
||||
To start, keep in mind that a typical entry in a command history might look like this. Note that command is displayed after the command sequence number and followed by its arguments.
|
||||
|
||||
```
|
||||
91 sudo apt-get install ccrypt
|
||||
^
|
||||
+-- command
|
||||
```
|
||||
|
||||
Note that the history command, adhering to the HISTSIZE setting, will determine how many commands will be preserved. This could be 500, 1,000 or more. If you don't like how many commands are preserved for you, you can add or change the HISTSIZE setting in your .bashrc or other start-up file.
|
||||
|
||||
```
|
||||
$ echo $HISTSIZE
|
||||
1000
|
||||
$ history | wc -l
|
||||
1000
|
||||
$ grep HISTSIZE ~/.bashrc
|
||||
# for setting history length see HISTSIZE and HISTFILESIZE in bash(1)
|
||||
HISTSIZE=1000
|
||||
```
|
||||
|
||||
One of the primary benefits of remembering a significant number of commands is that it makes it easy for you to rerun commands you've used in the past without having to retype or remember them. It also allows you to easily review how far you've moved through some series of tasks that you might be working on. When you use the **history** command by itself, you'll see something like this with your oldest commands listed first:
|
||||
|
||||
```
|
||||
$ history
|
||||
7 vi tasks
|
||||
8 alias
|
||||
9 echo $HISTTIMEFORMAT
|
||||
10 history
|
||||
11 date
|
||||
…
|
||||
```
|
||||
|
||||
Viewing the most recent commands requires looking at the bottom of the recorded commands:
|
||||
|
||||
```
|
||||
$ history | tail -4
|
||||
1007 echo $HISTSIZE
|
||||
1008 history | wc -l
|
||||
1009 history
|
||||
1010 history | tail -4
|
||||
```
|
||||
|
||||
Alternately, you could use the **tail** command to view the bottom of your **.bash_history** file, but the numbers shown by the **history** command allow you to rerun the commands by typing things like **!1010** and are generally more useful.
|
||||
|
||||
To prepare a summary of the commands used (such as **vi** and **echo**), you can start by using **awk** to separate that information from the rest of each command saved in our history:
|
||||
|
||||
```
|
||||
$ history | awk '{print $2}'
|
||||
vi
|
||||
alias
|
||||
echo
|
||||
history
|
||||
date
|
||||
…
|
||||
```
|
||||
|
||||
If you then pass the list of commands in your history to the **sort** command to group the commands in alphabetical order, you'll get something like this:
|
||||
|
||||
```
|
||||
$ history | awk '{print $2}' | sort
|
||||
7z
|
||||
7z
|
||||
alias
|
||||
apropos
|
||||
cd
|
||||
cd
|
||||
…
|
||||
```
|
||||
|
||||
Next, passing the output of that **sort** command to **uniq -c** will count how many of each command were used.
|
||||
|
||||
```
|
||||
$ history | awk '{print $2}' | sort | uniq -c
|
||||
2 7z
|
||||
1 alias
|
||||
2 apropos
|
||||
38 cd
|
||||
21 chmod
|
||||
…
|
||||
```
|
||||
|
||||
Last, adding a second **sort** command to sort the command group counts in reverse numeric order will list your most heavily used commands first.
|
||||
|
||||
```
|
||||
$ history | awk '{print $2}' | sort | uniq -c | sort -nr
|
||||
178 ls
|
||||
95 vi
|
||||
63 cd
|
||||
53 sudo
|
||||
41 more
|
||||
…
|
||||
```
|
||||
|
||||
This gives you an idea which commands you use the most, but won't include any commands that you may be intentionally omitting from your history file with a setting like this one:
|
||||
|
||||
```
|
||||
HISTIGNORE="pwd:clear:man:history"
|
||||
```
|
||||
|
||||
### When history changes
|
||||
|
||||
For the default history format, the first field in **history** command output will be the sequence number for each command, and the second will be the command that was used. For this reason, all of the **awk** commands shown above were set to display **$2**.
|
||||
|
||||
```
|
||||
$ alias cmds='history | awk '\''{print $2}'\'' | sort | uniq -c | sort -nr'
|
||||
```
|
||||
|
||||
If you've modified the format of your history entries with a setting like the one shown below that adds date and time settings to your command history, you will also have to modify the alias that you're setting up.
|
||||
|
||||
```
|
||||
$ echo $HISTTIMEFORMAT
|
||||
%d/%m/%y %T
|
||||
```
|
||||
|
||||
This date/time information can be very helpful at times, but means that you have to pick out the 4th field instead of the 2nd in your command history to summarize your command usage because your history entries will look like this:
|
||||
|
||||
```
|
||||
91 05/07/20 16:37:39 sudo apt-get install ccrypt
|
||||
^
|
||||
+-- command
|
||||
```
|
||||
|
||||
The alias for examining your command history would, therefore, look like this instead after changing the $2 to $4.
|
||||
|
||||
```
|
||||
$ alias cmds='history | awk '\''{print $4}'\'' | sort | uniq -c | sort -nr'
|
||||
```
|
||||
|
||||
To store either alias in your **.bashrc** or other startup file, make sure you insert a backslash in front of the **$** sign so that bash doesn't try to interpret **$4**.
|
||||
|
||||
```
|
||||
alias cmds='history | awk '\''{print \$2}'\'' | uniq -c | sort -nr'
|
||||
alias cmds='history | awk '\''{print \$4}'\'' | uniq -c | sort -nr'
|
||||
```
|
||||
|
||||
Note that the date and time information is stored on separate lines in your history file from the command themselves. So, when this information is added, the bash history file will have twice as many lines, though your history command output will not:
|
||||
|
||||
```
|
||||
$ wc -l .bash_history
|
||||
2000 .bash_history
|
||||
$ history | wc -l
|
||||
1000
|
||||
```
|
||||
|
||||
### Wrap-up
|
||||
|
||||
You can always decide how much command history you want to preserve and what commands are not worth recording to make your command summaries most useful.
|
||||
|
||||
Join the Network World communities on [Facebook][1] and [LinkedIn][2] to comment on topics that are top of mind.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://www.networkworld.com/article/3567050/summarizing-your-command-usage-on-linux.html
|
||||
|
||||
作者:[Sandra Henry-Stocker][a]
|
||||
选题:[lujun9972][b]
|
||||
译者:[译者ID](https://github.com/译者ID)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]: https://www.networkworld.com/author/Sandra-Henry_Stocker/
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://www.facebook.com/NetworkWorld/
|
||||
[2]: https://www.linkedin.com/company/network-world
|
@ -0,0 +1,76 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: ( )
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
[#]: subject: (Decentralized Messaging App Riot Rebrands to Element)
|
||||
[#]: via: (https://itsfoss.com/riot-to-element/)
|
||||
[#]: author: (John Paul https://itsfoss.com/author/john/)
|
||||
|
||||
Decentralized Messaging App Riot Rebrands to Element
|
||||
======
|
||||
|
||||
Riot is/was a decentralized instant messaging app based on the open source Matrix protocol.
|
||||
|
||||
In late June, Riot (the instant messaging client) announced that they would be changing their name. Yesterday, they revealed that their new name is [Element][1]. Let’s see more details on why Riot changed its name and what else is being changed.
|
||||
|
||||
### Why change the name from Riot to Element?
|
||||
|
||||
![][2]
|
||||
|
||||
Before we get to the most recent announcement, let us take a look at why they changed their name in the first place.
|
||||
|
||||
According to a [blog post][3] dated June 23rd, the group had three reasons for the name change.
|
||||
|
||||
First, they stated that “a certain large games company” had repeatedly blocked them from trademarking the Riot and Riot.im product names. (If I had to guess, they are probably referring to this [“games company”][4].)
|
||||
|
||||
Second, they originally chose the name Riot to “evoke something disruptive and vibrant”. They are worried that people are instead thinking that the app is “focused on violence”. I imagine that current world events have not helped that situation.
|
||||
|
||||
Thirdly, they want to clear up any confusion created by the many brand names involved with Riot. For example, Riot is created by a company named New Vector, while the Riot is hosted on Modular which is also a product of New Vector. They want to simplify their naming system to avoid confusing potential customers. When people look for a messaging solution, they want them to only have to look for one name: Element.
|
||||
|
||||
### Element is everywhere
|
||||
|
||||
![][5]
|
||||
|
||||
As of July 15th, the name of the app and the name of the company has been changed to Element. Their Matrix hosting service will now be called Element Matrix Services. Their announcement sums it up nicely:
|
||||
|
||||
> “For those discovering us for the first time: Element is the flagship secure collaboration app for the decentralised Matrix communication network. Element lets you own your own end-to-end encrypted chat server, while still connecting to everyone else in the wider Matrix network.
|
||||
|
||||
They chose the name Element because it “reflects the emphasis on simplicity and clarity that we aimed for when designing RiotX; a name that highlights our single-minded mission to make Element the most elegant and usable mainstream comms app imaginable”. They also said they wanted a name “evokes the idea of data ownership and self-sovereignty”. They also thought it was a cool name.
|
||||
|
||||
### More than just a name change
|
||||
|
||||
![][6]
|
||||
|
||||
The recent announcement also makes it clear that this move is more than just a simple name change. Element has also released its “next generation Matrix client for Android”. The client was formerly known as RiotX and is now renamed Element. (What else?) It is a complete rewrite of the former client and now supports VoIP calls and widgets. Element will also be available on iOS with support for iOS 13 with “entirely new push notification support”.
|
||||
|
||||
The Element Web client has also received some love with a UI update and a new easier to read font. They have also “rewritten the Room List control – adding in room previews(!!), alphabetic ordering, resizable lists, improved notification UI and more”. They have also started working to improve end-to-end encryption.
|
||||
|
||||
### Final thought
|
||||
|
||||
The people over at Element are taking a big step by making a major name change like this. They may lose some customers in the short term. (This could mainly be due to not being aware of the name change for whatever reason or not liking change.) However in the long run the brand simplification will help them stand out from the crowd.
|
||||
|
||||
The only negative note I’ll mention is that this is the third name change they have made in the app’s history. It was originally named Vector when it was released in 2016. The name was changed to Riot later that year. Hopefully, Element is here to stay.
|
||||
|
||||
If you found this article interesting, please take a minute to share it on social media, Hacker News, or [Reddit][7].
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://itsfoss.com/riot-to-element/
|
||||
|
||||
作者:[John Paul][a]
|
||||
选题:[lujun9972][b]
|
||||
译者:[译者ID](https://github.com/译者ID)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]: https://itsfoss.com/author/john/
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://element.io/
|
||||
[2]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/07/riot-to-element.png?ssl=1
|
||||
[3]: https://element.io/blog/the-world-is-changing/
|
||||
[4]: https://en.wikipedia.org/wiki/Riot_Games
|
||||
[5]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/07/element-desktop.jpg?ssl=1
|
||||
[6]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/07/element-apps.jpg?ssl=1
|
||||
[7]: http://reddit.com/r/linuxusersgroup
|
298
translated/tech/20200701 Customizing Bash.md
Executable file
298
translated/tech/20200701 Customizing Bash.md
Executable file
@ -0,0 +1,298 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: (nophDog)
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
[#]: subject: (Customizing Bash)
|
||||
[#]: via: (https://fedoramagazine.org/customizing-bash/)
|
||||
[#]: author: (Stephen Snow https://fedoramagazine.org/author/jakfrost/)
|
||||
|
||||
定制 Bash
|
||||
======
|
||||
|
||||
![][1]
|
||||
|
||||
操作系统的最外层 —— 也就是跟你直接打交道的 —— 叫做 [shell][2]。Fedora 预装了好几种不同的 shell。Shell 可以是图形界面,或者字符界面。在文档中,你常常能见到首字母缩写词 GUI (Graphical User Interface) 跟 CLI (Command-Line Interface) ,这两个词用来区分图形和字符 shell/界面。[GNOME][5] 和 [Bash][6] 分别是 Fedora 默认的图形和命令行界面,不过你也可以使用其它 [GUI][3] 或者 [CLI][4] shell。
|
||||
|
||||
接下来我们会讨论一些比较推荐的 Bash 字符界面点文件配置。
|
||||
|
||||
### Bash 概览
|
||||
|
||||
Bash 参考手册中写道:
|
||||
|
||||
> 根本上来说,shell 只是一个能执行命令的宏处理器。宏处理器这个词意味着通过扩展文本跟符号,从而构成更复杂的表达式。
|
||||
>
|
||||
> Bash 参考手册
|
||||
> 第五版,Bash 5.0
|
||||
> 2019 年 五月
|
||||
|
||||
除了能使用其它程序之外,Bash shell 还含有一些内置命令和关键字。Bash 内置功能很强大,甚至能够作为一[门高级语言][7]独当一面。部分 Bash 关键字和操作符类似于 [C 语言][8] 中的规范。
|
||||
|
||||
Bash 能够以交互式或非交互式模式启动。在交互模式中,Bash 就是一个很多人都熟悉的典型终端/命令行界面。[GNOME Terminal][9] 默认以交互模式打开 Bash。有一个 Bash 运行于非交互模式的典型例子,当它通过[管道][10]从文件或者 shell 脚本中获取命令和数据时。其它 Bash 可以运行的模式包括:登录(login),非登录(non-login),远程(remote),POSIX,unix sh,受限(restricted),以及不同于用户的 UID/GUI 模式。各种模式是可以相互组合的。比如,interactive + restricted + POSIX 或者 non-interactive + non-login + remote。不同的启动模式,决定着 Bash 所读取的启动文件。理解这些操作模式,有助于帮助我们修改启动文件。
|
||||
|
||||
根据 Bash 参考手册,它有以下行为:
|
||||
|
||||
> 1\. 从文件中读取输入...,从作为 -c 调用选项传入参数的字符...,或者从用户的终端。
|
||||
>
|
||||
>2\. 将输入分解成单词和操作符,遵循 [它的] 引用规则。...这些标记使用元字符隔开。这一步执行别名扩展。
|
||||
>
|
||||
> 3\. 将标记解析成简单与复合命令。
|
||||
>
|
||||
> 4\. 执行这种 shell 扩展...,将扩展之后的标记分解成文件名...和命令以及参数。
|
||||
>
|
||||
> 5\. 执行必要的重定向...从参数列表中去除重定向操作符和操作数。
|
||||
>
|
||||
> 6\. 执行命令。
|
||||
>
|
||||
> 7\. 必要时等待命令完成,收集退出状态。
|
||||
>
|
||||
> Bash 参考文档
|
||||
> 版本 5.0,Bash 版本 5.0
|
||||
> 五月 2019
|
||||
|
||||
当用户开启终端模拟器进入命令行环境时,便产生了一次交互式 shell 会话。GNOME Terminal 默认以非登录模式为用户打开 Shell。你可以在 Edit → Preferences → Profilles → Command 配置 GNOME Terminal 以何种模式(登录与非登录式)启动。登录模式可以在启动时通过 _-login_ 标识向 Bash 传递。要注意一点,Bash 的 _login_ 与 _non-interactive_ 模式并不互斥。可以让 Bash 同时以 _login_ 和 _non-Interactive_ 模式运行。
|
||||
|
||||
### 启动 Bash
|
||||
|
||||
除非传入 _noprofile_ 选项,否则 Bash 登录 shell 会默认读取、执行找到的初始化文件。如果 _/etc/profile_ 存在,它会是第一个被执行的文件,紧接着是按 _~/.bash_profile_, _~/.bash_login_ 或 _~/.profile_ 顺序找到的第一个文件。当用户退出登录 shell 时,或者有脚本在非交互登录 shell 中调用了内置 _exit_ 命令,Bash 会读取并执行 _~/.bash_logout_ 中的命令,如果 _/etc/bash_logout_ 存在的话,会紧接着执行。通常来说,_/etc/profile_ 会执行 _/etc/bashrc_ 文件,读取、执行其中的命令,然后查找并执行 _/etc/profile.d_ 目录中以 _sh_ 结尾的文件。同样的,_~/.bash_profile_ 通常也会执行 _~/.bashrc_ 文件。_/etc/bashrc_ 和 _~/.bashrc_ 都会进行检查,避免重复执行。
|
||||
|
||||
|
||||
第一次打开非登录式的交互 shell,会执行 _~/.bashrc_ 文件。这是用户在 Fedora 打开终端使用 shell 最常见的情形。当 Bash 以非交互模式启动 —— 就像运行脚本时那样 —— 它会寻找 _BASH_ENV_ 环境变量。如果找到了,就获取它的值作为文件名,接着读取、执行该文件中的命令。效果跟执行以下命令相同:
|
||||
|
||||
```
|
||||
if [ -n "$BASH_ENV" ]; then . "$BASH_ENV"; fi
|
||||
```
|
||||
|
||||
值得注意的是,_PATH_ 变量的值不会用于搜索文件名。
|
||||
|
||||
### 重要的用户点文件
|
||||
|
||||
Bash 最广为人知的用户点文件是 _~/.bashrc_。通过编辑该文件,可以设置许多个性化选项。由于我们常常需要设置一些选项,会改动上面提及甚至没有提及的文件,所以大部分自定义选项会成为一个麻烦事。Bash 环境具有很高的可定制性,正是为了适应不同用户的不同需求。
|
||||
|
||||
![][11]
|
||||
|
||||
当登录 shell 正常退出时,如果 _~/.bash_logout_ 和 _/etc/bash_logout_ 存在,它们会被调用。下一幅图展示了 Bash 作为交互式 shell 启动时的过程。例如,当用户从桌面环境打开终端模拟器时,会按照以下顺序进行。
|
||||
|
||||
![][12]
|
||||
|
||||
我们已经知道,在不同的启动模式下,Bash 会执行不同的命令,所以很明显,只有几种最需要关注的典型启动模式。分别是非交互、交互式登录 shell,和非交互式、交互式非登录 shell。如果想定义某些全局环境,那么需要将一个具有唯一名称、以 _.sh_ 为后缀的文件(例如 _custom.sh)放置 _/etc/profile.d_ 目录。
|
||||
|
||||
对于非交互式非登录启动方式,需要特别注意。在这种模式下,Bash 会检查 _BASH_ENV_ 变量。如果定义了该变量,Bash 会执行它所指向的文件。另外,处理 _BASH_ENV_ 时并不会使用 _PATH_ 变量所存储的值。所以它必须包含执行文件的绝对路径。比如说,如果有人希望非交互式执行脚本时,shell 能读取 _~/.bashrc_ 文件中的设置,那么他可以把类似下面这样的内容放在一个名为 _/etc/profile.d/custom.sh_ 的文件中...
|
||||
|
||||
```
|
||||
# custom.sh
|
||||
.
|
||||
.
|
||||
.
|
||||
#If Fedora Workstation
|
||||
BASH_ENV="/home/username/.bashrc"
|
||||
.
|
||||
.
|
||||
.
|
||||
#If Fedora Silverblue Workstation
|
||||
BASH_ENV="/var/home/username/.bashrc"
|
||||
|
||||
export BASH_ENV
|
||||
```
|
||||
|
||||
上面这份脚本会让每个 shell 脚本在运行之前先执行该用户的 _~/.bashrc_。
|
||||
|
||||
用户一般都会自定义系统环境,以便契合他们自己的工作习惯与偏好。举例来说,用户可以通过别名来实现这种程度的自定义。拥有相同起始参数、需要频繁使用的命令是制作别名的最佳选择。以下展示了一些来自 _~/.bashrc_ 文件中定义的别名。
|
||||
|
||||
```
|
||||
# .bashrc
|
||||
# 执行全局文件
|
||||
if [ -f /etc/bashrc ];
|
||||
then . /etc/bashrc
|
||||
fi
|
||||
.
|
||||
.
|
||||
.
|
||||
# 用户别名和函数
|
||||
alias ls='ls -hF --color=auto'
|
||||
alias la='ls -ahF --color=auto'
|
||||
|
||||
# 让 dir 命令用起来像在 Windows 那样
|
||||
alias dir='ls --color=auto --format=long'
|
||||
|
||||
# 用颜色高亮 grep 结果
|
||||
alias grep='grep --color=auto'
|
||||
```
|
||||
|
||||
在系统中,别名是一种自定义各种命令的方法。它能减少击键次数,而且让命令用起来更方便。针对用户级别的别名通常存放在该用户的 _~/.bashrc_ 文件中。
|
||||
|
||||
如果你发现自己经常要去历史中查找曾经执行过的某条命令,那可能需要改改历史设置了。你依然可以在 _~/.bashrc_ 文件中设置针对用户级别的历史选项。比如说,如习惯同时使用多个终端,那你可能要启用 _histappend_ 选项。某些 Bash 相关的 shell 选项本质上是布尔值(接收 _on_ 或 _off_),通常可以用内置命令 _shopt_ 启用或禁用。接收更复杂的值的 Bash 选项,常常通过赋值给环境变量来达到配置目的。以下演示如何以 shell 选项和环境变量定制 Bash。
|
||||
|
||||
```
|
||||
# 配置 Bash 历史
|
||||
|
||||
# Expand dir env vars on tab and set histappend
|
||||
shopt -s direxpand histappend
|
||||
|
||||
# - ignoreboth = ignorespace and ignoredup
|
||||
HISTCONTROL='ignoreboth'
|
||||
|
||||
# 控制 `history` 输出中的时间格式
|
||||
HISTTIMEFORMAT="[%F %T] "
|
||||
|
||||
# 无限历史记录
|
||||
# at least, only this works
|
||||
# NB:在新版 Bash 中,任何 < 0 的写法都有效,但是在 CentOS/RHEL 中,至少只有这样才行得通
|
||||
HISTSIZE=
|
||||
HISTFILESIZE=
|
||||
|
||||
# 或者对于使用新版 Bash 的人
|
||||
HISTSIZE=-1
|
||||
HISTFILESIZE=-1
|
||||
```
|
||||
|
||||
上面例子中的 _direxpand_ 选项,可以让 Bash 用文件名扩展结果替换目录名。它会改变 readline 编辑缓冲区的内容,所以你所输入的东西已经被补全得到的结果替换了。
|
||||
|
||||
_HISTCONTROL_ 变量用于启用或禁用命令历史的某些过滤选项。重复行,以空白打头的行,都能通过该选项将它们从命令历史中过滤掉。引用自 Dusty Mabe,我从他那儿得到的启发:
|
||||
|
||||
> _ignoredup_ 可以让历史不记录重复条目(如果你反复执行同一条命令)。_ignorespace_ 会忽略前面有空白的条目,当你在设置一个包含敏感信息的环境变量或者执行一条不想被记录进磁盘的命令时,这就很有用。_ignoreboth_ 相当于这两条选项的结合体。
|
||||
>
|
||||
> Dusty Mabe – Redhat Principle Software Engineer, June 19, 2020
|
||||
|
||||
对于命令行重度用户,Bash 有一个 _CDPATH_ 环境变量。如果 _CDPATH_ 包含一列目录供搜索,且提供一个相对路径作为 _cd_ 命令的第一个参数,那么它会检查所有的目录,寻找匹配的子目录并切换到第一个匹配结果目录。
|
||||
|
||||
```
|
||||
# .bash_profile
|
||||
|
||||
# 设置 CDPATH
|
||||
CDPATH="/var/home/username/favdir1:/var/home/username/favdir2:/var/home/username/favdir3"
|
||||
|
||||
# 也可以写成这样
|
||||
CDPATH="/:~:/var:~/favdir1:~/favdir2:~/favdir3"
|
||||
|
||||
export CDPATH
|
||||
```
|
||||
|
||||
_CDPATH_ 通常像 _PATH_ 一样更新 —— 通过在赋值右侧引用自身来保留原来的值。
|
||||
|
||||
```
|
||||
# .bash_profile
|
||||
|
||||
# 设置 CDPATH
|
||||
CDPATH="/var/home/username/favdir1:/var/home/username/favdir2:/var/home/username/favdir3"
|
||||
|
||||
# 或者写成这样
|
||||
CDPATH="/:~:/var:~/favdir1:~/favdir2:~/favdir3"
|
||||
|
||||
CDPATH="$CDPATH:~/favdir4:~/favdir5"
|
||||
|
||||
export CDPATH
|
||||
```
|
||||
|
||||
_PATH_ 是另一个极其重要的变量。它是系统上命令的搜索路径。注意,有些应用要求将它们自己的目录加入 _PATH_ 变量,这样才能正常使用。跟 _CDPATH_ 一样,通过在赋值右侧引用原值来追加新值到 _PATH_ 变量。如果你希望将新值前置,只需要把原来的值(_$PATH_)放到列表末尾即可。还有注意的是在 Fedora,这一列值通过冒号分隔(**:**)。
|
||||
|
||||
```
|
||||
# .bash_profile
|
||||
|
||||
# 添加 PATH 值到 PAHT 环境变量
|
||||
PATH="$PATH:~/bin:~:/usr/bin:/bin:~/jdk-13.0.2:~/apache-maven-3.6.3"
|
||||
|
||||
export PATH
|
||||
```
|
||||
|
||||
命令提示符是另一个流行的自定义选项。它有七个可定制的参数:
|
||||
|
||||
> **PROMPT_COMMAND** 如果设置了,会在每一个主提示符($PS1)出现之前执行。
|
||||
>
|
||||
> **PROMPT_DIRTRIM** 如果设置成大于零的数,则该值用作扩展 \w 和 \W 提示符字符串转义符时保留的尾随目录组件数量。删除的字符将替换为省略号。
|
||||
>
|
||||
> **PS0** 这个参数的值像 _PS1_ 一样扩展,在交互式 shell 读取命令之后、执行命令之前展示。
|
||||
>
|
||||
> **PS1** 主提示符字符串。默认值是 ‘**\s-\v\$** ‘。
|
||||
>
|
||||
> **PS2** 次提示符字符串。默认是 ‘_**>**_ ‘。在显示之前,_PS2_ 像 _PS1_ 那样扩展。
|
||||
>
|
||||
> **PS3** 这个参数的值用作 _select_ 命令的提示符。如果这个变量没有设置,_select_ 命令会用 ‘**#?** ‘ 作为提示符。
|
||||
>
|
||||
> **PS4** 这个参数的值像 _PS1_ 那样扩展,如果设置了 _-x_ 选项,这个值会在命令行被打印之前作为提示符显示。扩展后的值的第一个字符在必要时会复制数次,指示间接层数。默认值是 ‘_**+**_ ‘。
|
||||
>
|
||||
> Bash 参考文档
|
||||
> 版本 5.0,Bash 版本 5.0
|
||||
> 五月 2019
|
||||
|
||||
整篇文章只讨论了 Bash 的这一个方面。你可以找到许许多多信息和例子。有些点文件范例,包括提示符重构,都可以在文章底部链接的仓库中找到。你可以随意使用仓库中的例子进行学习和体验。
|
||||
|
||||
### 总结
|
||||
|
||||
既然你已经稍微了解 Bash 的工作原理,那就可以轻松修改你的 Bash 点文件,满足你自己的需求和习惯。美化你的提示符。制作一些别名。这样你的电脑才真的属于你。查看 _/etc/profile_,_/etc/bashrc_ 和 _/etc/profile.d/_ 这些文件的内容,获得一些启发。
|
||||
|
||||
你也可以留下关于终端模拟器的想法。有很多办法可以将你最喜欢的终端,完全配置成你想要的样子。你或许早就想到了,但是通常可以通过...没错...用户家目录的点文件实现这个目的。终端模拟器也能以一次登录会话启动,有些人总喜欢用登录环境。你使用终端和电脑的姿势,取决于你如何(或者不)修改你的点文件。
|
||||
|
||||
如果你很好奇自己的命令行处于什么会话状态,使用下面这个脚本来判断一下。
|
||||
|
||||
```
|
||||
#!/bin/bash
|
||||
|
||||
case "$-" in
|
||||
(*i*) echo This shell is interactive ;;
|
||||
(*) echo This shell is not interactive ;;
|
||||
esac
|
||||
```
|
||||
|
||||
把这几行放到一个文件里,加上可执行权限,然后运行,就能看到你当前处于何种类型的 shell。_$-_ 在 Bash 中是一个变量,如果是交互式 shell,它会包含字母 **i**。此外,你可以直接输出 $- 变量然后检查它的输出中是否含有 **i** 标记。
|
||||
|
||||
```
|
||||
$ echo $-
|
||||
```
|
||||
|
||||
### 参考信息
|
||||
|
||||
可以参考以下资料以获取更多信息和示例。 Bash 手册也是一个很好的信息来源。请注意,确保你的本地手册页记录了你当前运行的 Bash 版本的特性,因为在网上找到的信息有时可能太老(过时了)或太新(你的系统还没有安装)。
|
||||
|
||||
<https://opensource.com/tags/command-line>
|
||||
|
||||
<https://opensource.com/downloads/bash-cheat-sheet>
|
||||
|
||||
在上面的网站中,你必须要输入一个有效的电子邮箱地址,或者注册,才能下载。
|
||||
|
||||
<https://opensource.com/article/19/12/bash-script-template>
|
||||
|
||||
对本文有各种形式(点文件示例、提示,以及脚本文件)贡献的社区成员:
|
||||
|
||||
* Micah Abbott – Principal Quality Engineer
|
||||
* Micah Abbott – 首席质量工程师
|
||||
* John Lebon – Principal Software Engineer
|
||||
* John Lebon – 首席软件工程师
|
||||
* Dusty Mabe – Principal Software Engineer
|
||||
* Dusty Mabe – 首席软件工程师
|
||||
* Colin Walters – Senior Principal Software Engineer
|
||||
* Colin Walters – 高级首席软件工程师
|
||||
|
||||
|
||||
示例点文件和脚本可以在这个仓库中找到。
|
||||
|
||||
<https://github.com/TheOneandOnlyJakfrost/bash-article-repo>
|
||||
|
||||
请仔细检查上面所提供的仓库中的信息。有些可能已经过时了。里面还包含很多开发中的自定义脚本和宠物容器(pet container)配置例子,那些不是点文件。我推荐从 Lebon 的点文件开始学习,从头到尾都含有完善的解说,在我读过的脚本里属于最详细那一类。祝你学得开心!
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://fedoramagazine.org/customizing-bash/
|
||||
|
||||
作者:[Stephen Snow][a]
|
||||
选题:[lujun9972][b]
|
||||
译者:[译者ID](https://github.com/nophDog)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]: https://fedoramagazine.org/author/jakfrost/
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://fedoramagazine.org/wp-content/uploads/2020/05/bashenvironment-816x346.png
|
||||
[2]: https://en.wikipedia.org/wiki/Shell_(computing)
|
||||
[3]: https://fedoramagazine.org/fedoras-gaggle-of-desktops/
|
||||
[4]: https://en.wikipedia.org/wiki/Comparison_of_command_shells
|
||||
[5]: https://en.wikipedia.org/wiki/GNOME
|
||||
[6]: https://en.wikipedia.org/wiki/Bash_(Unix_shell)
|
||||
[7]: https://en.wikipedia.org/wiki/High-level_programming_language
|
||||
[8]: https://en.wikipedia.org/wiki/C_(programming_language)
|
||||
[9]: https://en.wikipedia.org/wiki/GNOME_Terminal
|
||||
[10]: https://en.wikipedia.org/wiki/Pipeline_(Unix)
|
||||
[11]: https://fedoramagazine.org/wp-content/uploads/2020/06/bash-initialization-1-1024x711.png
|
||||
[12]: https://fedoramagazine.org/wp-content/uploads/2020/06/bash-initialization-2-1024x544.png
|
||||
[13]: https://en.wikipedia.org/wiki/Boolean_data_type
|
@ -0,0 +1,88 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: (geekpi)
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
[#]: subject: (My feature-rich and minimal Linux terminal)
|
||||
[#]: via: (https://opensource.com/article/20/7/minimal-linux-terminal)
|
||||
[#]: author: (Sumantro Mukherjee https://opensource.com/users/sumantro)
|
||||
|
||||
我功能丰富又最小的 Linux 终端
|
||||
======
|
||||
这些应用和主题帮助我的终端变成自己的。
|
||||
![Digital images of a computer desktop][1]
|
||||
|
||||
每个人都喜欢以特定的方式设置他们的工作区;它可以帮助你提高效率,并使生活变得更轻松,它以一种有机的方式组织事物,并有一个对你有利的环境。这也绝对适用于终端。这可能就是为什么有这么多可用终端的原因。
|
||||
|
||||
在使用新的计算机时,我要做的第一件事是将终端设置为我自己的。
|
||||
|
||||
我最喜欢的终端应用是 [terminator][2],因为它的设计极简,并且内置了窗口选项。但从这里开始变得更加复杂。我将自己喜欢的终端风格描述为“功能丰富,但保持最小化”。这种平衡是我经常要调整的。
|
||||
|
||||
我使用 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][3],它是我环境的极其详细的视图。它包括一切,从命令高亮到运行时的时间戳。所有细节都集成到一个优雅的、上下文感知的提示中。上下文感知这里有两个好处,这里和下面的,作者可以在这里提供更多的信息,以了解这意味着什么以及为什么在终端中这是一件好事吗?
|
||||
|
||||
要安装 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][4]
|
||||
* [MesloLGS NF Bold.ttf][5]
|
||||
* [MesloLGS NF Italic.ttf][6]
|
||||
* [MesloLGS NF Bold Italic.ttf][7]
|
||||
|
||||
|
||||
|
||||
这将产生一个美观且上下文感知的终端(如 [screenfetch][8] 所示)
|
||||
|
||||
![terminator terminal shot via screenFetch ][9]
|
||||
|
||||
我已经习惯了这个特殊的设置,但是,尽管重要的是让你的工作环境成为你自己的,但这也并不是一个固执地尝试新事物的理由。为了满足新一代用户的需求,出现了新的终端。这意味着,即使一开始不熟悉,与以前的备用终端相比,新开发的终端可能更适合于当今的环境和职责。
|
||||
|
||||
我最近一直在考虑其他选择。我开始观察 [Starship][10] 的开发情况,它将自己描述为对任何 shell 来说都是最小的、快速的、可无限自定义的提示。它仍然有许多沉浸式的视觉细节,而不会像 Powerlevel10k 那样使人分心。
|
||||
|
||||
你最喜欢的终端是什么?为什么?请在评论栏分享!
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://opensource.com/article/20/7/minimal-linux-terminal
|
||||
|
||||
作者:[Sumantro Mukherjee][a]
|
||||
选题:[lujun9972][b]
|
||||
译者:[geekpi](https://github.com/geekpi)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]: https://opensource.com/users/sumantro
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/computer_desk_home_laptop_browser.png?itok=Y3UVpY0l (Digital images of a computer desktop)
|
||||
[2]: https://terminator-gtk3.readthedocs.io/en/latest/
|
||||
[3]: https://github.com/romkatv/powerlevel10k
|
||||
[4]: https://github.com/romkatv/powerlevel10k-media/raw/master/MesloLGS%20NF%20Regular.ttf
|
||||
[5]: https://github.com/romkatv/powerlevel10k-media/raw/master/MesloLGS%20NF%20Bold.ttf
|
||||
[6]: https://github.com/romkatv/powerlevel10k-media/raw/master/MesloLGS%20NF%20Italic.ttf
|
||||
[7]: https://github.com/romkatv/powerlevel10k-media/raw/master/MesloLGS%20NF%20Bold%20Italic.ttf
|
||||
[8]: https://github.com/KittyKatt/screenFetch
|
||||
[9]: https://opensource.com/sites/default/files/uploads/osdc00_edit.png (terminator terminal shot via screenFetch )
|
||||
[10]: https://starship.rs/
|
Loading…
Reference in New Issue
Block a user