Here is a small trick for defining a fix 'hostname' for linux machine. Sometimes we face a problem that 'hostname' keeps on changing for Linux machine. At first level, you can check with /etc/hosts, if settings are proper there. The contents should be like:
127.0.0.1 localhost.localdomain localhost
::1 localhost6.localdomain6 localhost6
But sometimes, even after having these settings fine, we still face above problem.
Next level of quick fix for this problem is given below:
127.0.0.1 localhost.localdomain localhost
::1 localhost6.localdomain6 localhost6
But sometimes, even after having these settings fine, we still face above problem.
Next level of quick fix for this problem is given below:
- Open /etc/rc.local
- Add following lines in this file
- hostname localhost.localdomain (or any other hostname if you want)
- Save the file
- Restart the system
1 comments:
You can also try by
Open /etc/NetworkManager/NetworkManager.conf or /etc/NetworkManager/nm-system-settings.conf
Add following lines, if not there already
[keyfile]
hostname=localhost.localdomain
-------
See if it can help
Post a Comment