Linux

How to check what is the hostname of the system?

Difficulty: unrated

Source: bregman-arie/devops-exercises by Arie Bregman

Answer

cat /etc/hostname

You can also run hostnamectl or hostname but that might print only a temporary hostname. The one in the file is the permanent one.