hostname command shows hostname of your computer.
root@vm1:~# hostname vm1 root@vm1:~#
How to Set Hostname
Various Linux distributions have different ways of setting hostname, following posts may help you set hostname on your Operating system.
- Setting HostName in CentOS 7 Server
- Setting HostName in Linux (no control panel server)
- Change Hostname In Debian or Ubuntu