Skip to content

Commit eff2c54

Browse files
committed
Add List All Services Managed By Brew as a Brew TIL
1 parent 1b229b3 commit eff2c54

File tree

2 files changed

+30
-1
lines changed

2 files changed

+30
-1
lines changed

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ pairing with smart people at Hashrocket.
1010

1111
For a steady stream of TILs, [sign up for my newsletter](https://crafty-builder-6996.ck.page/e169c61186).
1212

13-
_1416 TILs and counting..._
13+
_1417 TILs and counting..._
1414

1515
---
1616

@@ -99,6 +99,7 @@ _1416 TILs and counting..._
9999
### Brew
100100

101101
- [Configure Brew Environment Variables](brew/configure-brew-environment-variables.md)
102+
- [List All Services Managed By Brew](brew/list-all-services-managed-by-brew.md)
102103

103104
### Chrome
104105

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# List All Services Managed By Brew
2+
3+
Daemonized services, such as PostgreSQL, can be installed and managed with
4+
Homebrew. Under the hood `brew` uses `launchctl` on Mac to manage these
5+
services — i.e. starting, restarting, and stopping them.
6+
7+
Assuming you've already installed some services, you can run `brew services
8+
list` to see what services there are and what their current status is.
9+
10+
```bash
11+
$ brew services list
12+
Name Status User File
13+
mailhog none
14+
mysql none
15+
postgresql@11 started jbranchaud ~/Library/LaunchAgents/[email protected]
16+
postgresql@13 none
17+
postgresql@16 none
18+
unbound none
19+
```
20+
21+
This is the default behavior if you just run `brew services` without a subcommand.
22+
23+
This is helpful if you are, for instance, trying to see which PostgreSQL server
24+
version you are currently running and which other ones are available to run. I
25+
might then issue a `stop` to `postgresql@11` so that I can then `start` the
26+
`postgresql@16` service.
27+
28+
See `brew services --help` for more details.

0 commit comments

Comments
 (0)