# How to set hostname

**Hostname (имя хоста)** определяет имя Вашего сервера, его указание важно для правильной работы почтового сервера и некоторых других служб.

Для установки hostname на серверах под управлением CentOS откройте с помощью текстового редактора файл `/etc/sysconfig/network`:

```bash
nano /etc/sysconfig/network
```

Далее впишите:

```
HOSTNAME=(необходимый hostname)
```

Изменения вступят в силу после перезагрузки или перезапуска сети. Чтобы применить изменения прямо сейчас, нужно ввести команду:

```bash
hostname (необходимый hostname)
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://help.vdsnow.ru/english/tutorials/vds-configuration/how-to-set-hostname.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
