Accessing a windows shared folder from Linux?
I am trying to copy a (.html) file from a Windows XP Professional shared folder onto a server running Ubuntu Linux 10.04 LTS.
As it's a shared folder the usual 'wget' doesn't seem to work. I suspect I'm using the wrong address style completely.
I have tried:
- http://192.168.1.66/SharedFolder/Data.html
- //192.168.1.66/SharedFolder/Data.html
- smb://192.168.1.66/SharedFolder/Data.html
- //192.168.1.66/SharedFolder/Data.html
- 192.168.1.66/SharedFolder/Data.html
I wondered if this is even possible and if it is, could someone give me some pointers?
I've successfully pinged the Windows box from Ubuntu:
# ping 192.168.1.66
PING 192.168.1.66 (192.168.1.66) 56(84) bytes of data.
64 bytes from 192.168.1.66: icmp_seq=1 ttl=128 time=0.412 ms
64 bytes from 192.168.1.66: icmp_seq=1 ttl=128 time=0.557 ms (DUP!)
64 bytes from 192.168.1.66: icmp_seq=2 ttl=128 time=0.243 ms
64 bytes from 192.168.1.66: icmp_seq=3 ttl=128 time=0.251 ms
64 bytes from 192.168.1.66: icmp_seq=4 ttl=128 time=0.266 ms
and I can access the Windows share from every other computer on the network, however, they are all running Windows XP Professional aswell. I'm not sure if it's a problem between Ubuntu and Windows shares in general or just that my URL style is wrong.
If you want to use the GUI, try clicking Places -> Connect to Server...
. For Service Type
choose Windows share
, and fill out the fields like so:
Server: 192.168.1.66
Share: SharedFolder
Then download your file from the window. If you want to use a command-line interface, smbclient
uses a FTP-like interface (get
, put
, etc.):
~$ smbclient //192.168.1.66/SharedFolder
Password:
smb: \> get Data.html
Alternatively, you could mount the share as a CIFS filesystem: (First, ensure that cifs-utils is installed)
~$ sudo mount -t cifs //192.168.1.66/SharedFolder /mnt
If your share requires authentication, provide the username to smbclient
with the -U
option, or to mount
with -o user=username