Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Can anyone please help me to figure out,How can I change my localdomain name from something say user@host.localdomian to user@host.something ??

share|improve this question
up vote 1 down vote accepted

Either edit the file /etc/hostname or issue sudo echo "my_hostname" >> /etc/hostname (replacing "my_hostname" with the name you want for the system). The file is owned by root so you will have to invoke sudo privileges to make changes to it.

share|improve this answer
I dont want edit my host name I want to change my domain name from localhost.localdomain to localhost.something – Arush Salil May 30 '13 at 16:55
Doing as I said will accomplish that. You can enter a fictional or FQDN element as part of the hostname such as myserver.mydomain.local or If you are using a FQDN to resolve the server, you will also need to edit /etc/hosts and add your FQDN to the IP address listening for those queries. Read man hostname. – douggro May 30 '13 at 20:55
Thank you that really helped and well sorry for miss trusting you at the first time :-) – Arush Salil Jun 2 '13 at 23:04
No worries. Glad that you got it set as you wanted. – douggro Jun 2 '13 at 23:24

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.