40 Use Domain Name Linux New

Note that this is effective only until the next reboot.
Use domain name linux. This article explains how to setup a local dns using the hosts file etc hosts in linux systems for local domain resolution or testing the website. Edit etc hostname for permanent change. Dig is a flexible cli tool for interrogating dns name servers.
Display the name of the dns domain. Basically as of now when you connect to my server it just displays my public static ip in the address bar. When called with one argument or with the file option the commands set the host name or the nis yp domain name.
First of all check if your server is having domain name already set up or not using below command. A hostname show or set the system s host name b domainname show or set the system s nis yp domain name c dnsdomainname show the system s dns domain name d nisdomainname show or set system s nis yp domain name e ypdomainname show or set the system s nis yp domain name. A both linux unix comes with the following utilities to display hostname domain name.
Host is a simple utility for performing dns lookups. In the networking terminology the domain name is the mapping of ip with the name. Hostname uses the sethostname 2 function while all of the three domainname ypdomainname and nisdomainname use setdomainname 2.
Now i want to move on to the next step in the process and host a domain name that i have purchased through my apache server. This can be done using the following 5 commands. I want to set it up in such a manner that the domain name is displayed in the address bar not the ip to my server.
Domainname command in linux is used to return the network information system nis domain name of the host you can use hostname d command as well to get the host domainname if the domain name is not set up in your host then the response will be none. We will walk you through steps that need to be taken to the setup domain name on your linux server. Vi etc hostname set or replace hostname.