Disable truncation of hostnames in netstat's output

By default, the netstat command truncates hostnames in it's output. How can this truncation of hostnames be disabled in the output of the netstat command?


Solution 1:

On older versions of OSX and Ubuntu 10.04/16.04, use the -W flag:

netstat -W

On older versions of Linux and OSX 10.13.3, use the -T flag:

netstat -T

On Windows 7/8, use the -f flag:

netstat -f