Linux - How to Find the Hostname

Printer-friendly versionPDF version
Linux Find Hostname

Finding the hostname in Linux is very simple and basic. The method is the same, regardless of your Linux distribution (Ubuntu, openSUSE, Fedora...) Here are 2 ways to find the hostname:

Run the command "hostname":

hostname

Read the contents of "/etc/hostname":

cat /etc/hostname

Post new comment