FQDN:(Fully Qualified Domain Name)全限定域名:同时带有主机名和域名的名称

其实就是标注一个主机的完整域名。比如我的域名为 ifrom.top 那么它的邮件服务器的主机名为 mail, 所以它的FQDN 为: mail.ifrom.top

Linux 获取主机名 的命令为:

➜  ~ hostname -f
➜ ~ hostname --fqdn
➜ ~ hostname --long

三个都返回 fqdn 的值。

我们通过 man hostname 可以发现,其中有对fqdn 有更问详细的讲解:

   THE FQDN
The FQDN (Fully Qualified Domain Name) of the system is the name that the resolver() returns for the host name, such as, ursula.example.com. It is usually the hostname followed
by the DNS domain name (the part after the first dot). You can check the FQDN using hostname --fqdn or the domain name using dnsdomainname. You cannot change the FQDN with hostname or dnsdomainname. The recommended method of setting the FQDN is to make the hostname be an alias for the fully qualified name using /etc/hosts, DNS, or NIS. For example, if the hostname was
"ursula", one might have a line in /etc/hosts which reads 127.0.1.1 ursula.example.com ursula Technically: The FQDN is the name getaddrinfo() returns for the host name returned by gethostname(). The DNS domain name is the part after the first dot. Therefore it depends on the configuration of the resolver (usually in /etc/host.conf) how you can change it. Usually the hosts file is parsed before DNS or NIS, so it is most com‐
mon to change the FQDN in /etc/hosts. If a machine has multiple network interfaces/addresses or is used in a mobile environment, then it may either have multiple FQDNs/domain names or none at all. Therefore avoid
using hostname --fqdn, hostname --domain and dnsdomainname. hostname --ip-address is subject to the same limitations so it should be avoided as well.

保持更新,转载请注明出处。

Linux 中 FQDN 查询及设置的更多相关文章

  1. Linux 中如何查询和卸载已安装的软件

    Linux 中如何查询和卸载已安装的软件 Linux软件的安装和卸载一直是困扰许多新用户的难题.在Windows中,我们可以使用软件自带的安装卸载程序或在控制面板中的“添加/删除程序” 来实现.与其相 ...

  2. 如何在linux中部署mongodb并设置连接认证

    在windows上给mongodb设置连接认证权限:mongodb默认是不认证的,默认没有账号,现在就讲讲怎么设置账户和密码 1.首先进入C:\mongodb\bin下面双击运行mongo.exe启动 ...

  3. Linux中环境变量的设置

    目录 环境变量 Shell定义的环境变量 查看环境变量 Linux下环境变量的设置 环境变量 在Windows 系统下,很多软件安装都需要配置环境变量,比如 安装 jdk ,如果不配置环境变量,在非软 ...

  4. Mysql : L闪存卡linux中的内核参数设置

    将 Nytro WarpDrive 加速卡配置为文件系统 本节说明的操作使您可调整 Nytro WarpDrive 加速卡,增强使用 Oracle Linux with Unbreakable Ent ...

  5. Linux中使用export命令设置环境变量

    Linux export 命令 2011-08-31 22:36:39|  分类: 命令总结|举报|字号 订阅     功能说明:设置或显示环境变量. ######################## ...

  6. 00006 - Linux中使用export命令设置环境变量

    功能说明:设置或显示环境变量. #################################################################################### ...

  7. linux中Zabbix邮件报警设置配置步骤

    使用外部邮箱账号发送报警邮件设置 配置Zabbix服务端外部邮箱 vi /etc/mail.rc #编辑,添加以下信息 set from=xxx@163.com smtp=smtp.163.com s ...

  8. linux中环境变量PATH设置错误,导致ls cd 等命令不能使用,提示:没有那个文件或目录

    在CentOS7中执行了 PATH=/opt/:$PATH 然后执行ls时,出现 ls-bash: ls: 没有那个文件或目录 试了试其他命令也一样无法使用 后来执行 : export PATH=/u ...

  9. Linux 中如何查询端口被占用的情况

    Linux如何查看端口 1.lsof -i:端口号 用于查看某一端口的占用情况,比如查看8000端口使用情况,lsof -i:8000,如下图 可以看到8000端口已经被轻量级文件系统转发服务lwfs ...

随机推荐

  1. Spring总结 2.装配bean

    本随笔内容要点如下: bean的作用域 占位符 一.bean的作用域 在默认情况下,Spring管理的bean的单例的.也就是说,无论注入多少次,都是同一个bean对象.一般情况下,单例模式是足以应付 ...

  2. 常见hash原理

    原文出处:http://www.itmian4.com/forum.php?mod=viewthread&tid=4736&fromuid=1 散列表,它是基于快速存取的角度设计的,也 ...

  3. CentOS QT can't find lGL

    直接安装: yum install libGL, yum install libGL-devel 库即可.

  4. AI---训练集(train set) 验证集(validation set) 测试集(test set)

    在有监督(supervise)的机器学习中,数据集常被分成2~3个即: 训练集(train set) 验证集(validation set) 测试集(test set) 一般需要将样本分成独立的三部分 ...

  5. elasticSearch6源码分析(10)SettingsModule

    1.SettingsModule概述 /** * A module that binds the provided settings to the {@link Settings} interface ...

  6. ResNet 论文研读笔记

    Deep Residual Learning for Image Recognition 原文链接 摘要 深度神经网络很难去训练,本文提出了一个残差学习框架来简化那些非常深的网络的训练,该框架使得层能 ...

  7. Java源码阅读(不断补充)

    java.util.LinkedList LinkedList是实现了List接口的双链表实现,拥有list的所有方法并且允许所有元素(包括null). 双向链表也叫双链表,是链表的一种,它的每个数据 ...

  8. [转]SQL Server Reporting Services - Timeout Settings

    本文转自:https://social.technet.microsoft.com/wiki/contents/articles/23508.sql-server-reporting-services ...

  9. C# 全文搜索Lucene

    全文出自:https://blog.csdn.net/huangwenhua5000/article/details/9341751 1 lucene简介1.1 什么是luceneLucene是一个全 ...

  10. 设计模式之工厂方法(FactoryMethod)模式

    在五大设计原则的基础上经过GOF(四人组)的总结,得出了23种经典设计模式,其中分为三大类:创建型(5种).结构型(7种).行为型(11种).今天对创建型中的工厂方法(FactoryMethod)模式 ...