What Is Command Line and Command Prompt In Windows Operating System? – POFTUT

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-Line and Command Prompt. We can see both of these terms in documents and they are used interchangeably which means both Command-Line and 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 Command Prompt.

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.

LEARN MORE  Introduction To Bash Scripting

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.

Open the Run with WIN+R keyboard short cut or from the Start Menu. And then write cmd.exe or  cmd then press enter.

Open MS-DOS Command Prompt

Open MS-DOS Command Prompt

We will see the following MS-DOS command prompt.

MS-DOS Command Prompt

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.

Open PowerShell From Start Menu

Open PowerShell From Start Menu

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.

Open PowerShell From Run

Open PowerShell From Run

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.

PowerShell Command Prompt

PowerShell 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 Open or Run as Administrator in order to run with Administrative privileges.

Open Windows Terminal Command Prompt

Open Windows Terminal Command Prompt

Leave a Reply

Your email address will not be published. Required fields are marked *

Enjoy this blog? Please spread the word :)