In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-09-23 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/02 Report--
The current ubuntu version is 14.04:
View hostname
After connecting to ubuntu through the GNOME terminal, you can see the hostname directly from the command prompt, usually after the @ symbol, such as: root@myvs10d31. You can also view the hostname in the terminal with the command: hostname or uname-n.
Temporarily modify hostname
To change the hostname temporarily, run hostname new_hostname from the command line
Where new_hostname can be represented by any legal character. However, this modification is only temporary, and after rebooting the system, hostname will return to its original one. Moreover, after the modification, the current terminal will not take effect immediately, and a terminal window needs to be reopened.
Permanently modify hostname
The ubuntu system only needs to modify the / etc/hostname file to permanently modify the hostname. For other linux distributions, hostname exists in / etc/sysconfig/network, so it is necessary to distinguish between linux distributions when modifying hostname.
Root@myvs10d31:~# vim / etc/hostname myvs10d31
After modifying the hostname, it is recommended to modify / etc/hosts at the same time:
Root@myvs10d31:~# vim / etc/hosts127.0.0.1 localhost127.0.1.1 myvs10d31
/ etc/hosts stores the correspondence between domain name and ip. There is no direct relationship between domain name and host name. You can specify any corresponding name for an ip, but it is recommended to resolve an ip corresponding to hostname.
The above is the whole content of this article, I hope it will be helpful to your study, and I also hope that you will support it.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
The market share of Chrome browser on the desktop has exceeded 70%, and users are complaining about
The world's first 2nm mobile chip: Samsung Exynos 2600 is ready for mass production.According to a r
A US federal judge has ruled that Google can keep its Chrome browser, but it will be prohibited from
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
About us Contact us Product review car news thenatureplanet
More Form oMedia: AutoTimes. Bestcoffee. SL News. Jarebook. Coffee Hunters. Sundaily. Modezone. NNB. Coffee. Game News. FrontStreet. GGAMEN
© 2024 shulou.com SLNews company. All rights reserved.