公司办公都是在ubuntu服务器上,所以每每拷贝修改文件都要ftp之类的,实在不方便。

索性将服务器挂载到自己本地目录下。

服务器端参考其他samba安装和配置。这里只是说下本地自动挂载方法。

安装命令行如下:

  sudo apt-get install cifs-utils

二、安装完毕后,修改fstab配置文件。

  sudo vi /etc/fstab

我的配置如下:

 1 # /etc/fstab: static file system information.
 2 #
 3 # Use 'blkid' to print the universally unique identifier for a
 4 # device; this may be used with UUID= as a more robust way to name devices
 5 # that works even if disks are added and removed. See fstab(5).
 6 #
 7 # <file system> <mount point>   <type>  <options>       <dump>  <pass>
 8 # / was on /dev/sda9 during installation
 9 UUID=6aef3e79-e7bc-4da3-8844-68fd7b4069dd /               ext4    errors=remount-ro 0       1
10 # /boot was on /dev/sda7 during installation
11 UUID=1bcf1be5-8bf9-4b78-a37d-eecc312249b2 /boot           ext4    defaults        0       2
12 # /home was on /dev/sda10 during installation
13 UUID=44aa758f-fd97-448c-9445-6b1c071fdeee /home           ext4    defaults        0       2
14 # /home/joseph/win_work/ was on /dev/sda5 during installation
15 UUID=B62C67A72C6760FB /home/joseph/win_work/ ntfs    dmask=022,fmask=133,uid=1000,gid=1000 0       0
16 # swap was on /dev/sda8 during installation
17 UUID=93db6e5e-1fa9-4b49-8a62-bd0404d88118 none            swap    sw              0       0
18 
19 #mount -t cifs -o username="共享用户",password="密码" //ip/sharing_folder /mountpoint
20 //192.168.1.95/“服务器samba设置的共享文件夹”    /home/joseph/95         cifs    username=“服务器对应的samba用户名”,password=服务器对应的samba密码,uid=”本地所属用户“,gid=“本地所属组",ro 0    0
/etc/fstab

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-06-26
  • 2021-09-29
  • 2021-08-12
  • 2021-09-20
  • 2021-05-04
  • 2021-10-29
猜你喜欢
  • 2021-10-06
  • 2022-12-23
  • 2021-12-20
  • 2021-12-11
  • 2021-07-19
  • 2022-12-23
相关资源
相似解决方案