HPE GreenLake Administration
- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - Linux
- >
- what is the difference between /etc/host.conf and ...
Operating System - Linux
1827816
Members
2403
Online
109969
Solutions
Forums
Categories
Company
Local Language
back
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
back
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Go to solution
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-17-2010 03:53 AM
11-17-2010 03:53 AM
Hi
I'm not able to understand the diferences between /etc/host.conf and /etc/nsswitch.conf (in the case of host names).
Aren't they for the same purpose -- resolve host names ?
Thanx in advance
I'm not able to understand the diferences between /etc/host.conf and /etc/nsswitch.conf (in the case of host names).
Aren't they for the same purpose -- resolve host names ?
Thanx in advance
Solved! Go to Solution.
1 REPLY 1
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-17-2010 05:07 AM
11-17-2010 05:07 AM
Solution
/etc/nsswitch.conf covers way more than host names: it also covers the resolution of mail aliases, user and group names, network protocol, service and segment names and others.
It uses the de-facto standard format originally defined by Sun Microsystems for Solaris 2.
Linux uses glibc, whose resolver library has more options than the standard format can handle. Creating an incompatible extended version of the nsswitch.conf file format would not have been a good idea: it would have caused unnecessary difficulties in porting Unix software for Linux.
Instead, the glibc developers chose to add a new configuration file for those glibc-specific extra options. This file is /etc/host.conf.
Once you've learned to use /etc/nsswitch.conf on Linux, you can apply this knowledge to Solaris and many other Unix-style OSs.
But /etc/host.conf is specific to glibc, so on other Unix-style OSs it might not exist or might be completely different.
If you need to work with multiple system architectures, it's important to know what is standardized and what is architecture-specific. This kind of separation into different files is actually rather convenient.
MK
It uses the de-facto standard format originally defined by Sun Microsystems for Solaris 2.
Linux uses glibc, whose resolver library has more options than the standard format can handle. Creating an incompatible extended version of the nsswitch.conf file format would not have been a good idea: it would have caused unnecessary difficulties in porting Unix software for Linux.
Instead, the glibc developers chose to add a new configuration file for those glibc-specific extra options. This file is /etc/host.conf.
Once you've learned to use /etc/nsswitch.conf on Linux, you can apply this knowledge to Solaris and many other Unix-style OSs.
But /etc/host.conf is specific to glibc, so on other Unix-style OSs it might not exist or might be completely different.
If you need to work with multiple system architectures, it's important to know what is standardized and what is architecture-specific. This kind of separation into different files is actually rather convenient.
MK
MK
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
Company
Support
Events and news
Customer resources
© Copyright 2025 Hewlett Packard Enterprise Development LP