An operating system (OS) is a program that makes it... Read more →
The Linux Command Line Versus Graphical User Interfacesfinelinux June 4, 2019 0 COMMENTS
Choosing when you should utilize the Linux command line interface (CLI) and when you need to utilize a graphical user interface (GUI) instead isn’t as hard as you might think. Much comes down to personal choice: Some people are always more inclined to utilize a terminal window, and others choose apparently simpler visual tools. There is no Linus user maxim that states that you must utilize one tool over another, and in reality, you might discover the most efficient, useful approach is to utilize both the GUI and CLI.
When Utilizing the GUI Makes More Sense
In some circumstances, the graphical application is an apparent option. For example, if you’re writing a letter to a good friend, using a tool such as LibreOffice Author is much easier and faster than trying to type the letter in a command line editor such as vi or emacs. LibreOffice Writer offers a great WYSIWYG (” what you see is what you get”) user interface, layout functions, the capability to include tables, images and links, and spell-checking.
With this in mind, creating a reason to ever need to use the CLI might appear an ineffective workout. In truth, many people manage without ever using the terminal at all; you can easily accomplish most tasks without ever having to see the CLI. A lot of average Windows users most likely do not even know a command line option exists.
When Using the CLI Makes More Sense
What the command line offers over a visual user interface is versatility and power; in many cases, it is actually quicker to utilize the command line than to utilize a graphical tool.
For instance, take the act of setting up software. Ubuntu has what at first look appears to be a perfectly excellent tool for installing software application that includes the os. Compared to the command line, nevertheless, the software manager is slow to load and troublesome to browse with.
The CLI’s apt command lets you search for, install, and remove software and add new repositories with relative ease. When you use the apt command, you can be sure that you’re seeing all the applications available in the repositories, whereas the software manager doesn’t always capture them all.
In basic, applications with GUIs are great for doing the essentials, but the CLI tools supply access to do a bit extra. For example, if you want to see which procedures are running in Ubuntu, you can run the system display tool. The system screen tool shows each process, the user the procedure is running under, how much CPU is used as a portion, the procedure ID, memory, and top priority. Navigating the system screen application is extremely easy, and within a couple of clicks, you can get detailed information about each procedure, kill a procedure, and filter the list of processes to show various details.
What can the command line offer that the system display can’t? Well, by itself, the ps command can show all procedures; reveal all processes other than session leaders; and reveal all processes except session leaders and those not related to a terminal. The ps command can likewise reveal all procedures connected with this terminal or, certainly, any other; limit the output to only running processes; and show just the processes for a specific command, or for a specific group of users or user. In all, there are numerous various methods to format, view, and provide the list of processes working on your system utilizing the ps command– and that is just one command.
Now add to this the reality that you can pipe the output of that command and use it alongside other commands. For example, you can sort the output utilizing the sort command, compose the output to a file utilizing the cat command or filter the output using the grep command.
In essence, CLI tools often are more useful because they have a lot of switches offered to them that would be difficult or unwieldy to consist of in a graphical application. For this reason, GUIs tend to consist of the most frequently used functions, however to get all of them, the command line is much better.
As another example in which a CLI tool is better than a graphical tool, think about a large text file of possibly hundreds of megabytes and even gigabytes in size. How would you view the last 100 lines of that file utilizing a graphical application?
A visual application would require you to pack the file and after that either page down or utilize a keyboard shortcut or menu choice to go to the end of the file. In the terminal, you ‘d just use the tail command and, assuming that the graphical application is memory-efficient and loads just a particular amount of the file at a time, you can see completion of the file in far less time than the GUI technique takes.
The very best of Both Worlds: Utilizing the GUI and the CLI
So far, the CLI seems remarkable to the GUI for anything but letter-writing. This, of course, is untrue. You would never ever edit videos using the command line, and you are much more likely to use a visual audio player to establish playlists and pick the music you wish to play. Image editing also clearly needs a visual user interface.
When all you have is a hammer, everything appears like a nail; however, in Linux, you don’t have only a hammer: You have every tool you can conceivably picture when you use both the GUI and CLI.
If you have no interest in discovering the command line, you can probably manage using the GUI. If you do want to learn a bit to get the outright most out of Linux, a good location to begin is our guide to 10 necessary commands for navigating the file system.