{"id":12871,"date":"2021-12-09T14:24:25","date_gmt":"2021-12-09T14:24:25","guid":{"rendered":"https:\/\/linuxways.net\/?p=12871"},"modified":"2021-12-16T08:05:36","modified_gmt":"2021-12-16T08:05:36","slug":"host-command-in-linux","status":"publish","type":"post","link":"https:\/\/linuxways.net\/de\/centos\/host-command-in-linux\/","title":{"rendered":"Host Command in Linux"},"content":{"rendered":"<h2>Introduction<\/h2>\n<p>The host command in Linux allows the user to lookup DNS (Domain Name System). It can be understood simply that you can search for the IP address of a specific domain name or you can rely on an IP address to find a specific domain name.<\/p>\n<p>This is a useful command because you can rely on options to find more specific details of the domain name. Now we&#8217;re gonna guide you about using the host command in Linux. Hope you understand.<\/p>\n<h2>The syntax of the host command<\/h2>\n<p><strong>The syntax<\/strong>:<\/p>\n<pre>host [-aCdlriTWV] [-c class] [-N ndots] [-t type] [-W time]<\/pre>\n<pre>[-R number] [-m flag] hostname [server]<\/pre>\n<h2>Options<\/h2>\n<p><strong>1.<\/strong> <strong>Without option<\/strong><\/p>\n<pre>$ host<\/pre>\n<p>Output:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"968\" height=\"489\" class=\"wp-image-12872\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2021\/12\/word-image-169.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2021\/12\/word-image-169.png 968w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/12\/word-image-169-300x152.png 300w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/12\/word-image-169-768x388.png 768w\" sizes=\"auto, (max-width: 968px) 100vw, 968px\" \/><\/p>\n<p><strong>2. host domain_name<\/strong>: print out the IP address of the domain<\/p>\n<p>For example, I check the IP of google.com:<\/p>\n<pre>$ host google.com<\/pre>\n<p>Output:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"970\" height=\"173\" class=\"wp-image-12873\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2021\/12\/word-image-170.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2021\/12\/word-image-170.png 970w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/12\/word-image-170-300x54.png 300w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/12\/word-image-170-768x137.png 768w\" sizes=\"auto, (max-width: 970px) 100vw, 970px\" \/><\/p>\n<p><strong>3. host ip<\/strong>: print out domain of the IP address<\/p>\n<p>For example:<\/p>\n<pre>$ host 127.0.0.1<\/pre>\n<p>Output:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"969\" height=\"67\" class=\"wp-image-12874\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2021\/12\/word-image-171.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2021\/12\/word-image-171.png 969w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/12\/word-image-171-300x21.png 300w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/12\/word-image-171-768x53.png 768w\" sizes=\"auto, (max-width: 969px) 100vw, 969px\" \/><\/p>\n<p><strong>4. -a<\/strong>: specify the query type<\/p>\n<p>For example:<\/p>\n<pre>$ host -a google.com<\/pre>\n<p>Output:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"968\" height=\"265\" class=\"wp-image-12875\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2021\/12\/word-image-172.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2021\/12\/word-image-172.png 968w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/12\/word-image-172-300x82.png 300w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/12\/word-image-172-768x210.png 768w\" sizes=\"auto, (max-width: 968px) 100vw, 968px\" \/><\/p>\n<h2>Conclusion<\/h2>\n<p>And we guided you on how to use the host command in Linux.<\/p>\n<p>Thank you for checking it out!<\/p>","protected":false},"excerpt":{"rendered":"<p>Introduction The host command in Linux allows the user to lookup DNS (Domain Name System). It can be understood simply that you can search for the IP address&hellip;<\/p>","protected":false},"author":1,"featured_media":13011,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1,4,5,83,165,2],"tags":[158],"class_list":["post-12871","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-centos","category-debian","category-mint","category-opensuse","category-red-hat","category-ubuntu","tag-host-name"],"_links":{"self":[{"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/posts\/12871","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/comments?post=12871"}],"version-history":[{"count":0,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/posts\/12871\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/media\/13011"}],"wp:attachment":[{"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/media?parent=12871"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/categories?post=12871"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/tags?post=12871"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}