How-To: Configure Arch Linux, Manjaro, etc. to Show Hostname on Network
Recently, we published an article on how to get VNC to work on your Linux-based single-board computer or other machine. This worked great, but we found that Manjaro was not publishing its hostname on the network, so we had to access it by IP only. The same issue holds true for Arch Linux, as it is the parent distro of Manjaro.
While that is fine in certain situations, it does add at least one more step to find the IP address for the computer if that computer is getting a DHCP (dynamic) address (not a static IP).
Here are the steps we executed to get our Manjaro system to show up on the network:
If you haven't yet set your computer's hostname, enter:
sudo nano /etc/hostname
Next, install the necessary packages to publish the hostname on the network:
sudo pacman -Syu avahi nss-mdns systemctl start avahi-daemon.service
Let's say your computer's name was "manjaro". Try the following from another computer on the network:
ping manjaro
If this doesn't work, try:
ping manjaro.local
If this still doesn't work, try rebooting the Arch / Manjaro system and try the pings again. If your experience is similar to ours, your system should now be publishing its name on your network.
More information about Avahi on Arch Linux can be found here: https://wiki.archlinux.org/index.php/Avahi
Leave a comment