NetworkManager 使用

2023-10-27

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.

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:

sudo apt-get install network-manager

To install the GNOME applet / indicator:

sudo apt-get install network-manager-gnome

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:

network-manager-openvpn
network-manager-vpnc
network-manager-openconnect

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:

network-manager-openvpn-gnome
network-manager-vpnc-gnome
network-manager-openconnect-gnome

Start

To start NetworkManager:

sudo start network-manager

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.

VPN

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.

DSL

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:

sudo ip addr

You will get something like this:

2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000
    link/ether '''00:08:c7:1b:8c:02''' brd ff:ff:ff:ff:ff:ff

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.

/etc/NetworkManager
/etc/NetworkManager/system-connections

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.

sudo cp /etc/network/interfaces /etc/network/interfaces.bak
sudo nano /etc/network/interfaces

It should look similar to this when you are done:

# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

# The loopback network interface
auto lo
iface lo inet loopback

# This is a list of hotpluggable network interfaces.
# They will be activated automatically by the hotplug subsystem.
# auto eth1

# iface eth1 inet dhcp

Then reboot and you should be good to go!

Disabling NetworkManager

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

Stop network manager

sudo stop network-manager

Create an override file for the upstart job:

echo "manual" | sudo tee /etc/init/network-manager.override

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:

nmcli help

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

Troubleshooting

See Debugging/NetworkManager.

See also

https://launchpad.net/~network-manager/+archive/ppa
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

