This is configured with the ‘hostname’ option in /etc/sysconfig/network. Update that file and either reboot or run
hostname <mynewhostname>
Your current shell will not change but the next time you create a new shell it will be visibile in your shell. If you run the ‘hostname’ command the effect is immediate.
If you enjoyed this article, then you’ll love Zalvis's Cloud Hosting platform. Turbocharge your website and get 24/7 support from our veteran team. Our world-class hosting infrastructure focuses on auto-scaling, performance, and security. Let us show you the Zalvis difference! Check out our services.