P
P
Pavel Bezrukov2014-07-30 23:10:29
linux
Pavel Bezrukov, 2014-07-30 23:10:29

What is written in the hostname file?

Good afternoon.
I study Linux, and in the materials I read there is no unambiguous formulation of what should be written to the file:
/etc/hostname
Toli is an arbitrary name or a domain name.
I understand the question, of course, is childish, but there is no unambiguity in the blogs and the book I read!
Tell me please.

Answer the question

In order to leave comments, you need to log in

3 answer(s)
S
Sergey Lerg, 2014-07-30
@bezrukovPS

If you have the domain name myserver.mycompany.com assigned to this server, then you need to write myserver in /etc/hostname.
If there is no domain name, then write any name for the server, for example tabouret.

S
Sergey, 2014-07-30
Protko @Fesor

Every GNU/Linux system has a hostname, whether you like it or not. A system's hostname usually has a corresponding entry in the domain name system (DNS), but it doesn't necessarily have to. The hostname is the name that programs such as mail and web servers use to identify the system that they are running on. Many of these programs will issue warnings, or in some cases completely fail to run if the hostname is not set correctly.

In fact, this is the name of the computer on the network.

O
oia, 2014-07-30
@oia

hostname i.e. the name of the PC on which the system is installed

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question