Linux Change terminal prompt

Source: Internet
Author: User

\d: #代表日期, formatted as weekday month date, for example: "Mon 1" \h: #完整的主机名称. \h: #仅取主机的第一个名字, as in the example above, Fc4,.linux is omitted \ t: #显示时间为24小时格式, such as: HH:MM:SS \ t: #显示时间为12小时格式 \a: #显示时间为24小时格式: hh:mm \u: #当前用户的 Account name \v: #BASH的版本信息 \w: #完整的工作目录名称. Home directory will replace \w: #利用basename取得工作目录名称, so only the last directory is listed \#: #下达的第几个命令 \$: #提示字符, if it is root, the prompt is: #, the normal user is: $

echo $PS 1

[\[email protected]\h \w] $

Edit File

Vim/root/.bashrc

Add Last Face

Export ps1= "[\[email protected] \w] \$"

Make configuration effective

Source/root/.bashrc

Prompt to change to

[[email protected] py] $

This article is from the "Loyalty" blog, make sure to keep this source http://xinsir.blog.51cto.com/5038915/1594615

Linux Change terminal prompt

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.