i have a windows share that i am trying to copy stuff over to from a bash script.

i can browse to the network share through KDE's "network" browser, but am not sure how do to access this filesystem from a shell.

should i be using "net use" or mount ... ?

i tried mount -t smbfs //etc /mnt/backup but that came back with some errors.

basically i want to be able to "cp stuff.file /mnt/networkdrive"

edit: these are the errors: (using ubuntu intrepid)

mount -t cifs //dlink-642ea6/Volume_1 /mnt/backup
mount: wrong fs type, bad option, bad superblock on //dlink-642ea6/Volume_1,
   missing codepage or helper program, or other error
   (for several filesystems (e.g. nfs, cifs) you might
   need a /sbin/mount.<type> helper program)

  dmesg | tail
  [1813703.574971]  CIFS VFS: cifs_mount failed w/return code = -22
  • What were the errors? – EEAA Feb 8 '10 at 17:02

i managed to get it working. i had to install the packages that contained mount.cifs ( i think it was smbfs) thenwas able to run

  mount.cifs // /mnt/backup/

now off to find mount.cifs for sunos and fedora


If you're not on a domain, I'd try using something like

sudo mount -t cifs //windowsIP/sharename /mnt/mountpoint

That's with Ubuntu. Then just copy the files from/to the /mnt/mountpoint directory, assuming it exists.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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