Depending on your Rendhat 7 installation you may end up with a default hostname localhost.localdomain. This hostname will be shown on various services your new server will offer as well a it will be show on your command prompt such us:
[root@localhost ~]#
To change your hostname simply edit vi /etc/hostname file and inlcude name of your host.

For example to change hostname to "rhel7" the /etc/hostname file will contain:
# cat /etc/hostname
rhel7
redhat 7 linux change hostname


To update your command prompt simply re-login and to apply this change system wide execute:
# systemctl restart systemd-hostnamed
FIND LATEST LINUX JOBS on LinuxCareers.com
Submit your RESUME, create a JOB ALERT or subscribe to RSS feed.
LINUX CAREER NEWSLETTER
Subscribe to NEWSLETTER and receive latest news, jobs, career advice and tutorials.
DO YOU NEED ADDITIONAL HELP?
Get extra help by visiting our LINUX FORUM or simply use comments below.

You may also be interested in:



Comments and Discussions