How to Change Hostname (Computer Name) in Ubuntu 13.04

Here’s a beginners’ guide to change your hostname or computer name in Ubuntu 13.04 Raring Ringtail. The default PC name was set when you were installing Ubuntu. You can easily change it to whatever you want both in Ubuntu Server and Desktop with this tutorial. To check your current name, go to top-right corner “gear” button -> About This Computer.

Change Hostname in graphical way:

There’s a graphical tool called gnome-network-admin, it provides a simple way to change your computer name in Ubuntu Desktop.

You can search for and install this tool from Ubuntu Software Center. Or click the link below to launch it:

click to install gnome-network-admin

Change Hostname in Command Line:

If you’re comfortable with editing a configuration file and running some terminal commands it’s not difficult to change your PC name manually.

To check current hostname, run below commands:


To set a hostname until you restart, run:

sudo hostname YOUR_NEW_NAME

To change your computer name permanently, edit both /etc/hostname and /etc/hosts with your favorite editor and change your previous name to whatever you want.

By Ji m

I'm a freelance blogger who started using Ubuntu in 2007 and wishes to share my experiences and some useful tips with Ubuntu beginners and lovers. Please comment to remind me outdated tutorial! And, notify me if you find any typo/grammar/language mistakes. English is not my native language. Contact me via Buy me a coffee:


Comments are closed.

Exit mobile version