linux mount mount Shared directory details

  • 2020-05-27 07:57:47
  • OfStack

Mount windows Shared directory or FTP:

Option 1: include password

sudo mount // /windows -o username=user,password=abcdefg -t cifs 

Option 2: enter the password separately

sudo mount // /windows -o username=user -t cifs 
password : abcdefg 


umount /FTPServer 

Mount linux Shared directory:

[modify server terminal]

Modify /etc/export file to add:

/home/user/source *(rw) 

Execute the following command to allow the new share to take effect

$/etc/rc.d/init.d/nfs restart 

[client] mount the share by executing the following command:

mount -t nfs -o rw /home/user/target 

Set automatic mount on startup

1. Change the password of

2. Put the file into /home/user

3. Change the execution permission of the file and execute the following command:

chmod 777 

4. Add the file to the startup file:

$ echo /home/user/ >> /etc/rc.d/rc.local file contents, where abcdefg is the password of

set fileformat=unix 
mount -t nfs -o rw /home/user/target <<EOF 

Related articles: