Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to mount shared files under windows by linux

2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/02 Report--

**************************

Description:

Windows has a shared folder APP, Windows local IP is 192.168.9.155

Now you need to mount this APP folder on the linux server, the linux server ip is 192.168.9.200

The operation record is as follows:

1) Preparation for Windows

First of all, set the APP folder under D disk on windows to share. Right-click the Share property of the APP folder.

Select Specific Users Share to add shared users. as follows

In this way, the APP folder is set as a shared folder, and the above O3zyrm2d4gnp5j2 is the machine name of windows. View the files in the APP

2) Operation on Linux Server

Create mount directory/mnt/APP

[root@dev ~]# mkdir /mnt/APP

mount using mount.cifs:(the username and password below are for windows)

[root@dev ~]# yum provides */mount.cifs

[root@dev ~]#yum -y install cifs-utils-4.8.1-20.el6.x86_64

[root@dev ~]# mount.cifs //192.168.9.155/APP /mnt/APP/ -o user=administrator,pass=Taren1

Check it out and see it's already hanging.

[root@dev ~]# ls /mnt/APP/

2. sql3.sql 8633 Launched sql.zip

[root@dev mnt]# df -h

Filesystem Size Used Avail Use% Mounted on

/dev/sda2 450G 97G 331G 23% /

tmpfs 3.9G 228K 3.9G 1% /dev/shm

/dev/sda1 194M 34M 150M 19% /boot

//192.168.9.155/APP 123G 12G 111G 10% /mnt/APP

[root@dev mnt]# mount

/dev/sda2 on / type ext4 (rw)

proc on /proc type proc (rw)

sysfs on /sys type sysfs (rw)

devpts on /dev/pts type devpts (rw,gid=5,mode=620)

tmpfs on /dev/shm type tmpfs (rw)

/dev/sda1 on /boot type ext4 (rw)

none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw)

gvfs-fuse-daemon on /root/.gvfs type fuse.gvfs-fuse-daemon (rw,nosuid,nodev)

//192.168.9.155/APP on /mnt/APP type cifs (rw)

uninstall

[root@dev mnt]# umount /mnt/APP

[root@dev mnt]# df -h

Filesystem Size Used Avail Use% Mounted on

/dev/sda2 450G 97G 331G 23% /

tmpfs 3.9G 228K 3.9G 1% /dev/shm

/dev/sda1 194M 34M 150M 19% /boot

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report