PLIST files are formatted in XML and stand for property list files. They’re typically used by macOS applications for defining properties and configurations settings related with how the application itself will behave as a daemon/service.
See the following simple example for defining a service that will be greeting your everytime you turn on your mac:
The file above will be launched by running launchctl which is the command line interface for interacting with launchd. For those who are not familiar with launchd, it’s the service management framework used by macOS, similar in some ways to Service Control Manager on Windows or systemd on many Linux distributions.
Copy the snipped above and paste its content in a new file placed in
First of we will proceed validating the plist file by running:
Now turn on your audio and proceed for activating our agent that will be greeting your everytime your mac is turned on:
launchctl load -w ~/Library/LaunchAgents/com.example.agent.plist
Here there is! you should have listened Siry greeting you, easy right?
In order to verify that the agent is running just type:
launchctl list com.example.agent
As this is just a simple example about how services are managed in the macOS echosystem, anytime you want to turn off the agent just type:
launchctl unload -w ~/Library/LaunchAgents/com.example.agent.plist
Hope you find this brief introducction to how services/daemons are managed by macOS useful, if you want to know more visit: