Thursday, 24 May 2012
 Home arrow Articles arrow linux arrow How to Change the hostname or computer name in ubuntu
   
Main Menu
Home
News
Blog
Links
Search
FAQs
Spider
Articles
@intrenet
Free Softwares
Break for fun
Friends VIdeos
Techno videos
Contact Us
Disclaimer
Guest Book
Speed test
V.E.C. Calculator
IPv4 Subnet Calc
IPv6 Subnet Calc
Byte Converter
Converter
GMT/UTC Time
Bandwidth Calc
Allinone Calc
IANA Port Numbers
Country Call Codes
Pk Postal Codes
Surf Anonumously
Visitors Counter
mod_vvisit_countermod_vvisit_countermod_vvisit_countermod_vvisit_countermod_vvisit_countermod_vvisit_countermod_vvisit_counter
mod_vvisit_counterToday231
mod_vvisit_counterYesterday302
mod_vvisit_counterThis week793
mod_vvisit_counterThis month5342
mod_vvisit_counterAll126018
 
 
 
 


How to Change the hostname or computer name in ubuntu PDF Print E-mail
User Rating: / 0
PoorBest 
Written by Amanatullah khalil   
Saturday, 23 May 2009

How to Change the hostname or computer name in ubuntu

 

This is a really simple one, but can cause a lot of weeping and gnashing of teeth. You were given the default “ubuntu” hostname when you installed, and now you want something cooler that enhances your street cred. Heres how to change it:

Edit /etc/hostname and change to the new value, you can use nano instead of vi, but remember that real men prefer vi.

vi /etc/hostname

Edit /etc/hosts and change the old 127.0.1.1 line to your new hostname (if you dont do this, you wont be able to use sudo anymore. If you hav e already done it, press ESC on the grub menu, choose recovery, and edit your host file to the correct settings)

127.0.0.1   localhost
127.0.1.1   ubuntu.local    ubuntu   # change to your new hostname/fqdn

Now after a reboot, your hostname will be the new one you chose. To change without a reboot, you can just use hostname.sh after you edit /etc/hostname:

sudo /etc/init.d/hostname.sh start
Thanks to  http://techgurulive.com/2008/11/12/how-to-change-the-hostname-or-computer-name-in-ubuntu/
 
< Prev   Next >
 
 
 
csatpk Newsflash
Statistics
OS: Linux h
PHP: 5.2.17
MySQL: 5.1.63-community-log
Time: 04:46
Caching: Disabled
GZIP: Disabled
Members: 3
News: 368
Web Links: 5
Visitors: 266726
Popular