以下摘自百度百科:

FQDN:(Fully Qualified Domain Name)完全合格域名/全称域名,是指主机名加上全路径,全路径中列出了序列中所有域成员。全域名可以从逻辑上准确地表示出主机在什么地方,也可以说全域名是主机名的一种完全表示形式。从全域名中包含的信息可以看出主机在域名树中的位置。DNS解析流程:首先查找本机HOSTS表,有的直接使用表中定义,没有查找网络连接中设置的DNS 服务器由他来解析。

例子:

例如,acmecompany公司的Web服务器的全域名可以是 acmecompany.,而若sales主机是在销售部子域,则它的全域名可以是sales.acmecompany。当给出的名字像acmecompany而不是acmecompany.时,他们通常是指主机名,而名字后边带有点号(“.”是指根域名服务器)的则认为是全域名。这种区别在理解和控制解析过程时是非常重要的。点号实际上指出了域名树的根。

作用:

全域名在实际中是非常有用的。电子邮件就使用全域名作为收信人的电子邮件地址,如janicejones@ acmecompany. com,其中收信人为janicejones,跟在收信人名字后面是符号@,@后面是邮件服务器的全域名,或者说是邮件服务器所在企业的域名,最后是顶层域名.com。. com意味着acmecompany是一个商业机构。


以下摘自他人博客

