Linux 中 FQDN 查询及设置
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 查询及设置的更多相关文章
- Linux 中如何查询和卸载已安装的软件
Linux 中如何查询和卸载已安装的软件 Linux软件的安装和卸载一直是困扰许多新用户的难题.在Windows中,我们可以使用软件自带的安装卸载程序或在控制面板中的“添加/删除程序” 来实现.与其相 ...
- 如何在linux中部署mongodb并设置连接认证
在windows上给mongodb设置连接认证权限:mongodb默认是不认证的,默认没有账号,现在就讲讲怎么设置账户和密码 1.首先进入C:\mongodb\bin下面双击运行mongo.exe启动 ...
- Linux中环境变量的设置
目录 环境变量 Shell定义的环境变量 查看环境变量 Linux下环境变量的设置 环境变量 在Windows 系统下,很多软件安装都需要配置环境变量,比如 安装 jdk ,如果不配置环境变量,在非软 ...
- Mysql : L闪存卡linux中的内核参数设置
将 Nytro WarpDrive 加速卡配置为文件系统 本节说明的操作使您可调整 Nytro WarpDrive 加速卡,增强使用 Oracle Linux with Unbreakable Ent ...
- Linux中使用export命令设置环境变量
Linux export 命令 2011-08-31 22:36:39| 分类: 命令总结|举报|字号 订阅 功能说明:设置或显示环境变量. ######################## ...
- 00006 - Linux中使用export命令设置环境变量
功能说明:设置或显示环境变量. #################################################################################### ...
- linux中Zabbix邮件报警设置配置步骤
使用外部邮箱账号发送报警邮件设置 配置Zabbix服务端外部邮箱 vi /etc/mail.rc #编辑,添加以下信息 set from=xxx@163.com smtp=smtp.163.com s ...
- linux中环境变量PATH设置错误,导致ls cd 等命令不能使用,提示:没有那个文件或目录
在CentOS7中执行了 PATH=/opt/:$PATH 然后执行ls时,出现 ls-bash: ls: 没有那个文件或目录 试了试其他命令也一样无法使用 后来执行 : export PATH=/u ...
- Linux 中如何查询端口被占用的情况
Linux如何查看端口 1.lsof -i:端口号 用于查看某一端口的占用情况,比如查看8000端口使用情况,lsof -i:8000,如下图 可以看到8000端口已经被轻量级文件系统转发服务lwfs ...
随机推荐
- Solidity数组
一.固定长度的数组(Arrays) 1.固定长度类型数组的声明 pragma solidity ^0.4.4; contract C { // 数组的长度为5,数组里面的存储的值的类型为uint类型 ...
- Java中mongodb使用and和or的复合查询
在MongoDB的JAVA查询中对应这些问题 and查询 //条件 startsAt< curr and endsAt > curr long curr = new Date().getT ...
- java arrayList vector 区别
1. 关系图 List接口一共有三个实现类,分别是ArrayList.Vector和LinkedList 2. ArrayList.Vector和LinkedList区别 ArrayList是最常用的 ...
- Spark2.1.0——深入理解事件总线
Spark2.1.0——深入理解事件总线 概览 Spark程序在运行的过程中,Driver端的很多功能都依赖于事件的传递和处理,而事件总线在这中间发挥着至关重要的纽带作用.事件总线通过异步线程,提高了 ...
- 【angular5项目积累总结】breadcrumb面包屑组件
view code <div class="fxs-breadcrumb-wrapper" aria-label="Navigation history" ...
- SqlDataAdapter 对datagridview进行增删改(A)
这种方法主要是双击datagridview单元格,直接进行添加,修改,删除,在实际开发中并不太常用,另一种方法下一次在具体陈述. using System; using System.Collecti ...
- 【JVM】1、java虚拟机参数-X 与 -XX的区别
Options that begin with -X are non-standard (not guaranteed to be supported on all VM implementation ...
- 什么是Solr
什么是Solr Lucene复习: 1.什么是lucene:全文检索工具包 2.Lucene的工作原理: 索引数据的创建 从原始文件中提取一些可以用来搜索的数据(封装成各种Field),把各field ...
- django-全文检索
全文检索不同于特定字段的模糊查询,使用全文检索的效率更高,并且能够对于中文进行分词处理 需要的第三方库: haystack:django的一个包,可以方便地对model里面的内容进行索引.搜索,设计为 ...
- apicloud 自定义模块的开发与上架注意事项
模块开发要点与返回刷新页面注意事项 1.介绍 apicloud 除了使用官方提供的模块外,我们可以自定义一些模块供自己使用和上传到官方出售.针对没有提供或者价格过贵的模块,如果有时间自己可以进行研究. ...