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

Adding a new disk drive to Centos 6

Installing a new HDD The disk drives in Centos is named hd* or sd*. In system with only one...

Cron

Cron is the daemon that can be used to schedule tasks according to time, day of the month,...

Fail2ban

Fail2ban scans log files (e.g. /var/log/apache/error_log) and bans IPs that show the...

Security tips for Linux server

1. Use only  strong passwords for all accounts , especially for root. Always use a secure root...

Clear swap in Centos

Print memory usage [root@localhost]# free -m              total       used       free...