SlackwareThis Forum is for the discussion of Slackware Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
1) If you're using DHCP, the DHCP server will write the DNS server(s) in your /etc/resolv.conf. On a desktop client in my office, here's how that looks:
Code:
[kikinovak@alphamule:~] $ cat /etc/resolv.conf
# Generated by dhcpcd from eth0
# /etc/resolv.conf.head can replace this line
domain microlinux.montpezat
search microlinux.montpezat
nameserver 192.168.2.1
# /etc/resolv.conf.tail can replace this line
If you wonder where the magic comes from, it's from the DHCP server which is configured like this:
2) If your setup is static (like on a server, for example), you can edit /etc/resolv.conf manually and put your nameserver(s) in it. The minimal syntax looks like this:
Code:
nameserver 8.8.8.8
Or:
Code:
nameserver 8.8.8.8
nameserver 4.4.4.4
On my office server (running it's own DNS server), here's how things are configured:
1) If you're using DHCP, the DHCP server will write the DNS server(s) in your /etc/resolv.conf. On a desktop client in my office, here's how that looks:
Code:
[kikinovak@alphamule:~] $ cat /etc/resolv.conf
# Generated by dhcpcd from eth0
# /etc/resolv.conf.head can replace this line
domain microlinux.montpezat
search microlinux.montpezat
nameserver 192.168.2.1
# /etc/resolv.conf.tail can replace this line
If you wonder where the magic comes from, it's from the DHCP server which is configured like this:
2) If your setup is static (like on a server, for example), you can edit /etc/resolv.conf manually and put your nameserver(s) in it. The minimal syntax looks like this:
Code:
nameserver 8.8.8.8
Or:
Code:
nameserver 8.8.8.8
nameserver 4.4.4.4
On my office server (running it's own DNS server), here's how things are configured:
$ cat /etc/resolv.conf
# Generated by NetworkManager
nameserver 192.168.1.1
NetworkManager has set the DNS name server to point to 192.168.1.1. This is probably a modem/router. When your modem/router connects to the internet, it will be supplied DNS name server IPs. You will need to query your modem/router settings (probably via a web interface; in a browser try going to URL http://192.168.1.1) to find these addresses.
What happens is that when an address cannot be resolved locally (e.g. by an entry in /etc/hosts) then the DNS request is sent to the name server in /etc/resolv.conf. This request is then passed to the DNS name servers in your modem/router.
NetworkManager has set the DNS name server to point to 192.168.1.1. This is probably a modem/router. When your modem/router connects to the internet, it will be supplied DNS name server IPs. You will need to query your modem/router settings (probably via a web interface; in a browser try going to URL http://192.168.1.1) to find these addresses.
What happens is that when an address cannot be resolved locally (e.g. by an entry in /etc/hosts) then the DNS request is sent to the name server in /etc/resolv.conf. This request is then passed to the DNS name servers in your modem/router.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.