Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
当您在终端时,您会收到提示:
computer_name:~目录用户$ (命令输入)
然后,如果您使用命令"bash",提示将更改为:
bash-3.2$ (命令输入)
现在我明白了,当你使用像"python"这样的命令时,你会进入 Python 解释器,但是当你切换到 Bash 时,看起来几乎所有的命令都和往常一样。有人可以解释这里发生了什么(如果有的话)吗?
当您键入时,bash您将进入一个新Bash实例。如果按下Ctrl + D,您将退出。OSX 使用 Bash 作为默认 shell。
bash
Bash
Ctrl + D