How To Change Your Hostname on Debian

  • Last Created On Dec 10, 2024
  • 6
0 0

Step 1: Login to your VPS

Locate the IP address of your AKLWEB HOST VPS and login as the root user.

ssh root@server

Step 2: Edit /etc/hostname

Open the /etc/hostname file with your favorite text editor. For example:

nano /etc/hostname

Update the hostname in this file. Then save the file, and exit the text editor.

Step 3: Edit /etc/hosts

Open the /etc/hosts file with your favorite text editor. For example:

nano /etc/hosts

Change the first line and replace your old hostname with the new one. Save the file and exit the editor.

Step 4: Run hostname.sh

Run the following command to update your hostname:

/etc/init.d/hostname.sh start

Step 5: Check your hostname

Run the following command to check your new hostname:

hostname

The new hostname will be displayed in your ssh terminal.

Step 6: (Optional) Change reverse DNS

Visit Client Area, then navigate to your VPS. Click on the IPv4 tab. You will see an “Update” button in the “Reverse DNS” column. Click this button to update the reverse DNS address. By default it will read:

x.x.x.x.aklwebhost.com

It is common to replace x.x.x.x.aklwebhost.com with the DNS name of your server, which may be related to its hostname.

Views: 6

Recent Articles

  • How to Install JAX with ROCm Acceleratio...
    96
  • Deploy a PyTorch Workspace on a Vultr Cl...
    71
  • Managing Backup Storage
    83
  • Automating FTP Backups in Windows Server
    71
  • Automating FTP Backups in Linux
    75

Popular Articles

  • Our General Terms & Conditions
    2635
  • Our Privacy Policy
    2479
  • Our Cookies Policy
    275
  • Our Terms of Use
    153
  • How to Install JAX with ROCm Acceleratio...
    96