NetworkManager 使用 的相关文章

  • Linux“屏幕”的 Windows 等效项还是其他替代方案?

    我正在寻找一种在 Windows 环境中控制程序的方法 我希望它与 Linux 软件有点相似 screen 我搜索的原因是我需要使用标识符启动一个程序 在 Windows 上 这样我以后就能够关闭该特定程序 而无需关闭其他任何程序 即使实际
  • 如何设置Java线程的CPU核心亲和力?

    我搜索了以前关于类似主题的帖子 但找不到合适的答案 因此提出这个问题 非常感谢您帮助回答 我知道在 Linux 中通过任务集命令设置进程与特定 CPU 核心的关联性 但我想设置 Java 线程与特定 cpu 核心的亲和力 以便属于同一进程的
  • 如何从远程 ssh 连接上运行的 tmux(复制模式)复制到本地剪贴板

    我通过 OS X 上的 VirtualBox 运行 Linux 我通过在无头状态下运行虚拟机 然后使用端口转发 sshing 到 Linux 机器来实现这一点 现在 无论复制到我的虚拟机上的剪贴板 我都可以粘贴到我的远程 ssh 会话上 但
  • XAMPP Windows 上的 Php Cron 作业

    嗯 我是这个词的新手CRON 据我所知 这是一个Unix安排特定操作在定义的时间间隔后执行的概念 我需要运行一个php文件 每小时更新一次数据库 但我的困惑在于安排执行 我在用XAMPP用于 Windows 7 上的本地开发测试 我发现了什
  • 在 debian wheezy amd64 上安装 ia32-libs

    我正在使用 Debian 7 喘息 amd64 uname a Linux tzwm debian 3 2 0 4 amd64 1 SMP Debian 3 2 51 1 x86 64 GNU Linux 我想安装ia32 libs在我的
  • 使用 ProcessBuilder 运行 shell 脚本

    我正在尝试使用 Java 和 ProcessBuilder 运行脚本 当我尝试运行时 我收到以下消息 error 2 没有这样的文件或目录 我不知道我做错了什么 但这是我的代码 ps 我尝试只执行不带参数的脚本 错误是相同的 String
  • 为什么docker容器提示“权限被拒绝”?

    我使用以下命令来运行 docker 容器 并从主机映射目录 root database 到容器 tmp install database docker run it name oracle install v root database t
  • 如何在文件夹中的 xml 文件中 grep 一个单词

    我知道我可以使用 grep 在这样的文件夹中的所有文件中查找单词 grep rn core 但我当前的目录有很多子目录 我只想搜索当前目录及其所有子目录中存在的所有 xml 文件 我怎样才能做到这一点 我试过这个 grep rn core
  • 为什么默认情况下不启用 arp 忽略/通告 [关闭]

    Closed 这个问题是无关 help closed questions 目前不接受答案 我有一个需要经验才能回答的具体问题 为什么 arp ignore arp announce 在 Linux 安装 例如 debian 上默认不启用 有
  • 用于时间线数据的类似 gnuplot 的程序

    我正在寻找一个类似 gnuplot用于在时间轴中绘制数据图表的程序 类似 gnuplot 在 Linux 上运行 命令行功能 GUI 对我帮助不大 可编写脚本的语法 输出为 jpg png svg 或 gif 输出应该是这样的 set5 s
  • Ctrl-p 和 Ctrl-n 在 Docker 下表现异常

    For the life of me I can t seem to figure out why ctrl p and ctrl n don t work like they re supposed to under the Docker
  • 请检查 PPA 名称或格式是否正确

    在我的 Ubuntu 14 04 中 我尝试安装 Captiva 图标包 如上所列这个 omgubuntu 帖子 http www omgubuntu co uk 2014 09 4 gorgeous linux icon themes d
  • 静态 OpenCV 库中未定义的引用

    我有一个使用 OpenCV 3 1 的 C 项目 并且使用共享库可以正常工作 但现在我想使用静态库 位于项目目录中的文件夹中 来编译它 因为我希望能够在未安装 OpenCV 的情况下导出它 如果需要还可以编辑和重新编译 这次我重新编译了 O
  • PostgreSQL 错误:无法连接到数据库 template1:​​无法连接到服务器:没有这样的文件或目录

    我需要创建数据库 首先我运行 sudo su postgres then createdb test 我不断收到此错误 createdb could not connect to database template1 could not c
  • 在用户程序中使用 或在驱动程序模块代码中使用 ...这有关系吗?

    我正在开发一个设备驱动程序模块和关联的用户库来处理ioctl 来电 该库获取相关信息并将其放入一个结构中 该结构被传递到驱动程序模块中并在那里解压 然后进行处理 我省略了很多步骤 但这就是总体思路 一些数据通过结构体传递ioctl is u
  • 查找并删除超过 x 天的文件或文件夹

    我想删除超过 7 天的文件和文件夹 所以我尝试了 17 07 14 email protected cdn cgi l email protection find tmp mindepth 1 maxdepth 1 ctime 7 exec
  • 隐式声明“gets”

    据我所知 隐式声明 通常意味着该函数必须在调用之前放置在程序的顶部 或者我需要声明原型 然而 gets应该在stdio h文件 我已包含 有没有什么办法解决这一问题 include
  • 在 ubuntu 中找不到 .android 文件夹 [关闭]

    Closed 这个问题不符合堆栈溢出指南 help closed questions 目前不接受答案 我在哪里可以找到 android在 Ubuntu 中 我想使用debug keystore 转到您的主文件夹并按 ctrl h 瞧
  • 如何使用 VSCode 调试 Linux 核心转储?

    我故意从我使用 VSCode 编写的 C 应用程序生成核心转储 我不知道如何调试核心转储 有没有人愿意分享这方面的经验 更新 我相信我现在已经可以使用了 我为核心文件创建了第二个调试配置 我需要添加指向生成的转储文件的 coreDumpPa
  • 如何在 bash_profile 文件中添加导出语句?

    我正在尝试了解是否必须添加导出语句来在 bash profile 文件中设置变量 我该怎么做呢 例如 如果我必须添加 export AX name 那么我应该将其简单地写在文件末尾还是我还需要编写其他内容 简单写一下export AS na

