> ## Content Index
> Fetch the complete content index at: https://www.albert-yu.com/llms.txt
> Use this file to discover other available public pages before exploring further.

# Ubuntu掛載S3（S3FS）
- URL: https://www.albert-yu.com/blog/ubuntu-mount-s3-with-s3fs/
- Published: 2016-12-29T01:40:54.000Z
- Updated: 2026-10-30T03:43:34.000Z
- Author: Albert Yu
- Tags: AWS, Cloud, CloudService, OS, S3, s3fs, Ubuntu

安裝S3fs與fuse  
$apt install fuse  
$apt install S3fs

新增password檔  
$ touch /etc/passwd-s3fs編輯檔案  
$ vim /etc/passwd-s3fs  
檔案內容請看IAM匯出檔案和S3建立BucketName部分  
BucketName:Access Key Id:Secret Access Key

更改檔案權限  
$ chmod 640 /etc/passwd-s3fs

新增要掛載的位置  
$ mkdir /mnt  
$ mkdir /mnt/bucket1

掛載bucket  
參考s3 開啟的BucketName  
$ /usr/bin/s3fs /mnt/bucket1 -o allow\_other

測試是否有掛載成功  
$ df -h

卸載  
fusermount -u /mnt/bucket1