2019-03-15 03:43:28 +00:00
|
|
|
|
# scutil
|
|
|
|
|
|
2021-08-02 09:41:09 +01:00
|
|
|
|
> 管理系统配置参数。
|
|
|
|
|
> 设置配置时必须是 root 权限。
|
2021-11-14 19:45:59 +00:00
|
|
|
|
> 更多信息:<https://ss64.com/osx/scutil.html>.
|
2019-03-15 03:43:28 +00:00
|
|
|
|
|
2021-08-02 09:41:09 +01:00
|
|
|
|
- 显示 DNS 配置:
|
2019-03-15 03:43:28 +00:00
|
|
|
|
|
|
|
|
|
`scutil --dns`
|
|
|
|
|
|
2021-08-02 09:41:09 +01:00
|
|
|
|
- 显示代理配置:
|
2019-03-15 03:43:28 +00:00
|
|
|
|
|
|
|
|
|
`scutil --proxy`
|
|
|
|
|
|
2021-08-02 09:41:09 +01:00
|
|
|
|
- 获取计算机名称:
|
2019-03-15 03:43:28 +00:00
|
|
|
|
|
|
|
|
|
`scutil --get ComputerName`
|
|
|
|
|
|
2021-08-02 09:41:09 +01:00
|
|
|
|
- 设置计算机名称:
|
2019-03-15 03:43:28 +00:00
|
|
|
|
|
|
|
|
|
`sudo scutil --set ComputerName {{我的计算机名}}`
|
|
|
|
|
|
2021-08-02 09:41:09 +01:00
|
|
|
|
- 获取主机名(HostName):
|
2019-03-15 03:43:28 +00:00
|
|
|
|
|
|
|
|
|
`scutil --get HostName`
|
|
|
|
|
|
2021-08-02 09:41:09 +01:00
|
|
|
|
- 设置主机名:
|
2019-03-15 03:43:28 +00:00
|
|
|
|
|
|
|
|
|
`scutil --set HostName {{hostname}}`
|