There was a problem loading the comments.

How to Set Hostname in Linux

Support Portal  »  Knowledgebase  »  Viewing Article

  Print

REDHAT/CENTOS
Local hostname and domain name of your server defined in text configuration located in /etc directory.

If you are using Red Hat, Fedora
Use redhat-config-network GUI tool. Type following command and click on DNS tab > Setup hostname and domain name:
# redhat-config-network

On other hand you can edit a text file in CENTOS. Find out and set up the value for HOSTNAME in the file /etc/sysconfig/network:
# vi /etc/sysconfig/network
Setup/replace HOSTNAME
HOSTNAME=myserver.domain.com

DEBIAN

You need to edit /etc/hostname file and put hostname.domain.com in this file:
# vi /etc/hostname
Set or replace hostname:
myserver.domain.com


Share via

Related Articles

© 8Dweb LLC