Bugsp.ru

Ваша компьютерная помощь
1 просмотров
Рейтинг статьи
1 звезда2 звезды3 звезды4 звезды5 звезд
Загрузка...

Установка NetworkManager в Ubuntu

Настройка Network Manager в консоли

NetworkManager — популярный инструмент управления сетевыми подключениями в Linux, имеет удобный графический интерфейс как для Gnome, так и для KDE, но бывают ситуации когда окружение рабочего стола не запускается, и нужно поднимать сеть из консоли, или нужно настроить сеть на сервере где не установлено рабочее окружение.

В этой инструкции будет рассмотрена настройка Network Manager в консоли с помощью утилиты nmcli. С настройкой в графическом интерфейсе вы разберетесь без каких-либо инструкций, поэтому была выбрана именно эта тема. Также поговорим о том, как посмотреть информацию о сетевых интерфейсах в системе.

Собираем информацию о системе

Чтобы получить информацию обо всех установленных в системе сетевых интерфейсах используйте команду:

Для просмотра статистики переданных и полученных пакетов для интерфейса, например, enp24s0, наберите:

ip -s link show enp24s0

А чтобы посмотреть таблицу маршрутизации:

ip route show match 0/0

Синтаксис и опции nmcli

Утилита nmcli — многофункциональный и гибкий инструмент командной строки для настройки сети с помощью Network Mananger из консоли. Сначала рассмотрим ее синтаксис:

$ nncli опции объект команда

Чаще всего в nmcli мы будем использовать такие объекты:

  • device — управление сетевыми интерфейсами;
  • connection — управление соединениями;
  • networking — управление сетью в целом;
  • general — показывает состояние всех сетевых протоколов и NetworkManager в целом;
  • radio — управление сетевыми протоколами, wifi, ethernent и т д.

Команды для каждого объекта разные, а опции нам не будут интересны. Дальше рассмотрим примеры nmcli network manager.

Настройка сети с помощью nmcli

1. Запустить NetworkManager

Первым делом нужно запустить NetworkManager из консоли:

sudo systemctl start NetworkManager

Теперь смотрим состояние интерфейсов с помощью nmcli:

nmcli general status

Еще мы можем посмотреть имя хоста:

nmcli general hostname

Получаем состояние интерфейсов

nmcli device status

2. Список подключений

Теперь самое интересное, управление сетью nmcli. Смотрим список доступных подключений:

nmcli connection show

Здесь вы можете видеть одно проводное подключение для интерфейса enp24s0. С помощью следующей команды можно посмотреть информацию о нём:

nmcli connection show «Проводное соединение 2»

3. Управление подключениями

Чтобы подключится к сети с помощью нужного подключения используйте команду up:

nmcli connection up «Проводное соединение 2»

Команды можно сокращать, например:

nmcli conn up «Проводное соединение 2»

А для деактивации подключения используйте команду down:

nmcli conn down «Проводное соединение 2»

4. Создание DHCP соединения

Чтобы создать новое подключение используйте команду add. Например создадим новое подключение с именем dhcp:

nmcli connection add con-name «dhcp» type ethernet ifname enp24s0

Команде надо передать параметр type — тип устройства, в нашем случае ethernet (Проводное соединение), а также ifname — название сетевого интерфейса, в этом примере enp24s0. По умолчанию используется тип подключения DHCP, поэтому больше ничего настраивать не надо и вы можете уже активировать это подключение как описано выше.

5. Создание соединения с статическим адресом

Для статического подключения настроек больше, вам надо передать команде add ip адрес, который будет использоваться в качестве основного в параметре ip4, а также шлюз с помощью параметра gw4:

nmcli connection add con-name «static» ifname enp2s0 autoconnect no type ethernet ip4 192.168.0.210 gw4 192.168.0.1

6. Настройка подключения

Продолжим настройку нашего статического соединения. Обычно оно уже может работать, но вы можете захотеть добавить DNS сервер. Для этого используется команда modify:

