Set linux Path Display

Source: Internet
Author: User
Article Title: Set the linux path display. Linux is a technology channel of the IT lab in China. Includes basic categories such as desktop applications, Linux system management, kernel research, embedded systems, and open source.

PS1: prompt settings

PS1 (Number 1 rather than the letter l). The special characters in the variable PS1 in each version of bash may be slightly different. You can run man bash first. The following are the meanings of the default special symbols in the FC4 environment:

\ D: represents the date, in the format of weekday month date, for example: "Mon Aug 1"

\ H: complete host name. For example, if my machine name is fc4.linux, this name is fc4.linux.

\ H: only the first name of the host. In the preceding example, the name is fc4, and the name of. linux is omitted.

\ T: The display time is in the 24-hour format, for example, HH: MM: SS.

\ T: The display time is in the 12-hour format.

\ A: The display time is in the 24-hour format: HH: MM.

\ U: Account name of the current user

\ V: BASH version information

\ W: complete working directory name. In the home directory ~ Replace

\ W: Use basename to get the working directory name. Therefore, only the last directory is listed.

#: Commands issued

\ $: The prompt character. If it is root, the prompt is: #, and the normal user is: $

The default PS1 content is '\ [\ u @ \ h \ W \] \ $', so the default prompt is: [root @ linux ~]. #. -

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.