命令行前面的文本叫什么?

Frequently asking questions about the smallest and most subtle elements of your computing experience can yield interesting insights into computers and their history. Today we look at the little block of text that sits at the front of the command line.

经常询问有关您的计算体验的最小和最微妙元素的问题,可以对计算机及其历史产生有趣的见解。 今天,我们看一下位于命令行开头的一小段文本。

Today’s Question & Answer session comes to us courtesy of SuperUser—a subdivision of Stack Exchange, a community-driven grouping of Q&A web sites.

今天的“问答”环节由SuperUser提供,它是Stack Exchange的一个分支,该社区是由社区驱动的Q&A网站分组。

问题 (The Question)

SuperUser reader Erty is curious:

超级用户读者Erty很好奇:

Is there a name for the text that shows up at the front of each command at the Command Line Interface. For example, in Ubuntu when I start up a terminal, it says:

命令行界面上每个命令的开头是否显示文本的名称。 例如,在Ubuntu中,当我启动一个终端时,它说:

username@computer:~$ And in Windows:

username @ computer:〜$在Windows中:

C:\Users\Username> Is there a formal way to refer to that text?

C:\ Users \ Username>是否有引用该文本的正式方法?

Thanks in advance!

提前致谢!

What is that little bit called?

那叫什么呢?

答案 (The Answer)

SuperUser contributor Barlop offers some insight:

超级用户贡献者Barlop提供了一些见解:

It’s called ‘the prompt’

叫做“提示”

In linux, you could be more specific and say “the bash prompt” in the case of the bash shell, or for the KSH shell, The KSH (korn shell) prompt etc. In Windows you can change the prompt with the PROMPT command.

在linux中,您可能更具体,在bash shell的情况下说“ bash提示符”,对于KSH shell,则说KSH(korn shell)提示等。在Windows中,您可以使用PROMPT命令更改提示。

In windows, you could be more specific and say “the C prompt”, and the prompt in windows is most famously C:\> or C:\something…> so you can see how it gets that name. A techie might’ve frustratingly said to a user on the phone “Do you get the C prompt?”. While saying it as C prompt, some write it as The C:\ prompt or The C: prompt. One wouldn’t call it that when it was A: or D: (which you get when you boot DOS off floppy or cd drive, or you change to one those drives from the command prompt) and nobody talks of the A prompt or the D prompt, only the famous one, the C prompt.

在Windows中,您可能更具体,说“ C提示符”,而Windows中的提示符最著名的是C:\>或C:\ something…>,因此您可以看到它如何获得该名称。 一个技术人员可能会在电话上沮丧地对用户说:“您收到C提示了吗?”。 当说它为C提示符时,有人将其写为C:\提示符或C:提示符。 当它是A:或D :(从软盘或CD驱动器启动DOS,或者从命令提示符更改为这些驱动器之一)时,不会有人称呼它,而没人会说A提示符或D提示,只有著名的一个,C提示。

If all this talk of the prompt has you in a command-line sort of mood, check out some of the following How-To Geek articles about life at the prompt:

如果所有关于提示的讨论都使您处于命令行状态,请在提示下查看以下有关生活的How-To Geek文章:



Have something to add to the explanation? Sound off in the the comments. Want to read more answers from other tech-savvy Stack Exchange users? Check out the full discussion thread here.

有什么补充说明吗? 在评论中听起来不对。 是否想从其他精通Stack Exchange的用户那里获得更多答案? 在此处查看完整的讨论线程

翻译自: https://www.howtogeek.com/149272/what-is-the-text-in-front-of-the-command-line-called/

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值