Can anyone tell me how to change the computer name in elementaryOS, please?

2 Answers 2


You can easily rename your computer by editing the /etc/ hostname file.

In Terminal, type sudo nano /etc/hostname, press Enter, type your password and press Enter again. Delete the old name and type the new one. Press Ctrl+O to save and then Ctrl+X to close the editor. The new name will enter into effect after a reboot.


in terminal: hostnamectl set-hostname new-hostname

  • 2
    Your participation is much appreciated👍 Let me inform you that we love informative answers with step by step guide. Please try to post detailed information. Have a nice day!
    – Hasan
    Commented Nov 24, 2019 at 11:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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