nmcli conn modify «static» ipv4.dns 8.8.8.8

И ещё один DNS сервер с помощью оператора +:

nmcli conn modify «static» +ipv4.dns 8.8.4.4

Для добавления дополнительной информации в поле используйте символ +. Например, вот так можно добавить еще один ip адрес:

nmcli conn modify «static» +ipv4.addresses 192.168.0.240/24

Обратите внимание, что IP адрес должен быть из той же подсети, что и ваш шлюз иначе может ничего не работать. Теперь можете активировать подключение:

nmcli connection up static

7. Настройка Wifi

В графическом интерфейсе это делается одной галочкой, здесь одной командой. Смотрим состояние wifi:

nmcli radio wifi

nmcli radio wifi on

nmcli radio wifi off

Такой командой можно посмотреть список доступных сетей wifi:

nmcli device wifi list

Команда для подключения к новой сети wifi выглядит не намного сложнее. Например, давайте подключимся к сети TP-Link с паролем 12345678:

nmcli device wifi connect «TP-Link» password 12345678 name «TP-Link Wifi»

Если всё прошло хорошо, то вы получите уже привычное сообщение про создание подключения с именем TP-Link Wifi и это имя в дальнейшем можно использовать для редактирования этого подключения и управления им, как описано выше.

Выводы

Как видите, все очень просто и быстро. Настройка network manager в консоли выполняется в пару команд, достаточно только их запомнить или где-нибудь написать, чтобы вы могли выполнить управление сетью nmcli когда это понадобится.

Устанавливаем NetworkManager в Ubuntu

Nmcli status

В Ununtu, как и в любой операционной системе, присутствуют панель управления сетевыми настройками. Она называется NetworkManager. Сегодня мы поговорим об этом компоненте подробнее, а также рассмотрим варианты восстановления в случае проблем с запуском.

Описание проблемы

Компонент входит в состав официального дистрибутива Ubuntu, но в ряде случаев случаются сбои. Он может не запускаться либо некорректно обрабатывать сетевые конфигурации. В таких случаях рекомендуется переустановить элемент. Рассмотрим подробнее два способа переустановки компонента.

Устанавливаем через терминал

Открываем терминал сочетанием клавиш Ctrl + Alt + T, вводим команду:

Читайте так же:
Как обновить Айтюнс на компьютере

sudo apt-get install network-manager

После инсталляция запустим службу:

sudo service NetworkManager start

Важно! Если установка прошла успешно, то на экране появится соответствующее сообщение.

Устанавливаем с помощью менеджера Snap

Второй вариант предполагает использование пакетов Snap. Новый подход в инсталляции программного обеспечения разработали Canonical. Технология Snap включает в себя не только пакет программы, но и все зависимости, которые необходимы для ее работы.

«Снэпы» быстро стали популярны, что повлияло на распространение технологии – они включаются в новые релизы других дистрибутивов Linux.

Для установки Snap NetworkManager набираем в терминале:

snap install network-manager

Дополнительно потребуется авторизация пользователя. Инсталляция займет 2-3 минуты максимум.

Проверка работоспособности

Теперь проверим, как прошла установка компонента. Для этого запустим встроенный инструмент Nmcli.

nmcli general status

В терминале отобразится информация о текущих подключениях:

Nmcli status

Если необходима увидеть текущие подключения по сети, вводим:

nmcli connection show

Nmcli show

Информация о подключениях

Для получения информации о возможных операциях с утилитой nmcli запускаем инструмент с ключом man.

Что делать, если NetworkManager не запускается

Если переустановка не помогла, то воспользуемся другими способами для восстановления компонентов. Введем в терминале команду:

sudo ifconfig eth0 up

Операционная система обратится к сетевому интерфейсу eth0 и попробует запустить его в ручном режиме.

Перезапуск Wi-Fi

Если проблемы наблюдаются только с модулем беспроводной связи (например, на ноутбуке), то используем nmcli.

