Find the answer to your Linux question:
Results 1 to 8 of 8
hello all, well i'm running slackware 10, and i want to change my hostname. right now it is, name.name.net i would like it to be my domain name, as name.name.net ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Dec 2004
    Posts
    49

    changing hostname?


    hello all, well i'm running slackware 10, and i want to change my hostname. right now it is, name.name.net i would like it to be my domain name, as name.name.net does not exist. any help please?

  2. #2
    Linux Enthusiast puntmuts's Avatar
    Join Date
    Dec 2004
    Location
    Republic Banana
    Posts
    562
    You could edit /etc/HOSTNAME and /etc/hosts as well. That are plain text files so any editor would do.
    I\'m so tired .....
    #200472

  3. #3
    Just Joined!
    Join Date
    Dec 2004
    Posts
    49
    awsome. thanks alot

  4. $spacer_open
    $spacer_close
  5. #4
    Linux Newbie
    Join Date
    Jun 2004
    Location
    Chicago
    Posts
    112
    using netconfig can also help you with this.

  6. #5
    Linux User Muser's Avatar
    Join Date
    May 2004
    Location
    Maryland
    Posts
    363
    or
    Code:
    su
    Password:
    hostname [newhostname]

  7. #6
    obs
    obs is offline
    Just Joined! obs's Avatar
    Join Date
    Dec 2004
    Posts
    14
    i use before "hostname", but after restart it backs my host name to default...

  8. #7
    Linux Enthusiast puntmuts's Avatar
    Join Date
    Dec 2004
    Location
    Republic Banana
    Posts
    562
    hostname comes with a manual page. There will be your answer.
    Code:
    man hostname
    I\'m so tired .....
    #200472

  9. #8
    Just Joined!
    Join Date
    Feb 2005
    Posts
    1

    Changing hostname - my 2 bits

    Hi everyone

    If all else fails, I had luck when I first installed Slackware 10 a while ago editing the /etc/rc.d/rc.M file ... here's the spot I'm referring to (around line 20 of my /etc/rc.d/rc.M) :

    # Set the hostname.
    if [ -r /etc/HOSTNAME ]; then
    /bin/hostname $(cat /etc/HOSTNAME | cut -f1 -d .)
    else
    # fall back on this old default:
    echo "darkstar.example.net" > /etc/HOSTNAME
    /bin/hostname ***JUST TYPE YOUR HOSTNAME HERE***
    fi

    This will fix the "every reboot" problem ... but I think that creating a /etc/HOSTNAME file is still your best bet!

    cheers
    -Josh

Posting Permissions

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