Skip to main content
21 events
when toggle format what by license comment
Mar 3, 2022 at 12:42 comment added Alexander Stohr the question here is about Ubuntu 16.04 - and its tagged Ubuntu.
May 10, 2021 at 7:03 comment added SYN Lacking any edit suggestion, here you go: I'm adding mentions to hostnamectl, which is not exhaustive, nor mandatory. Also missing from some Linux distros / not portable
May 10, 2021 at 7:01 history edited SYN CC BY-SA 4.0
added 290 characters in body
May 10, 2021 at 6:55 history edited SYN CC BY-SA 4.0
added 290 characters in body
May 9, 2021 at 8:48 comment added jbarlow Once again StackExchange's obsolete accepted answers take precedence over current information while questions for newer versions are being deleted as duplicates.
Feb 24, 2020 at 8:17 comment added SYN Feel free to edit then. The above steps still reflect how I'ld configure my hostname, on debian-based systems, though I didn't deploy Ubuntu in ages... hostnamectl did exist with Ubuntu Trusty and Debian Jessie already, while I initially answered. It's still not a part of Devuan though. Thus, not a standard with debian-like systems, as far as I'm concerned.
Feb 24, 2020 at 2:12 comment added BobHy -1, this answer is becoming increasingly obsolete.
Jan 7, 2020 at 18:06 comment added Adam Plocher @inopinatus sudo apt install resolvconf to edit it in 18.04
Jun 24, 2019 at 23:55 comment added B. Shea Note also that if you use AWS you'll also need to preserve the hostname after reboots - sudo nano /etc/cloud/cloud.cfg update preserve_hostname: true (default is false).
Jun 4, 2019 at 23:25 comment added nealmcb It seems suboptimal to hardcode the IP address in /etc/hosts, in case the server is moved later. Would it be better to put the fqdn on the 127.0.0.1 line, as recommended by @Richard Westby-Nunn?
Dec 2, 2018 at 15:51 comment added chovy how do i set the fqdn in the prompt? nm : \H
Aug 25, 2018 at 5:10 comment added Déjà vu You could update the answer with hostnamectl
Jun 4, 2018 at 3:42 comment added inopinatus This doesn't seem to apply to 18.04 LTS - there's no such file /etc/resolvconf/resolv.conf.d/head and there's no such utility resolvconf.
S Apr 25, 2018 at 17:11 history suggested Benjamin Moore CC BY-SA 3.0
search is used to specify search domains, domain is used to specify the host's domain
Apr 25, 2018 at 14:57 review Suggested edits
S Apr 25, 2018 at 17:11
Jan 6, 2018 at 23:24 comment added njbair Don't be fooled by the fact that the "DO NOT EDIT" warning appears in /etc/resolvconf/resolv.conf.d/head. Everything in the head file is prepended to the resulting /etc/resolv.conf output file, so that's why the warning is in there, so that it shows up in the final result. Threw me for a loop at first.
May 1, 2017 at 1:26 comment added Walf Both those conf files say DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN on my server (same version).
Jan 4, 2017 at 1:04 comment added SYN Running on EC2, note that you may want to set some DHCP options to your VPC, pushing the proper domain name - or disable DHCP client from your AMIs - to prevent /etc/resolv.conf from being rewritten.
Jan 3, 2017 at 7:52 comment added Thufir does this work for AWS or other VPS?
Nov 13, 2016 at 9:08 vote accept titsou
Nov 12, 2016 at 23:51 history answered SYN CC BY-SA 3.0