Linux “hostname”

“Hostname” is a command to display the host name of the system. If you are the root user(superuser), you can also change the host name.

[vagrant@localhost ~]$ hostname
localhost.localdomain

[vagrant@localhost ~]$ sudo -S “hostname”
localhost.localdomain