> For AI agents: the complete documentation index is available at /llms.txt, the full documentation bundle is available at /llms-full.txt.

# Changing Your VPS Hostname on CrownPanel

In this article, we will show you how to change your VPS hostname using CrownPanel and how to verify or change the hostname from within your VPS.

:::note

You can change the hostname either from CrownPanel or directly from within your VPS using the command line.

:::

## Changing the Hostname in CrownPanel


### Log in to CrownPanel
Log in to [CrownPanel](https://crownpanel.com/).
### Click Manage
Click on the **Manage** button beside the VPS you wish to edit the hostname for.
<img alt="Manage button" src={image0} />
### Click the hostname
Click on the **Hostname** listed beside the IP address.
<img alt="Hostname beside the IP address" src={image1} />
### Edit the hostname
A form will open where you can edit the hostname as you wish. Once you save it, the VPS hostname is updated.
<img alt="Edit hostname form" src={image2} />

## CentOS / AlmaLinux / Rocky Linux


### View the current hostname
Run:
```bash
hostnamectl
```
Alternatively, use `hostnamectl status` to quickly view the current hostname and other system information:
```bash
hostnamectl status
```
### Change the hostname
Run the following command, replacing `YOUR_PREFERRED_HOSTNAME` with your desired hostname:
```bash
hostnamectl set-hostname YOUR_PREFERRED_HOSTNAME --static
```
For example, to set the hostname to `myvps`:
```bash
hostnamectl set-hostname myvps --static
```
### Verify the new hostname
After changing the hostname, verify it using:
```bash
hostnamectl status
```
The new hostname should be displayed under **Static hostname**.

## Ubuntu / Debian


### View the current hostname
To check the current hostname, run:
```bash
hostnamectl status
```
The output will look something like this:
```
Static hostname: vps.server.com
...
Architecture: x86_64
```
### Change the hostname
Replace `YOUR_PREFERRED_HOSTNAME` with your desired hostname:
```bash
hostnamectl set-hostname YOUR_PREFERRED_HOSTNAME
```
### Verify the new hostname
Open a new terminal session after changing the hostname and run:
```bash
hostnamectl status
```
The new hostname should be displayed under **Static hostname**.

## Conclusion

You have successfully learned how to change and verify your VPS hostname using CrownPanel or the command line on CentOS, AlmaLinux, Rocky Linux, Ubuntu, and Debian systems.