Важно! На экране отображается только текущий статус («Включено» или «Выключено»).

Проверим текущее состояние Wi-FI, используя следующий синтаксис:

nmcli radio wifi

Nmcli Wi-FI

Статус беспроводной сети

Результат показывает, что беспроводная сеть работает.

Если же на экране появится сообщение с надписью Disabled, то перезапускаем модуль.

nmcli radio wifi off

nmcli radio wifi on

Для проверки работоспособности беспроводного модуля, подключимся к Wi-FI. Запускаем мониторинг доступных Wi-Fi подключений.

nmcli device wifi list

nmcli device wifi connect <SSID> password XXX name YYY

  1. SSID – имя беспроводной сети, к которой подключаемся.
  2. XXX – пароль Wi-FI.
  3. YYY – имя, которое будет сохранено в настройках.

Если соединение прошло успешно, то появится доступ в Интернет.

Альтернатива NetworkManager

В качестве альтернативного варианта расскажем про утилиту Wicd. Она является аналогичным решением, но с расширенным функционалом: поддержкой профилей для проводных и беспроводных подключений, шифрованием WEP, WPA и WPA2, совместимостью с любой графической оболочкой и доступностью для большинства ОС семейства Linux.

Важно! Во время инсталляции пакета Wicd, предыдущий (NetworkManager) удалится автоматически, т.е. настройки исчезнут.

  1. Добавим продукт в официальный репозиторий Ubuntu и подтвердим ключ безопасности.

echo «deb http://apt.wicd.net `lsb_release -cs` extras» | sudo tee -a /etc/apt/sources.list

sudo apt-key adv —recv-keys —keyserver keyserver.ubuntu.com FEC820F4B8C0755A

sudo apt-get update

sudo apt-get install wicd

Wicd

Выбираем сетевой интерфейс, который необходимо сконфигурировать. Нажимаем кнопку «Параметры».

Параметры Wicd

Опции сетевого интерфейса

Пользователь меняет IP-адреса, DNS-сервера, имя рабочей станции или включает шифрование трафика.

Заключение

Публикация рассказала о переустановке пакета NetworkManager двумя способами в виде инструкций со скриншотами. Также рассмотрен альтернативный вариант: программа Wicd, которая доступна для любого релиза Linux-систем.

Ubuntu 20.04 Network Management

It is difficult to envisage an Ubuntu system that does not have at least one network connection, and harder still to imagine how such an isolated system could be of much practical use. The simple fact is that Ubuntu is designed to provide enterprise level services over network and internet connections. A key part of learning how to administer an Ubuntu system involves learning how to configure and manage the network interfaces installed on the system.

This chapter is intended to provide an overview of network management on Ubuntu including the NetworkManager service and tools together with some other useful utilities.

1.1 An Introduction to NetworkManager

NetworkManager is a service and set of tools designed specifically to make it easier to manage the networking configuration on Linux systems and is the default network management service on Ubuntu desktop installations.

In addition to a service that runs in the background, NetworkManager also includes the following tools:

  • nmcli – A tool for working with NetworkManager via the command-line. This tool is useful when access to a graphical environment is not available and can also be used within scripts to make network configuration changes.
  • nmtui – A basic text-based user interface for managing NetworkManager. This tool can be run within any terminal window and allows changes to be made by making menu selections and entering data. While useful for performing basic tasks, nmtui lacks many of the features provided by the nmcli tool.
  • nm-connection-editor – A full graphical management tool providing access to most of the NetworkManager configuration options.
  • GNOME Settings – The Network screen of the GNOME desktop Settings application allows basic network management tasks to be performed.
  • Cockpit Network Settings – The Network screen of the Cockpit web interface allows a range of network management tasks to be performed.

