In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-06 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/01 Report--
Most people do not understand the knowledge of this "Linux hostname command how to use" article, so the editor summarizes the following content, detailed content, clear steps, and has a certain reference value. I hope you can get something after reading this article. Let's take a look at this "Linux hostname command how to use" article.
Hostname displays and sets the hostname of the system
Supplementary note the hostname command is used to display and set the hostname of the system.
The environment variable HOSTNAME also holds the current hostname.
After setting the hostname with the hostname command, the system will not permanently save the new hostname, but will remain the original hostname after reboot. If you need to permanently change the hostname, you need to modify the relevant contents of / etc/hosts and / etc/sysconfig/network and restart it, or you can use the hostnamectl command to change it permanently.
Syntax hostname [- b] {hostname |-F file} set hostname (or get from file) hostname [- a |-A |-d |-f |-I |-I |-s |-y] display formatted name hostname display hostname {yp,nis,} domainname {nisdomain |-F file} set NIS hostname (or obtain from file) {hostname } domainname displays NIS host names dnsdomainname displays DNS host names hostname-V |-- version |-- h |-- help prints information and exits the option-a,-- alias displays host aliases-A,-- all-fqdns shows all FQDN names-b -- boot if there is no hostname available Then set the default hostname-d,-- domain displays the DNS domain name-f,-- fqdn,-- long displays the FQDN name-F,-- file reads the hostname or NIS domain name-I from a given file,-- ip-address displays the ip address of the host-I,-- all-ip-addresses displays all the ip addresses of the host-s -- short displays short host name Truncate-y,-- yp,-- nis display NIS domain name instance display host name at the first point
[root@AY1307311912260196fcZ ~] # hostname AY1307311912260196fcZ temporarily change the hostname
[root@AY1307311912260196fcZ ~] # hostname newname displays all IP addresses of the host
[root@AY1307311912260196fcZ] # hostname-I 10.17.0.1 10.18.0.10 172.17.0.1 or above is the content of this article on "how to use Linux hostname commands". I believe you all have some understanding. I hope the content shared by the editor will be helpful to you. If you want to know more about it, please follow the industry information channel.
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.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.