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

  • 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.

主站蜘蛛池模板: 中超| 池州市| 淳化县| 逊克县| 马山县| 明水县| 霸州市| 邵阳市| 巴彦淖尔市| 丹阳市| 嵩明县| 芦溪县| 来宾市| 昌黎县| 鄂尔多斯市| 万年县| 呼图壁县| 壤塘县| 普兰店市| 巨野县| 南澳县| 孝感市| 理塘县| 资阳市| 虎林市| 阿鲁科尔沁旗| 邹城市| 凌云县| 台湾省| 锡林郭勒盟| 中西区| 东方市| 桐庐县| 江陵县| 鄂伦春自治旗| 绥阳县| 金昌市| 邵东县| 资源县| 鄂托克前旗| 林西县|