Linux 文本模式和 Windows 命令提示符的区别

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/3586114/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-09 07:34:19  来源:igfitidea点击:

Difference between Linux text mode and Windows command prompt

windowslinux

提问by subanki

I don't know if this is a dumb question or not but again as my professor says if you have doubts then clear them . What is the difference between Linux text mode and windows command prompt (cmd). I know both windows and Linux are different Operating Systems but when you look at the commands, some of the commands are common For Example cd command.

我不知道这是否是一个愚蠢的问题,但正如我的教授所说,如果您有疑问,请清除它们。Linux 文本模式和 Windows 命令提示符 (cmd) 之间有什么区别。我知道 windows 和 Linux 是不同的操作系统,但是当您查看命令时,一些命令是常见的例如cd command

采纳答案by GotDibbs

They're both based on the same idea and are called Command-Line Interfaces (see wikipedia). They operate off the same principals, just using different keywords to perform similar commands. It should be noted however, that the commands although similarly named, may not perform the exact same function. They are just abstractions of lower level functions of the operating system. Just like people can explain similar ideas using different words and phrases, the same applies in this situation. For reference here's a list of Bash commands: http://ss64.com/bash/and the same website has windows commands.

它们都基于相同的想法,被称为命令行界面(参见维基百科)。它们的操作原理相同,只是使用不同的关键字来执行类似的命令。然而,应该注意的是,这些命令虽然名称相似,但可能不会执行完全相同的功能。它们只是操作系统底层功能的抽象。就像人们可以使用不同的单词和短语来解释相似的想法一样,这同样适用于这种情况。作为参考,这里有一个 Bash 命令列表:http: //ss64.com/bash/,同一个网站有 windows 命令。

回答by caf

Although superficially similar in some ways, the two command line interfaces have different lineages:

尽管在某些方面表面上相似,但这两个命令行界面却有着不同的渊源:

  • The Windows command prompt is based heavily on that of MS-DOS / PC-DOS, which in turn was based on the CP/M Console Command Processor. The CP/M CCP interface was itself based on an earlier operating system called RSTS.

  • The Linux shells trace their roots back to the original UNIX Thompson shell; the Thompson shell borrowed from the Multics shell (where the term "shell" originated).

  • Windows 命令提示符在很大程度上基于 MS-DOS / PC-DOS,后者又基于 CP/M 控制台命令处理器。CP/M CCP 接口本身基于一个早期的操作系统,称为 RSTS。

  • Linux shell 的根源可以追溯到最初的 UNIX Thompson shell;从 Multics shell 借来的 Thompson shell(术语“ shell”起源于此)。

Traces of these are still evident today - the DIRcommand in the Windows command prompt can be traced all the way back to the DIRcommand in RSTS, and similarly the lscommand in GNU coreutils can be traced back to the Multics "list segments" command.

这些痕迹今天仍然很明显DIR——Windows 命令提示符中的命令可以一直追溯到DIRRSTS 中的命令,类似地ls,GNU coreutils 中的命令可以追溯到 Multics“列表段”命令。

回答by Alberto Zaccagni

It is not that commands are in common (well yes, maybe some), it is that they have the same name and do almost the same things, as for cdas you said.

并不是命令有共同之处(嗯,是的,也许是一些),而是它们具有相同的名称并执行几乎相同的操作,cd就像您所说的那样。

The shells are an abstraction of the underlying operative system, Linux and Windows have a different kernel, hence the difference.

shell 是底层操作系统的抽象,Linux 和 Windows 具有不同的内核,因此有所不同。

You might want to start herewith your reading.

您可能想从这里开始阅读。

回答by Matt Phillips

The difference is the operating system. The command prompt (cmd) and a terminal emulator (linux bash shell or similar) are text interfaces to the operating system. They allow you to manipulate the file system and run programs without the graphical interface.

不同之处在于操作系统。命令提示符 (cmd) 和终端模拟器(linux bash shell 或类似的)是操作系统的文本界面。它们允许您在没有图形界面的情况下操作文件系统和运行程序。

回答by karlphillip

You should read about Linux shells. The Bashshell for instance, is among the most used Linux shells... ever!

您应该阅读有关 Linux shell 的信息。该猛砸外壳举例来说,是最常用的Linux壳中...永远!

http://doc.dev.md/lsst/ch01sec07.html

http://doc.dev.md/lsst/ch01sec07.html

http://www.tuxfiles.org/linuxhelp/shell.html

http://www.tuxfiles.org/linuxhelp/shell.html

And if you're looking for a list of commands: http://www.physics.ubc.ca/mbelab/computer/linux-intro/html/

如果您正在寻找命令列表:http: //www.physics.ubc.ca/mbelab/computer/linux-intro/html/