Thursday, November 18, 2021

How to change the RHEL 8 server hostname without a system restart

 


Ref: https://www.cyberciti.biz/faq/rhel-8-change-hostname-computer-name-command/

Type the following commands:
$ sudo hostname nixcraft-rhel8
Next edit the /etc/hostname file and update hostname:
$ sudo vi /etc/hostname
Finally, edit the /etc/hosts file and update the lines that reads your old-host-name:
$ sudo vi /etc/hosts
From:
127.0.1.1 localhost
To:
127.0.1.1 nixcraft-rhel8
Save and close the file.

No comments:

Post a Comment

Install and use xorg-server on macOS via Homebrew

  The instructions to install and use xorg-server on macOS via Homebrew: Install Homebrew (if you haven't already): /bin/bash -c ...