随机推荐

  • linux 安装Elasticsearchhe和kibana以及启动遇到的错误解决(已成功运行)

    linux安装es和kibana 参考博文 https blog csdn net han12398766 article details 88373869 启动报错1 Exception elasticsearch keystore 这个
  • ELK+Wazuh搭建笔记

    本文借鉴https www cnblogs com backlion p 10394369 html 在此谢谢大佬指明方向 本人又总结了wazuh界面上opencat Vulnerabilities的后台配置情况 以及agent版本升级情况
  • 页面刷新 Vuex 数据丢失

    用 Vuex 的时候发现一个问题 在页面刷新的时候 vuex 的 state 里面存储的数据会丢失 问题产生原因 因为 store 里的数据是保存在运行内存中的 当页面刷新时 页面会重新加载 vue 实例 store 里面的数据就会被重新赋
  • 子类覆盖父类方法时参数以及方法的访问权限问题

    一 子类覆盖父类可继承方法时子类同名方法的访问权限必须大等于父类 父类private不被子类继承 也无覆盖一说 报错 Fatal error Access level to Sun3 a must be protected as in cl
  • 高精度高精度乘法(C++)

    高精度加法以及高精度单精度乘法这里就不过多赘述了 今天咱们的主角是高精度高精度乘法 咱们先回顾一下竖式乘法 我们先不急着进位 先来看看 对应位置上的数字都是这么来的 对于不足位我们补充零后 不难发现 对应位置的最后答案 是由该位置起以后的全
  • Timing Borrow的理解

    在集成电路设计中 静态时序分析 Static Timing Analysis STA 是一种常用的验证方法 用于确保芯片在运行时的时序约束得到满足 在STA分析过程中 Timing Borrow是一种时序收敛技术 即在某些情况下 可以借用下
  • PowerMock--Mock静态方法

    1 PowerMock静态方法 写单元测试时 经常会遇到测试方法体内调用了某些工具类的静态方法的情况 而这些静态方法一般是读取配置中心里的文件数据 或者是一些其他涉及到需要启动项目的操作 往往这些操作会造成Mock单元测试的不彻底 有些流水
  • 排序算法之快速排序

    高快省的排序算法 有没有既不浪费空间又可以快一点的排序算法呢 那就是 快速排序 啦 光听这个名字是不是就觉得很高端呢 假设我们现在对 6 1 2 7 9 3 4 5 10 8 这个10个数进行排序 首先在这个序列中随便找一个数作为基准数 不
  • 【福利】南昌大学NCU主题电子笔记本,免费获取!

    转载请注明出处 小锋学长生活大爆炸 xfxuezhang cn 禁止转卖 恰烂钱可耻 下载链接 https pan baidu com s 1RWVrQgbmth CwoTcY 1yVw pwd 5gu8
  • MATLAB——基于自回归积分移动平均线 (ARIMA) 模型对数据进行预测

    通过1985至20222年各年的参加测试人数为实际数据 通过ARIMA模型对未来十年参加测试人数进行预测 clc clear Y data 2 N length Y t 1985 2022 figure 1 plot t Y title 高
  • 数据库性能优化的误区!

    常见的数据库系统优化中的一些观点 系统性能出现问题进行优化 一定要深入了解数据库内部参数 等待事件 Latch 缓冲池 trace文件 查询 优化引擎等底层细节 这种观点往往出自数据库 高手 这部分人以了解数据库底层实现细节而感到非常骄傲
  • Python文件指针

    实验文件data txt如下 This file is data txt hello world My name is mark 实验一 文件指针初始化 f open data txt r print f tell f write nice
  • matlab读取.dat数据

    任务 手上有一个dat后缀名文件 需要导入matlab 并对其中的每一列数据进行处理 解决方案 导入数据 S1 点击 导入数据 按钮 弹出导入数据窗口 S2 选择 范围 因为第一行是标题 所以我不想导入 导入范围从A2开始 到G436结束
  • Notes Twenty one days-渗透攻击-红队-权限提升

    Notes Twenty one days 渗透攻击 红队 权限提升 dayu 作者 大余 时间 2020 10 7 请注意 对于所有笔记中复现的这些终端或者服务器 都是自行搭建的环境进行渗透的 我将使用Kali Linux作为此次学习的攻
  • 获取系统磁盘类型信息以及判断是否是U盘

    使用WIN API函数实现 include
  • Web渗透测试实战——(1)Web渗透测试简介

    一 什么是渗透测试 渗透测试 penetration testing 是对计算机系统的一种授权攻击 旨在评估系统 网络的安全性 执行测试以识别漏洞及其带来的风险 一般而言 渗透测试过程分为五个阶段 包括识别目标系统 检测存在的漏洞以及每个漏
  • Java基础系列30-单列 Collection集合

    文章目录 一 集合的概述 1 1 为什么会出现集合类 1 2 集合类体系结构图 二 Collection集合 2 1 Collection集合入门 2 2 Collection集合的成员方法 2 3 Collection集合的遍历 2 4
  • vue使用vue-amap 高德地图进行选点和搜索

    vue使用vue amap进行地图点的搜索和点击选点 npm install vue amap save 下载npm 包 在main js主文件中进行引用 import VueAMap from vue amap Vue use VueAM
  • C++连接CTP接口实现简单量化交易(行情、交易、k线、策略)

    对于量化交易来说 量化策略和技术系统缺一不可 为了知其所以然 本文实现了一个C 连接CTP接口进行仿真交易的demo 从接收行情 下订单 数据处理到添加策略 挂载运行交易等多个环节来看一下量化交易的最简单流程 管中窥豹 一探究竟 准备工作
  • NetworkManager 使用

    Network Manager Network Manager aims for Network Connectivity which Just Works The computer should use the wired network