This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
#use -alias do remove an entry | |
ifconfig lo0 alias 127.0.1.1 | |
ifconfig lo0 alias 127.0.1.2 | |
ifconfig lo0 alias 127.0.1.3 | |
ifconfig lo0 alias 127.0.1.4 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#List all ports for tcp | |
sudo lsof -itcp | |
#all ports for tcp, dont resolve port name from numbers | |
sudo lsof -itcp -P | |
#open files and ports of process #$PID | |
sudo lsof -p $PID | |
#only ports of tcp for process #$PID, dont resolve port name, dont resolve ip name |