How to change my droplet's reference when seen on a terminal

So, I just created a droplet. And I gave it a name. However, when I access that droplet though ssh it comes up with a great long name:


Now, when I have created droplets in the past, they would have been referenced like this:


So - what have I done wrong, and can I chnage it ?

Many thanks !

Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Rajkishore J
DigitalOcean Employee
DigitalOcean Employee badge
October 28, 2021
Accepted Answer

Hi @vincej,

During the time of droplet launch, you can change/edit the hostname under the “Choose a hostname” section.

For more information :

And for renaming droplets, You can accomplish this by following the steps listed below.

  1. Login to the Digital Ocean Control Panel.
  2. Click the Droplet you want to rename.
  3. Then, on the Droplet detail window, click on the name of your Droplet.
  4. Change the name in the entry field and click the checkmark.

Renaming the droplet changes the name on the Cloud panel as well as updating the RDNS record, but it doesn’t automatically update the hostname inside the droplet configuration. You will need to update the droplet hostname within Droplet operating system.

You can achieve this by either updating /etc/hostname and /etc/hosts files, or by using hostname utility hostnamectl.

Update /etc/hostname :

Use hostnamectl :

I hope this helps!

Regards, Rajkishore

Try DigitalOcean for free

Click below to sign up and get $200 of credit to try our products over 60 days!

Sign up

Featured on Community

Get our biweekly newsletter

Sign up for Infrastructure as a Newsletter.

Hollie's Hub for Good

Working on improving health and education, reducing inequality, and spurring economic growth? We'd like to help.

Become a contributor

Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.

Welcome to the developer cloud

DigitalOcean makes it simple to launch in the cloud and scale up as you grow — whether you're running one virtual machine or ten thousand.

Learn more
DigitalOcean Cloud Control Panel