Advantages and disadvantages of CLI

Many people regard command line interfaces as old-fashioned. They’re certainly less friendly and much less intuitive than icons and a mouse. Nevertheless, command line interfaces still exist, and even the Macintosh, the computer that introduced the masses to icons and mice, has one. So what are the advantages and disadvantages of CLI?

Command lines can be cryptic but they can be a whole lot faster, and they make automation and dealing with huge data sets possible. Network administrators, system administrators, security professionals, and data scientists may all spend significant time using a CLI for this reason.

Disadvantages of CLI

advantages and disadvantages of CLI
This command is a bit cryptic but it gives me information in seconds that would take an hour to get through a GUI, if I can get it at all. That’s why every major operating system today provides a CLI in some fashion.

The biggest disadvantages of CLI is the lack of intuitiveness. No one is born knowing the command line. And the commands vary from machine to machine. I can sum it up pretty simply. Years ago, I worked in a shop that had several minicomputers running Digital Equipment Corporation’s VMS operating system. Any time I connected up to one of the VMS systems, I instinctively typed Unix commands into it. The systems weren’t Unix at all, and they didn’t have very many commands in common, but they looked enough like Unix that my mind went there.

The commands not being universal can cause another problem. For example, Oracle databases have a command called shutdown immediate. It shuts down the database so you can patch it or run other maintenance. If you sign into a Windows machine and open a command prompt but not an Oracle command prompt and type shutdown immediate, you shut down the server. The whole server. If someone in St. Louis did that to one of our servers in Japan, we had issues.

Command lines are very powerful, but they bring a lot of responsibility along with it. If your goal, like the people who ran one government contract I worked on, is to have systems that “any idiot” can come in and administer, command lines can pose a problem. If you hire an idiot to administer an Oracle database, that person will type shutdown immediate into the wrong type of command prompt and cause outages.

Advantages of CLI

The advantages of CLI include speed. Often I can type a command to process and filter data much more quickly than I can process and filter the same data in Microsoft Excel. I may be able to run the command and be done in less time than it takes to load Excel. And if I have large datasets, I can process them from the CLI regardless of the size. In Excel, I’m limited to 1,048,576 lines. I routinely have to process datasets with millions of lines as part of my job, a situation that’s becoming more and more common. And it’s not just in my job. For example, if you want to work in the growing field of data science, you won’t be able to avoid using the command line for at least part of the job.

Automation is another big advantage of CLI. Several years ago, I went over my then-employer’s process to build a web server. Doing it manually, mousing around through the user interface, it took a minimum of two hours to build a server. Worse yet, three of us following the same instructions got different results. Some of the instructions were ambiguous and if you made the wrong decision, you ended up with a server that didn’t function. I tore apart the server that worked, figured out the right answer to the ambiguous portions, then rewrote the procedure. Then I realized 90 percent of the steps could be done from the CLI, and could be automated in a script. So I wrote a script and reduced the amount of time required to build a server to 15 minutes, and the results were consistent.

So if you hire idiots, a CLI is a disadvantage. If you hire smart people like me, the CLI can save you hours of labor and greatly improve your outcomes.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this:
WordPress Appliance - Powered by TurnKey Linux