The Wonder Behind the Command-Line Interface

by Ashwini Selvakumaran

Ever wanted to be able to interact with your computer?

Now if you’re scratching your head, disappointed that your computer can’t talk back to you, don’t get upset yet! Take the time to explore the interesting ways computers communicate with us, for example, you can go to this website to learn more about command lines. And you might just be captivated after all.

The command-line interface allows the user to interact with the computer by typing in commands. The computer displays a prompt; the user keys in the command and presses ENTER or RETURN. 

Many commands have what are called 'switches.' These are basically an extra set of instructions which add extra functionality to the command. For example, if I typed this into the command-line interface:

»Dir /p

We would now be able to pause at the bottom of every page! Neat, huh?

Before Windows was developed, this type of user interface was what most people used to get the computer to follow basic instructions. Nowadays, very few people have the knowledge to be able to use a command-line interface. With all the complex technology and advanced programing that has been developed, it’s easy to see why. However, it’s important to go back to the roots and explore the benefits of the command-line interface. 

Pressing the ENTER key after typing in a command causes that command to be passed to the shell. A shell is a program that provides the command-line interface as well as reads commands that are typed on the keyboard and then runs them. The results of executing many, but not all, commands are also shown on the command line. 

There are many different types of command-line interfaces, but the two most popular ones are DOS (for Windows) and the bash shell (for Linux). Most people these days prefer graphical-user interface, a modern and visual way of interacting with your computer (AKA probably what you’re using to read this right now). However, command-line interfaces aren’t just out-of-style just yet. In fact, some operations can actually be completed faster by typing commands. People like Network administrators and Webmasters use it for common tasks like transferring files and checking server statuses and many use it for everyday tasks like logging into Facebook or checking email. 

Though the graphic-user interface is the latest trend with modern computers, the command-line interface is pretty neat if you want to be able to enter a bundle of commands. Though it does not let our computer talk to us physically, it does let us communicate with the computer through the keyboard. That’s some pretty neat stuff!