Skip to content
www.mytechnote.ru
Menu
  • Administration
    • Scripts
  • Equipment
    • Reviews
    • Instructions
  • Other
  • English
    • English
    • Русский
Menu

Ubuntu network setup

Setting up a network in Ubuntu is not a tricky business, but for beginners it can be difficult, today I’ll show you how to configure the network on a freshly installed Ubuntu.

I prefer the network manager – networking, it is more flexible in setting up, and it works more fast and more posh. To enable it, you must first remove the graphic network-manager, for this we type in the terminal:

sudo stop network-manager
sudo apt-get remove network-manager

Then you need to enable networking:

sudo /etc/init.d/networking start

If you suddenly swear at something, you can try to reboot the whole system:

sudo reboot now

After networking starts, you need to edit the config:

sudo nano /etc/network/interfaces

You need to add it to it if you plan to use the DHCP address:

auto eno1
iface eno1 inet dhcp

eno1 needs to be replaced with the name of your network interface, you can see all your interfaces, not even configured and disabled, with the command:

ifconfig -a

If you plan to register a static IP, you need to add the following lines to the interfaces file:

auto eno1
iface eno1 inet static
#ip address
address 192.168.1.4
#network mask
netmask 255.255.255.0
#gateway
gateway 192.168.1.1
#dns
dns-nameservers 8.8.8.8

You can register DNS not in here but in /etc/resolvconf/resolv.conf.d/head, or simply in /etc/resolv.conf. But the option with interfaces is preferable.

After you edit the config, you need to restart the network:

sudo /etc/init.d/networking restart

The network should work.

If you need to restart or disable the network interface, you can use the following commands:

sudo ifdown eno1 #отключение
sudo ifup eno1 #включение

Posted on 07.08.201730.05.2024 by sanglyb

Post navigation

← How to remove a service in Windows
How to install phpmyadmin on Ubuntu →

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Подписывайтесь

Youtube
vk
telegram
github
twitter
rss
  • Форум
  • Об авторе
  • Поддержать автора

Популярные записи

Новые записи

  • How to Extend an LVM Partition in Linux
  • SCCM Reporting Errors After Migrating from SQL Server 2016 to 2019
  • Problem Using PassFiltEx on Older CPUs
  • How to remove attachments from old calendar events in Exchange using a script
  • How to download and install Office 2024 LTSC

Архивы

  • 2026 (3)
  • 2025 (5)
  • 2024 (7)
  • 2023 (30)
  • 2022 (4)
  • 2020 (17)
  • 2017 (82)
  • 2016 (5)
© 2015-2026 www.mytechnote.ru
Использование материалов сайта возможно только с разрешения владельца или обязательна индексируемая, прямая, передающая вес ссылка на материал.