Files
tldr/pages.zh/linux/networkctl.md

33 lines
794 B
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# networkctl
> 查询网络链接的状态。
> 使用 `systemd-networkd` 管理网络配置。
> 更多信息:<https://www.freedesktop.org/software/systemd/man/networkctl.html>。
- 列出现有链接及其状态:
`networkctl list`
- 显示整体网络状态:
`networkctl status`
- 启用网络设备:
`networkctl up {{interface1 interface2 ...}}`
- 禁用网络设备:
`networkctl down {{interface1 interface2 ...}}`
- 更新动态配置(例如,从 DHCP 服务器接收的 IP 地址):
`networkctl renew {{interface1 interface2 ...}}`
- 重新加载配置文件 (.netdev 和 .network)
`networkctl reload`
- 重新配置网络接口(如果您编辑了配置,需要先调用 `networkctl reload`
`networkctl reconfigure {{interface1 interface2 ...}}`