First you need to know the current host name, to see this run this command
Then if you want to change the host name, you can do it in a file named hostname of this address /etc/hostname. Run this command:
Or run commands
sysctl kernel.hostname sysctl kernel.hostname=NEW_HOSTNAME
Previous post: Install lighttpd web server on Debian and Ubuntu.