tldr/pages.zh/osx/scutil.md

30 lines
502 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

# scutil
> 管理系统配置参数。
> 设置配置时必须是 root 权限。
> 更多信息:<https://keith.github.io/xcode-man-pages/scutil.8.html>.
- 显示 DNS 配置:
`scutil --dns`
- 显示代理配置:
`scutil --proxy`
- 获取计算机名称:
`scutil --get ComputerName`
- 设置计算机名称:
`sudo scutil --set ComputerName {{我的计算机名}}`
- 获取主机名HostName
`scutil --get HostName`
- 设置主机名:
`scutil --set HostName {{hostname}}`