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

DDoS

Diagnostic To display how many http connections are open at the moment, enter: netstat |...

Autorun in Linux

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

php increase max file size upload

For increase maximum size of uploads file you should set only one setting in php.ini. Set...

Changing mac address in VMware

In Centos: 1. Edit old mac HWADDR=XX:XX:XX:XX:XX:XX in the file...

Forward (redirect/nat) traffic with iptables

If you want to redirect/nat some traffic to IP 2.2.2.2 via IP 1.1.1.1, it simply can be done...