then I'm using an ubuntu server with gitlab installed, I need to configure hostname the name ubuntudev, to access it from within the network! I configure the ubuntudev name in /etc/hosts but it does not work with the hostname, how can I fix this error? I put under the contents of the /etc/hosts file
--> /etc/hosts
127.0.0.1 localhost
127.0.1.1 ubuntudev
# The following lines are desirable for IPv6 capable hosts
::1 localhost ip6-localhost ip6-loopback
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
ping ubuntudevyou'll be pinging 127.0.1.1 so you'll likely find what you did worked, it just didn't do what you intended./etc/hostspreceeded the dhcp protocol (ie. arpanet days) and is only a list of ip-addresses and names to access those ip.addresses. I think what you wanted to change was/etc/hostname– guiverc Dec 29 '17 at 11:26hostnamebut. IMHO,hostnamectlis preferred – Panther Dec 29 '17 at 18:21