Skip to content

Instantly share code, notes, and snippets.

@Mayurifag
Created May 23, 2025 08:09
Show Gist options
  • Save Mayurifag/93db04b48f42d0d0de60a73fb2d12a4c to your computer and use it in GitHub Desktop.
Save Mayurifag/93db04b48f42d0d0de60a73fb2d12a4c to your computer and use it in GitHub Desktop.

Revisions

  1. Mayurifag created this gist May 23, 2025.
    42 changes: 42 additions & 0 deletions instruction.md
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,42 @@
    # Find UUID

    ```sh
    sudo blkid | grep ntfs # Find UUID of device
    ```

    # Create folder and add file

    ```sh
    sudo mkdir -p /var/lib/systemd/system/
    sudo nano /var/lib/systemd/system/var-mnt-shared.mount
    ```

    ```ini
    # /var/lib/systemd/system/var-mnt-shared.mount
    [Unit]
    Description=Mount NTFS Drive
    After=local-fs.target

    [Mount]
    ExecStartPre=/bin/mkdir -p /var/mnt/shared
    What=UUID=01DB94C211A53E90 # CHANGE UUID HERE
    Where=/var/mnt/shared
    Type=ntfs3
    Options=defaults,uid=1000,gid=1000,umask=022,noatime
    TimeoutSec=30

    [Install]
    WantedBy=multi-user.target
    ```

    # Launch service

    ```sh

    sudo systemctl daemon-reexec
    sudo systemctl daemon-reload
    sudo systemctl enable var-mnt-shared.mount
    sudo systemctl start var-mnt-shared.mount
    sudo systemctl status var-mnt-shared.mount
    ```