Linux command
networkctl 命令
文本
复制后可按需替换文件名、目录或参数。
常用示例
Example
networkctl list
Example
networkctl status
Bring up
networkctl up eth0
Bring down
networkctl down eth0
Renew
networkctl renew eth0
Reload
networkctl reload
Reconfigure
networkctl reconfigure eth0
说明
networkctl queries and controls the state of network links as seen by systemd-networkd. It provides administrative control over network interfaces managed by the systemd networking daemon.
参数
- -a, --all
- Show all links with status
- -s, --stats
- Include link statistics
- -l, --full
- Disable output truncation
- -n, --lines=NUM
- Control journal output lines (default: 10)
- --json=MODE
- Format output as JSON (short/pretty/off)
- --drop-in=NAME
- Edit drop-in configuration files
- --no-reload
- Skip service reload after editing
FAQ
What is the networkctl command used for?
networkctl queries and controls the state of network links as seen by systemd-networkd. It provides administrative control over network interfaces managed by the systemd networking daemon.
How do I run a basic networkctl example?
Run `networkctl list` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
What does -a, --all do in networkctl?
Show all links with status