Can I Change Computer Name?
Forum rules
There are no such things as "stupid" questions. However if you think your question is a bit stupid, then this is the right place for you to post it. Stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions use the other forums in the support section.
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
There are no such things as "stupid" questions. However if you think your question is a bit stupid, then this is the right place for you to post it. Stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions use the other forums in the support section.
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Can I Change Computer Name?
Hi folks! Linux Mint 11. Careless of me at install to accept default computer name. I've looked and searched for a way to clean it up but can't find where to do it, if it's even possible. TIA
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: Can I Change Computer Name?
Hi Apsey,
You need to change 2 files:
When you next boot, the system will read /etc/hostname and set it accordingly.
source
Regards,
Anakin
You need to change 2 files:
- /etc/hostname - enter the new hostname
/etc/hosts - replace the hostname after 127.0.0.1
Code: Select all
hostname <<NewName>>
source
Regards,
Anakin
Re: Can I Change Computer Name?
Thank you Anakin. It sounds so easy but I am new to Linux. This is not a big deal, but being unable to even understand how to follow your simple instructions has sent me on a mission to better understand the whole root user and sudo thing. I won't mark this [Solved] just yet, but will attempt to figure out where to go from here on my own. Thank you again for your willingness to assist.
Re: Can I Change Computer Name?
Ah, sorry about that. I've only recently started using Ubuntu-based stuff, so still not in the routine of using sudo...Apsey wrote:Thank you Anakin. It sounds so easy but I am new to Linux. This is not a big deal, but being unable to even understand how to follow your simple instructions has sent me on a mission to better understand the whole root user and sudo thing. I won't mark this [Solved] just yet, but will attempt to figure out where to go from here on my own. Thank you again for your willingness to assist.
Yes, you need to edit them as a different user as you've already noticed.
The easiest way to do this, is to start a text-editor as root, using for instance the following command:
Code: Select all
gksu gedit
Yes, I know I mention yet another item here, gksu, not sudo. Rule-of-thumb: use gksu for graphical processes, sudo for commands in the console.
Anakin
Re: Can I Change Computer Name?
I found that the best way to do this is to open a terminal and enter the command,
Type in your administrator password.
cd into the etc directory (2 levels up on my system). Simply vi into the "hostname" and "hosts" file, and change the names just as it says above. Write the file and close it out.
Good to go! Hope this helps.
Code: Select all
su
cd into the etc directory (2 levels up on my system). Simply vi into the "hostname" and "hosts" file, and change the names just as it says above. Write the file and close it out.
Good to go! Hope this helps.
Re: Can I Change Computer Name?
Cheers for addition Hyc!
However, on Ubuntu and any of its offspring, this will not work out-of-the-box, as the password for the user root is unknown to us.
You would have to use
and enter your own password.
Besides that, gedit is by far easier to new Linux-users.
Just to be complete (I completely support the use of vi!):
http://www.washington.edu/computing/unix/vi.html
http://www.lagmonster.org/docs/vi.html
http://www.laeff.cab.inta-csic.es/Laeff ... sheets.pdf
However, on Ubuntu and any of its offspring, this will not work out-of-the-box, as the password for the user root is unknown to us.
You would have to use
Code: Select all
sudo su
Besides that, gedit is by far easier to new Linux-users.
Just to be complete (I completely support the use of vi!):
http://www.washington.edu/computing/unix/vi.html
http://www.lagmonster.org/docs/vi.html
http://www.laeff.cab.inta-csic.es/Laeff ... sheets.pdf