To change the domain name in Linux, follow the below mentioned points:

1) Login to your administration panel (WHM).
2) Go to Account Functions-> Modify an Account.
3) Search the account by username or by domain name.
4) Click on Modify.
5) Change the domain name under Domain field.
6) Click on Save.