Equivalent Commands

The commands supported in MacOS to do the thing you know how to do in Linux.

Listing Open TCP Ports

Equivalent to netstat -nap:

lsof -nP -i4TCP:$PORT | grep LISTEN

Managing Daemons

The tool to manage running services and daemons is launchctl. The Linux equivalent would be systemctl and the various init.d scripts.

launchctl stop com.openssh.sshd

Last updated