Introduction To The Command-Line Interface

What is the command line?

  • The command line, also called the Windows command line, command screen, or text interface is a user interface that is navigated by typing commands at prompts, instead of using the mouse.
  • In the 1960s, using only computer terminals, this was the only way 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.
  • Today, with graphical user interfaces (GUI), most users never use command-line interfaces (CLI).
  • However, CLI is still used by software developers and system administrators to configure computers, install software, and access features that are not available in the graphical interface.

Opening: Windows

Depending on your version of Windows and your keyboard, one of the following should open a command window (you may have to experiment a bit, but you don’t have to try all of these suggestions):

  1. Go to the Start menu or screen, and enter “Command Prompt” in the search field.
  2. Go to Start menu → Windows System → Command Prompt.
  3. Go to Start menu → All Programs → Accessories → Command Prompt.
  4. Go to the Start screen, hover your mouse in the lower-left corner of the screen, and click the down arrow that appears (on a touch screen, instead flick up from the bottom of the screen). The Apps page should open. Click on Command Prompt in the Windows System section.
  5. Hold the special Windows key on your keyboard and press the “X” key. Choose “Command Prompt” from the pop-up menu.
  6. Hold the Windows key and press the “R” key to get a “Run” window. Type “cmd” in the box, and click the OK key.

Opening: OS X

Go to Applications → Utilities → Terminal.

Opening: Linux

It’s probably under Applications → Accessories → Terminal, or Applications → System → Terminal, but that may depend on your system. If it’s not there, you can try to Google it. :)

$ whoami altaf
$ ls Documents Pictures Downloads Public Music Videos Desktop
$ pwd /Users/altaf/Desktop
> cd C:\Users\altaf\Desktop
$ pwd /Users/altaf/Desktop
> cd C:\Users\altaf\Desktop
$ rm -r practice



Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store