diff --git a/sources/tech/20220706 10 Tools to Generate and Have Fun With ASCII Art in Linux Terminal.md b/sources/tech/20220706 10 Tools to Generate and Have Fun With ASCII Art in Linux Terminal.md deleted file mode 100644 index 4b7e7c3b18..0000000000 --- a/sources/tech/20220706 10 Tools to Generate and Have Fun With ASCII Art in Linux Terminal.md +++ /dev/null @@ -1,293 +0,0 @@ -[#]: subject: "10 Tools to Generate and Have Fun With ASCII Art in Linux Terminal" -[#]: via: "https://itsfoss.com/ascii-art-linux-terminal/" -[#]: author: "Abhishek Prakash https://itsfoss.com/author/abhishek/" -[#]: collector: "lkxed" -[#]: translator: "泠知落汐" -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " - -10 Tools to Generate and Have Fun With ASCII Art in Linux Terminal -====== -Linux terminal is not as scary as you think. - -Of course, it could be intimidating in the beginning but once you [know the terminal better][1], you start loving it. - -You are likely to use the terminal for serious work. But there are many fun stuff you can do in the terminal as well. - -One of them is experimenting with ASCII art. You can display predefined or random messages, play games, or run some animation in ASCII format in the Linux terminal using various command line tools. - -My teammate Sreenath likes to explore such unusual CLI tools and share his findings with me. I am sharing those findings with you. - -![ascii art tools linux][2] - -Most of these programs should be available in the repositories of your Linux distribution. You can use your system’s package manager to install them. To keep the article concise, I have only included the installation instructions for Ubuntu. - -### 1. lolcat: Add colors to your terminal - -Alright! lolcat doesn’t have anything to do with ASCII art. At least not directly. - -Still, I included it at the beginning of this article because you can combine other ASCII tools with lolcat. - -So, what does it do? It is similar to the cat command but it adds random gradient colors to its output. - -![lolcat][3] - -It may not look useful at the moment but you’ll see its impact when the outputs of other ASCII tools are piped through lolcat. - -Install lolcat with the apt command: - -``` -sudo apt install lolcat -``` - -### 2. Aewan: Display ASCII text beautifully - -Aewan is a multi-layered ASCII graphics/animation editor. It produces stand-alone cat-able ASCII art files and an easy-to-parse format for integration into terminal applications. - -It has two tools: `aewan`, an ASCII editor and `aecat`, for viewing the created file. - -I am not going to discuss the editor part here. - -![aewan initial layout][4] - -To display any text in pretty ASCII format, you need the aecat command. Notice the use of letters in the screenshot below. - -![aewan output][5] - -To install aewan use the following command: - -``` -sudo apt install aewan -``` - -And then use it like this: - -``` -aecat hello -``` - -### 3. Cowsay: Make an ASCII cow say whatever you want - -What does the cow say? Whatever you want it to say. - -The cowsay is already a popular tool among seasoned Linux users. It shows an ASCII cow that repeats the text you provide it. - -![cowsay][6] - -But you are not restricted to cows only. You can change it to several other characters as well. Like a dragon (burning King’s landing): - -![cowsay][7] - -Did you notice the colored output in the above screenshot? That’s the magic of the lolcat command I mentioned earlier. - -To install cowsay, use: - -``` -sudo apt install cowsay -``` - -Once installed, you can use it like this: - -``` -cowsay hello -``` - -You can refer to its [man page][8] for additional configuration and options. - -### 4. jp2a: Convert images into ASCII art - -jp2a is a command-line tool that [converts images to ASCII art in the Linux terminal][9]. It works with JPEG and PNG files. It also allows colored output and your selection of character set to appear as ASCII image. - -![jp2a][10] - -You can install it using the following command: - -``` -sudo apt install jp2a -``` - -You can get the colorful output and save the ASCII text like this: - -``` -jp2a --output=ascii.txt --colors input.png -``` - -It’s not the only program of this kind. There is ascii-image-converter and several other tools that could be used for the same purpose. I won’t discuss all of them in this list. - -### 5. linuxlogo: Display the ASCII logo your Linux distro - -The name says it all. It displays the [Linux logo in ASCII format][11]. - -No, not our [beloved Linux logo, Tux][12] but the logo of your Linux distribution. It also shows a few additional information like [Linux kernel version][13], CPU, RAM, hostname, etc. - -![linux logo][14] - -You can install it using the apt command: - -``` -sudo apt install linuxlogo -``` - -Just enter linuxlogo to use the command. - -### 6. Neoftech: Display the Linux logo along with system info - -The above linuxlogo command is too simplistic. You can amp it up by using Neofetch. - -It displays the distribution in a more pretty way along with several system information like kernel, uptime, desktop environment, theme, icons, etc. - -![neofetch][15] - -You can also parse it through lolcat to get rainbow-colored output. - -Install Neoftech using this command: - -``` -sudo apt install neofetch -``` - -And then just enter neoftech to run the command. - -There is also screenfetch, a similar tool to Neofetch. You can use either of them. - -### 7. fortune: Get your fortune told - -Just kidding! There’s no such thing. - -However, fortune cookies are still fashionable and apparently, people like to read random predictions or teachings. - -You can get a similar feature in the Linux terminal with the fortune command: - -![fortune cookie linux][16] - -You can install it using the following command: - -``` -sudo apt install fortune -``` - -Once installed, just enter fortune in the terminal to get a random message. - -### 8. pv: Make things animated - -This is a classic example of the unintended use of a Linux command. The pv command is used to monitor the progress of data through pipe. - -But you can use it to animate the output of any command. Combine it with some of the above-mentioned commands and you can see the ASCII art appearing on your screen as if it is being typed. - -Don’t get it? Watch this video: - -![A Video from YouTube][17] - -Install it using the following command: - -``` -sudo apt install pv -``` - -And then use it in the following manner: - -``` -neofetch | pv -qL 200 | lolcat -``` - -The higher the number, the higher will be the speed. - -### 9. cmatrix: Matrix like animation in ASCII - -Remember the cult geek move Matrix? The green falling code is synonymous with Matrix and hacking. - -You can run an ASCII simulation of the falling code in the Linux terminal with cmatrix command. - -I am sharing a screenshot instead of animation here. - -![cmatrix][18] - -You can install it with apt command: - -``` -sudo apt install cmatrix -``` - -Once installed, you can run it with: - -``` -cmatrix -``` - -It starts the animation immediately and it keeps on generating random green text falling and disappearing from the screen. The command keeps on running. To [stop the running application][19], use the Ctrl+C keys. - -### 10. cbonsai: Grow a bonsai in your terminal - -Got a green thumb? How about growing an ASCII bonsai tree in the terminal? - -cbonsai is a [fun Linux command][20] that lets you run bonsai tree growing animation in ASCII format. - -I shared a YouTube Shorts of cbonsai command a few days ago. - -![Have fun with the Linux terminal 😍 🐧][21] - -[Subscribe to our YouTube channel for more Linux videos][22] - -You can install cbonsai using: - -``` -sudo apt install cbonsai -``` - -And then to run the animation, use this command: - -``` -cbonsai -l -``` - -### Try some more - -There are many more such fun CLI tools. Heck, there are [ASCII games][23] as well. It’s fun to use them at times to amuse people around you. - -Can you put these commands to some good use? Not certain about the usability, but you can add some of them in your .bashrc file so that the command is run as soon as you open a terminal session. - -Many sys-admins do that on shared Linux systems. A program like cowsay or figlet can be used to display a message or system info in a pretty way. - -You may also use some of these programs in your bash scripts, especially if you have to highlight something. - -There could be other usages of ASCII art in Linux. I let you share them with the rest of us here. - -#### Read More Articles - --------------------------------------------------------------------------------- - -via: https://itsfoss.com/ascii-art-linux-terminal/ - -作者:[Abhishek Prakash][a] -选题:[lkxed][b] -译者:[泠知落汐](https://github.com/CoWave-Fall) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://itsfoss.com/author/abhishek/ -[b]: https://github.com/lkxed -[1]: https://itsfoss.com/basic-terminal-tips-ubuntu/ -[2]: https://itsfoss.com/wp-content/uploads/2022/07/ascii-art-tools-linux.png -[3]: https://itsfoss.com/wp-content/uploads/2022/07/lolcat.png -[4]: https://itsfoss.com/wp-content/uploads/2022/07/Aewan-initial-layout.png -[5]: https://itsfoss.com/wp-content/uploads/2022/07/aewan-output.png -[6]: https://itsfoss.com/wp-content/uploads/2022/07/cowsay-1.png -[7]: https://itsfoss.com/wp-content/uploads/2022/07/cowsay.png -[8]: https://itsfoss.com/linux-man-page-guide/ -[9]: https://itsfoss.com/ascii-image-converter/ -[10]: https://itsfoss.com/wp-content/uploads/2022/07/jp2a.png -[11]: https://itsfoss.com/display-linux-logo-in-ascii/ -[12]: https://itsfoss.com/tux-trivia/ -[13]: https://itsfoss.com/find-which-kernel-version-is-running-in-ubuntu/ -[14]: https://itsfoss.com/wp-content/uploads/2022/07/linux-logo.png -[15]: https://itsfoss.com/wp-content/uploads/2022/07/neofetch.png -[16]: https://itsfoss.com/wp-content/uploads/2022/07/fortune-cookie-Linux.png -[17]: https://player.vimeo.com/video/727286686 -[18]: https://itsfoss.com/wp-content/uploads/2022/07/cmatrix.png -[19]: https://itsfoss.com/stop-program-linux-terminal/ -[20]: https://itsfoss.com/funny-linux-commands/ -[21]: https://youtu.be/KqhqgdezPp8 -[22]: https://www.youtube.com/c/itsfoss?sub_confirmation=1 -[23]: https://itsfoss.com/best-ascii-games/ diff --git a/translated/tech/20220706 10 Tools to Generate and Have Fun With ASCII Art in Linux Terminal.md b/translated/tech/20220706 10 Tools to Generate and Have Fun With ASCII Art in Linux Terminal.md new file mode 100644 index 0000000000..f339c21d3f --- /dev/null +++ b/translated/tech/20220706 10 Tools to Generate and Have Fun With ASCII Art in Linux Terminal.md @@ -0,0 +1,292 @@ +[#]: subject: "10 Tools to Generate and Have Fun With ASCII Art in Linux Terminal" +[#]: via: "https://itsfoss.com/ascii-art-linux-terminal/" +[#]: author: "Abhishek Prakash https://itsfoss.com/author/abhishek/" +[#]: collector: "lkxed" +[#]: translator: "CoWave-Fall" +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +10 个在 Linux 终端中生成有趣的 ASCII 字符画的工具 +====== +Linux 终端其实没有想象中的那样可怕。 + +当然啦,一开始它可能会令人望而却步,但是当我们更了解它的时候,我们就会喜欢上它的。 + +你可能会使用终端来做一些严肃的工作。不过,你也可以在终端中做很多有趣的事情。 + +其中的一项就是试一试 ASCII 字符画。你可以在 Linux 终端中用各种命令行工具以 ASCII 的形式显示一些预定义的或是随机的消息,玩游戏,抑或是播放动画。 + +我的队友 Sreenath 喜欢探索此类不寻常的命令行工具并将他的发现分享给我。现在,我也将他的发现与你分享。 + +![ascii art tools linux][2] + + +你的 Linux 发行版的仓库中应该已经有这些程序中的大多数了。你可以用系统的包管理器安装它们。为了使文章简洁,下文的安装指南均以 Ubuntu 为例。 +### 1. lolcat: 向终端加入缤纷色彩 + +虽然 lolcat 与 ASCII 字符画没有任何关系,至少,没有直接关系。 + +但是,我还是在文章开头就列出了它,因为它可以与其他的 ASCII 工具组合使用。 + +所以,它能做什么呢?它与 cat 指令很相似,但是它向输出内容加入随机的渐变色彩。 + +![lolcat][3] + +目前它看起来可能没什么用,但当其他 ASCII 工具通过 lolcat 输出时,您会看到它的效果。 + +用 apt 安装 lolcat: + +``` +sudo apt install lolcat +``` +### 2. Aewan: 漂亮地显示 ASCII 字符 + +Aewan 是一个多层 ASCII 图形、动画编辑器。它可以生成独立的,可被 cat 命令查看的 ASCII 字符画文件和便于命令行工具集成与解析的格式。 + +它包括两个工具:ASCII 编辑器 `aewan`,和文件查看器 `aecat`。 + +这里不讨论编辑器部分。 + +![aewan 的初始状态布局][4] + +用 aecat 命令以 ASCII 格式漂亮地显示任何文本。注意下面的截屏中字母的使用方式。 + +![aewan output][5] + +用下面的命令安装 aewan: + +``` +sudo apt install aewan +``` + +然后这样使用: + +``` +aecat hello +``` + +### 3. Cowsay: 让 ASCII 牛复述你想说的话 + +牛说什么?你想什么就让它说什么。 + +cowsay 是已经在经验丰富的 Linux 用户中流行的工具。它显示了一个 ASCII 牛,会重复你提供的文本。 + +![cowsay][6] + +但不仅限于牛。你也可以将其更改为其他的角色。比如,一条龙(火龙君临): + +![cowsay][7] + +你注意到截图中的色彩了吗?这正是上文提到过的 lolcat 命令的魔力所在。 + +用下列命令安装 cowsay: + +``` +sudo apt install cowsay +``` + +装好之后,这样使用: + +``` +cowsay hello +``` + +你可以参考它的 [手册][8],浏览其他配置和选项。 + +### 4. jp2a: 图片转 ASCII 字符画 + +jp2a 是一个在 Linux 终端中将图像转换为 ASCII 字符画的命令行工具。它适用于 JPEG 和 PNG 文件,允许彩色输出和用您选定的字符显示 ASCII 字符画。 + +![jp2a][10] + +用下列命令安装它: + +``` +sudo apt install jp2a +``` + +你可以像这样得到彩色的输出,并且保存到文件。 + +``` +jp2a --output=ascii.txt --colors input.png +``` + +它并不是这类工具中的唯一一种,比如,ascii-image-converter 和几个其他的工具也可以达成相同的效果。在这里不再一一讨论了。 + +### 5. linuxlogo: 用 ASCII 格式显示 Linux 发行版的徽标 + +正如起名,它[用 ASCII 格式显示 Linux 发行版的标志][11]。 + +不,不是我们[喜爱的 Linux 标志 Tux][12],而是您的 Linux 发行版的徽标。它还显示一些其他信息,比如 Linux 内核版本、CPU、RAM、主机名等等。 + +![linux logo][14] + +用 apt 安装: + +``` +sudo apt install linuxlogo +``` + +输入 linuxlogo 就可以用啦。 + +### 6. Neoftech: 显示 Linux 标志和系统信息 + +上面的 Linux 标志有点太简化了。你可以用 Neofetch 放大他。 + +它以更漂亮的方式显示发行版以及一些系统信息,如内核、运行时间、桌面环境、主题和图标等等。 + +![neofetch][15] + +您还可以通过 lolcat 解析它,获得彩虹色的输出。 + +用这行命令安装 Neofetch: + +``` +sudo apt install neofetch +``` + +然后,输入 Neofetch 就可以运行啦。 + +还有一个与 Neofetch 很像的工具,screenfetch。用哪个都行。 + +### 7. fortune: 看看命运如何 + +开玩笑啦。这样的事情根本就不存在。 + +不过,幸运饼干仍然很流行,所以显然,人们喜欢阅读随机的预测或说法。 + +您可以在 Linux 终端中用 Fortune 命令达到类似效果: + +![fortune cookie linux][16] + +你可以用下面的命令安装它。 + +``` +sudo apt install fortune +``` + +装好之后,在终端中输入 fortunate 来得到一条随机消息。 + +### 8. pv: Make things animated + +这是非预期使用 Linux 命令的典型例子。pv 命令本来用于通过管道监控数据的进度。 + +但您可以使用它来对显示任何命令的输出加入动画效果。将其与上述的命令结合起来,您就可以看到 ASCII 字符画逐渐显现在屏幕上,就像正在输入一样。 + +不太明白?看看这个: + +![A Video from YouTube][17] + +用下面的命令安装: + +``` +sudo apt install pv +``` + +然后按这样使用: + +``` +neofetch | pv -qL 200 | lolcat +``` + +数字越大,速度越快。 + +### 9. cmatrix: 类似黑客帝国的 ASCII 动画 + +还记得 "黑客帝国 "吗?下落的绿色代码是黑客帝国和黑客的象征。 + +您可以使用 cmatrix 命令在 Linux 终端用 ASCII 模拟运行下落代码。 + +我在这里用一张图片代替视频。 + +![cmatrix][18] + +你可以用 apt 安装他: + +``` +sudo apt install cmatrix +``` + +安装好之后,用它运行: + +``` +cmatrix +``` + +它会立即启动,并不断生成随机的绿色文本,带着从屏幕上落下后消失的动画效果。该命令会持续运行。使用 Ctrl+C 停止运行程序。 + +### 10. cbonsai: Grow a bonsai in your terminal + +有没有园艺的天赋?在终端中种植一棵 ASCII 盆景树怎么样? + +cbonsai 是一个可让您以 ASCII 格式运行盆景树生长动画的有趣 Linux 命令。 + +几天前我发了一条关于 cbonsai 命令的 YouTube 短视频。 + +![Have fun with the Linux terminal 😍 🐧][21] + +[订阅我们的 YouTube 频道,查看更多关于 Linux 的视频][22] + +你可以用下面的命令安装 cbonsai: + +``` +sudo apt install cbonsai +``` + +用这行命令运行: + +``` +cbonsai -l +``` + +### Try some more + +还有很多这样的有趣的命令行工具,甚至还有[ASCII 游戏][23]。有时,看着它们给周围的人带来欢乐真的很有趣。 + +这些命令能派上用场吗?我不确定是否可用,但你可以在 .bashrc 文件中添加其中一些,这样一旦打开终端会话,命令就会立即运行。 + +许多系统管理员在共享的 Linux 系统上都会这样做。像 cowsay 或 figlet 这样的程序可以用来以漂亮的方式显示消息或系统概况。 + +您也可以在您的 bash 脚本中使用其中的一些程序,尤其是当您需要突出显示某些内容时。 + +ASCII 字符画在 Linux 中可能还会有其他用途。你可以与我们分享。 + +#### 阅读更多 + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/ascii-art-linux-terminal/ + +作者:[Abhishek Prakash][a] +选题:[lkxed][b] +译者:[泠知落汐](https://github.com/CoWave-Fall) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://itsfoss.com/author/abhishek/ +[b]: https://github.com/lkxed +[1]: https://itsfoss.com/basic-terminal-tips-ubuntu/ +[2]: https://itsfoss.com/wp-content/uploads/2022/07/ascii-art-tools-linux.png +[3]: https://itsfoss.com/wp-content/uploads/2022/07/lolcat.png +[4]: https://itsfoss.com/wp-content/uploads/2022/07/Aewan-initial-layout.png +[5]: https://itsfoss.com/wp-content/uploads/2022/07/aewan-output.png +[6]: https://itsfoss.com/wp-content/uploads/2022/07/cowsay-1.png +[7]: https://itsfoss.com/wp-content/uploads/2022/07/cowsay.png +[8]: https://itsfoss.com/linux-man-page-guide/ +[9]: https://itsfoss.com/ascii-image-converter/ +[10]: https://itsfoss.com/wp-content/uploads/2022/07/jp2a.png +[11]: https://itsfoss.com/display-linux-logo-in-ascii/ +[12]: https://itsfoss.com/tux-trivia/ +[13]: https://itsfoss.com/find-which-kernel-version-is-running-in-ubuntu/ +[14]: https://itsfoss.com/wp-content/uploads/2022/07/linux-logo.png +[15]: https://itsfoss.com/wp-content/uploads/2022/07/neofetch.png +[16]: https://itsfoss.com/wp-content/uploads/2022/07/fortune-cookie-Linux.png +[17]: https://player.vimeo.com/video/727286686 +[18]: https://itsfoss.com/wp-content/uploads/2022/07/cmatrix.png +[19]: https://itsfoss.com/stop-program-linux-terminal/ +[20]: https://itsfoss.com/funny-linux-commands/ +[21]: https://youtu.be/KqhqgdezPp8 +[22]: https://www.youtube.com/c/itsfoss?sub_confirmation=1 +[23]: https://itsfoss.com/best-ascii-games/