官术网_书友最值得收藏!

  • Linux Mint Essentials
  • Jay LaCroix
  • 449字
  • 2021-07-16 11:52:56

Why should we use the terminal?

With Mint containing a complete suite of graphical tools, one may wonder why it is useful to learn and use the terminal at all. Depending on the type of user, learning how to execute commands in a terminal may or may not be beneficial. If you are a user who intends to use Linux only for basic purposes such as browsing the Internet, checking e-mails, playing games, editing documents, printing, watching videos, listening to music, and so on, terminal commands may not be a useful skill to learn as all of these activities (as well as others) are best handled by a graphical desktop environment.

However, the real value of the terminal in Linux comes with advanced administration. Some administrative activities are faster using shell commands than using the GUI. For example, if you wanted to edit the /etc/fstab file, it would take fewer steps to type sudo nano /etc/fstab than it would to open a file manager with root permissions, navigate to the /etc directory, find the fstab file, and click on it to open it. This is especially true if all you want to do is make a quick change. Similarly, typing sudo apt-get install geany may be faster if you already know the name of the package you want, compared to opening up Mint Software Manager, waiting for it to load, finding the geany package, and installing it. On older and slower systems, the overhead caused by graphical programs may delay execution time.

Another value in the Linux Shell is scripting. With a script, you can create a text file with a list of commands and instructions and execute all of the commands contained within a single execution. For example, you can create a list of packages that you would prefer to install on your system, type them out in a text file, and add your distribution package's installation command at the beginning of the list. Now, you can install all of your favorite programs with a single command. If you save this script for later, you can execute it any time you reinstall Linux Mint so that you can immediately have access to all your favorite programs. If you are administering a server, you can create a script to check the overall health of the system at various times, check for security intrusions, or even configure servers to send you weekly reports on just about anything you'd like to keep yourself updated on. There are entire books dedicated to scripting, so we won't go in detail about it in this book. However, by the end of the chapter, we will create a script to demonstrate how to do so.

主站蜘蛛池模板: 宁强县| 开化县| 汪清县| 黄冈市| 荥阳市| 渑池县| 闵行区| 连山| 达尔| 增城市| 来安县| 彰化市| 永福县| 东丰县| 香格里拉县| 万盛区| 出国| 龙州县| 台东市| 天长市| 香河县| 德格县| 兰州市| 田东县| 紫阳县| 启东市| 紫云| 镇康县| 靖远县| 金华市| 凯里市| 岳池县| 彭山县| 沙雅县| 治多县| 通州区| 霍州市| 黎城县| 鲜城| 岱山县| 合阳县|