Set hostname

Set host name on Centos:

/etc/sysconfig/network

 

HOSTNAME="mycomputer"


/etc/hosts wrote:

127.0.0.1 mycomputer.mydomain.local mycomputer

 

check it with

hostname 
hostname --fqdn
hostname -a

 

Was this answer helpful?

 Print this Article

Also Read

Usefull linux tools

please note: for installing some toosl you ned to connect EPEL repo first. htop -extened version...

FreePBX

FreePBX is an open source GUI (graphical user interface) that controls and manages Asterisk (PBX)...

Sendmail [25: Connection refused] fix

If you can't receive email from the outside and got next error:  (Delivery Status Notification...

Generating public/private ssh keys

How to generate and use public / private ssh keys This guide is tested on Centos 6 To...

Changing ssh port

How to change ssh port. Open the file /etc/ssh/sshd_config with your favourite text...