Skip to content

Commit

Permalink
f: ip add
Browse files Browse the repository at this point in the history
  • Loading branch information
mrhanhan committed Aug 21, 2024
1 parent 7bcfa38 commit a999f30
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions _posts/工作日志/Linux/2024-06-17-network.md
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地址

0 comments on commit a999f30

Please sign in to comment.