Insert new line to bash prompts

主宰稳场 提交于 2019-12-19 13:12:12

问题


This seems like a common question, but I can't find this anywhere on Google nor SO. Please point me to the article if you find one.

How do I insert a new line in bash prompts (when you just press ENTER), similar to that in Windows prompt?

Linux:

$
$
$

Windows:

C:\>

C:\>

C:\>

I need that extra space in between.


回答1:


Change the PS1 Bash prompt variable:

PS1="\n$PS1"


来源:https://stackoverflow.com/questions/17198311/insert-new-line-to-bash-prompts

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!