Although there are a number of different ways to manage the network environment on an Ubuntu system, for the purposes of this chapter we will focus on the nmcli command. While the graphical tools are certainly useful when you have access to a desktop environment or Cockpit has been enabled, understanding the command-line interface is essential for situations where a command prompt is all that is available. Also, the graphical tools (Cockpit included) do not include all of the capabilities of the nmcli tool. Finally, once you have gained some familiarity with NetworkManager and nmcli, those skills will translate easily when using the more intuitive tool options. The same cannot be said of the graphical tool options. It is harder to use nmcli if, for example, you have only ever used nm-connection-editor.

1.2 Installing and Enabling NetworkManager

NetworkManager should be installed by default for most Ubuntu installations if the Desktop installation image was used. Use the apt command to find out if it needs to be installed:

Читайте так же:
Типы данных в Excel

If necessary, install the package as follows:

Once the package is installed, the NetworkManager daemon will need to be enabled so that it starts each time the system boots:

Finally, start the service running and check the status to verify that the launch was successful:

1.3 Basic nmcli Commands

The nmcli tool will have been installed as part of the NetworkManager package and can be executed from the command-line using the following syntax:

In the above syntax, Object will be one of general, networking, radio, connection, monitor, device or agent, all of which can be abbreviated to a few letters of the word (for example con, or even just the letter c, for connection). For example, all of the following commands will output help information relating to the device object:

To check the overall status of NetworkManager on the system, use the following command:

To check the status of the devices installed on a system, the following command can be used:

The output may also be modified by using the -p (pretty) option to make the output more human friendly:

Conversely, the -t option may be used to make the output more terse and suitable for automated processing:

From the status output, we can see that the system has two physical devices installed, one Ethernet and the other a WiFi device.

The bridge (virbr) entries are virtual devices used to provide networking for virtual machines (the topic of virtualization will be covered starting with the chapter entitled “An Overview of Virtualization Techniques”). The loopback interface is a special virtual device that allows the system to communicate with itself and is typically used to perform network diagnostics.

When working with NetworkManager, it is important to understand the difference between a device and a connection. As described above, a device is either a physical or virtual network device while a connection is a network configuration that the device connects to.

The following command displays information about the connections configured on the system:

From the above output, we can see that the WiFi device (wlxc83a35cad517) is connected to a wireless network named zoneone while the Ethernet device (eno1) is connected to a connection named Wired connection 1. In addition to zoneone, NetworkManager has also listed two other WiFi connections named zonetwo and zonethree, neither of which currently have a device connected.

To find out the IP address allocated to a connection, the ip tool can be used with the address option:

This can also be abbreviated:

The ip command will output information for all of the devices detected on the system. The above output shows that the WiFi device has been assigned an IP address of 192.168.1.121.

If we only wanted to list active connections, the nmcli command could have been used with the -a option:

To switch the WiFi device connection from zoneone to zonetwo, we can run the following command:

The -ask flag causes nmcli to prompt the user to enter the password for the WiFi network. To include the WiFi password on the command-line (particularly useful if the command is being executed in a script), use the password option:

The nmcli tool may also be used to scan for available WiFi networks as follows:

A currently active connection can be deactivated as follows:

Similarly, an inactive connection can be brought back up at any time:

When a connection is brought down, NetworkManager automatically searches for another connection, activates it and assigns it to the device to which the previous connection was established. To prevent a connection from being used in this situation, disable the autoconnect option as follows:

The following command may be used to obtain additional information about a specific connection. This includes the current values for all the connection properties:

All of these properties can be modified using nmcli with the modify option using the following syntax:

1.4 Working with Connection Profiles

So far we have explored the use of connections without explaining how a connection is configured. The configuration of a connection is referred to as a connection profile and is stored in a file located in the /etc/NetworkManager/system-connections directory, the contents of which might read as follows:

Each of the files is an interface configuration file containing the connection profile for the corresponding connection.

Consider, for example, the contents of our hypothetical zoneone connection:

Читайте так же:
Как установить Телеграм на айФон

