This tutorial explains Linux “domainname” command, options and its usage with examples.
domainname – show or set the system’s NIS/YP domain name.
Displays or sets the name of the current Network Information Service (NIS) domain.
domainname [ DomainName ]
Optional Argument to set the NIS domain name
1. To join a new domain, enter
In this example, the domainname command sets the NIS domain name to caesar.
2. To find out the name of the domain your machine belongs to, enter:
Sanfoundry Global Education & Learning Series – 1000 Linux Tutorials.
Participate in the Sanfoundry Certification contest
to get free Certificate of Merit. Join our social networks below and stay updated with latest contests, videos, internships and jobs!
, a technology veteran with 20+ years @ Cisco & Wipro, is Founder and CTO at Sanfoundry. He is Linux Kernel Developer & SAN Architect and is passionate about competency developments in these areas. He lives in Bangalore and delivers focused training sessions to IT professionals in Linux Kernel, Linux Debugging, Linux Device Drivers, Linux Networking, Linux Storage, Advanced C Programming, SAN Storage Technologies, SCSI Internals & Storage Protocols such as iSCSI & Fiber Channel. Stay connected with him @