返回命令列表

Linux command

brew-services 命令

文本

Copy it and replace filenames, paths, or keywords as needed.

命令示例

List all services

brew services list

Start a service

brew services start [postgresql]

Stop a service

brew services stop [postgresql]

Restart a service

brew services restart [postgresql]

Run service in foreground

brew services run [postgresql]

Stop all services

brew services stop --all

Clean up unused services

brew services cleanup

说明

brew services manages background services for installed Homebrew formulae. On macOS, it uses launchd with LaunchAgent plist files. On Linux, it uses systemd user units. Services configured with this command start automatically on user login.

参数

--all
Apply to all services
--json
Output in JSON format
--file _path_
Use custom service file

FAQ

What is the brew-services command used for?

brew services manages background services for installed Homebrew formulae. On macOS, it uses launchd with LaunchAgent plist files. On Linux, it uses systemd user units. Services configured with this command start automatically on user login.

How do I run a basic brew-services example?

Run `brew services list` in a terminal, then adjust file names, paths, flags, or remote targets for your system.

What does --all do in brew-services?

Apply to all services