More than 5 years have passed since last update.
nmap -sT -O localhost
netstat -an
Register as a new user and use Qiita more conveniently