# Fix hostname changing to localhost

Some Slackware machines may have a problem with the hostname: after login and
logout, the machine hostname changes to `localhost` for some reasons. To fix
this problem, run the following command.

```bash
echo "hostname-mode=none" >> /etc/NetworkManager/NetworkManager.conf
```

## Sources

- https://unix.stackexchange.com/questions/513246/networkmanager-interferes-with-hostname-configuration/513390#513390
