Inspect a macOS launch service
Build a paste-ready command, then review its compatibility and effects before running it.
launchctl print system/com.apple.sshd | head -30read-onlyno known side effects Compatibility
macOSVerified for macOS using zsh, bash syntax.
Operational knowledgereview due 2027-01-20
Requirementslaunchctllaunchctl must be installed and available on PATH.
Version supportlaunchctl Current supported releasesVerified for macos using zsh, bash syntax; consult compatibility notes for platform-specific differences.
Expected signalssystem/com.apple.sshd = {Representative successful output; values vary with the selected target and system state.
Known errorslaunchctl: command not foundlaunchctl is missing or is not available on PATH.
Verifylaunchctl print system/com.apple.sshd | head -30The output matches the expected target and exits without an error.Rollback noteNot required: this command is read-only and does not change system state.
Command breakdown
01launchctlCommandRuns the launchctl stage of this one-liner.
02printArgumentPasses print to launchctl.
03system/com.apple.sshdArgumentPasses system/com.apple.sshd to launchctl.
04|PipelinePasses the output on the left to the command on the right.
05headCommandRuns the head stage of this one-liner.
06-30OptionConfigures head with the -30 option.
Example input
launchctl print system/com.apple.sshd | head -30
Example output
system/com.apple.sshd = {
active count = 0
path = /System/Library/LaunchDaemons/ssh.plist
state = not running
program = /usr/libexec/sshd-keygen-wrapper
}
Illustrative output — exact values vary by system and data.
Official sources