Chinaunix首页 | 论坛 | 博客
  • 博客访问: 1704291
  • 博文数量: 143
  • 博客积分: 0
  • 博客等级: 民兵
  • 技术积分: 1462
  • 用 户 组: 普通用户
  • 注册时间: 2016-08-23 11:14
文章分类

全部博文(143)

文章存档

2022年(3)

2021年(13)

2020年(21)

2019年(8)

2018年(28)

2017年(7)

2016年(63)

我的朋友

分类: 嵌入式

2017-01-02 19:14:25

1 shell和cmd的关系?
  首先说shell,shell直接翻译就是壳,按照ABS的定义,shell是The shell is a command interpreter. More than just the insulating layer between the operating system kernel and the user, it's also a fairly powerful programming language.渣英文翻一下的意思是:shell是一个命令解释器,处于内核和用户之间,负责把用户的指令传递给内核并且把执行结果回显给用户,同时,shell也可以作为一门强大的编程语言。那么,很显然这里的shell是命令行解释器的意思,也有内核上的一层壳的含义。
  接着看cmd,cmd是Command shell的简写,翻译成中文也是命令外壳我擦真的好渣的翻译。我们看下微软对cmd的定义:The command shell is a separate software program that provides direct communication between the user and the operating system. The non-graphical command shell user interface provides the environment in which you run character-based applications and utilities. The command shell executes programs and displays their output on the screen by using individual characters similar to the MS-DOS command interpreter Command.com.照例渣英文翻译下: Command Shell是一个独立的应用程序,它为用户提供对操作系统直接通信的功能,它为基于字符的应用程序和工具提供了非图形界面的运行环境,它执行命令并在屏幕上回显MS-DOS风格的字符。好啦我知道翻译很渣你行你上啊。
  综上,shell和cmd并没有本质上的区别。另外,在linux/unix平台上,shell多半默认为Bash shell,当然也有其他shell,比如C shell什么的,在Windows平台上,shell=cmd.exe,如是而已。它们都是命令行解释器,都是一个用户与操作系统的交互接口。
2 cmd是dos嘛?
  我们常常将Windows的cmd认为是“dos”。dos和命令行绝对是两个概念,总把dos挂嘴边的人真该改改观念了。dos是个古代的早就淘汰了的16位的操作系统;cmd是一种类似dos命令行环境的用户shell.内核还是Windows的内核。
  另外,Windows如今也不光有cmd这一个shell了。微软这个技术后进生在shell上也在做改变。除了cmd是系统关键组件不动之外,又新作了一套powershell增强批处理等功能,去追赶Unix发展了几十年的脚步。
3 powershell和cmd的关系?
  powershell不能执行Cmd命令行的所有命令,确切地说,powershell不能执行任何cmd命令,至少不能直接执行。这是因为,powershell不是cmd的新版本或者加强版什么的,只是它的有些命令从长相到功能都跟cmd命令很相似而已。
  powershell可以做为一个应用程序在cmd中运行,同样cmd也可以在powershell中作为应用程序运行。
4 cmd会被powershell替代吗?
  powershell必然有它的优越性,cmd也有一票粉丝,短时间内不存在谁替代谁的问题。
阅读(2973) | 评论(0) | 转发(0) |
0

上一篇:网络通信协议

下一篇:mysql 版本

给主人留下些什么吧!~~