This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision Next revision Both sides next revision | ||
настройка_сети_в_linux [2023/06/07 09:01] val [Общие файлы конфигурации] |
настройка_сети_в_linux [2023/06/14 10:19] val [Файлы конфигурации Ubuntu >= 18] |
||
---|---|---|---|
Line 90: | Line 90: | ||
<code> | <code> | ||
- | # hostnamectl set-hostname server2 | + | # hostnamectl set-hostname server.corpX.un |
+ | |||
+ | # cat /etc/hostname | ||
+ | </code><code> | ||
+ | server.corpX.un | ||
+ | </code> | ||
# cat /etc/hosts | # cat /etc/hosts | ||
Line 113: | Line 118: | ||
=== Статическая настройка параметров === | === Статическая настройка параметров === | ||
<code> | <code> | ||
- | # cat /etc/hostname | ||
- | </code><code> | ||
- | server.corpX.un | ||
- | </code><code> | ||
# cat /etc/network/interfaces | # cat /etc/network/interfaces | ||
</code><code> | </code><code> | ||
Line 277: | Line 278: | ||
</code><code> | </code><code> | ||
# systemctl restart systemd-resolved | # systemctl restart systemd-resolved | ||
+ | </code> | ||
+ | |||
+ | === Без systemd-resolved === | ||
+ | <code> | ||
+ | # systemctl disable systemd-resolved | ||
+ | |||
+ | # systemctl stop systemd-resolved | ||
+ | |||
+ | # rm /etc/resolv.conf | ||
</code> | </code> | ||
Line 290: | Line 300: | ||
ubuntu18# rm /etc/netplan/50-cloud-init.yaml | ubuntu18# rm /etc/netplan/50-cloud-init.yaml | ||
- | ubuntu20# rm /etc/netplan/00-installer-config.yaml | + | ubuntu20/22# rm /etc/netplan/00-installer-config.yaml |
</code> | </code> | ||