mirror of
https://github.com/fruworg/fruworg.github.io.git
synced 2024-11-16 09:27:17 +03:00
33 lines
583 B
Markdown
33 lines
583 B
Markdown
|
---
|
||
|
title: "Настройка сети в Linux"
|
||
|
date: 2022-11-25T15:34:46+05:00
|
||
|
description: Путём правки конфигурационных файлов
|
||
|
tags: [linux]
|
||
|
---
|
||
|
## Настройка DNS и домена
|
||
|
```bash
|
||
|
search <domain>
|
||
|
nameserver <dns-server>
|
||
|
|
||
|
# /etc/resolv.conf
|
||
|
```
|
||
|
|
||
|
## Статика
|
||
|
```bash
|
||
|
auto <interface>
|
||
|
iface <interface> inet static
|
||
|
address <ip-address>
|
||
|
netmask <netmask>
|
||
|
gateway <gateway>
|
||
|
|
||
|
# /etc/network/interfaces.d/<interface>
|
||
|
```
|
||
|
|
||
|
## DHCP
|
||
|
```bash
|
||
|
auto <interface>
|
||
|
iface <interface> inet dhcp
|
||
|
|
||
|
# /etc/network/interfaces.d/<interface>
|
||
|
```
|