-Bash-4.1 # solution when this occurs,

Source: Internet
Author: User

-Bash-4.1 # solution when this occurs,

-Bash-4.1 # adjust-bash-4.1 # echo $ PS1 export PS1 = "[\ u @ \ h \ W] \ $"-bash-4.1 # echo $ PS1 \ s-\ v \ $-bash-4.1 # if [$ UID-gt 199] & ["'id-gn '" = "'id-un' "]; then umask 002 else umask 022fi for I in/etc/profile. d /*. sh; do if [-r "$ I"]; then if ["$ {-# * I }"! = "$-"]; Then. "$ I" else. "$ I">/dev/null 2> & 1 fi fidone unset iunset-f pathmungeexport PS1 = "[\ u @ \ h \ W] \ $" NOTE: Add export TERM = xterm Note: to add it to the system, set ["$ PS1" = "\ s-\ v \ $"] in/etc/bashrc. & amp; PS1 = "[\ u @ \ h \ W] \ $" the values of PS1 in the file are as follows: \ 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, It is fc4 ,. 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 \ w: complete working directory name. In the home directory ~ Replace \ W: Use basename to get the name of the working directory. Therefore, only the last directory \ # is listed. For example, if it is root, the prompt is: #, for common users: $

 

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.