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).
Advertisements








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. 🙂
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.
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.
Thanks for the info! It’s good to know that other distributions may store it differently.
how do i change my profile in the computer back
Ummm, you also need to change /etc/hosts