DEV Community

Cover image for A Tour into CLI.
Philip Onuchukwu
Philip Onuchukwu

Posted on • Updated on

A Tour into CLI.

Understanding The CLI As a BEGINNER

Brief History

In the 1960s, the use of computer terminals was first introduced, this was the only design pattern to interact with computers. In the 1970s and 1980s, command line input was commonly used by Unix systems and PC systems like MS-DOS and Apple DOS. It does not support the use of a mouse, the user inputs the command through the keyboard and the computer executes the instruction.
The essence of this article is to get you an understanding of basic CLI commands used during most development processes by software engineers. Every developer, during their journey as a software engineer, Web developer, Android, and Embedded system programmer must always come across the use of commands in their terminals to create packages and bundles for tooling their application. This makes development processes faster and handier. Nevertheless, you should have an understanding or clearer interpretation of what each line does as well when navigating across each directory.

What is CLI

Let's look into the acronym CLI, which stands for any of the followings;

  • Command Line Interface
  • Command line Interpreter
  • Command Line Input

This is a command line program that accepts text input to execute operating system functions. CLIs are often used by programmers and system administrators, in engineering and scientific areas of discipline, and by technically advanced personal computer users. It consists of Syntax and Semantics:

The Syntax Of CLI:

Syntax is the grammar that all commands must follow. They're a set of rules that the command must follow and also dictate how a user navigates through the system command.

The semantics of CLI:

Semantics define what sort of operations are possible, on what sort of data these operations can be performed, and how the grammar represents these operations and data. Here, it is the symbolic meaning of syntax
A typical example of this is

  • DOS command C:\>
  • Linux Command >
  • NPM commands C:\>npm install packages or > npm install packages

Try out this command to know who it is, that the PC you’re using represents
Prompt c:\> Whoami
checking your pc name with cli


The command line existed before the GUI which is presently widely used. It's very much a great deal to discuss the GUIs as well.
GUI is simply the graphical user interface, The innovative design of GUI limited the use of command lines in later years as program executions and applications now use beautifully designed UI/UX to run applications at a click. With the GUI, most users never experience the use of the command line interface.

The Concept of CLI

With the widely used GUI, the command line Interface still plays a vital role in usage for software engineers, statisticians, and engineers of different fields such as embedded system designers.

The command-line

The parameter is an item of information provided to a program when it is started. A program can have many command-line arguments or parameters that identify sources or destinations of information, or that alter the operation of the program.
This source and destinations can be navigated with the use of two attributes parts namely the
Which is always the initial state prompting the user to key in a command.

Command Line:
Which consists of the command, option or flag, the file specification, and switches

For example; With the CLI you can navigate to display a picture gallery. Using the parameter
Prompt > command line (this includes command and filespec) there are some hands-on command lines to try out using your PCs.

Navigating with CLI

Using the command prompt parameter

  • Change directory (CD)
    This is used to change paths and navigate to a specific directory or folder.
    Prompt> cd pictures

  • Change the directory backward in one step (CD ..)
    Using the dot-dot space after the CD changes directory to the previous or preceding folder moving it one level up
    Prompt> cd ..

  • Change directory to root directory (CD /)
    This will navigate you to the root directory of the command prompt if you’re already in the picture directory or move to root
    Prompt> pictures> cd /

  • To create a new directory (MKDIR or MD)
    This command is used to create a new directory in a specified location
    Prompt> cd desktop/mkdir New folder

  • To remove a directory of the folder (RMDIR or RD)
    This command will remove a created folder from its location
    Prompt> rmdir newfolder

  • To clear up the screen (cls or clear)
    This command is used to clear up the screen after multiple commands have been executed. However, with the keyboard up, and down arrow keys previously cleared commands can be reused.
    Prompt > cls

  • To close and exit windows (EXIT)
    Prompt > exit

  • To get Help on a command use (HELP)
    This will display the number of commands to be used to navigate the cli
    Prompt > help

Types of CLIs

There are two common types of command Line interface

  • Operating system (OS) command-line interfaces are usually distinct programs supplied with the operating system. A program that implements such a text interface is often called a command-line interpreter, command processor, or shell. E.g. DOS' Windows CMD.EXE programs

  • Application programs (as opposed to operating systems) may also have command-line interfaces.
    Some applications support a CLI, presenting their own prompt to the user and accepting command lines. Other programs support both a CLI and a GUI.


The use of a command line interface can not be overemphasized. As this could be very relatable to any level of techies during the building of applications where the use of Node Package Manager (npm) CLI parameters are mostly used to install packages and bundle over different thousands of open source npm packages at a go. Such as the CLIs for creating Angular, React, Express, and flutter wave applications. You're encouraged to learn more about the use of CLI for your developments

Top comments (0)