Find the answer to your Linux question:
Results 1 to 5 of 5
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1

    Changing Hostname

    Hi everyone,

    I'm new to the linux world and I've been using Mandrake 10.1 for a few days now. I just have one quick question (out of the many I have for maybe later) about how to change my hostname. Probably a simple question that I should be able to answer myself, but I haven't been able to figure it out yet. Any help would be appreciated. Thanks!

  2. #2
    Just Joined!
    Join Date
    Mar 2005
    Northern Ireland
    Try hostname <whatever> as root user:

    $ hostname
    $ su -
    # hostname myhost
    # hostname

  3. #3
    Thanks for the reply dtodd. Heh, I knew it should have been something as easy as that...

  4. $spacer_open
  5. #4


    I tried that and it didn't work on my 10.1 system

  6. #5
    That's odd. I did find something else and I have read some other posts about changing the hostname. You could try editing the network file:
    $  su
    type password
    #  cd /etc/sysconfig
    #  vi network
    Then once in the network file, press "a" (to be able to insert something) and add the line HOSTNAME="your_hostname". Once that's done, press escape so you are unable to insert anything else and then enter this in on your keyboard :wq (make sure you get the colon in). Restart your PC and, cross your fingers, the hostname should be changed...

    Hope this helps.

Posting Permissions

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