Putty -- set the title bar to display IP addresses after login

Source: Internet
Author: User
Putty -- after login, set the title bar to display the IP address putty. a headache is that there are more windows after connecting to multiple servers. I don't know which window corresponds to the server. So it is much easier to display the IP address on the title. Find this method on the Internet, good, good, haha. Record 1...
Putty -- after login, set the title bar to display the IP address putty. a headache is that there are more windows after connecting to multiple servers. I don't know which window corresponds to the server. So it is much easier to display the IP address on the title. Find this method on the Internet, good, good, haha. Record it for future use. Append the following scripts ~ /. Bashrc (corresponding to the root user, that is, the/root/. bashrc file) end of the automatic script. # Auto add env parameter $ PROMPT_COMMAND when use non-Linux tty login by ssh. if ["$ SSH_CONNECTION "! = ''-A" $ TERM "! = 'Linux ']; thendeclare-a HOSTIPHOSTIP = 'echo $ SSH_CONNECTION | awk' {print $3} ''export PROMPT_COMMAND = 'echo-ne" \ 033] 0; $ {USER} @ $ HOSTIP: [$ {HOSTNAME %. *}]: $ {PWD/# $ HOME /~} \ 007 "'Fi re-log on to the server (or use the previous user to log on). you will find that the IP address of the server is displayed in the upper left corner.

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.