How to Change your Computer Name in (K)Ubuntu

Change my hostname in Ubuntu?

Easy.

That is.

Simply replace the name in your /etc/hostname file as superuser (sudo) and save the file, as tech-recipes.com tells us.

Or:

gksu gedit /etc/hostname

As pie.

To see the change, restart your system.

EXTRA TIDBIT: Remember that gksu is the same as sudo, but it is the recommended command to use for graphical programs. In this case, gedit (Gnome’s Text Editor). Sudo is best suited for terminals, or command-line. You could have also typed in gksudo, but that is the same thing: it’s a symlink to gksu. And in KDE, you could have used kdesu (KDE SuperUser).

Tags: , , , , , , , , , , , , ,

6 responses to “How to Change your Computer Name in (K)Ubuntu”

  1. Satya says :

    Or, System, Administration, Network. Hit the General tab. Did that not work for you? I’m not about to try it, in case it breaks something for me.🙂

  2. Kevin Guertin says :

    Yes, that is the main way to change your computer name. And it works. But it’s always good to know a different way in case that applet doesn’t work. It’s also good to know where it is actually stored if you need to change it from a command line.

  3. Satya says :

    Absolutely agreed. Given the nature of your site, though, I figured the target audience would appreciate knowing the GUItastic way first. And, I’ve had poor results with editing /etc/hostname sometimes, maybe because some distros put extra hostname info elsewhere and refresh /etc/hostname on boot. Or I was being stupid.

  4. Kevin Guertin says :

    Thanks for the info! It’s good to know that other distributions may store it differently.

  5. webster says :

    how do i change my profile in the computer back

  6. Joe says :

    Ummm, you also need to change /etc/hosts

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: