User Specific Host Aliases
Available in
中文
Sometimes we need to claim useful host aliases, for example, when linking HTB domains to target machines, we can edit /etc/hosts
like this:
10.10.11.27 itrc.ssg.htb signserv.ssg.htb
This is however very invasive due to the required privilege. We want a simpler and cleaner solution allowing each user to define their own set of host aliases without polluting the global name resolution.
I found a handy project libnss_homehosts, which allows you to put user-level hosts at ${XDG_CONFIG_HOME}/hosts
or $HOME/.hosts
.
|
|
|
|