If you have some important data on your Windows machine which you want to access from the Linux server, then you can do that and be able to access the shared directory or drive over the network and can access the directory from the Linux machine which is on the same network.
Below is the way using which you can do this:-
1) First, make the directory or drive on your Windows machine shared over the network or for a particular machine.
2) After this make sure that your Linux machine (or the machine which is allowed to access the shared drive or directory on the Windows machine) is on the same network.
3) Run the command below on the Linux machine command prompt:-
mount.cifs //windows-machine-ip/shared-directory /mnt/cifs -o username=windowuser password=password
For example-
mount.cifs //192.0.168.18/shared/mnt/cifs -o username=admin password=password
4) After this, you’ll be able to connect to the shared directory and can access the data as below:-
cd /mnt/cifs
ls -al
That’s all.
]]>