Computer Name change
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Computer Name change
I have two machines on my network with the same name. How do I change one of these?
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
Re: Computer Name change
run this command
change name, save, exit
Code: Select all
gksudo gedit /etc/hostname
Re: Computer Name change [SOLVED]
Thank you --how simple can it get?GeneC wrote:run this command
change name, save, exitCode: Select all
gksudo gedit /etc/hostname
Re: Computer Name change
you likely have to change your /etc/hosts file to make sure the localhost has the 'right' name as well. I think there must be something else to change too.
Kurt
Kurt
Re: Computer Name change
I think the hosts file is changed automatically.petersk wrote:you likely have to change your /etc/hosts file to make sure the localhost has the 'right' name as well. I think there must be something else to change too.
Kurt
But to make it safe open a terminal and type
Code: Select all
cat /etc/hosts
Angtagapagligt
Re: Computer Name change
I think there is a also a safe(r) way for this, at least for Mint 13 / Mate (I translate the names from german to english):
Goto Control center / Network and select the second tab "General" ("Allgemein")
Click the padlock to unlock the settings (admin's password required)
Change the computer name ("Rechnername") and close the dialog.
Mint automatically updates the above mentioned files /etc/hostname and /etc/hosts for you.
Hope this is more comfortable this way,
Karsten
Goto Control center / Network and select the second tab "General" ("Allgemein")
Click the padlock to unlock the settings (admin's password required)
Change the computer name ("Rechnername") and close the dialog.
Mint automatically updates the above mentioned files /etc/hostname and /etc/hosts for you.
Hope this is more comfortable this way,
Karsten
Re: Computer Name change
In Linux Mint 19 Cinnamon, when I copy/paste that command, it tells me that "gksudo" does not exist.GeneC wrote: ⤴Sun Mar 11, 2012 2:32 pm run this command
change name, save, exitCode: Select all
gksudo gedit /etc/hostname
Has something about this changed in Mint 19 ?
Thanks.
EDIT 1: Okay...., I replaced gedit with xed and the text editor popped up with the computer name; I changed it and save.
Now, when I open a terminal, my old name remains; however, when I run the /etc/hostname command again, it displays the new name.
EDIT 2: This is a dual-boot machine; can/should Windows and Mint have different names ?
-
- Level 1
- Posts: 41
- Joined: Fri Dec 22, 2017 12:03 pm
Re: Computer Name change
I think in Mint 19 you have to use:
if gksudo does not exist.
Code: Select all
xed admin:///etc/hostname
Re: Computer Name change
You mean if something has changed in the over 6 years that this thread has been dead? Good lord, man...
The correct way to change the hostname these days is this:
Code: Select all
hostnamectl set-hostname YOURNEWNAME
Re: Computer Name change
Thanks for the current commands to accomplish this.
As for the ancient thread, since the information is no longer relevant, it should be purged from the system so that it would not show up at the top of the list in searches regarding the topic as it only serves to mislead poor misguided souls such as I.
As for the ancient thread, since the information is no longer relevant, it should be purged from the system so that it would not show up at the top of the list in searches regarding the topic as it only serves to mislead poor misguided souls such as I.
Re: Computer Name change
You are welcome. That aside, good luck convincing the volunteer moderators to spend their time verifying 6-year old threads. Just look at the date, that's why it gets printed on every post. Old information can remain relevant, but in particular where system files are involved never use it blindly.BuckSkin wrote: ⤴Fri Jan 18, 2019 3:01 pmThanks for the current commands to accomplish this.
As for the ancient thread, since the information is no longer relevant, it should be purged from the system so that it would not show up at the top of the list in searches regarding the topic as it only serves to mislead poor misguided souls such as I.