How to change the computer name in linux

Follow me if you want to change the computer name on Linux
[siwan@localhost ~]$ hostname siwan
hostname: you must be root to change the host name
[siwan@localhost ~]$ su
Password:
[root@localhost siwan]# hostname siwan
[root@localhost siwan]#

close the terminal or command prompt and start again

[siwan@siwan ~]$

your Pc name will be siwan

command : hostname your_desired_computer_name

Published by

Purab

I am Purab from India, Software development is my profession and teaching is my passion. Programmers blog dedicated to the JAVA, Python, PHP, DevOps and Opensource Frameworks. Purab's Github Repo Youtube Chanel Video Tutorials Connect to on LinkedIn

One thought on “How to change the computer name in linux”

  1. I have read a few of the articles on your website now, and I really like your style of blogging. I added it to my favorites web site list and will be checking back soon. Please check out my site as well and let me know what you think.

Leave a Reply

Your email address will not be published.