Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What should debian pay attention to when modifying hostname

2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/01 Report--

This article mainly explains "what do you need to pay attention to when debian modifies the host name?" the content in the article is simple and clear, and it is easy to learn and understand. Please follow the editor's train of thought to study and learn "what do you need to pay attention to when you modify the host name in debian?"

I have introduced the article about modifying the host name under debian before, but I encountered some minor problems when I tested it on my computer today, so I turned over some materials to tell you the matters needing attention to modify the host name under debian.

In addition, friends who are not familiar with hosts files can refer to: Linux hostname hostname configuration file / etc/hosts detailed explanation.

Next, let's start today's topic.

As we know, the hostname record in Debian

In / etc/hosts and

/ etc/hostname

In both files, if you want to make changes, change the hostnames in both files and restart them.

The hosts file is divided into 3 fields per line:

IP hostname alias

It is wrong to say that the alias is the host name, the alias is just for ease of use, and the modification of it will not affect the time name.

The one that really affects the hostname is hostname (as it is on Debian systems). It is particularly important to note that if you change the hostname in hostname, be sure to include a line like this in hosts:

127.0.0.1 localhost the hostname you modified

Or this.

127.0.0.1 the hostname you modified

Because gethostbyname () is used in many commands in linux, this command cannot be executed if you change the hostname without updating it in hosts.

Note: in FC systems, the configuration file is different from Debian, and its hostname setting is / etc/sysconfig/network.

Thank you for your reading, the above is the content of "what do you need to pay attention to when debian modifies the host name?" after the study of this article, I believe you have a deeper understanding of what you need to pay attention to when modifying the host name of debian, and the specific use needs to be verified in practice. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!

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.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report