完全合格域名(FQDN点结尾的域名

例如bbs.cnblogs.com.就是一个完全合格域名。在一般的网络应用中,我们可以省略完全合格域名最右侧的点,但DNS对这个点不能随便省略。因为这个点代表了DNS的根,有了这个点,完全合格域名就可以表达为一个绝对路径,例如bbs.cnblogs.com.就可以表示为DNS根下的com子域下cnblogs.com域中一个名为bbs的主机。如果DNS发现一个域名不是以点结尾的完全合格域名,就会把这个域名加上当前的区域名称作为后缀,让其满足完全合格域名的形式需求。例如DNS会把域名bbs处理为bbs.blogs.com.

域名就相当于一个命名空间,在这个命名空间下,属于这个域的各个主机都可以创建自己的主机名称。

linux下查看方式:

hostname, 查看主机名

hostname -f 查看FQDN

dnsdomainname 查看域

uname -h 查看主机名

问题:hostname -f返回错误:hostname: Unknown host

答:

The hostname command returns results from DNS and /etc/hosts.

hostname is equivilant to uname -n and is the actual "hostname" or "nodename" of the box.
All the other hostname arguments use this nodename to look up info. So before going any further, I should explain the /etc/hosts file format.
The first field is fairly obvious, its the IP address all the hostnames on the line should resolve to. The second field is the primary hostname for that IP. The remaining fields are aliases. So if you run hostname -f it will first try to resolve the IP for your nodename. Depending on how you have the hosts: entry configured in /etc/nsswitch.conf this method will vary. If you have it configured to use dns, it will use the search domains configured in /etc/resolv.conf until it gets an IP back from DNS.
If you have it configured to use files it will look in /etc/hosts to find a line where either the primary hostname or the alias name is your current nodename (uname -n), and then return the IP address in that line.
Once it has the IP it will then try a reverse lookup on that IP. Again it will use DNS for this and your hosts file based on your nsswitch.conf. In the case of using your hosts file, it will return the primary entry (which is the first field after the IP in the file). hostname -a will only work with the hosts file since doing a reverse lookup in DNS only gives you result. With the hosts file it return the alises in the matching line (which is everything after the first entry, the primary hostname). So in short, the likely reason for your issue is that you have no entry in /etc/hosts that contains your hostname (uname -n). Examples
If your nodename is 'foobar', and you have an entry in /etc/hosts such as this: 127.0.0.1 foobar.example.com foobar localhost.localdomain localhost
Then you will get the following command results: # hostname
foobar
# uname -n
foobar # hostname -f
foobar.example.com # hostname -a
foobar localhost.localdomain localhost

回答来自:http://unix.stackexchange.com/questions/158877/linux-hostname-f-command-is-not-working-on-rhel

FQDN说明的更多相关文章

  1. 使用shell/python获取hostname/fqdn释疑

    一直以来被Linux的hostname和fqdn(Fully Qualified Domain Name)困惑了好久,今天专门抽时间把它们的使用细节弄清了. 一.设置hostname/fqdn 在Li ...

  2. Linux设置FQDN

    FQDN是Fully Qualified Domain Name的缩写, 含义是完整的域名. 例如, 一台机器主机名(hostname)是www, 域后缀(domain)是example.com, 那 ...

  3. 使用shell/python获取hostname/fqdn释疑(转)

    一直以来被Linux的hostname和fqdn(Fully Qualified Domain Name)困惑了好久,今天专门抽时间把它们的使用细节弄清了. 一.设置hostname/fqdn 在Li ...

  4. linux中和salt中的fqdn测试小节

    设置hosts文件和hostname文件 [root@dawn-hnyd-yd-1 ~]# cat /etc/hosts 127.0.0.1 localhost localhost.localdoma ...

  5. Linux 中 FQDN 查询及设置

    FQDN:(Fully Qualified Domain Name)全限定域名:同时带有主机名和域名的名称 其实就是标注一个主机的完整域名.比如我的域名为 ifrom.top 那么它的邮件服务器的主机 ...

  6. lync2013 错误: 已为不同的传输层安全性(TLS)目标找到类型为“McxInternal”且完全限定的域名(FQDN)为

    最近 练习安装lync2013 在发布拓扑结构时遇到如下错误: lync 错误: 已为不同的传输层安全性(TLS)目标找到类型为“McxInternal”且完全限定的域名(FQDN)为“lync.co ...

  7. 基于Python Shell获取hostname和fqdn释疑

    一直以来被Linux的hostname和fqdn(Fully Qualified Domain Name)困惑了好久,今天专门抽时间把它们的使用细节弄清了. 一.设置hostname/fqdn 在Li ...

  8. What is a fully qualified domain name (FQDN)?

    fully qualified domain name (FQDN) is the complete domain name for a specific computer, or host, on ...

  9. 如何查看FQDN

    FQDNFully Qualified Domain Name缩写, 含义完整域名. 例, 台机器主机名(hostname)www, 域缀(domain)example.com, 该主机FQDN应该w ...

随机推荐

  1. SQLite3开发接口函数详解

    SQLite3是SQLite一个全新的版本,它虽然是在SQLite 2.8.13的代码基础之上开发的,但是使用了和之前的版本不兼容的数据库格式和API. SQLite3是为了满足以下的需求而开发的: ...

  2. Python练习 | WebServer

    #-*- coding:utf-8 -*- import sys, os from http.server import BaseHTTPRequestHandler, HTTPServer #--- ...

  3. FileUpload.PostedFile 为null异常 NullReferenceException

    FileUpload控件PostedFile属性总是为null,提示有异常NullReferenceException.我的程序中加了UpdatePannel控件.把UpdatePannel去掉之后就 ...

  4. C# 特性(Attribute)之Flag特性

    本文参考自C# 位域[flags],纯属读书笔记,加深记忆 [Flags]的微软解释是“指示可以将枚举作为位域(即一组标志)处理.”其实就是在编写枚举类型时,上面附上Flags特性后,用该枚举变量是既 ...

  5. android 拍照和从相册选择组件

    android 拍照及从相册选择组件 单独封装到一个 activity 中便于更好的复用 拍照或从相册选择成功后使用 EventBus 发出广播回传图片路径,和调用者充分解耦合 根据传入参数支持裁剪和 ...

  6. PHP和Java中foreach循环的用法区别

    1.foreach语句介绍: ①PHP: foreach 语法结构提供了遍历数组的简单方式.foreach 仅能够应用于数组和对象,如果尝试应用于其他数据类型的变量,或者未初始化的变量将发出错误信息. ...

  7. RESTful简单介绍

    1 什么是restful Restful就是一个资源定位及资源操作的风格.不是标准也不是协议,只是一种风格.基于这个风格设计的软件可以更简洁,更有层次,更易于实现缓存等机制. 资源:互联网所有的事物都 ...

  8. cg教程

    Unity对shader的重点支持是cg语言,因为具有跨平台性质 Cg语言和CPU 上的C语言是很相似的,只不过有了自己的一套关键字和函数库 Cg语言的权威和入门教程在NVID1A的官方网站上,如果以 ...

  9. CCF 201412-4 最优灌溉

    问题描述 试题编号: 201412-4 试题名称: 最优灌溉 时间限制: 1.0s 内存限制: 256.0MB 问题描述: 问题描述 雷雷承包了很多片麦田,为了灌溉这些麦田,雷雷在第一个麦田挖了一口很 ...

  10. .netCore2.0 部分视图ViewComponent

    .netCore 中部分视图相当于轻量级的控制器,建立方法类似控制器,需要建立文件夹Components,然后再建立视图组件控制器,规则和视图控制器类似,默认结尾为ViewComponent,如Abc ...