How to change domain name and host name linux

domainname yourdomain

hostname your host name