Determine the Maximum Host Name Length in Linux with HOST_NAME_MAX




(5.00 out of 5)



(5.00 out of 5)



(5.00 out of 5)



(5.00 out of 5)



(5.00 out of 5)



(5.00 out of 5)



(5.00 out of 5)




(1 votes)Determine the Maximum Host Name Length in Linux with HOST_NAME_MAX
Log in to answer.
Copyright © dBuggr LLC - All Rights Reserved.
smehta26 6:44 am on February 3, 2010
“If anyone wondered what is the max length of hostname you can use (solutions and guess over the internet already), but just itching to write down how to find out. Here’s how..
krish@lin-hyd-dsk-07:~> getconf HOST_NAME_MAX
64
This is defined in file
krish@lin-hyd-dsk-07:~> grep HOST_NAME_MAX /usr/include/bits/local_lim.h
#define HOST_NAME_MAX 64″