mirror of
https://github.com/LCTT/TranslateProject.git
synced 2025-02-16 00:21:12 +08:00
parent
d03c539635
commit
5b8a0f3a32
@ -0,0 +1,335 @@
|
||||
[#]: subject: "Moo! There is a Cow in My Linux Terminal"
|
||||
[#]: via: "https://itsfoss.com/cowsay/"
|
||||
[#]: author: "Sreenath https://itsfoss.com/author/sreenath/"
|
||||
[#]: collector: "lkxed"
|
||||
[#]: translator: "ChatGPT"
|
||||
[#]: reviewer: "wxy"
|
||||
[#]: publisher: "wxy"
|
||||
[#]: url: "https://linux.cn/article-15952-1.html"
|
||||
|
||||
哞~ 我的 Linux 终端里有头牛
|
||||
======
|
||||
|
||||
![][0]
|
||||
|
||||
> cowsay 是一个有趣的小型 Linux 命令行实用程序,它有各种使用方式。以下是几个示例。
|
||||
|
||||
如果你想的话,Linux 终端可以是一个有趣的地方。
|
||||
|
||||
当然,终端一般用在严肃的场合,但你可以使用 [有趣的 Linux 命令][1] 来娱乐自己。
|
||||
|
||||
`cowsay` 就是其中之一。它可以在终端上显示一头牛。
|
||||
|
||||
![Linux 中的 cowsay 命令][2]
|
||||
|
||||
`cowsay` 的一个特点是,如果与其他命令组合使用,它可以用于一些 “严肃的场合”。比如,在共享的 Linux 服务器上使用它来显示 “每日消息”,以供多个用户查看。
|
||||
|
||||
听起来有趣吗?是时候~~喂养~~安装一个了。
|
||||
|
||||
### 安装 Cowsay
|
||||
|
||||
`cowsay` 是一个受欢迎的工具,它可以在大多数 Linux 发行版的软件仓库中找到。
|
||||
|
||||
要在 Debian 和 Ubuntu 系统上安装 `cowsay`,请打开终端并运行:
|
||||
|
||||
```
|
||||
sudo apt install cowsay
|
||||
```
|
||||
|
||||
对于 Fedora,请使用:
|
||||
|
||||
```
|
||||
sudo dnf install cowsay
|
||||
```
|
||||
|
||||
在基于 Arch Linux 的发行版中,请使用:
|
||||
|
||||
```
|
||||
sudo pacman -S cowsay
|
||||
```
|
||||
|
||||
### 使用 Cowsay
|
||||
|
||||
顾名思义,这是一头以 ASCII 艺术展示的牛,能输出输入的文本。默认情况下,`cowsay` 提供了几个选项来调整这头 ASCII 牛的外观和样式。
|
||||
|
||||
#### 普通的 cowsay
|
||||
|
||||
```
|
||||
cowsay <文本>
|
||||
```
|
||||
|
||||
这将在牛讲话的气泡中打印你提供的任何文本。
|
||||
|
||||
![默认的 cowsay 命令][3]
|
||||
|
||||
或者,你可以使用管道重定向,将另一个命令(比如 `echo`)的输出作为 `cowsay` 的输入。
|
||||
|
||||
```
|
||||
echo "Hello" | cowsay
|
||||
```
|
||||
|
||||
#### 贪婪的牛
|
||||
|
||||
这里,牛的眼睛看起来有点贪婪,它是美元符号。
|
||||
|
||||
```
|
||||
cowsay -g <消息>
|
||||
```
|
||||
|
||||
![具有贪婪选项的 cowsay 命令][4]
|
||||
|
||||
#### 使用特殊字符作为眼睛
|
||||
|
||||
你可以使用 `-e` 选项,然后提供你希望作为眼睛的两个字符。默认是 `OO`。
|
||||
|
||||
```
|
||||
cowsay -e hh Hello
|
||||
```
|
||||
|
||||
![具有自定义眼睛字符的 cowsay 命令][5]
|
||||
|
||||
在上面的截图中,两个 `h` 将出现在眼睛的位置。
|
||||
|
||||
> 🚧 如果你输入的字符已被任何默认选项使用,比如 `$$`,那么它将被覆盖。
|
||||
|
||||
#### 使用其他字符代替牛
|
||||
|
||||
`cowsay` 还提供了许多其他 ASCII 图像,你可以通过 `-f` 选项使用它们。
|
||||
|
||||
使用 `-l` 选项列出它们:
|
||||
|
||||
```
|
||||
cowsay -l
|
||||
```
|
||||
|
||||
![使用 "ls /usr/share/cowsay/cows/" 和 "cowsay -l" 列出的各种默认 cowsay 图像][6]
|
||||
|
||||
现在,要打印上述图像之一,请使用:
|
||||
|
||||
```
|
||||
cowsay -f <牛文件名称> <消息>
|
||||
```
|
||||
|
||||
![使用不同图像而不是默认的牛的 cowsay 命令][7]
|
||||
|
||||
类似地,在更新的版本中,你可以使用 `-r` 选项随机打印上述图像之一。
|
||||
|
||||
```
|
||||
cowsay -r Hello
|
||||
```
|
||||
|
||||
#### 其他选项
|
||||
|
||||
| 选项 | 用途 |
|
||||
| :- | :- |
|
||||
| `-b` | 启用博格模式 |
|
||||
| `-d` | 看起来死了的牛 |
|
||||
| `-p` | 陷入偏执状态的牛 |
|
||||
| `-s` | 看起来迷迷糊糊的牛 |
|
||||
| `-t` | 一只疲倦的牛 |
|
||||
| `-y` | 让牛年轻一些 |
|
||||
|
||||
### 使用 Cowthink
|
||||
|
||||
`cowthink` 是与 `cowsay` 一起提供的辅助程序。它显示的是思维泡泡而不是说话泡泡。如果你熟悉漫画书的标注,这将更有意义。
|
||||
|
||||
```
|
||||
cowthink Hello
|
||||
```
|
||||
|
||||
![默认的 Cowthink 命令][8]
|
||||
|
||||
所有在 `cowsay` 中提到的选项在这里同样适用。
|
||||
|
||||
### 使用 Cowsay 和 Fortune
|
||||
|
||||
通过管道重定向,你可以将 `cowsay` 与另一个流行的有趣的 Linux 命令 `fortune` 结合使用。
|
||||
|
||||
> 💡 在 Ubuntu 中可以使用 `sudo apt install fortune lolcat` 命令安装 `fortune` 和 `lolcat`。
|
||||
|
||||
对于那些不知道 `fortune` 是什么的人来说,它是一个小程序,在终端上打印名人名言。你可以像这样作为独立命令来运行它:
|
||||
|
||||
```
|
||||
fortune
|
||||
```
|
||||
|
||||
要使用 `cowsay` 打印 `fortune` 的内容,运行:
|
||||
|
||||
```
|
||||
fortune | cowsay
|
||||
```
|
||||
|
||||
![][9]
|
||||
|
||||
你还可以添加 `cowsay` 的选项来使输出更好:
|
||||
|
||||
```
|
||||
fortune | cowsay -f dragon
|
||||
```
|
||||
|
||||
### 用 lolcat 把牛变成彩色的
|
||||
|
||||
许多人都熟悉 `lolcat` 给文本添加的彩虹效果。那么为什么不将其与上述程序一起使用呢?你只需要将 `cowsay` 命令连接到 `lolcat` 命令上即可。
|
||||
|
||||
```
|
||||
cowsay Hello | lolcat
|
||||
```
|
||||
|
||||
![运行 cowsay 和 lolcat][10]
|
||||
|
||||
现在,如果你想同时添加 `fortune` 和各种 `cowsay` 选项,请使用所有这些选项,并将整个命令的输出都连接到 `lolcat`,就像这样:
|
||||
|
||||
```
|
||||
fortune | cowsay -f tux | lolcat
|
||||
fortune | cowthink -f tux | lolcat
|
||||
```
|
||||
|
||||
![在一起运行 fortune、cowsay 和 lolcat][11]
|
||||
|
||||
### 第三方牛文件(适用于高级用户)
|
||||
|
||||
对默认的 `cowsay` 牛文件不感兴趣吗?别担心,有许多不同的牛文件可供选择,由热心的开发者创建。我在这里介绍两个:[https://github.com/bkendzior/cowfiles][12] 和 [https://github.com/paulkaefer/cowsay-files][13]。
|
||||
|
||||
你可以按照它们的 `README` 所述从这些存储库安装牛文件,或者只需从存储库中下载所需的牛文件(.cow)并将它们粘贴到 `/usr/share/cowsay/site-cows/` 下。现在,你可以通过文件名访问该牛文件:
|
||||
|
||||
```
|
||||
cowsay -f <新文件名> Hello
|
||||
```
|
||||
|
||||
在屏幕截图中,你可以看到我使用了一个下载下来的牛文件,名为 `C3PO.cow`。
|
||||
|
||||
对于那些想要创建自己的图像的人,可以访问 [Charc0al 的 cowsay 文件][14]。
|
||||
|
||||
![第三方牛文件][15]
|
||||
|
||||
在这里,你可以下载现有的文件,或者转换一些图像(建议不大于 50×50)以满足需求。
|
||||
|
||||
### 其他有趣的用法
|
||||
|
||||
#### 使用 cowsay 提示输入 sudo 命令的密码
|
||||
|
||||
```
|
||||
sudo -p "$(cowsay '如果你知道密码,请在此输入。否则请离开:')" <command>
|
||||
```
|
||||
|
||||
![Cowsay sudo 提示][16]
|
||||
|
||||
#### 将 cowsay 作为 bash 配置的一部分,以便在每次打开终端时看到欢迎
|
||||
|
||||
对于像 Fedora 中的较新版本的 `cowsay`,可以将 `fortune | cowsay -r | lolcat` 添加到你的 `~/.bashrc` 中。现在,每次打开终端时,都会打印一个带有不同名言的新牛文件。
|
||||
|
||||
对于没有随机选项(`-r`)的较旧版本的 `cowsay`,你可以手动获取不同的文件,并使用 `fortune | cowsay -f <要使用的特定牛文件的名称> | lolcat`。
|
||||
|
||||
#### 使用 cowsay 显示其他命令的输出
|
||||
|
||||
你可以让 `lsblk` 等命令使用 `cowsay` 打印输出。只需将这些命令连接起来。
|
||||
|
||||
```
|
||||
lsblk | cowsay
|
||||
```
|
||||
|
||||
#### 在 Fedora 中使用 cowsay-beefymiracle
|
||||
|
||||
`beefymiracle` 是 Fedora 中提供的一个 cowsay 包。这里的牛变成了牛肉(我这颗素食主义者的心在哭泣 😢)。
|
||||
|
||||
使用下面的命令来安装它:
|
||||
|
||||
```
|
||||
sudo dnf install cowsay-beefymiracle
|
||||
```
|
||||
|
||||
现在,运行:
|
||||
|
||||
```
|
||||
cowsay -f beefymiracle <消息>
|
||||
```
|
||||
|
||||
![cowsay 的 beefymiracle 文件][17]
|
||||
|
||||
### 更多:XCowsay
|
||||
|
||||
`xcowsay` 是普通的 cowsay 的图形替代品。这里,牛不再是 ASCII 图形,而是一个真实的图像。你可以通过以下方式进行安装:
|
||||
|
||||
```
|
||||
sudo apt install xcowsay
|
||||
```
|
||||
|
||||
现在运行:
|
||||
|
||||
```
|
||||
xcowsay <消息>
|
||||
```
|
||||
|
||||
这将根据文本的长度,在一段特定的时间内显示图形化的牛,然后消失,**但你可以点击它立即隐藏。**
|
||||
|
||||
![xcowsay 命令][18]
|
||||
|
||||
更有趣的是,牛可以“梦见”图像而不是文本。甚至牛的图像可以更改为随机图像。
|
||||
|
||||
使用以下命令之一:
|
||||
|
||||
```
|
||||
xcowsay --dream=file
|
||||
```
|
||||
|
||||
或者
|
||||
|
||||
```
|
||||
xcowsay --image=file --dream=file
|
||||
```
|
||||
|
||||
![][19]
|
||||
|
||||
![][20]
|
||||
|
||||
你可以查看 `xcowsay` 的手册页面以了解更多选项。
|
||||
|
||||
### 更多终端中的 ASCII 乐趣
|
||||
|
||||
喜欢 ASCII 艺术吗?可以尝试用 [Neofetch][21] 以 ASCII 格式显示你所使用的发行版的徽标。
|
||||
|
||||
为什么只限于徽标呢?Linux 终端上还有很多 ASCII 工具。
|
||||
|
||||
不要停止在终端中寻找乐趣。
|
||||
|
||||
希望你喜欢这篇关于以各种格式使用 `cowsay` 的教程。惊人的是,这个小工具提供了如此多的选项,有这么多的使用方式。
|
||||
|
||||
你最喜欢哪个 cowsay 的例子?不要说牛肉的那个 💔
|
||||
|
||||
*(题图:MJ/bd304f28-2476-4496-93d2-50fdae0a8831)*
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://itsfoss.com/cowsay/
|
||||
|
||||
作者:[Sreenath][a]
|
||||
选题:[lkxed][b]
|
||||
译者:ChatGPT
|
||||
校对:[wxy](https://github.com/wxy)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]: https://itsfoss.com/author/sreenath/
|
||||
[b]: https://github.com/lkxed/
|
||||
[1]: https://itsfoss.com/funny-linux-commands/
|
||||
[2]: https://itsfoss.com/content/images/2023/06/cowsay-linux.png
|
||||
[3]: https://itsfoss.com/content/images/2023/06/normal-cowsay.svg
|
||||
[4]: https://itsfoss.com/content/images/2023/06/greedy-cowsay.svg
|
||||
[5]: https://itsfoss.com/content/images/2023/06/cowsay-special-eyes.svg
|
||||
[6]: https://itsfoss.com/content/images/2023/06/cowsay-files.png
|
||||
[7]: https://itsfoss.com/content/images/2023/06/cowsay-different-inbuilt-files.svg
|
||||
[8]: https://itsfoss.com/content/images/2023/06/cowthink-normal.svg
|
||||
[9]: https://itsfoss.com/content/images/2023/06/fortune-cowsay.svg
|
||||
[10]: https://itsfoss.com/content/images/2023/06/cowsay-lolcat.svg
|
||||
[11]: https://itsfoss.com/content/images/2023/06/-cowsay-fortune-lolcat-tux.svg
|
||||
[12]: https://github.com/bkendzior/cowfiles
|
||||
[13]: https://github.com/paulkaefer/cowsay-files
|
||||
[14]: https://charc0al.github.io/cowsay-files/converter/
|
||||
[15]: https://itsfoss.com/content/images/2023/06/charcoal-cowfiles.png
|
||||
[16]: https://itsfoss.com/content/images/2023/06/cowsay-sudo-prompt.svg
|
||||
[17]: https://itsfoss.com/content/images/2023/06/cowsay-beefymiracle-fedora.png
|
||||
[18]: https://itsfoss.com/content/images/2023/06/xcowsay-normal.png
|
||||
[19]: https://itsfoss.com/content/images/2023/06/custom-image-in-xcowsay.png
|
||||
[20]: https://itsfoss.com/content/images/2023/06/xcowsay-random-image-both.png
|
||||
[21]: https://itsfoss.com/using-neofetch/
|
||||
[0]: https://img.linux.net.cn/data/attachment/album/202306/28/225311tkxprbpbv44zpta9.jpg
|
@ -1,325 +0,0 @@
|
||||
[#]: subject: "Moo! There is a Cow in My Linux Terminal"
|
||||
[#]: via: "https://itsfoss.com/cowsay/"
|
||||
[#]: author: "Sreenath https://itsfoss.com/author/sreenath/"
|
||||
[#]: collector: "lkxed"
|
||||
[#]: translator: " "
|
||||
[#]: reviewer: " "
|
||||
[#]: publisher: " "
|
||||
[#]: url: " "
|
||||
|
||||
Moo! There is a Cow in My Linux Terminal
|
||||
======
|
||||
|
||||
The Linux terminal can be a fun place if you want it to be.
|
||||
|
||||
Of course, it is used for serious work but you have [funny Linux commands][1] to amuse yourself.
|
||||
|
||||
The cowsay is one such tool. It gives you a cow in the terminal.
|
||||
|
||||
![Cowsay command in Linux][2]
|
||||
|
||||
The thing about cowsay is that it could be used for 'serious work' if combined with other commands. One such example is using it to display the 'message of the day' on a shared Linux server with multiple users.
|
||||
|
||||
Sounds interesting? Time to ̶m̶i̶l̶k̶ install it.
|
||||
|
||||
### Install Cowsay
|
||||
|
||||
Cowsay is a popular tool and it is available in the repositories of most Linux distributions.
|
||||
|
||||
To install cowsay in Debian and Ubuntu system, open a terminal and run:
|
||||
|
||||
```
|
||||
sudo apt install cowsay
|
||||
```
|
||||
|
||||
For Fedora, use:
|
||||
|
||||
```
|
||||
sudo dnf install cowsay
|
||||
```
|
||||
|
||||
And in Arch Linux based distros, use:
|
||||
|
||||
```
|
||||
sudo pacman -S cowsay
|
||||
```
|
||||
|
||||
### Using Cowsay
|
||||
|
||||
As the name suggests, this is an ASCII talking cow, that outputs text provided as its input. By default, cowsay provides several options to tweak the look and appearance of the ASCII cow.
|
||||
|
||||
#### Normal Cowsay
|
||||
|
||||
```
|
||||
cowsay <Text>
|
||||
```
|
||||
|
||||
This will print whatever text you provided in a speechbubble with the cow .
|
||||
|
||||
![The default cowsay command][3]
|
||||
|
||||
Or you can provide output of another command, say `echo` as input to cowsay using pipes redirection.
|
||||
|
||||
```
|
||||
echo "Hello" | cowsay
|
||||
```
|
||||
|
||||
#### Greedy Cow
|
||||
|
||||
Here, cow appears to be greedy, with Dollar eyes.
|
||||
|
||||
```
|
||||
cowsay -g <message>
|
||||
```
|
||||
|
||||
![Cowsay command with greedy option][4]
|
||||
|
||||
#### Use Special Characters as eyes
|
||||
|
||||
You can use the `-e` option, and then provide two characters that you want to appear as eyes. The default is “OO”.
|
||||
|
||||
```
|
||||
cowsay -e hh <hello>
|
||||
```
|
||||
|
||||
![Cowsay command with custom eye charaters][5]
|
||||
|
||||
Here, in the above screenshots, two “h” will appear in place of eyes.
|
||||
|
||||
> 🚧 If the characters entered by you has already been used by any of the default option, say $$, then it is lost.
|
||||
|
||||
#### Use another character instead of the cow
|
||||
|
||||
Cowsay provides many other ASCII images also, which you can use through the option `-f`.
|
||||
|
||||
List them with option `-l`:
|
||||
|
||||
```
|
||||
cowsay -l
|
||||
```
|
||||
|
||||
![Various default cowsay cow files listed using "ls /usr/share/cowsay/cows/" and "cowsay -l"][6]
|
||||
|
||||
Now, to print one of the above images, use:
|
||||
|
||||
```
|
||||
cowsay -f <cowfile name> <message>
|
||||
```
|
||||
|
||||
![Cowsay command using different images instead of the default cow][7]
|
||||
|
||||
Similarly, in newer versions, you can use `-r` option to randomly print one of the above images.
|
||||
|
||||
```
|
||||
cowsay -r Hello
|
||||
```
|
||||
|
||||
#### Other options
|
||||
|
||||
| Option | Use |
|
||||
| :- | :- |
|
||||
| -b | Invokes Borg mode |
|
||||
| -d | Causes the cow to appear dead |
|
||||
| -p | Causes a state of paranoia to come over the cow |
|
||||
| -s | Makes the cow appear thoroughly stoned |
|
||||
| -t | A tired cow |
|
||||
| -y | Brings on the cow’s youthful appearance |
|
||||
|
||||
### Using Cowthink
|
||||
|
||||
Cowthink is an adjoint program that come with cowsay. Instead of the speach bubble, it displays the thought bubble. It will make more sense to you if you are familiar with comic book notations.
|
||||
|
||||
```
|
||||
cowthink Hello
|
||||
```
|
||||
|
||||
![Default Cowthink command][8]
|
||||
|
||||
All the options that were mentioned with cowsay will work here as well.
|
||||
|
||||
### Using Cowsay with Fortune
|
||||
|
||||
With the help of pipe redirection, you can use cowsay along with another popular fun Linux command, the `fortune` command.
|
||||
|
||||
> 💡 Install fortune and lolcat in Ubuntu using `sudo apt install fortune lolcat`
|
||||
|
||||
For those of you, who don’t know what `fortune`, it is a small program, that prints quotes from famous persons on a terminal. You can run it as a standalone command like:
|
||||
|
||||
```
|
||||
fortune
|
||||
```
|
||||
|
||||
To simply print what fortune says using cowsay, run:
|
||||
|
||||
```
|
||||
fortune | cowsay
|
||||
```
|
||||
|
||||
![][9]
|
||||
|
||||
You can also add the cowsay options to make it better:
|
||||
|
||||
```
|
||||
fortune | cowsay -f dragon
|
||||
```
|
||||
|
||||
### Using a colorful cow with lolcat
|
||||
|
||||
Many of you know lolcat and its rainbow effects on texts. So why not use it along with the above programs? All you have to do is to pipe the cowsay command to lolcat.
|
||||
|
||||
```
|
||||
cowsay Hello | lolcat
|
||||
```
|
||||
|
||||
![Running cowsay and lolcat][10]
|
||||
|
||||
Now, if you want to add `fortune` and various `cowsay` options along with this, use all such options and pipe the entire thing to lolcat, like this:
|
||||
|
||||
```
|
||||
fortune | cowsay -f tux | lolcat
|
||||
fortune | cowthink -f tux | lolcat
|
||||
```
|
||||
|
||||
![Running fortune, cowsay and lolcat together][11]
|
||||
|
||||
### Third-party cow files (for advanced users)
|
||||
|
||||
Not interested in the default cowsay cow files? Do not worry, there are a huge number of different cowfiles out there, created by enthusiast developers. Two of them, I will mention here. [https://github.com/bkendzior/cowfiles][12] and [https://github.com/paulkaefer/cowsay-files][13]
|
||||
|
||||
You can either install the cowfiles from these repositories as mentioned on their README, or just download the required cowfile (.cow) from the repository and paste them on `/usr/share/cowsay/site-cows/`. Now, you can access that cowfile using its name:
|
||||
|
||||
```
|
||||
cowsay -f <new file name> Hello
|
||||
```
|
||||
|
||||
You can see in the screenshot I have used a downloaded cow file, called C3PO.cow.
|
||||
|
||||
For those of you, who want to create your own images, you can visit [Charc0al’s cowsay file][14].
|
||||
|
||||
![Third Party cowfiles][15]
|
||||
|
||||
Here, you can either download the existing files, or convert some of your images (recommend no larger than 50 × 50) for the purpose.
|
||||
|
||||
### Other funny uses
|
||||
|
||||
**Use cowsay prompt to enter password in sudo commands:**
|
||||
|
||||
```
|
||||
sudo -p "$(cowsay 'If you know the password, enter it here. Or just go away:')" <command>
|
||||
```
|
||||
|
||||
![Cowsay Sudo prompt][16]
|
||||
|
||||
**Make cowsay as an entry to your bash config, so you are greeted every time you open the terminal.**
|
||||
|
||||
- For newer cowsay versions, like those in Fedora, add `fortune | cowsay -r | lolcat` to your `~/.bashrc`. Now, each time, you open the terminal, a new cowfile with a different quote will be printed.
|
||||
- For older versions of cowsay, where you cannot get the random (-r) option, you can get different files manually, and use `fortune | cowsay -f <name of particular cowfile to use> | lolcat`.
|
||||
|
||||
**Make other commands show output using cowsay**
|
||||
|
||||
You can make commands like `lsblk` to print the output using cowsay. Just pipe those commands.
|
||||
|
||||
```
|
||||
lsblk | cowsay
|
||||
```
|
||||
|
||||
**Use cowsay-beefymiracle in Fedora**
|
||||
|
||||
`beefymiracle` is a cowsay package available in Fedora. The cow is turned into beef here (my vegetarian heart cries 😢).
|
||||
|
||||
Use the below command to install it:
|
||||
|
||||
```
|
||||
sudo dnf install cowsay-beefymiracle
|
||||
```
|
||||
|
||||
Now, run:
|
||||
|
||||
```
|
||||
cowsay -f beefymiracle <message>
|
||||
```
|
||||
|
||||
![cowsay beefymiracle file][17]
|
||||
|
||||
### Bonus: XCowsay
|
||||
|
||||
`xcowsay` is a graphical alternative to the normal cowsay. Here, the cow is no more ASCII, but a proper image. You can install it by:
|
||||
|
||||
```
|
||||
sudo apt install xcowsay
|
||||
```
|
||||
|
||||
Now run:
|
||||
|
||||
```
|
||||
xcowsay <message>
|
||||
```
|
||||
|
||||
This will display the graphical cow for a specific amount of time according to the length of the text, and then disappears. **You can click on it to hide it immediately, though.**
|
||||
|
||||
![xcowsay command][18]
|
||||
|
||||
What is more interesting is the cow can 'dream' images instead of texts. Or even the cow image can be changed to random images.
|
||||
|
||||
Use either:
|
||||
|
||||
```
|
||||
xcowsay --dream=file
|
||||
|
||||
OR
|
||||
|
||||
xcowsay --image=file --dream=file
|
||||
```
|
||||
|
||||
![][19]
|
||||
|
||||
![][20]
|
||||
|
||||
You can explore the man page of `xcowsay` for more options.
|
||||
|
||||
### More ASCII fun in the terminal
|
||||
|
||||
Love ASCII? How about displaying your distribution's logo in ASCII format with [Neoftech][21]?
|
||||
|
||||
Why restrict with logo? Here are more ASCII tools for Linux terminal.
|
||||
|
||||
Don't stop the fun in the terminal.
|
||||
|
||||
I hope you liked this tutorial on using cowsay in various formats. It's amazing that this little tool comes with so many options and there are so many ways to use it.
|
||||
|
||||
Which cowsay example did you like the most here? Don't say beef one 💔
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://itsfoss.com/cowsay/
|
||||
|
||||
作者:[Sreenath][a]
|
||||
选题:[lkxed][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/sreenath/
|
||||
[b]: https://github.com/lkxed/
|
||||
[1]: https://itsfoss.com/funny-linux-commands/
|
||||
[2]: https://itsfoss.com/content/images/2023/06/cowsay-linux.png
|
||||
[3]: https://itsfoss.com/content/images/2023/06/normal-cowsay.svg
|
||||
[4]: https://itsfoss.com/content/images/2023/06/greedy-cowsay.svg
|
||||
[5]: https://itsfoss.com/content/images/2023/06/cowsay-special-eyes.svg
|
||||
[6]: https://itsfoss.com/content/images/2023/06/cowsay-files.png
|
||||
[7]: https://itsfoss.com/content/images/2023/06/cowsay-different-inbuilt-files.svg
|
||||
[8]: https://itsfoss.com/content/images/2023/06/cowthink-normal.svg
|
||||
[9]: https://itsfoss.com/content/images/2023/06/fortune-cowsay.svg
|
||||
[10]: https://itsfoss.com/content/images/2023/06/cowsay-lolcat.svg
|
||||
[11]: https://itsfoss.com/content/images/2023/06/-cowsay-fortune-lolcat-tux.svg
|
||||
[12]: https://github.com:443/bkendzior/cowfiles
|
||||
[13]: https://github.com:443/paulkaefer/cowsay-files
|
||||
[14]: https://charc0al.github.io:443/cowsay-files/converter/
|
||||
[15]: https://itsfoss.com/content/images/2023/06/charcoal-cowfiles.png
|
||||
[16]: https://itsfoss.com/content/images/2023/06/cowsay-sudo-prompt.svg
|
||||
[17]: https://itsfoss.com/content/images/2023/06/cowsay-beefymiracle-fedora.png
|
||||
[18]: https://itsfoss.com/content/images/2023/06/xcowsay-normal.png
|
||||
[19]: https://itsfoss.com/content/images/2023/06/custom-image-in-xcowsay.png
|
||||
[20]: https://itsfoss.com/content/images/2023/06/xcowsay-random-image-both.png
|
||||
[21]: https://itsfoss.com/using-neofetch/
|
Loading…
Reference in New Issue
Block a user