With Emacs running on Windows (without cygwin) I am able to open a remote (windows share) directory with C-x C-f //IPADDRESS/d$ RET command. With Emacs on cygwin, I tried /smb:IPADDRESS:/d$$ RET. However, I got the below error message,

Host 'IPADDRESS' looks like a remote host, 'smb' can only use the local host.

The earlier //IPADDRESS/DIR syntax too didn't work.

Can anyone please help (I also tried using my username in the smb URL but got the same error)?

EDIT: I found out from the post https://superuser.com/questions/102233/how-to-go-to-remote-directory-in-cygwin that cygwin treats UNC paths as local. More information is at https://www.cygwin.com/cygwin-ug-net/using.html#unc-paths. So the solution is to do C-x C-f //machine/shareddir RET to browse the remote directory assuming you don't have to provide different credentials.

1 Answer 1


Tramp's smb method is not activated for cygwin. See tramp-smb.el:

(unless (memq system-type '(cygwin windows-nt))
  (add-to-list 'tramp-methods
  • Thanks. Why this is not be supported? Also is there any other way I can access remote files from Emacs on cygwin if Tramp smb is restricted? Dec 22, 2018 at 10:45
  • 1
    Well, it is 15+ years old code, I don't remember. If you have the smbclient available in cygwin, edit the code snippet to not kick off cygwin, and try it. If it works for you, pls report, and I'll change it in Tramp. Dec 22, 2018 at 20:13
  • Thanks for the response. Looks like cygwin doesn't provide a smbclient. I stumbled upon a post where the person has compiled smbclient for windows at allandynes.com/2016/05/…. Interested users can try it out and post the outcome here. Meanwhile, I am editing my question to include the answer I got from another Q&A. Dec 23, 2018 at 6:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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