真是愚蠢的问题,Ubuntu 20,我安装了 apache2,没有太多其他的。我想要sudo visudo /etc/hosts
添加一个别名“dummy.com”域别名作为指向服务器的黑客,仅用于本地测试学习网站,我得到了这个不寻常的结果
>> /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
Run Code Online (Sandbox Code Playgroud)
我删除了该127.0.0.1 localhost notmydomain.com
行,所以现在这是我的文件,为什么每当我编辑它时它都会出现如上所述的语法错误?
conrad@conrad-VirtualBox:~$ cat /etc/hosts
127.0.0.1 localhost
127.0.1.1 conrad-VirtualBox
# The …
Run Code Online (Sandbox Code Playgroud)