How to change hostname in centos | Tip

Question:

How  to change  hostname  in Centos ?

Answer:

Open terminal and type the following command :

echo “newhostname” > /proc/sys/kernel/hostname