1

If I make a change to a plist file, how can I subsequently force a refresh so that it is reflected? Do I need to logout and log back in, or can I run a command?

2
  • 2
    Is there a specific problem you try to solve by modifying a plist? Reload options differ between plists.
    – nohillside
    Commented Aug 19, 2023 at 14:14
  • This is what the defaults write command is for.
    – benwiggy
    Commented Aug 19, 2023 at 14:57

1 Answer 1

3

The .plist has to be re-read. To do that, you have to restart the service or application that utilizes it.

For example, if you make one of the many, many changes in Finder, you need to issue the command killall Finder which will terminate all Finder processes and it will automatically restart.

Some apps can be closed via the GUI and system processes are usually killed off via command line though Activity Monitor does give you the ability to do the same thing. If they are not automatically restarted, you'll have to manually start them.

2
  • On Linux/BSD, I can do kill -HUP <PID> to force the process to reload the configuration. Would that also work?
    – John Doe
    Commented Aug 19, 2023 at 14:41
  • Yes, you can do the exact same thing in macOS. HUP sends the "hangup" signal. It's the same signal that gets generated if you are running a process in the foreground and then disconnect your terminal (which is why you can execute a process with NOHUP). Whether or not the process respawns depends on if there's a helper running to do so; you may still have to relaunch it manually.
    – Allan
    Commented Aug 19, 2023 at 14:46

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .