Last update at :2024-06-20,Edit by888u
When we operate SSH, we will see a prompt similar to [[email protected] ~] in the xshell tool interface. It has nothing to do with the performance and use of the machine, but it will affect our vision. Users who pursue perfection will definitely ask for their own defined username to be displayed, such as our specific name nickname, or a business noun representing the machine.
For general user nouns, we can directly modify the host name in the background of the panel, or we can modify it by commanding hostname. However, after Alibaba Cloud has modified it and then restarts, it will restore the original long user name, which is ugly. , the following method can completely modify the stubborn username.
Step one, vi /etc/hosts to modify the host name
Step 2, vi /etc/sysconfig/network modify the host name
Modify part of the HOSTNAME. This is the host name we need to modify.
The third step, hostname command
hostname newlaozuoSuch a command sets a new host name in both directions, and then when we log in to SSH again, we will see the set host name, so that it will not rebound even if we restart.
Recommended site searches: registration information, dynamic vps instant IP change, virtual host 99idc, Beijing server rental, cloud host rental, free domain name, free domain name registration platform, local IP address query, virtual host control panel, cn domain name, < /p>
发表评论