Page 2 of 2 FirstFirst 12
Results 11 to 19 of 19

Thread: How to change hostname?

  1. #11
    Join Date
    Jun 2008
    Location
    Podunk
    Posts
    26,669
    Blog Entries
    15

    Default Re: How to change hostname?

    Quote Originally Posted by kog13
    Changing the values in YaST changed them in /etc/hosts, but not in
    /etc/HOSTNAME. I had to change /etc/HOSTNAME manually. What exactly do
    you mean by a domain? The only box to the right of Hostname is "Host
    alias".
    Hi
    On the Hostname/DNS tab under Network Settings, There is a Hostname and
    a Domain Name.

    I think you have changed in the incorrect area in YaST, sounds like you
    used 'Hostnames' under Network Services.

    You need to use Network Devices -> Network Settings, third tab.

    --
    Cheers Malcolm (Linux Counter #276890)
    SUSE Linux Enterprise Desktop 11 (x86_64) Kernel 2.6.27.45-0.1-default
    up 7 days 16:58, 3 users, load average: 0.64, 0.25, 0.14
    GPU GeForce 8600 GTS Silent - CUDA Driver Version: 190.53


  2. #12
    Join Date
    Jun 2008
    Location
    Prescott, AZ
    Posts
    1,175

    Default Re: How to change hostname?

    Sorry to be dumb, Malcom, I don't see a Network Settings applet in YaST. The closest I see is Network Services and Hostnames, neither of which give the option to change hostname. (opensuse 12.1 x64)

  3. #13
    Join Date
    Jun 2008
    Location
    Podunk
    Posts
    26,669
    Blog Entries
    15

    Default Re: How to change hostname?

    Quote Originally Posted by PattiMichelle
    Sorry to be dumb, Malcom, I don't see a Network Settings applet in YaST.
    The closest I see is Network Services and Hostnames, neither of which
    give the option to change hostname. (opensuse 12.1 x64)

    Hi
    It's on the left, Network Settings -> Network Devices (this is the
    applet).

    --
    Cheers Malcolm °¿° (Linux Counter #276890)
    SUSE Linux Enterprise Desktop 11 (x86_64) Kernel 3.0.34-0.7-default
    up 3 days 12:59, 4 users, load average: 0.44, 0.37, 0.37
    CPU Intel i5 CPU M520@2.40GHz | Intel Arrandale GPU


  4. #14

    Default Re: How to change hostname?

    hello evryone i don't know if this is still in but want give the solution that i read and apply by reading the man of the command "hostnamectl"
    to change your hostname is better to do it through the command line.

    sudo hostnamectl set-hostname <your_new_hostname>
    the system will ask for root password, tape it and you are good to go. let me know any other issue that I can help
    ----------------------------------------
    openSUSE-13.1

  5. #15
    Join Date
    Nov 2009
    Location
    West Virginia Sector 13
    Posts
    15,703

    Default Re: How to change hostname?

    Old thread and it is easy to do from Yast

  6. #16

    Arrow Re: How to change hostname?

    Quote Originally Posted by ab@novell.com View Post
    -----BEGIN PGP SIGNED MESSAGE-----
    Hash: SHA1

    During the installation on the Network section you there is a checkbox
    that says, basically, "Set hostname via DHCP" so it could be anything.
    You can uncheck that and set your host name permanently along with
    anything else name-ish (like DNS).

    Good luck.





    EarthMind wrote:
    | Currently my hostname is "unknown0015f26474fe", how can I change this?
    | I've tried via /etc/hosts in KDE before but it didn't work, even after
    | a reboot. I found it before in KDE but forgot where it was...
    |
    | OpenSUSE should really add this feature to the installer because it's
    | annoying that I can't set this at install time.
    |
    |
    -----BEGIN PGP SIGNATURE-----
    Version: GnuPG v1.4.2 (GNU/Linux)
    Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

    iD8DBQFIak/i3s42bA80+9kRAg7EAJ99S/jpcXDigRirXc4kvo1EouYPKQCfSBxH
    g5z81YmH+kxEXzOef4zxxtg=
    =OWfF
    -----END PGP SIGNATURE-----
    Well If you install with a netcable pluged in You AINT gonna see any Netsetup - so no luck there!!
    I tried adding to both Hosts and Hostname, that worked, apart from the fact that all and any DNS resolution had waporised, so I had to enter them manually -- BUT THAT IS NO SOLUTION ON A LAPTOP!!

    So please where do we set a hostname that works, setting it in YAST enters the info in hosts, but leaves nohostname every where else!!

  7. #17
    Join Date
    Jun 2008
    Location
    San Diego, Ca, USA
    Posts
    11,138
    Blog Entries
    2

    Default Re: How to change hostname?

    Quote Originally Posted by kog13 View Post
    Changing the values in YaST changed them in /etc/hosts, but not in /etc/HOSTNAME. I had to change /etc/HOSTNAME manually. What exactly do you mean by a domain? The only box to the right of Hostname is "Host alias".
    IMO the proper way to display your current HOST and HOSTNAME values is to echo those variables as follows because AFAIK what is returned is how locally running apps will see those variables.
    Code:
    echo $HOST
    echo $HOSTNAME
    First, answering your "domain name" question...
    That should actually be the group name of computers in your network. It's the Domain name if you're running something like LDAP or Active Directory, it is the Workgroup name if you're not running network security. If this "domain" is not set correctly, then your machines will not be able to easily "see" and browse network services on another computer in your network, like network file shares, proxy authentication, more.

    As for the HOST and HOSTNAME variables,
    I just ran some tests on a LEAP 42.1 to verify what I've observed in the past...

    Changing the HOSTNAME in YAST > Network Settings doesn't always have an immediate effect in an open console, and I've always been curious about that... but if you wait a few minutes or open a new console immediately then you will see the HOSTNAME change in the console immediately.

    But, if you use the "echo" methods I describe to display your current HOST and HOSTNAME, you will continue to see the original values. As I described, this is important because it will mean that apps dependent on reading these variables will be using values you thought had been changed.

    Only after a full reboot,
    Then when you run the echo tests again will you see the new values.

    Also, technically the $HOST and $HOSTNAME variables can be different but it looks like openSUSE configures them both to always have the same values.

    Lastly, note that when using YAST to change the Hostname what each checkbox does and their consequences...
    Bottom line is that I highly recommend that the second checkbox should <always> be checked, and the first checkbox <only most of the time> the box should be unchecked (You would almost always check the box if you're implementing network security like LDAP or AD).
    The first checkbox "Change Hostname via DHCP" means just that... You're allowing DHCP settings to over-ride whatever you just configured. <Uncheck> this box or nullify what you just set.
    The second checkbox "Assign Hostname to Loopback IP" can be important for any applications that use "external" access using the loopback addresses (anything that starts with 127.0.0.x, that should answer your question about 127.0.0.1 and 127.0.0.2). When applications run on your machine, they can be using something like Sockets or Named Pipes that are internal direct access methods, or they can access by "external" network sockets.

    But talking pipes and Unix sockets vs network sockets starts getting into a deep dive into system and software architecture. Just follow my recommendation any you'll be OK... Until something doesn't work and then you can post in these Forums again.

    HTH,
    TSU
    Beginner Wiki Quickstart - https://en.opensuse.org/User:Tsu2/Quickstart_Wiki
    Solved a problem recently? Create a wiki page for future personal reference!
    Learn something new?
    Attended a computing event?
    Post and Share!

  8. #18

    Thumbs down Re: How to change hostname?

    Quote Originally Posted by kenmol View Post
    Well If you install with a netcable pluged in You AINT gonna see any Netsetup - so no luck there!!
    I tried adding to both Hosts and Hostname, that worked, apart from the fact that all and any DNS resolution had waporised, so I had to enter them manually -- BUT THAT IS NO SOLUTION ON A LAPTOP!!

    So please where do we set a hostname that works, setting it in YAST enters the info in hosts, but leaves nohostname every where else!!
    Yep, for the last year or two, I've had to manually update my /etc/resolv.conf everytime I logon to wireless, wired, or VPN. I have even done the force update, to no avail. /etc/resolv.conf ONLY has search domain (after the force update) the commented out message about manually updating the sysconfig files, and that if I touch it it won't be changed. So I just manually update it... I think it's a Network Manager thing that no one has fixed after two years.

  9. #19
    Join Date
    Jun 2008
    Location
    Netherlands
    Posts
    25,001

    Default Re: How to change hostname?

    Quote Originally Posted by emrecio View Post
    Yep, for the last year or two, I've had to manually update my /etc/resolv.conf everytime I logon to wireless, wired, or VPN. I have even done the force update, to no avail. /etc/resolv.conf ONLY has search domain (after the force update) the commented out message about manually updating the sysconfig files, and that if I touch it it won't be changed. So I just manually update it... I think it's a Network Manager thing that no one has fixed after two years.
    When this is to be a request for help, please start a new thread. Not many will see this post at the end of an old thread.
    Henk van Velden

Page 2 of 2 FirstFirst 12

Posting Permissions

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