i remember sometime ago i had to change the hostname for my server but i was using redhat linux, but i dont remember how i did it, i searched to see how i can change the hostname in a linux box using ssh but i could only find for debian, ubuntu, gentoo and slackware

if you can tell me how to change it in fedora or centos because its the same command they both use.