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 ...
随机推荐
- C++关于sort和priority_queue的运算符重载
C++中的sort函数默认是将元素升序排列的,而priority_queue默认是将元素降序排列的(默认实现的是大顶堆). 自定义运算符用的比较多,以下2种对sort和priority_queue运算 ...
- IC 设计中DFT的Boundary Scan功能
在很大规模的IC设计中,往往会有一些各种各样的bug出现,不论是在前期design的过程,还是在post silicon流片回来chip的flaw,都会导致chip的功能的失败,时钟频率无法达到期望频 ...
- 软件架构设计学习总结(15):远程通信(RPC,Webservice,RMI,JMS、EJB、JNDI的区别)对比
总结这些概念都是易混淆,最基本概念定义复习和深入理解,同时也是架构师必备课程 RPC(Remote Procedure Call Protocol) RPC使用C/S方式,采用http协议,发送请 ...
- webpack4 自学笔记一(babel的配置)
所有代码都可以再我的github上查看,每个文件夹下都会有README.md,欢迎star: https://github.com/Jasonwang911/webpackStudyInit/tree ...
- [编程] TCP协议概述
TCP 协议概述 1.TCP提供一种面向连接的.可靠的字节流服务. 2.两个应用程序通过TCP连接交换8bit字节构成的字节流. 3.每个TCP首部都包含源端和目的端的端口号,用于寻找发端和收端应用进 ...
- LinkedBlockQueue生产消费源码解析
LinkedBlockQueue自JDK1.5以后提供的一种阻塞队列,遵循生产者消费者模式,实现了BlockQueue接口,如图 从它的名字可以了解到它是采用链表的方式实现了阻塞队列,并且定义了“节点 ...
- 入门angularJs笔记手记一
angularjs表达式: ng-init ng-bind ng-app ng-model输入域的值绑定到程序 ng-repeat重复一个HTML元素 自定义指令: <script> va ...
- 转载 - java中接口的向上转型。和多态性
发现一篇对接口总结很精简的文章 1.在java中接口就是一个完全抽象的类,跟抽象类一样不能产生对象,但是可以作为对象的引用,可以由其实现类向上转型,它就跟超类一样, 向上转型了,可以很好的利用接口,可 ...
- mysql建表以及列属性
一.整型( int, tinyint, smallint 等 ) ------------------------------------------------------------------- ...
- python MRO及c3算法
1. 了解python2和python3类的区别 python2在2.3之前使用的是经典类, 2.3之后, 使用的是新式类 2. 经典类的MRO 树形结构的深度优先遍历 -> 树形结构遍历 cl ...