How can I change the DNS server command?

How can I change the DNS server command because every time I restart my computer I have to write this in the terminal: sudo gedit /etc/resolv.conf
Please help:)