+ Reply to Thread
Results 1 to 5 of 5

Thread: Changing the host name on a linux box

  1. #1
    Onur Guest

    Arrow Changing the host name on a linux box

    This is a simple process ... But again, probably you dont know it since you are looking for it.

    2 Places to Change:

    /etc/sysconfig/network, Edit the

    HOSTNAME=.

    This will be available even after a reboot.

    A quicker way - Edit

    /proc/sys/kernel/hostname.

    But that won't be saved when you reboot.

  2. CODECALL Circuit advertisement

     
  3. #2
    rumen is offline Programmer
    Join Date
    Jun 2008
    Posts
    110
    Rep Power
    0
    Nice guide, it could help me on my openSuse box

  4. #3
    whwmia's Avatar
    whwmia is offline Newbie
    Join Date
    Aug 2009
    Posts
    24
    Rep Power
    0

    Re: Changing the host name on a linux box

    Thank you for such nice sharing !

  5. #4
    nikhilkhullar is offline Newbie
    Join Date
    Nov 2009
    Location
    Jannat
    Posts
    20
    Rep Power
    0

    Re: Changing the host name on a linux box

    Isn't this distro-specific. I mean the HOSTNAME even when exported once is not remembered in some distros after reboot...

    Is there any universal way which will work irrepective of the distro being used ?


    Regards,
    Nikhil Khullar

  6. #5
    genux's Avatar
    genux is offline Learning Programmer
    Join Date
    Dec 2009
    Location
    Norwich
    Posts
    79
    Rep Power
    8

    Re: Changing the host name on a linux box

    since different distro's place the hostname file in different places, on a ubuntu setup, it is /etc/hostname file to alter.

    you could do a grep -R "your hostname" /etc which should find out where the file is.
    Code:
    int coffeePerDay = 10; // need to cut down!!!
    Codingfriends

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. General interrupt changing
    By h4x in forum Assembly
    Replies: 17
    Last Post: 09-29-2009, 04:56 PM
  2. Changing the name of a DLL
    By bugale in forum C# Programming
    Replies: 3
    Last Post: 02-21-2009, 11:59 AM
  3. Changing links
    By Jaan in forum PHP Development
    Replies: 5
    Last Post: 12-25-2008, 06:10 PM
  4. Changing flags from a DLL?
    By RobotGymnast in forum C and C++
    Replies: 0
    Last Post: 10-26-2008, 10:04 AM
  5. Changing IP address
    By Grub in forum Linux Networking
    Replies: 2
    Last Post: 04-08-2008, 01:14 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts