Merge pull request #25559 from FYJNEVERFOLLOWS/0509translate

[翻译完成] 8 tips for the Linux command line
This commit is contained in:
六开箱 2022-05-09 19:16:58 +08:00 committed by GitHub
commit 172d17454e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 74 additions and 77 deletions

View File

@ -1,77 +0,0 @@
[#]: collector: (lujun9972)
[#]: translator: (FYJNEVERFOLLOWS )
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
[#]: subject: (8 tips for the Linux command line)
[#]: via: (https://opensource.com/article/21/1/linux-commands)
[#]: author: (Jim Hall https://opensource.com/users/jim-hall)
8 tips for the Linux command line
======
Take advantage of all of the powers the almighty Linux command line has
to offer.
![Terminal command prompt on orange background][1]
The Linux command line provides a great deal of flexibility. Whether you are managing a server or launching a terminal window on a desktop system, the command line brings with it an extensive toolkit to update files, tweak system performance, and manage processes. The command line is where it's at.
Testifying to the command line's popularity, Opensource.com publishes many excellent articles about how to get the most out of your system. The following were some of Opensource.com's most-read articles about Linux commands in 2020:
### [Make Bash history more useful with these tips][2]
Bash is the default command line shell on most Linux systems. Seth Kenlon wrote this guide to help you with your Bash **history**. Manipulating history is usually less dangerous than it sounds, especially when you're curating it with a purpose in mind. Tell Bash what you want it to remember—or even rewrite history by deleting entries you don't want or need. Use your history sessions as required, and exercise your power over history wisely.
### [How I balance features and performance in my Linux terminal][3]
Ricardo Gerardi is a big fan of command line applications and spends a lot of his time working in a terminal. Ricardo invested some time to make the command line a pleasant environment to work in. Learn how to customize terminal apps, themes, and the prompt to create a feature-rich terminal that's easy on system resources.
### [Drop Bash for the fish shell to get beautiful defaults][4]
Matt Broberg recently let go of the default command line interpreter, Bash, in favor of fish, which proudly markets itself as "a command line shell for the '90s." The fish-themed "friendly interactive shell" creates a more enjoyable experience on the command line. Read Matt's article to learn more about how to get the most out of fish. If you're looking to move away from tinkering with your terminal, focus more on code, and have a more beautiful default shell, give fish a try.
### [10 ways to analyze binary files on Linux][5]
We work with binaries daily, yet we understand so little about them. Linux provides a rich set of tools that makes analyzing binaries a breeze! These simple commands and tools can help you sail through the task of analyzing binary files. Whatever your job role, knowing the basics about these tools will help you understand your Linux system better. Gaurav Kamathe covers some of the most popular Linux tools and commands to manage binaries, including **file**, **nm**, **strings**, and **hexdump**.
### [4 Markdown tools for the Linux command line][6]
When it comes to working with files formatted with Markdown, command line tools rule the roost. They're light, fast, powerful, and flexible, and most of them follow the Unix philosophy of doing one thing well. Scott Nesbitt reviews four command line utilities that can help you work more efficiently with Markdown files.
### [Improve Linux system performance with noatime][7]
Whenever I upgrade Linux on my home computer, I have a list of tasks I usually do. They've become habits over the years: I back up my files, wipe the system, reinstall from scratch, restore my files, then reinstall my favorite extra applications. I also make a few system tweaks. One tweak is **atime**, which is one of the three timestamps on every file on Linux. Turning off **atime** is a small but effective way to improve system performance. Here's what it is and why it matters.
### [Extend the life of your SSD drive with fstrim][8]
Over the past decade, solid-state drives (SSD) have brought about a new way of managing storage. SSDs have benefits like silent and cooler operation and a faster interface spec, compared to their elder spinning ancestors. Of course, new technology brings with it new methods of maintenance and management. Alan Formy-Duval wrote about a new **systemd** service to make your life easier when managing SSDs.
### [5 modern alternatives to essential Linux command line tools][9]
In our daily use of Linux/Unix systems, we use many command line tools to complete our work, and to help us understand and manage our systems better. Over the years, these tools have been modernized and ported to different systems. However, in general, they still follow their original idea, look, and feel. In recent years, the open source community has developed alternative tools that offer additional benefits. Ricardo Gerardi shows us how to gain new benefits by improving old command line tools with these five updated alternatives.
### Wrap up
Use these articles as a springboard to finding your own tips and tricks for the command line. Is there something missing from this list? Comment below, or better yet, submit an article of your own!
--------------------------------------------------------------------------------
via: https://opensource.com/article/21/1/linux-commands
作者:[Jim Hall][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/jim-hall
[b]: https://github.com/lujun9972
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/terminal_command_linux_desktop_code.jpg?itok=p5sQ6ODE (Terminal command prompt on orange background)
[2]: https://opensource.com/article/20/6/bash-history-control
[3]: https://opensource.com/article/20/7/performance-linux-terminal
[4]: https://opensource.com/article/20/3/fish-shell
[5]: https://opensource.com/article/20/4/linux-binary-analysis
[6]: https://opensource.com/article/20/3/markdown-apps-linux-command-line
[7]: https://opensource.com/article/20/6/linux-noatime
[8]: https://opensource.com/article/20/2/trim-solid-state-storage-linux
[9]: https://opensource.com/article/20/6/modern-linux-command-line-tools

View File

@ -0,0 +1,74 @@
[#]: collector: (lujun9972)
[#]: translator: (FYJNEVERFOLLOWS )
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
[#]: subject: (8 tips for the Linux command line)
[#]: via: (https://opensource.com/article/21/1/linux-commands)
[#]: author: (Jim Hall https://opensource.com/users/jim-hall)
使用 Linux 命令行的 8 个技巧
======
要好好利用无所不能的 Linux 命令行提供的所有功能
![Terminal command prompt on orange background][1]
Linux 命令行是极其灵活的。无论你是管理服务器还是在桌面系统上启动终端窗口,都可以通过命令行无所不包的工具包来更新文件、调整系统性能或者管理进程。命令行里发生的事情是非常有趣的。[https://www.collinsdictionary.com/zh/dictionary/english/where-its-at]
Opensource.com 发布了许多关于如何充分利用系统的优秀文章,证明了命令行的流行。下面是 2020 年 Opensource.com 中关于 Linux 命令阅读量最高的一些文章:
### [使用这些技巧让 Bash history 更加有用][2]
Bash 是大多数 Linux 系统上的默认命令行 Shell。Seth Kenlon 编写了该指南,用于帮助你了解 Bash **history**。修改 Bash history 通常没有听起来那么危险,特别是当你带有目的地修改 Bash history 的时候。告诉 Bash 你希望它记住什么,甚至还可以直接通过删除你不想要或不需要的条目来重写历史。根据需要使用你的历史会话,明智地行使你对历史的权力。
### [如何在 Linux 终端中兼顾特性和性能][3]
Ricardo Gerardi 非常喜欢命令行应用程序他花了很多时间在终端上工作。Ricardo 投入了一些时间,把命令行变成了一个令人愉快的工作环境。你可以通过了解如何自定义终端应用程序、主题和提示符,来创建一个功能丰富、易于使用系统资源的终端。
### [放弃 Bash 转投拥有更优美配置的 Fish][4]
Matt Broberg 最近放弃了默认的命令行解释器 —— Bash转而支持 fish。fish 自豪地宣称自己是“90年代的命令行 shell”。以鱼为主题的“友好的交互式 shell”为命令行创造了更愉快的体验。阅读 Matt 的文章来进一步了解如何充分利用 fish。如果你不想再对你的终端修修补补换一个更漂亮的默认 shell把更多精力放在代码上不妨试一试 fish。
### [分析 Linux 里二进制文件的 10 种方式][5]
我们每天都在和二进制文件打交道但我们对它们的了解甚少。Linux 提供了一组丰富的工具使分析二进制文件变得轻而易举这些简单的命令和工具可以帮助你顺利完成分析二进制文件的任务。无论你的工作角色是什么了解这些工具的基本知识将帮助你更好地了解你的Linux系统。Gaurav Kamathe 介绍了一些最流行的用于管理二进制文件的 Linux 工具和命令,包括 **file**、**nm**、**strings** 和 **hexdump**
### [可用于 Linux 命令行的 4 种 Markdown 工具][6]
当涉及使用 Markdown 格式的文件时,命令行工具占据了主导地位。它们轻巧、快速、强大而又灵活,其中大多数遵循 Unix 把一件事情做好的哲学。Scott Nesbitt 回顾了 4 种命令行实用工具,它们可以帮助你更高效地处理 Markdown 文件。
### [禁用 atime 来提高 Linux 系统性能][7]
每当我在为家里的电脑升级 Linux 时,我都会把我通常要做的任务列出来。这些年来,它们已经成为了习惯:备份文件、还原系统、重新安装、恢复文件,然后重新安装额外的我最喜欢的应用程序。我还会对系统进行了一些调整。其中一个调整就是 **atime**,它是 Linux 里每个文件的三个时间戳之一。关掉 **atime** 是一种简单但有效的提升系统性能的方法。下面是关于 **atime** 的介绍,以及为什么它会有影响。
### [使用 fstrim 延长固态硬盘的寿命][8]
在过去的十年中固态硬盘SSD带来了一种全新的管理存储的方式。相比传统的机械硬盘固态硬盘具有一些优点比如安静、更酷的操作和更快的接口规格。当然新技术带来了新的维护和管理方法。Alan Formy-Duval 写了一个新的 **systemd** 服务让你更容易管理固态硬盘。
### [Linux 命令行工具的 5 种新式替代品][9]
在我们日常使用的 Linux 或 Unix 系统中我们会使用许多命令行工具来完成我们的工作并帮助我们更好地了解和管理我们的系统。多年来这些工具已经现代化并移植到了不同的系统中。然而总的来讲它们仍然保持着最初的想法、外观和感觉。近年来开源社区已经开发出了提供额外好处的替代工具。Ricardo Gerardi 向我们展示了如何通过这 5 种新的替代品改进旧的命令行工具来获得新的好处。
### 总结
把这些文章作为跳板,寻找你自己关于命令行的技巧和花招吧!这份清单里还缺少什么吗?请在下方评论,或者提交一篇你自己的文章!
--------------------------------------------------------------------------------
via: https://opensource.com/article/21/1/linux-commands
作者:[Jim Hall][a]
选题:[lujun9972][b]
译者:[FYJNEVERFOLLOWS](https://github.com/FYJNEVERFOLLOWS)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://opensource.com/users/jim-hall
[b]: https://github.com/lujun9972
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/terminal_command_linux_desktop_code.jpg?itok=p5sQ6ODE (Terminal command prompt on orange background)
[2]: https://opensource.com/article/20/6/bash-history-control
[3]: https://opensource.com/article/20/7/performance-linux-terminal
[4]: https://opensource.com/article/20/3/fish-shell
[5]: https://opensource.com/article/20/4/linux-binary-analysis
[6]: https://opensource.com/article/20/3/markdown-apps-linux-command-line
[7]: https://opensource.com/article/20/6/linux-noatime
[8]: https://opensource.com/article/20/2/trim-solid-state-storage-linux
[9]: https://opensource.com/article/20/6/modern-linux-command-line-tools