nmcli命令与配置文件对应关系
主机名:
如果说你没有设置主机名的话,默认是localhost.localdomain
修改配置文件的主机名
# hostnamectl set-hostname www.djl.cc
查看网卡信息
# nmcli connection
# nmcli con show
显示具体的网络接口信息
# nmcli connection show eth0
显示所有设配状态
# nmcli device status
修改配置文件执行生效
# systemctl restart network
# nmcli connection reload
显示所有活动连接
# nmcli connection show --active
删除一个网卡连接
# nmcli connection delete eth0
添加一个网卡连接
# nmcli connection add type ethernet con-name eth0 ifname eno33554992
网络接口的启用与停用:
停用:
# nmcli connection down eth0
启用:
# nmcli connection up eth0
给eth0添加一个IP(IPADDR)
# nmcli connection modify eth0 ipv4.addresses 192.168.0.58
给eth0添加一个子网掩码(NETMASK)
# nmcli connection modify eth0 ipv4.addresses 192.168.0.58/24
IP获取方式设置成手动(BOOTPROTO=static/none)
# nmcli connection modify eth0 ipv4.method manual
添加一个ipv4
# nmcli connection modify eth0 +ipv4.addresses 192.168.0.59/24
删除一个ipv4
# nmcli connection modify eth0 -ipv4.addresses 192.168.0.59/24
添加DNS
# nmcli connection modify eth0 ipv4.dns 114.114.114.114
删除DNS
# nmcli connection modify eth0 -ipv4.dns 114.114.114.114
添加一个网关(GATEWAY)
# nmcli connection modify eth0 ipv4.gateway 192.168.0.2
可一块写入:
nmcli connection modify eth0 ipv4.dns 114.114.114.114 ipv4.gateway 192.168.0.2
修改网卡名称
删除网卡连接
# nmcli connection delete eno16777736
修改内核参数配置文件
# vi /etc/default/grub
植入内核
# grub2-mkconfig -o /boot/grub2/grub.cfg
重启
#reboot
添加网卡
# nmcli connection add type ethernet con-name eth0
(转)linux中nmcli命令的使用及网络配置
原文:https://blog.51cto.com/groot/1847482 http://www.178linux.com/44076----CentOS7中nmcli网络管理及使用详解 http ...
linux中nmcli命令详解
https://www.iyunv.com/thread-269695-1-1.html http://www.178linux.com/44668
linux的视频学习4(网络配置和rpm)
linux的视频学习: 1.网络配置的三种方式的介绍. 第一种方式: setup 命令--选择network configuration-->配置固定ip(tab键)和自动分配IP(长空格) / ...
Linux中systemctl命令详细介绍
Linux Systemctl是一个系统管理守护进程.工具和库的集合,用于取代System V.service和chkconfig命令,初始进程主要负责控制systemd系统和服务管理器.通过Syst ...
linux中keepalived实现nginx高可用配置
linux中keepalived实现nginx高可用配置 安装keepalived 运行如下命令即可 tar -zxvf keepalived-2.0.8.tar.gz -C /usr/src cd ...
Linux中exec命令相关
Linux中exec命令相关 exec和source都属于bash内部命令(builtins commands),在bash下输入man exec或man source可以查看所有的内部命令信息. b ...
linux中touch命令参数修改文件的时间戳(转)
linux中touch命令参数不常用,一般在使用make的时候可能会用到,用来修改文件时间戳,或者新建一个不存在的文件,以下是linux中touch命令参数的使用方法: touch [-acm][-r ...
linux中执行命令权限不够怎样处理
在linux中执行命令权限不够就要增加权限,先看遇到的情况 查看权限情况 那就赋予权限 执行命令
Linux中监控命令top命令使用方法详解
收集了两篇关于介绍Linux中监控命令top命令的详细使用方法的文章.总的来说,top命令主要用来查看Linux系统的各个进程和系统资源占用情况,在监控Linux系统性能方面top显得非常有用,下面就 ...
随机推荐
linux基本知识0
linux的基本原则: 1.有目的单一的小程序组成,组合小程序完成复杂任务. 2.一切皆文件 3.尽量避免捕获用户接口 4.配置文件保存为纯文本格式 CLI接口: 命令提示符,prompt,bash ...
centos7安装openoffice
[摘要:间接登录openoffice民网下载硬件包,但跳转的页里却不停挨没有开.末了只能正在末端里干活下了: 1. 挑选得当的版本:http://www.openoffice.org/download ...
新版Microsoft Azure Web管理控制台 - Microsoft Azure New Portal - (3)
之前我们多次提到过Resource Manager,也知道Resource Manager是Microsoft Azure提供的一种新型资源管理模式.在Service Management模式(Cla ...
SPFA(负环) LightOJ 1074 Extended Traffic
题目传送门 题意:收过路费.如果最后的收费小于3或不能达到,输出'?'.否则输出到n点最小的过路费 分析:关键权值可为负,如果碰到负环是,小于3的约束条件不够,那么在得知有负环时,把这个环的点都标记下 ...
documentElement和ownerDocument和ownerElement
1.document.documentElement是指文档根节点----HTML元素 2.element.ownerDocument是指当前元素所在的文档对象----document 3.attrO ...
win7x64安装wince6
Windows Embedded CE 安装方法 Wince的安装相对比较复杂,即使是一个Wince的老手,也可能遇到这样那样的问题.想来真是悲摧,Windows XP, Windows 7,64位, ...
SharePoint 2013 WebPart属性面板配置
为WebPart添加右侧的属性面板,方便将来对于WebPart的配置,我们只需要在CustomWebPart.cs文件里面,声明一下变量即可: private string url = string. ...
spring的常用配置
bean.xml <?xml version="1.0" encoding="UTF-8"?>