windows命令提示符_Windows操作系统中的命令行和命令提示符是什么?

windows命令提示符_Windows操作系统中的命令行和命令提示符是什么?

windows命令提示符

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.

命令提示符或命令行是基于文本的界面,用于在Windows操作系统上运行命令。 命令提示符或命令行是接口的通用名称,其中可以是MS-DOS,PowerShell或新发布的Windows终端。 在本教程中,我们将学习“什么是命令行或命令提示符?” 及其用途,命令,脚本和批处理文件。

命令行或命令提示符 (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.

我们将从Command-LineCommand Prompt开始这些术语。 我们可以在文档中看到这两个术语,并且它们可以互换使用,这意味着“ Command-Line和“ Command Prompt这两个术语都用于表示和指定相同的事物。 有一段时间,他们习惯了将它们命名为DOS prompt 。 从现在开始,我们将仅使用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命令提示符 (MS-DOS Command Prompt)

MS-DOS is an operating system that 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 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.

MS-DOS是1980年代创建的操作系统。 但是随着GUI的发展,MS-DOS操作系统对大多数用户变成了命令提示符。 MS-DOS为Windows用户(例如Windows XP,Windows 7,Windows 8,Windows 10和2003年以来的所有Windows Server版本)提供命令提示符。MS-DOS命令提示符提供了许多命令来管理系统和操作系统。

打开MS-DOS命令提示符 (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.

我们可以用不同的方式启动MS-DOS命令提示符,但我们将研究打开MS-DOS提示符的最简单和流行的方法。 通过快捷方式或从“ Start Menu打开Run使用WIN+R键盘Run 。 然后编写cmd.execmd然后按Enter。

windows命令提示符_Windows操作系统中的命令行和命令提示符是什么?
Open MS-DOS Command Prompt
打开MS-DOS命令提示符

We will see the following MS-DOS command prompt.

我们将看到以下MS-DOS命令提示符。

windows命令提示符_Windows操作系统中的命令行和命令提示符是什么?
MS-DOS Command Prompt
MS-DOS命令提示符

PowerShell命令提示符(PowerShell Command Prompt)

PowerShell is a next-generation command prompt for the Windows operations systems. It is a lot more advanced than 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 the Linux command line or Bash to the PowerShell.

PowerShell是Windows操作系统的下一代命令提示符。 它比MS-DOS命令提示符先进得多。 PowerShell提供了与.Net Framework和Windows操作系统紧密集成的完整编程和脚本编写环境。 PowerShell为Linux命令提供了别名,从而可以从Linux命令行或Bash迁移到PowerShell。

了解更多Windows配置工具的命令行快捷方式

打开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.

我们可以通过不同的方式打开PowerShell命令提示符。 首先,从“ Start Menu中将PowerShell写入“ Search/Run Box ,其中将按如下所示列出PowerShell。

windows命令提示符_Windows操作系统中的命令行和命令提示符是什么?
Open PowerShell From Start Menu
从开始菜单打开PowerShell

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.

或者我们可以从Run中打开,可以使用WIN+R键盘快捷方式打开它,然后将powershell写入如下所示的框中。

windows命令提示符_Windows操作系统中的命令行和命令提示符是什么?
Open PowerShell From Run
从运行中打开PowerShell

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命令提示符。 我们可以看到,为了指定当前命令行,在命令提示符之前添加了PowerShell PS

windows命令提示符_Windows操作系统中的命令行和命令提示符是什么?
PowerShell Command Prompt
PowerShell命令提示符

Windows终端命令提示符(Windows Terminal Command Prompt)

Windows Terminal is the latest command prompt provided by Microsoft. It is released in 2019 which provides modern terminal features that are already provided by most of the Linux terminals. Windows terminal is actually just a GUI that can provide both MS-DOS and PowerShell command line in a tabbed manner.

Windows Terminal是Microsoft提供的最新命令提示符。 它于2019年发布,提供了大多数Linux终端已经提供的现代终端功能。 Windows终端实际上​​只是一个GUI,可以以选项卡形式同时提供MS-DOS和PowerShell命令行。

打开Windows终端命令提示符 (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.

我们可以从Start Menu打开Windows Terminal ,只需键入Windows Terminal如下所示。 然后单击“ OpenRun as Administrator身份运行”以便以“管理”权限运行。

windows命令提示符_Windows操作系统中的命令行和命令提示符是什么?
Open Windows Terminal Command Prompt
打开Windows终端命令提示符

翻译自: https://www.poftut.com/what-is-command-line-and-command-prompt-in-windows-operating-system/

windows命令提示符