The program to view and change a machine’s hostname in Linux is a program named hostname itself. In a machine’s with the hostname test, running the program will produce the following:

$ hostname
test