Still Need to Edit Resolv.conf? Bug?

I was taught that good practice in setting up Virtualmin was to add the following line to the top /etc/resolv.conf

echo nameserver >> /etc/resolv.conf

Does this still apply? Is it good practice? I don’t want to be like that story about the modern gunnery crew with two men standing on the left and right of a gun because they used to hold the horses.

If I’m not mistaken the Virtualmin installer script should perform this step automatically.

If it does not for some reason, it is indeed recommended (and the configuration check will fail otherwise) to have as first nameserver in resolv.conf. (Your example with echo >> would probably add it as last nameserver, which is incorrect.)

Note that depending on Linux distro and version, the nameservers need to be configured in the network config file (e.g. /etc/network/interfaces in Ubuntu), since resolv.conf gets overwritten/auto-generated by the system.