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

Iptables

Iptables is a Linux based packet filtering firewall. It is a service (daemon)...

Autorun in Linux

To set a script to start at boot in CentOS, add it into /etc/rc3.d/S99local. For example:...

NFS on Centos 6

How to install NFS on Centos 6 yum install nfs-utils nfs-utils-lib Set nfs to start...

Usefull linux tools

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

Changing ssh port

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