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. kafka主题管理

    若代理设置了 auto.create.topics.enable=true,这样还未创建topic就往kafka发送消息时, 会自动创建一个 ${num.partitions}个分区和{default ...

  2. Docker: vmware企业级docker镜像私服--Harbor的搭建

    1.下载harbor,地址https://github.com/vmware/harbor2.进入harbor-master/Deploy目录,修改harbor.cfg文件,主要修改以下信息      ...

  3. gitlab之gitlab-ci和gitlab-runner<二>

    1.使用 该版未接入k8s,下一篇会写接入k8s. 配置项目使用gitlab-ci和gitlab-runner,在项目的根目录中添加.gitlab-ci.yml文件,用于触发pipeline. .ho ...

  4. 【LeetCode题解】225_用队列实现栈(Implement-Stack-using-Queues)

    目录 描述 解法一:双队列,入快出慢 思路 入栈(push) 出栈(pop) 查看栈顶元素(peek) 是否为空(empty) Java 实现 Python 实现 解法二:双队列,入慢出快 思路 入栈 ...

  5. 基于SpringBoot+SSM实现的Dota2资料库智能管理平台

    Dota2资料库智能管理平台的设计与实现 摘    要 当今社会,游戏产业蓬勃发展,如PC端的绝地求生.坦克世界.英雄联盟,再到移动端的王者荣耀.荒野行动的火爆.都离不开科学的游戏管理系统,游戏管理系 ...

  6. 使用iframe实现同域跨站提交数据

    有一个已经编译的asp.net 1.1的网站.为了改进录入的效率,改为由barcode扫描枪来替代手动.由于在扫描枪添加其它信息.原录入窗口已经无法适应.另外程序虽然跑的是存储过程,但交易的trans ...

  7. SQLite事务 SQLite插入多条语句为什么这么慢?.net (C#)

    今天有个朋友测试 SQLite,然后得出的结论是:SQLite 效率太低,批量插入1000条记录,居然耗时 2 分钟!下面是他发给我的测试代码.我晕~~~~~~ using System.Data; ...

  8. 整数对(hdu1271)找规律

    整数对 Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Total Submissio ...

  9. 小希的迷宫(hdu1272)并查集(有点坑)

    纪念我死去的脑细胞们    .....   小希的迷宫 Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java ...

  10. JAVA动态代理基础

    Java动态代理机制详解(JDK 和CGLIB,Javassist,ASM) 彻底理解JAVA动态代理 class文件简介及加载 Java编译器编译好Java文件之后,产生.class 文件在磁盘中. ...