LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 08-17-2015, 06:16 PM   #1
luofeiyu
Member
 
Registered: Aug 2015
Posts: 237

Rep: Reputation: Disabled
How to get the domainname with command?


I have named the domain name 'hfi' on my local machine during the installation.
Why can't get the domain name ?
$ domainname
(none)
 
Old 08-17-2015, 06:42 PM   #2
jpollard
Senior Member
 
Registered: Dec 2012
Location: Washington DC area
Distribution: Fedora, CentOS, Slackware
Posts: 4,912

Rep: Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513
It is historically a poor choice of naming by Sun.

The command "domainname" is referring to the NIS naming service. Not the domain name from the fully qualified domain name.

You should have an utility named "dnsdomainname", but even that is not required to have a value either. Read the manpage on dnsdomainname, the section "THE FQDN" shows how it is set, but it really is unnecessary.
 
Old 08-17-2015, 08:13 PM   #3
luofeiyu
Member
 
Registered: Aug 2015
Posts: 237

Original Poster
Rep: Reputation: Disabled
dnsdomainname
hfi


Got it .
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
can't ping domainname.com saman Linux - Server 1 07-18-2008 11:44 PM
domainname? kalleanka General 2 06-12-2005 04:53 PM
sendmail and domainname zeky Linux - Networking 4 05-02-2005 01:09 PM
domainname pkp2372 Linux - Newbie 1 02-24-2004 10:40 AM
domainname kevv Linux - Networking 1 05-03-2002 10:19 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 03:49 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration