$manlookup

hostname

The Linux manual documents hostname in 2 places. Pick the section you want.