Home >Common Problem >What is the difference between powershell and cmd

What is the difference between powershell and cmd

青灯夜游
青灯夜游Original
2023-01-11 14:23:039999browse

Difference: 1. When running Cmd, it only takes up less than 1M of memory; when using PowerShell, it takes up about 20M of memory. 2. Cmd does not support syntax highlighting, but PowerShell does. 3. When using Cmd to run some more complex and time-consuming commands, when you drag the command line window at will, the content in the window can still remain the same; but PowerShell cannot. 4. Cmd can only use commands in the .net library, nor can it use Linux commands; PowerShell can.

What is the difference between powershell and cmd

The operating environment of this tutorial: Windows 10 system, DELL G3 computer

What is cmd

The command prompt is a working prompt in the operating system that prompts for command input. The command prompt varies in different operating system environments. In the Windows environment, the command line program is cmd.exe, which is a 32-bit command line program. The Microsoft Windows system is based on the command interpreter on Windows, similar to Microsoft's DOS operating system. Enter some commands and cmd.exe can execute them. For example, entering shutdown -s will shut down the computer after 30 seconds. All in all, it's very useful. Open method: Start-All Programs-Accessories or Start-Search-Enter: cmd/cmd.exe and press Enter. It can also execute BAT files.

What is powershell

PowerShell is a cross-platform task automation and configuration management framework, consisting of a command line management program and a scripting language . Unlike most shells, which accept and return text, PowerShell is built on the .NET common language runtime (CLR) and accepts and returns .NET objects. This fundamental change introduces entirely new automation tools and methods.

The difference between powershell and cmd

1. Resource occupation

First, let’s do Take a look at the resource usage of Cmd and PowerShell. When we run Cmd, it only takes up less than 1M of memory, which is almost negligible.

What is the difference between powershell and cmd

When using PowerShell, it takes up about 20M of memory, which is almost 40 to 50 times different. It can be seen from here that if your computer is older and has lower performance, you can undoubtedly get higher fluency by using Cmd.

What is the difference between powershell and cmd

2. Interface

When we use Cmd, all characters are of the same color and syntax is not high. Bright.

What is the difference between powershell and cmd

However, if you are using PowerShell, the keywords will be highlighted and the error message will be displayed in red, which is really beautiful.

What is the difference between powershell and cmd

3. Typesetting

When we use Cmd to run some more complex and time-consuming commands, feel free to drag the command When you resize the window, the content in the window can still remain the same, neat and beautiful.

What is the difference between powershell and cmd

#However, if you use PowerShell to execute the same command, the situation is not optimistic. If you quickly drag the command line window during the execution of a command, the Chinese characters in the window will appear overlapping, seriously affecting the reading experience.

What is the difference between powershell and cmd

4. Command support level

Cmd can only support traditional Windows commands and cannot use commands in the .net library. , and commands under Linux cannot be used.

What is the difference between powershell and cmd

But PowerShell is much more powerful in this regard. It not only perfectly supports traditional Windows commands and commands in the .net library, but also supports some commonly used Linux commands.

What is the difference between powershell and cmd

For more programming related knowledge, please visit: Programming Video! !

The above is the detailed content of What is the difference between powershell and cmd. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn