Linux View Domain Name. Domain DNS information can be verified from the Linux terminal using the following three commands. Both Linux UNIX comes with the following utilities to display hostname domain name.
You need to open file etcresolvconf in a text editor like vi or nano and add your name server IP in the below format. Host name is generally put in the etchostname file. A few tips about listing users in Linux.
Domainname nisdomainname ypdomainname will print the name of the system as returned by the getdomainname 2 function.
So we can simple print the host name to the terminal with echo command like below. Its main purpose is to uniquely identify over a network. You just saw three ways to view users in Linux. Setting or changing FAQDN on Ubuntu 2004 LTS per interface advanced config However the recommended way is to use the hostnamectl command to editetchostname file.