What Is Command Line and Command Prompt In Windows Operating System?
Command prompt or command line is a text-based interface used to run commands on the Windows operating system. Command prompt or command line is the generic name of the interface where it can be MS-DOS, PowerShell or newly released Windows Terminal. In this tutorial, we will learn “What is Command-Line or Command Prompt?” with its uses, commands, scripts and batch files.
Command-Line or Command Prompt
We will start the terms with
Command Prompt. We can see both of these terms in documents and they are used interchangeably which means both
Command Prompt terms are used to express and specify the same thing. Some time with the old habits they are named
DOS prompt. From now we will use only the
Running Scripts and Batch Files On-Command Prompts
As running commands on command prompt are trivial task system administrators generally uses scripts and batch files. Script or batch files are used to store multiple commands in a single file and call these commands just running the file as script or batch file.
MS-DOS Command Prompt
MS-DOS is an operating system which is created in the 1980s. But with the development of the GUI, the MS-DOS operating system turned into a Command prompt for most of the users. MS-DOS provides command prompt for the Windows users like Windows XP, Windows 7, Windows 8, Windows 10 and all Windows Server versions from 2003. MS-DOS command prompt provides a lot of commands in order to manage the system and operating system.
Open MS-DOS Command Prompt
We can start MS-DOS command prompt in different ways but we will examine the most simple and popular ways to open MS-DOS prompt.
WIN+R keyboard short cut or from the
Start Menu. And then write
cmd then press enter.
We will see the following MS-DOS command prompt.
PowerShell Command Prompt
PowerShell is a next-generation command prompt for the Windows operations systems. It is a lot more advanced then MS-DOS command prompt. PowerShell provides complete programming and scripting environment which is tightly integrated with the .Net Framework and Windows operating system. PowerShell provides an alias for the Linux commands which makes migration from Linux command line or Bash to the PowerShell.
Open PowerShell Command Prompt
We can open a PowerShell command prompt in different ways. First from the
Start Menu write
PowerShell to the
Search/Run Box where PowerShell will be listed like below.
Or we can open from
Run which can be opened with the
WIN+R keyboard shortcut and write the
powershell to the box like below.
We will see the following PowerShell command prompt. We can see that in order to specify the current command line is PowerShell
PS added before the command prompt.
Windows Terminal Command Prompt
Windows Terminal is the latest command prompt provided by Microsoft. It is released in 2019 which provides modern terminal features which are already provided by most of the Linux terminals. Windows terminal is actually just a GUI which can provide both MS-DOS and PowerShell command line in a tabbed manner.
Open Windows Terminal Command Prompt
We can open
Windows Terminal from the
Start Menu just typing
Windows Terminal like below. And then click
Run as Administrator in order to run with Administrative privileges.