Friday, August 17, 2018

[Linux] 開機後自動 mount 的方法

方法一:
#vim /etc/rc.loc
mount //172.31.0.1/lab /var/www/lab -o username=myid,password=mypw

方法二:
#vim /etc/fstab
//172.31.0.1/lab /var/www/lab cifs defaults,user=myid,password=mypw 0 0

補充:
1. 查看目前的mount
#df
2. 移除目前的mount
#umount /var/www/lab

No comments:

Post a Comment