Sections: 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | Index | Next >
Learning objective: Explain the purpose of CLI in Windows
A command-line interface (CLI) is a mechanism for interacting with a computer operating system or software by typing commands to perform specific tasks. This text-only interface contrasts with the use of a mouse pointer with a graphical user interface (GUI) to click on options, or menus on a text user interface (TUI) to select options. This method of instructing a computer to perform a given task is referred to as "entering" a command: the system waits for the user to conclude the submitting of the text command by pressing the "Enter" key (a descendant of the "carriage return" key of a typewriter keyboard). A command-line interpreter then receives, parses, and executes the requested user command. Upon completion, the command usually returns output to the user in the form of text lines on the CLI. This output may be an answer if the command was a question, or otherwise a summary of the operation. [Wikipedia]
Why a command line interface and not a GUI
Quite often people new to another operating system than Microsoft Windows are confronted with the terms CLI (Command Line Interface) and GUI (Graphical User Interface). Pretty soon they get a notion about what those two are but at this stage they are still far away from being able to tell what is the "better" one. Well, there is no better -- it depends on the tasks that need be done, how experienced a user is and his personal likings. However, this page shows some comparisons what it means to use a CLI (Command Line Interface) or GUI (Graphical User Interface) and the impact that may come by doing so. A computer that is only using the command line takes a lot less of the computers resources. Also, with CLIs there is no need to install a graphical layer at all onto a computer system which saves a lot of resources e.g. storage space. [Gattol]
Command prompt
A command prompt (or just prompt) is a sequence of (one or more) characters used in a command-line interface to indicate readiness to accept commands. Its intent is to literally prompt the user to take action. A prompt usually ends with one of the characters $, %, #, :, > and often includes other information, such as the path of the current working directory. In DOS's COMMAND.COM and in the Windows NT's command-line interpreter cmd.exe the prompt is modifiable by issuing a prompt command or by directly changing the value of the corresponding %PROMPT% environment variable. The default of most modern systems, the C:\> style is obtained, for instance, with "prompt $P$G". The default of older DOS systems, C> is obtained by just "prompt", although on some systems this produces the newer C:\> style, unless used on floppy drives A: or B:; on those systems "prompt $N$G" can be used to override the automatic default and explicitly switch to the older style. [Wikipedia]
DOS lives in the present
With the command line interface, you can only go forward. The events above the prompt are the past and are there for reference. You can not go back with the mouse can click on them like you can in a GUI environment. All you can do is enter a new command when the system prompt is available. In many versions of the DOS CLI, you can press the up arrow on the keyboard and retrieve previous commands at the system prompt to help make using DOS easier.
Commands, commands, commands
There are lots of commands in DOS. Another big difference between DOS and GUI is awareness of commands / actions that are available to the user. In Windows, you can see what options are available to you and all you have to do is click or drag or both. In DOS, if you don't know what you want to do, there are no clues on how to accomplish a given task. The best selling book on DOS is "DOS for Dummies" which is also the first book in the Dummy series. Tens of millions have been sold!
Blank sheet of paper...
Unlike GUI environments that suggest purpose and context, the world of the command line interface is basically void of all meaning. It is more like a blank sheet of paper waiting the thoughts of the author. It is not uncommon for new users to the CLI world to have "writer's block" when trying to figure out what set and sequence of commands need to be used and in what order to accomplish a given task. It is the difference between popping a TV dinner into the microwave and making a dinner from scratch!
Other command line environments
The command line is used by many other OS enabled environments and is the most requested skill from the CIS Advisory Board over the years. "The GUI makes computing easy, the command line makes computing possible." The basic skill of learning the Microsoft command line interface will help prepare you for working with Cisco, Amazon Web Services (AWS), Microsoft Azure, and many other CLI enabled environments. See the links in the Embedded Resources section below for glimpses into their use of a command line to manage system resources.
Thinking: Why use a CLI at all when you have GUI?
Key terms: CLI, GUI, commands, prompt
Resources:
To maximize your learning, please visit these Web sites and review their content
to help reinforce the concepts presented in this section.
Quick links:
GUI vs. Command Line: What's the Difference? @ Difference.Wiki
Command line vs. GUI @ Computer Hope
Command Line Interface @ Wikipedia
Using the Cisco IOS Command-Line Interface @ Cisco
AWS Command Line Interface @ Amazon
Use the Azure CLI to manage Azure resources and resource groups @ Microsoft
Notes on navigation: Click inside the frame to navigate the embedded Web page. - Click outside the frame to navigate this page to scroll up/down between the embedded Web pages. - Click on the frame title to open that page in a new tab in most browsers. - Click on the the "Reload page" link to reload the original page for that frame.
GUI vs. Command Line: What's the Difference? @ Difference.Wiki |
Reload page
|
If frame is empty, click on the link to view the page in a new tab or window
Command line vs. GUI @ Computer Hope |
Reload page
|
If frame is empty, click on the link to view the page in a new tab or window
Command Line Interface @ Wikipedia |
Reload page
|
If frame is empty, click on the link to view the page in a new tab or window
Using the Cisco IOS Command-Line Interface @ Cisco |
Reload page
|
If frame is empty, click on the link to view the page in a new tab or window
AWS Command Line Interface @ Amazon |
Reload page
|
If frame is empty, click on the link to view the page in a new tab or window
Use the Azure CLI to manage Azure resources and resource groups @ Microsoft |
Reload page
|
If frame is empty, click on the link to view the page in a new tab or window
Sections: 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | Index | Next >