Customizing the Ubuntu terminal Terminal prompt and title

Source: Internet
Author: User
Keywords Ubuntu terminal prompt
Tags aliyun custom file find html http set terminal

Custom http://www.aliyun.com/zixun/aggregation/13835.html ">ubuntu terminal terminal prompt and title, you need to modify the following file:

$gedit ~/.BASHRC

1. Locate the "# Set a fancy prompt" prompt to set a paragraph to form:
>case "$TERM" in
...
>*)
> #PS1 = ' ${debian_chroot:+ ($debian _chroot)}\u@\h:\w\$ '
> ps1= ' ithov_com:\w\$ ' #customized
>;
>esac
Reboot the terminal and the prompt has been changed to: "ithov_com:~$".

2. Find the "# If this is a xterm set" title to User@host:dir "set a paragraph, change to form such as:
>case "$TERM" in
>xterm*|rxvt*)
> #PROMPT_COMMAND = ' echo-ne ' \033]0;${user}@${hostname}: ${pwd/$HOME/~}\007 "'
> prompt_command= ' echo-ne ' \033]0;ithov_com@ubuntu\007 ' #customized
...
>esac
Restart Terminal, the title has been changed to: Ithov_com@ubuntu.
Related Article

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.