To restart the named service (also known as the Domain Name System (DNS) server) in Ubuntu or Debian, you can use the following command:
refer to:lautturi.comsudo service named restart
This command will stop the named service and then start it again. If you just want to stop the service, you can use the following command:
sudo service named stop
And to start the service again, use the following command:
sudo service named start
Keep in mind that you may need to use systemctl
instead of service
depending on your version of Linux and the init system being used. For example, on CentOS 7 and later, you can use systemctl
to start, stop, and restart the named service like this:
sudo systemctl restart named.service sudo systemctl stop named.service sudo systemctl start named.service