Categories: TutorialsUbuntu

Host Command in Linux

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 of a specific domain name or you can rely on an IP address to find a specific domain name.

This is a useful command because you can rely on options to find more specific details of the domain name. Now we’re gonna guide you about using the host command in Linux. Hope you understand.

The syntax of the host command

The syntax:

host [-aCdlriTWV] [-c class] [-N ndots] [-t type] [-W time]
[-R number] [-m flag] hostname [server]

Options

1. Without option

$ host

Output:

2. host domain_name: print out the IP address of the domain

For example, I check the IP of google.com:

$ host google.com

Output:

3. host ip: print out domain of the IP address

For example:

$ host 127.0.0.1

Output:

4. -a: specify the query type

For example:

$ host -a google.com

Output:

Conclusion

And we guided you on how to use the host command in Linux.

Thank you for checking it out!

Ubuntu Server Admin

Recent Posts

pedit COW kernel local privilege escalation vulnerability mitigations

Mitigations are available for the Linux vulnerability with CVE ID CVE-2026-46331. The CVE ID was…

4 hours ago

Ubuntu Flavours Must Now Pass Beta Testing Before Official Releases

Canonical has introduced a new requirement for Ubuntu flavours that changes how alternative Ubuntu editions…

1 day ago

Ubuntu Introduces Smarter Runtime Permission Controls for Applications

Ubuntu continues to improve the way applications request access to system resources, giving users greater…

1 day ago

Upgrading Ubuntu 16.04 LTS to Ubuntu 26.04 LTS

If your server is still operating on Ubuntu 16.04 LTS, moving to Ubuntu 26.04 LTS…

1 day ago

Canonical becomes Gold Sponsor of Trifecta Tech Foundation

Canonical is pleased to announce it is now a Gold Sponsor of the Trifecta Tech…

3 days ago

🚀 Deploy Docmost on Ubuntu VPS

This article provides a guide demonstrating how to deploy Docmost on Ubuntu VPS. What is…

4 days ago