Linux under PS1 command prompt settings

Source: Internet
Author: User

Linux under PS1 command prompt settings

Added on the last line of this file: Vim/etc/profileexport ps1= ' [\[email protected]\h \w]\$ ' #这里必须用单引号.

\d: Represents the date, in the format weekday month date, for example: "Mon 1" \h: Full host name. For example: My machine name is: Fc4.linux, then this name is Fc4.linux\h: Host name\ t: Display time in 24-hour format, such as: HH:MM:SS \ t: Display time in 12-hour format \a: 24-hour format: hh:mm\u: Current user's account name\v:bash Version Information \w: The full working directory name. Home directory will be replaced by ~\w: Use basename to get the working directory name, so only the last directory is listed\#: \$: Prompt character, if root, Prompt is: #, normal user is: $

Linux under PS1 command prompt settings

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.