How do I change the hostname in Linux Redhat?

KellyPoima

New member
How do I change the hostname in Linux Redhat?
Answer
RHEL 8 change hostname command
  1. Type the following command to edit /etc/hostname using nano or vi text editor: sudo vi /etc/hostname.
  2. Delete the old name and setup new name.
  3. Next Edit the /etc/hosts file: …
  4. Replace any occurrence of the existing computer name with your new one.
  5. Reboot the system to changes take effect:
 

Tìm kiếm

Back
Top