CentOS 8 Change Hostname (computer name) command

last updated in Categories ,

I am a new CentOS 8 Linux user and setup a server. They setup my server name to ‘li2025-143’ during deployment but now I would like to change the computer name to something else. How can I remove old name and set it to ‘nixcraft-centos8’ on CentOS Enterprise Linux? Can you tell me how do I change the CentOS 8 computer name? How do I assign a static hostname to server running CentOS 8?