Cart

/ Domain name

/ Your .CO.UK domain
for only £ 4.99**

Get started with your own domain names

Register now

/ Other

/ Latest news

Launch of new Big Storage platform

Read more
Need help?

    Sorry, we could not find any results for your search querry.

    Changing your hostname in Debian 11

    It is important to set a correct hostname on your VPS. The hostname is used by many applications to identify themselves on a network / the internet. Therefore, an incorrectly configured hostname can cause unexpected problems.

    In this tutorial we show how you can check and/or change your current hostname in Debian 11.


    Checking the hostname

     

    The current hostname can be retrieved with the command:

    hostname

    Or for more extensive information use the command:

    hostnamectl

    Changing the hostname

     

    There are two recommended methods to customize or view your hostname:

    • thehostnamectl-command
    • thehostname-command

    Only the changes of the first option remain intact after a restart. You change your hostname with these options as follows:
     

    • Hostnamectl:
      Use the command below and replace server.yourdomain.com with your desired hostname:
      hostnamectl set-hostname server.yourdomain.com
      
    • hostname:
      Use the command below and replace server.yourdomain.com with your desired hostname:
      hostname server.yourdomain.com
      Please note that with the hostname command, the changes do not persist after a reboot of your VPS.

    Was this article helpful?


    Provide feedback about this article

    Need help?

    Receive personal support from our supporters

    Contact us