How do I change the hostname in Redhat 6?

How do I change the hostname in Redhat 6?
Answer
Make sure you are logged in as root and move to /etc/sysconfig and open the network file in vi. Look for the HOSTNAME line and replace it with the new hostname you want to use. In this example I want to replace localhost with redhat9. When you are done, save your changes and exit vi.
 

Tìm kiếm

Back
Top