Mount get's undone when script ends?

It ends because it’s running in a script, and therefore a subshell. You have to use nohup if you want it to persist when the script ends.

man nohup
1 Like