I want to know, whether is it possible to access the Windows files from a shell script on Linux system ? What i am trying to do is to run a shell script in my Linux system, that will access the files of a remote Windows system, read them and manipulate them. Forget about the file and folder permissions.

Is it possible to do this using the Linux shell scripts (or perl scripts)?

3 Answers 3


Yes, you can mount a windows share into the linux filesystem using mount.cifs e.g.

mkdir /mnt/windowsfs
mount -t cifs //server/share -o username=user,password=P4ssw0rd /mnt/windowsfs

Once you've done that you can (with suitable permissions) access and manipulate the files in /mnt/windowsfs.


Mounting the remote share is the most direct approach. However, there's also the smbclient executable, that gives FTP-like access to remote shares. It's a part of the Samba software package.


Install this command on linux

 sudo apt-get install cifs-utils


mkdir /mnt/windowsfs

sudo mount.cifs //WindowsPC/Share /mnt/windowsfs -o user=geek

its ask for password, enter password then check your /mnt/windowsfs folder...its Done.

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.