{"id":10767,"date":"2023-09-02T23:44:34","date_gmt":"2023-09-02T21:44:34","guid":{"rendered":"https:\/\/monodes.com\/predaelli\/?p=10767"},"modified":"2023-09-02T23:44:37","modified_gmt":"2023-09-02T21:44:37","slug":"user-specific-hosts-file-to-complement-etc-hosts","status":"publish","type":"post","link":"https:\/\/monodes.com\/predaelli\/2023\/09\/02\/user-specific-hosts-file-to-complement-etc-hosts\/","title":{"rendered":"User-specific hosts file to complement \/etc\/hosts"},"content":{"rendered":"\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p>Any user can create a personal list of hosts to complement the entries in the \/etc\/hosts file.<\/p>\n\n\n\n<p>The functionality is implemented in glibc. You can define a custom hosts file by setting the <code class=\"\" data-line=\"\">HOSTALIASES<\/code> environment variable. The names in this file will be picked up by <code class=\"\" data-line=\"\">gethostbyname<\/code> (see <a href=\"http:\/\/man7.org\/linux\/man-pages\/man3\/gethostbyname.3.html\">documentation<\/a>).<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code class=\"\" data-line=\"\">$ echo &#039;g www.google.com&#039; &gt;&gt; ~\/.hosts\n$ export HOSTALIASES=~\/.hosts\n$ wget g -O \/dev\/null\n<\/code><\/pre>\n<cite>Slightly edited from: <em><a href=\"https:\/\/unix.stackexchange.com\/questions\/10438\/can-i-create-a-user-specific-hosts-file-to-complement-etc-hosts\">Can I create a user-specific hosts file to complement \/etc\/hosts? &#8211; Unix &amp; Linux Stack Exchange<\/a><\/em><\/cite><\/blockquote>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p class=\"excerpt\">\n<p class=\"more-link-p\"><a class=\"more-link\" href=\"https:\/\/monodes.com\/predaelli\/2023\/09\/02\/user-specific-hosts-file-to-complement-etc-hosts\/\">Read more &rarr;<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"inline_featured_image":false,"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"activitypub_content_warning":"","activitypub_content_visibility":"","activitypub_max_image_attachments":4,"activitypub_interaction_policy_quote":"anyone","activitypub_status":"","footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[278],"tags":[],"class_list":["post-10767","post","type-post","status-publish","format-standard","hentry","category-tricks"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p6daft-2NF","jetpack-related-posts":[{"id":12892,"url":"https:\/\/monodes.com\/predaelli\/2025\/03\/06\/how-to-download-all-pdf-files-linked-from-a-single-page-using-wget\/","url_meta":{"origin":10767,"position":0},"title":"How to download all PDF files linked from a single page using wget","author":"Paolo Redaelli","date":"2025-03-06","format":false,"excerpt":"You can use wget to download all PDFs from a webpage by using: wget -r -l1 -H -t1 -nd -N -np -A.pdf -erobots=off --wait=2 --random-wait --limit-rate=20k [URL] -r: Recursive download. -l1: Only one level deep (i.e., only files directly linked from this page). -H: Span hosts (follow links to other\u2026","rel":"","context":"In &quot;Tricks&quot;","block_context":{"text":"Tricks","link":"https:\/\/monodes.com\/predaelli\/category\/documentations\/tricks\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":11302,"url":"https:\/\/monodes.com\/predaelli\/2024\/02\/05\/quickemu\/","url_meta":{"origin":10767,"position":1},"title":"Quickemu","author":"Paolo Redaelli","date":"2024-02-05","format":false,"excerpt":"This quickemu could easily dislodge VirtualBox as my favorite desktop virtualization solution: Quickly create and run highly optimized desktop virtual machines for Linux, macOS and Windows; ... Quickemu now also includes comprehensive support for macOS and Windows. Features macOS Monterey, Big Sur, Catalina, Mojave & High Sierra Windows 10 and\u2026","rel":"","context":"In &quot;Apple&quot;","block_context":{"text":"Apple","link":"https:\/\/monodes.com\/predaelli\/category\/apple\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/monodes.com\/predaelli\/wp-content\/uploads\/sites\/4\/2024\/02\/quickemu-logo.webp?fit=512%2C512&ssl=1&resize=350%2C200","width":350,"height":200},"classes":[]},{"id":14328,"url":"https:\/\/monodes.com\/predaelli\/2025\/11\/23\/1984-safe-hosting-in-iceland\/","url_meta":{"origin":10767,"position":2},"title":"1984 &#8211; Safe hosting in Iceland","author":"Paolo Redaelli","date":"2025-11-23","format":false,"excerpt":"SAFE HOSTING IN ICELAND Source: 1984 - Safe hosting in Iceland","rel":"","context":"In &quot;Senza categoria&quot;","block_context":{"text":"Senza categoria","link":"https:\/\/monodes.com\/predaelli\/category\/senza-categoria\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":9614,"url":"https:\/\/monodes.com\/predaelli\/2022\/09\/18\/self-hosted-streaming-server-nginx-rtmp-youtube-facebook-live\/","url_meta":{"origin":10767,"position":3},"title":"Self-Hosted Streaming Server \u2013 NGINX + RTMP \u2013 YouTube + Facebook Live","author":"Paolo Redaelli","date":"2022-09-18","format":false,"excerpt":"Copying this here in case the original goes offline Self-Hosted Streaming Server \u2013 NGINX + RTMP \u2013 YouTube + Facebook Live Published by Anthony on 14th April 2020 I\u2019m writing these notes up, mainly as a reference for me in the future \u2013 but they might just help others looking\u2026","rel":"","context":"In &quot;Basilica's website&quot;","block_context":{"text":"Basilica's website","link":"https:\/\/monodes.com\/predaelli\/category\/basilicas-website\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/monodes.com\/predaelli\/wp-content\/uploads\/sites\/4\/2015\/06\/screenshot-2015-06-10-16-01-521.png?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/monodes.com\/predaelli\/wp-content\/uploads\/sites\/4\/2015\/06\/screenshot-2015-06-10-16-01-521.png?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/monodes.com\/predaelli\/wp-content\/uploads\/sites\/4\/2015\/06\/screenshot-2015-06-10-16-01-521.png?resize=525%2C300&ssl=1 1.5x"},"classes":[]},{"id":13833,"url":"https:\/\/monodes.com\/predaelli\/2025\/08\/01\/sshfs-with-a-jump-host\/","url_meta":{"origin":10767,"position":4},"title":"sshfs with a jump host","author":"Paolo Redaelli","date":"2025-08-01","format":false,"excerpt":"sshfs -o ProxyJump=B_host C_host:\/<path> <mountpoint> From https:\/\/serverfault.com\/questions\/941934\/sshfs-over-a-jumphost where John Kearney and Omar Buhidma suggest using ~\/.ssh\/config, this will accomplish this simpler syntax: Host <host alias> User <host_username> HostName <host_name> ProxyJump [user@]<jump host>[:port]","rel":"","context":"In &quot;Tricks&quot;","block_context":{"text":"Tricks","link":"https:\/\/monodes.com\/predaelli\/category\/documentations\/tricks\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":3384,"url":"https:\/\/monodes.com\/predaelli\/2017\/09\/26\/miglior-hosting-italiano-2017-guida-alla-scelta-wp-vincente-it\/","url_meta":{"origin":10767,"position":5},"title":"Miglior Hosting Italiano 2017: Guida alla Scelta! \u00ab WP-Vincente.it","author":"Paolo Redaelli","date":"2017-09-26","format":false,"excerpt":"Miglior Hosting Italiano 2017: Guida alla Scelta! \u00ab WP-Vincente.it SiteGround.it\u00a0(leggi l\u2019articolo e scopri il perch\u00e9) Keliweb ServerPlan vHostingSolution Noamweb Aruba Doh, perch\u00e9 non c'\u00e8 SeeWeb?","rel":"","context":"In &quot;Wordpress&quot;","block_context":{"text":"Wordpress","link":"https:\/\/monodes.com\/predaelli\/category\/wordpress\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/monodes.com\/predaelli\/wp-content\/uploads\/sites\/4\/2017\/09\/Miglior-Hosting-Italiano-712x289.jpg?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/monodes.com\/predaelli\/wp-content\/uploads\/sites\/4\/2017\/09\/Miglior-Hosting-Italiano-712x289.jpg?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/monodes.com\/predaelli\/wp-content\/uploads\/sites\/4\/2017\/09\/Miglior-Hosting-Italiano-712x289.jpg?resize=525%2C300&ssl=1 1.5x, https:\/\/i0.wp.com\/monodes.com\/predaelli\/wp-content\/uploads\/sites\/4\/2017\/09\/Miglior-Hosting-Italiano-712x289.jpg?resize=700%2C400&ssl=1 2x"},"classes":[]}],"jetpack_likes_enabled":true,"_links":{"self":[{"href":"https:\/\/monodes.com\/predaelli\/wp-json\/wp\/v2\/posts\/10767","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/monodes.com\/predaelli\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/monodes.com\/predaelli\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/monodes.com\/predaelli\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/monodes.com\/predaelli\/wp-json\/wp\/v2\/comments?post=10767"}],"version-history":[{"count":0,"href":"https:\/\/monodes.com\/predaelli\/wp-json\/wp\/v2\/posts\/10767\/revisions"}],"wp:attachment":[{"href":"https:\/\/monodes.com\/predaelli\/wp-json\/wp\/v2\/media?parent=10767"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/monodes.com\/predaelli\/wp-json\/wp\/v2\/categories?post=10767"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/monodes.com\/predaelli\/wp-json\/wp\/v2\/tags?post=10767"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}