generated from cotes2020/chirpy-starter
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
19 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
--- | ||
layout: post | ||
category: [工作日志, Linux] | ||
tags: [Linux, 网络, IP] | ||
title: Linux 下修改IP | ||
--- | ||
|
||
在linux 中(ubuntu、centos)等,必不可少的就是对系统IP的修改。 | ||
本文将记录任何情况下的IP修改方式。持续更新 | ||
|
||
|
||
|
||
## 1. IP 命令配置文件 | ||
|
||
> IP 命令添加的IP地址重启后不会生效 | ||
- `ip link set [ifname] down`: 关闭接口 | ||
- `ip link set [ifname] up`: 打开接口 | ||
- `ip addr add [ip]/[netmask] dev [ifname]`: 添加IP地址 |