This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision | |||
|
настройка_сети_в_linux [2026/03/30 11:13] val [Файлы конфигурации Netplan и cloud-init] |
настройка_сети_в_linux [2026/03/30 11:22] (current) val |
||
|---|---|---|---|
| Line 144: | Line 144: | ||
| === Статическая настройка параметров === | === Статическая настройка параметров === | ||
| <code> | <code> | ||
| + | # apt install ifupdown | ||
| + | |||
| # cat /etc/network/interfaces | # cat /etc/network/interfaces | ||
| </code><code> | </code><code> | ||
| Line 212: | Line 214: | ||
| client1# :> /etc/resolv.conf | client1# :> /etc/resolv.conf | ||
| - | </code> | ||
| - | или [[Система безопасности UNIX#Команда chattr]] | ||
| - | |||
| - | <code> | ||
| client1# cat /etc/hosts | client1# cat /etc/hosts | ||
| </code><code> | </code><code> | ||
| Line 277: | Line 275: | ||
| <code> | <code> | ||
| # apt purge cloud-init | # apt purge cloud-init | ||
| - | </code> | ||
| - | === Отключение ifupdown === | + | # rm /etc/netplan/50-cloud-init.yaml |
| - | <code> | + | |
| - | apt purge ifupdown | + | |
| </code> | </code> | ||
| Line 313: | Line 308: | ||
| # netplan apply | # netplan apply | ||
| - | </code> | ||
| - | |||
| - | === Отключение Netpaln === | ||
| - | |||
| - | * [[https://linuxconfig.org/how-to-switch-back-networking-to-etc-network-interfaces-on-ubuntu-20-04-focal-fossa-linux|How to switch back networking to /etc/network/interfaces on Ubuntu 20.04 Focal Fossa Linux]] | ||
| - | |||
| - | <code> | ||
| - | # apt install ifupdown net-tools | ||
| - | |||
| - | ubuntu20/22# rm /etc/netplan/00-installer-config.yaml | ||
| - | |||
| - | ubuntu24# rm /etc/netplan/50-cloud-init.yaml | ||
| </code> | </code> | ||