• RSS
  • SmsJobs
  • Sms
  • GoogleBuzz
  • Facebook
  • Twitter
  • Linkedin
  • Youtube
The Linux Juggernaut

The Linux Juggernaut

roles on……

Do you like www.linuxnix.com ? Please consider supporting us by becoming a subscriber and get a Linux basics e-book for free.

Computers are assigned with a name as we do for humans beings. This is called hostname in computer world. So how to assign a hostname to a Linux system? Its very much simple. Before doing this we should know every task in Linux can be done in two ways :

1. Temporary way(once you boot your system the changes made in this way will go away)
2. Permanent way(Changes made in this way will be retained even after rebooting of the system).
Before changing the hostname, check what is your present system name by using hostname command

#hostname

This command will show present system name.
Now we will see how to assign a host name to a linux machine in both(temporary as well as permanent) ways.

Temporary way : Use hostname command to change the host name
#hostname your-system-nameExample :

#hostname office-laptop.example.com

Permanent way : Change hostname in Redhat/CentOS/Fedora :
Edit /etc/sysconfig/network file, use HOSTNAME variable in that file to denote hostname.
#vi /etc/sysconfig/network

HOSTNAME=office-laptop.example.com


Save the file and exit


Then your hostname is changed permanently to your desired name.

Change hostname in Ubuntu/Debian :

Edit /etc/hostname, just write down what is your hostname in to that file.
#vi /etc/hostname

office-laptop.example.com


Save the file and exit
Then your hostname is changed permanently to your desired name.

Do you like www.linuxnix.com ? Please consider supporting us by becoming a subscriber and get a Linux basics e-book for free.
bySurendra On Monday-July - 5 - 2010

email newsletter

Redhat Flagship dist

Redhat announced that they are going to release RHEL7 by ...

12 examples to use f

Flower brackets examples This is a small post on how to ...

7 Linux read command

read command examples read command is useful in scripts when reading ...

7 linux sort command

Linux/Unix sort command examples This is a small tutorial on how ...

How to find command

How to find command location in Linux and Unix This is ...

  • About Linux Juggernaut

    How the blog name selected? Juggernaut: * a massive inexorable force that seems to crush everything in its way ...readmore>>

  • Contact Me

    Contact us Send an Email Phone number and vCard LinkedIn profile Advertise with us
  • About Me

    Surendra Kumar Chowdary

    My name is Surendra Kumar Anne. I am from Vijayawada which is cultural capital of south Indian state of Andhra Pradesh. I am a Linux evangelist who believes in Hard work, A down to earth person, Likes to share knowledge with others, Loves dogs, Likes photography. At present i work at Persistent Systems as Module Lead.   read more »