The file contains basic information about the connection, including the type (wifi), and the SSID and WPA password key for the WiFi network. For both IPV4 and IPV6 the method property is set to auto (in other words the IP address for the connection will be obtained dynamically using DHCP). Changes to the connection profile can be implemented by modifying this file and instructing nmcli to reload the connection configuration files:

New connection profiles can also be created manually or generated automatically by nmcli. As an example, assume that a new network device has been installed on the system. When this happens, the NetworkManager service will detect the new hardware and create a device for it. In the example below, the new device has been assigned the name enp0s8:

NetworkManager automatically detected the device, activated it and assigned it to a connection named “Wired connection 2”. This is a default connection over which we have no configuration control because there is no interface configuration file for it in /etc/NetworkManager/systemconnections. The next steps are to delete the “Wired connection 2” connection and use nmcli to create a new connection and assign it to the device. The command to delete a connection is as follows:

Next, nmcli can be used to create a new connection profile configured either with a static IP address, or a dynamic IP address obtained from a DHCP server. To create a dynamic connection profile named dyn_ip, the following command would be used:

After the connection has been created, a file named dyn_ip will have been added to the /etc/ NetworkManager/system-connections directory and will read as follows:

Checking the device status should now verify that the enp0s8 device is now using the dyn_ip connection profile:

At this point it is worth noting that the enp0s3 device is also using a default connection profile for which there is no interface file through which to modify the connection settings. The same steps used to create the dyn_ip profile can also be used for the enp0s3 device. For example, to create a connection named static_ip assigned a static IP address (in this case 192.168.1.200) assigned to the enp0s3 device, the following command would be used (keeping in mind that if you are connected remotely to the system via the Wired connection 1 interface you will lose the connection):

The corresponding static_ip file will read as follows:

The command to add a new connection may be altered slightly to also assign both IPv4 and IPv6 static addresses:

1.5 Interactive Editing

In addition to using nmcli with command-line options, the tool also includes an interactive mode that can be used to create and modify connection profiles. The following transcript, for example, shows interactive mode being used to create a new Ethernet connection named demo_con:

The following transcript, on the other hand, modifies the previously created static_ip connection profile to use a different static IP address to the one originally specified:

After modifying an existing connection, remember to instruct NetworkManager to reload the configuration profiles:

When using interactive mode, it is useful to know that there is an extensive built-in help system available to learn how to use the tool. The help topics can be accessed by typing help or ? at the nmcli > prompt:

1.6 Configuring NetworkManager Permissions

In addition to making it easier to manage networks on Ubuntu, NetworkManager also allows permissions to be specified for connections. The following command, for example, restricts a connection profile to root and user accounts named john and caitlyn:

Once the connection profiles have been reloaded by NetworkManager, the static_ip connection will only be active and accessible to other users when at least one of the designated users is logged in to an active session on the system. As soon as the last of these users logs out, the connection will go down and remain inactive until one of the users signs back in.

In addition, only users with permission are able to make changes to the connection status or configuration.

1.7 Summary

Network management on Ubuntu is handled by the NetworkManager service. NetworkManager views a network as consisting of network interface devices and connections. A network device can be a physical Ethernet or WiFi device or a virtual device used by a virtual machine guest. Connections represent the network to which the devices connect and are configured by connection profiles. A configuration profile will, among other settings, define whether the connection has a static or dynamic IP address, the IP address of any gateway used by the network and whether or not the connection should be established automatically each time the system starts up.

NetworkManager can be administered using a number of different tools including the nmcli and nmtui command-line tools, the nm-connection-editor graphical tool and the network settings section of the Cockpit web interface. In general, the nmcli command-line tool provides the most features and flexibility.

Ezoic

report this ad

Network Manager

Network Manager aims for Network Connectivity which «Just Works». The computer should use the wired network connection when it’s plugged in, but automatically switch to a wireless connection when the user unplugs it and walks away from the desk. Likewise, when the user plugs the computer back in, the computer should switch back to the wired connection. The user should, most times, not even notice that their connection has been managed for them; they should simply see uninterrupted network connectivity.

