This question already has an answer here:

i want to change my hostname that appears in my router DHCP things that i already tried

sudo hostname ___

also tried to change it from /etc/hostname and /etc/hosts

marked as duplicate by Android Dev, Arronical, Byte Commander, Community Sep 27 '16 at 14:35

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.


you need to do that on the router not on the host.

this will typically be done by assigning an ip and hostname combination to the mac address of the network adapter you use on your host.

  • 1
    My router uses the device's hostname, but I found that it caches it, so it doesn't refresh if I change it. – Android Dev Sep 27 '16 at 13:42
  • 1
    if you host is set with a specific hostname it will include this in the DHCP query , this will be how the router knows about it. It will be cached for the lifetime of the DHCP lease. – Amias Sep 27 '16 at 13:44

Not the answer you're looking for? Browse other questions tagged or ask your own question.