`hostname -i` or `hostname -I` is the prefered method here.