Читайте так же:
Как посмотреть расход трафика на Xiaomi

More information about Network Manager is available in Gnome website and wiki .

Installation

NetworkManager should be installed by default on Ubuntu Desktop installs, as well as most flavours of Ubuntu.

To install NetworkManager:

To install the GNOME applet / indicator:

VPN support

Network Manager VPN support is based on a plug-in system. If you need VPN support via network manager you have to install one of the following packages:

The network-manager-pptp plugin is installed by default.

On GNOME, you also need to install the -gnome packages for the VPN plugin you choose:

Start

The steps to start NetworkManager depend on which of the initialization subsystems are running: Upstart or Systemd.

Using Upstart

Start network manager

Using Systemd

Systemd became the default initialization system in Ubuntu 15.04. Here’s how to start Network Manager and enable it to be restarted after a reboot:

Start network manager

Enable restarting the network manager when the system reboots

NM-applet Overview

The network-manager or the nm-applet is the one which is found in the systray. The icon of two computers, one below to the other on the left-side.

Clicking on NM-applet will give you the types of connection/hardware you have available.

For e.g. if you have a wired connection clicking on it will give you something like: Wired Network (D-Link System RTL-8139/8139C/8139C+ Auto eth1

Now let’s break down what such a notification would mean.

a. Wired/Wireless/Mobile Broadband/VPN/DSL — the interface/hardware you have.

b. (D-Link System RTL-8139/8139C/8139C+ :- the chipset which enables the connection to be made.

c. Auto/Manual eth1 :- If the connection is has been made automatically or generated through the system settings or/and done manually. Any one connection can only have only of the states not both. The eth1 is just a name to make it easier for the user to know which way he’s connected through to the network/Internet.

Right-click Options

Right-clicking on the applet will give you the following options

a. A checkbox saying Enable Networking or not.

b. Connection Information: Giving info. on the same below.

c. Edit Connections: This is the NM-connections editor which we will talk about a little later.

d. About: Which gives the status of current version of network-manager installed and a link to the upstream network-manager site.

Connection Information

  • This figure is shown right-clicking on the nm-applet and then clicking on the blue (i) Connection information option in the drop-down menu of nm-applet. It gives information about the interface being used, the MAC or Hardware Address of the device, what driver is being used to do the networking, at what speed is the network card capable of communicating, any security protocols used.

Then there is some distance and information regarding how the actual connection is set up in terms of the IP Address taken/given, the IP Address at which its broadcasting its presence to others, the Subnet Mask used and lastly the DNS address.

NM-connections editor

The NM-connections editor is where the user can edit and create the various connection types. To invoke the nm-connections editor you need to right-click on the nm-applet and then click on Edit Connections. Clicking on that option would result in a tabbed window called network connections having different ways to connect to the network/Internet.

Connection Types

Wired connections

This type of connection is one where you are connecting to the Internet through an Ethernet connection to some router/modem.

Wireless

This type of connection is one where one is connected to the Internet through a wireless card & base-station combo.

Mobile Broadband

This type of connection is similar to wireless, the only difference would be the hardware. Its normally based on a high-speed portable wireless card which may follow GPRS, 3G, WiMAX, UMTS/HSPA or/and EV-DO standards.

This type of connection is usually used by corporates to connect to their workplace via the internet or by universities to make special services available to their students and staff. Currently no more than one VPN connection at a time is supported (see here). The VPN packages are not installed by default. See VPN for how to do that.

This type of connection is when one is transferring data over the public telephone network (also known as POTS). Need some type of XDSL modem (ADSL is common type of connection).

Creating/Modifying a User connection

Hint: Making any change to an existing wired connection will only be applied after you finish editing and then left-click the connection name (left-click the Network Manager icon to access the list of connections) or by rebooting your system. Changes will also be automatically applied if your change the Connection name of a connection.

Читайте так же:
Как перепрошить Айфон

So how do we add or modify a user connection. Let’s start by adding a user connection. So we do the following steps:

a. Invoke nm-connection-editor by right-clicking on network-manager icon, clicking on Edit Connections which brings up the network-connections having various options to connect to the local network or/and the Internet.

b. Choose one of the options depending on the hardware and the way the connection is set up. We would be looking at all the 5 options in the network connections one by one as to what information needs to be filled up.

Adding Wired connections

Wired Tab

For this one needs to click on the Add button after selecting the Wired tab in Network Connections as shown above.

Clicking on that tab would bring you to another box having three tabs, i.e. Wired, 802.1x and lastly IPv4 settings.

At the top one needs to give some name to the connection, by default it is showing as Wired Connection 1. You can either use that or make it something which is recognizable and easily remembered by you.

A little distance below there are two options with check-boxes just next to them. The first option asks whether you want network-manager to connect automatically or not. Clicking on that would make network-manager automatically try to resolve or making that connection happen for you.

The second one says System Settings. Systems settings are an option so one can configure connections system-wide, so they get enabled without you being logged in. This was not possible to do before 0.7.

Just below that is the wired tab. The Wired tab has a field called «MAC address». The MAC (Media Access Control) address is a unique identifier for the Ethernet card/Network Interface card. The MAC address is written in the form of a set of 6 grouped hexadecimal digits, e.g. 01:23:45:67:89:AB.

To find out your MAC address you can run:

You will get something like this:

802.1x security

This tab is for secure communications where one wants to have port-based authentication using some authentication server. After checking the box to use 802.1x security for the connection you have to choose which authenticated protocol to use from TLS, Tunneled TLS or Protected EAP. Would also need to give some identity as well as choose a user or/and some certifying authority’s certificate. You would also need to give your private key particulars as well as a Private Key password. You may choose or not to show the password.

IPv4 Settings

This is the last but perhaps the most interesting tab in the Wired Networking tab, where one has various options of connecting:

a. Automatic (DHCP)
b. Automatic (DHCP Addresses only)
c. Manual
d. Link-local only and lastly
e. Shared to other computers

User Settings and System Settings

All the connection configuration files will be stored here.

User settings are defined as files in those directories that include specific access controls to limit the access to a specific user.

Issues

If it is not managing your network connections, you’ll need to comment out the references to all interfaces (except lo) in /etc/network/interfaces to let Network Manager handle them.

It should look similar to this when you are done:

Then reboot and you should be good to go!

Stopping and Disabling NetworkManager

The steps to disable NetworkManager depend on which of the initialization subsystems are running: Upstart or Systemd.

Using Upstart

According to this bug here’s how to disable Network Manager without uninstalling it:

Stop network manager

Create an override file for the Upstart job:

Using Systemd

Systemd became the default initialization system in Ubuntu 15.04. Here’s how to stop and disable Network Manager without uninstalling it (taken from AskUbuntu):

Stop network manager

Disable network manager (permanently) to avoid it restarting after a reboot

Editing Network Settings in nm-connection-editor

Nm-connection-editor is the configuration applet that provides easy access to advanced network settings and allows greater configuration options through a simple interface. To access nm-connection-editor, right-click on the network icon in the notification area and select Edit Connections.

Changing a network’s encryption key

Nm-connection-editor enables you to easily update a network’s encryption key by displaying the current key for each network and giving you the option of displaying it in clear text while you edit.

Ensuring connection to particular access points

You can specify a particular BSSID directly in nm-connection-editor. This means that in a wireless network with more than one access point, you can choose the one NetworkManager will connect to.

Using NetworkManager on the command line

NetworkManager now ships with nmcli, a simple interface to allow users to connect to particular networks, and even create connections to new wireless networks they have never connected to:

Provides all the information about how to use the nmcli utility.

голоса
Рейтинг статьи
Ссылка на основную публикацию