Friday, January 25, 2013

openSUSE: How to change hostname

Procedure for changing hostname on openSUSE 12.2:

  1. Run YaST
  2. Network devices -> Network settings
  3. (If you get "Warning: Network is currently controlled by NetworkManager", just click "OK")
  4. Open the Hostname/DNS tab
  5. Fill in the desired hostname
  6. Check "Change Hostname via DHCP" if desired
  7. click "OK"

Even after doing that, though, the old hostname was still displayed on the XDM login screen. Annoying. So I decided to run a search for the old hostname over all ordinary text files in the /etc tree (see Basic usage of GNU find and GNU grep):
# find /etc -type f -exec grep -H oldhostname {} \;

Sure enough, after editing that file, the XDM login screen displayed the correct hostname.

No comments:

Post a Comment