Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I have set up Samba on Ubuntu Server. Everything works fine, but I can access the dir only by providing ip address: smb://192.168.1.2/public but not the host name smb://myhost/public.

user@host$: cat /etc/hostname
myhost.org

What do I need to set up to see this from other machines without providing IP?

share|improve this question
add comment

2 Answers 2

up vote 2 down vote accepted

If you're using static IP in your LAN, you can add the following to your /etc/hosts file

192.168.1.2    myhost.org
share|improve this answer
add comment

Just guessing you have no DNS server in your network. In that case the easiest method is to add a line in the hosts file on your client:

192.168.1.2 myhost

On Linux this file is in /etc/hosts, on Windows it resides in C:\windows\system32\drivers\etc\hosts

Don't remove existing lines from the file, just add this line.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.