Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Check the service using port (mac)

Check The Process Using Port

In ~/.zshrc, put the following:

pidportfunction() {
    lsof -n -i4TCP:$1 | grep LISTEN
}
alias pidport=pidportfunction

Usage:

pidport 9994

Check the machine IP address

In ~/.zshrc, put the following:

alias whereami="ipconfig getifaddr en0"

Usage:

whereami
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.