Really dumb question, Ubuntu 20, and I have apache2 installed, not much else.
I go sudo visudo /etc/hosts
and want to add an alias "dummy.com" domain alias as a hack to point to the server for local only testing a learning site and I get this unusual
>> /etc/hosts: syntax error near line 1 <<<
>>> /etc/hosts: syntax error near line 2 <<<
>>> /etc/hosts: syntax error near line 5 <<<
>>> /etc/hosts: syntax error near line 6 <<<
>>> /etc/hosts: syntax error near line 7 <<<
>>> /etc/hosts: syntax error near line 8 <<<
>>> /etc/hosts: syntax error near line 9 <<<
What now? Q
I removed the 127.0.0.1 localhost notmydomain.com
line , so this is my file now, why does it have such syntax errors as above whenever I edit it?
conrad@conrad-VirtualBox:~$ cat /etc/hosts
127.0.0.1 localhost
127.0.1.1 conrad-VirtualBox
# 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
Confused because the browser does work when I visit fakedomain.com (curiously the alias still carries on working in browser even after I removed the fakedomain.com alias and ran sudo service network-manager restart
.) I've wasted so much time on this I'm going to re-install, but would love to know where I might have gone wrong.