3
2
I tried to change the FQDN in Ubuntu using sudo -i gedit /etc/hosts
and change as shown below:
127.0.0.1 localhost
127.0.1.1 ubuntu.example.com
192.168.217.129 ubuntu.example.com
# The following lines are desirable for IPv6 capable hosts
::1 ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
after that I tried:
hostname -f
which shows:
hostname: Name or service not known
How can I change the FQDN?
Try the most popular answer here: http://askubuntu.com/questions/158957/how-to-set-the-fully-qualified-domain-name-in-12-04
– Kinnectus – 2015-12-18T07:01:22.723The below link will help you. http://askubuntu.com/questions/158957/how-to-set-the-fully-qualified-domain-name-in-12-04
– Hussain7 – 2015-12-18T07:01:22.767Well what'ya know! – Kinnectus – 2015-12-18T07:02:12.103
rather than using sudo with gedit, might I suggest nano? It's quite easy. Occasionaly,
vi
is the only real option -- but I think that's realistically only for visudo. I wouldn't mix gedit and sudo, myself. – Thufir – 2017-01-04T12:18:47.237