How to Use Network Manager on OpenSUSE

29/12/2020
The NetworkManager app is the ideal solution for managing networks. It’s especially useful if you’re running openSUSE on a laptop or a portable computer. NetworkManager supports all the standard encryption standards. It also takes care of switching networks on-the-fly. Using NetworkManager, you can also have multiple connections active at once. This article will focus on how to install and use NetworkManager on openSUSE.

Enabling NetworkManager

If you’re running openSUSE on a portable computer, then openSUSE is already enabled. Anyway, you can use YaST to enable/disable NetworkManager.

Start YaST.

YaST requires root privilege to run. Enter the root password.

From the YaST Control Center window, go to System >> Network Settings.

On the “Global Options” tab, select “NetworkManager Service” under the “Network Setup Method” option. Then, click “OK”.

This window will pop up, notifying that NetworkManager is controlled by the desktop applet. So, this is up to the desktop environment you’re currently running (GNOME or KDE preferably).

Using NetworkManager on KDE Plasma

If you’re running KDE Plasma, search for “network” on the menu. Select “Connections” from the result.

Here, you can manage all the connected networks easily.

If you want to disconnect a network, right-click and select “Disconnect”.

To connect/reconnect, right-click and select “Connect”.

In order to delete a connection, select a connection, right-click and choose “Delete”.

Click “OK” when the confirmation window appears.

Enter the root password to confirm the action.

In order to add a new connection, click the “+” icon.

Select the connection type.

From this window, you can choose various customizations, for example, device restriction, 802.1x security, IPv4, IPv6 etc.

Once everything is set, click the “Save” button.

Using Network Manager on GNOME

If you’re running GNOME, then it’s easier. From the top-right corner, select “Settings”.

On the “Wi-Fi” section, all the wireless networks will appear. You can turn on/off Wi-Fi from the top bar. To manage the connected Wi-Fi network, click the gear icon next to it.

On the “Wi-Fi” section, all the wireless networks will appear. You can turn on/off Wi-Fi from the top bar. To manage the connected Wi-Fi network, click the gear icon next to it.

For managing the wired connections, VPNs and proxy, select “Network” from the left panel.

To enable/disable a connection, toggle the button next to it.

To enable/disable a connection, toggle the button next to it.

To tweak the connection, click the gear icon next to your desired connection.

NetworkManager command-line

“nmcli” is the command-line tool for controlling NetworkManager. It’s especially useful if the system is being configured remotely. Using nmcli is also useful when setting up a server.

Here’s how nmcli command structure works.

$ nmcli <options> object {command | help}

There are 7 different options in terms of “object”: networking, device, connection, monitor, agent, radio, and general.

Networks are managed by the networking devices connected to the system. The following command will print out the status of all the connected network devices.

$ nmcli dev status

The first column in the output is the name of the interface. The last column denotes the name of the “connection profile” associated with the device.

Confused about the command? Let’s try a different one. The “-p” flag stands for “Pretty” (human-readable) output.

$ nmcli -p device

Using nmcli, we can generate a report of all the information about the interfaces. It’s a lot of information, so it’s better to check out one specific interface at a time. In my case, let’s check out the info of “eth0”.

$ nmcli dev show eth0

You may have noticed that some devices are set as “unmanaged”, meaning NetworkManager isn’t controlling them. How about making an existing one “unmanaged”? Run this command.

$ sudo nmcli device set <interface_name> managed no

Let’s make one of the “unmanaged” devices under NetworkManager’s control!

$ sudo nmcli device set <device> managed yes

How about connecting/disconnecting certain connections? When dealing with networking, this is one of the primary tasks of network management. To disconnect a certain device (interface), run the following command.

$ sudo nmcli device disconnect <interface_name>

Connecting a disconnected device is similar to the disconnection command.

$ sudo nmcli device connect <interface_name>

Let’s finish by the profile. The connections of NetworkManager are stored in a certain directory. Using the profiles, you can directly manipulate the connection behavior and features. However, I personally don’t recommend unless you’re an expert in it.

Run this command first.

$ nmcli connection show

Now, it’s time to check out the profile directory.

$ cd /etc/sysconfig/network/
$ tree

The active connection profiles are named with “ifcfg-“ prefix.

Final thoughts

NetworkManager is a wonderful tool for managing your network connections. Even if you’re using a desktop environment, don’t hesitate to give nmcli a try. If you’re confused about any nmcli command, just check out the man page!

$ man nmcli

Enjoy!

Sandclock IDC thành lập vào năm 2012, là công ty chuyên nghiệp tại Việt Nam trong lĩnh vực cung cấp dịch vụ Hosting, VPS, máy chủ vật lý, dịch vụ Firewall Anti DDoS, SSL… Với 10 năm xây dựng và phát triển, ứng dụng nhiều công nghệ hiện đại, Sandclock IDC đã giúp hàng ngàn khách hàng tin tưởng lựa chọn, mang lại sự ổn định tuyệt đối cho website của khách hàng để thúc đẩy việc kinh doanh đạt được hiệu quả và thành công.
Bài viết liên quan

Hướng dẫn xóa netplan và cài đặt ifupdown thay thế trên Ubuntu 18.04

Từ trong những bản phát hành mới đây của Ubuntu, Netplan là tiện ích mặc định giúp ta cấu hình...
30/12/2020

OpenSuse vs Ubuntu

Among all the Linux distros out there, openSUSE and Ubuntu are two of the bests. Both of them are free and open-source,...
29/12/2020

What Is a Boot Loader?

Although boot loaders tend to be very small and relatively simple, they play a critical role in the boot process. Visit...
28/12/2020
Bài Viết

Bài Viết Mới Cập Nhật

Hướng dẫn chuyển đổi windows server windows evaluation to standard và active windows server 2008 + 2012 + 2016 + 2019
26/10/2021

How to Update Ubuntu Linux
24/10/2021

Squid Proxy Manager cài đặt và quản lý Proxy Squid tự động trên ubuntu
20/10/2021

Hướng dẫn cài đặt Apache CloudStack 4.15.2.0
19/10/2021

Hướng dẫn ký file PDF bằng chữ ký số (chữ ký điện tử) và sửa lỗi mới nhất 2021 foxit reader
19/10/2021