To connect to the Internet from a Linux machine, we need to set the DNS for the Linux machine using the command line. We need to set up an entry in a file that is /etc/resolv.conf. Below is the way using which we can setup an entry:-
Step 1: Login onto the server using SSH.
Step 2: Edit the file with your favourite editor:-
vi /etc/resolv.conf
and then place the entry of the DNS as below :-
nameserver 8.8.8.8
nameserver 4.4.4.4
and then save the file.
That’s all we need to do here for connecting to the Internet.
]]>