[SOLVED] Rename container proxmox 5

Hello, I have a question about that. I have proxmox "Virtual Environment 5.4-3", when I change the hostname by "dev.exemple.com" the hostname are ok on the proxmox web interface, but when I log in with ssh on my server I have "root@dev:~#". I have 3 dev environnements, I wondering if it's possible to change that "dev" name ? I tried to edit /etc/hostname and /etc/hosts by
127.0.0.1 localhost
::1 localhost ip6-localhost ip6-loopback
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
# --- BEGIN PVE ---
xxx.xxx.xxx.xxx dev.exemple.com devExemple
# --- END PVE ---

But after reboot the hosts file get back
127.0.0.1 localhost
::1 localhost ip6-localhost ip6-loopback
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
# --- BEGIN PVE ---
xxx.xxx.xxx.xxx dev.exemple.com dev
# --- END PVE ---
 
Select the DNS panel, then change Hostname
Sorry if this bumps an ancient thread, but I want to thank you for this simple response. It's 2024, I'm on Proxmox 8.2.7, and I had the same question... because when I looked at the DNS panel, my brain ignored the first row of the table thinking it was a header (like "Attribute" and "Value" or something). Just couldn't see that first table line as a table row to be read and edited. xD

Thanks again!
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!