Last active
May 25, 2018 12:40
-
-
Save raupie/6db11e872287f392082a85babade53a0 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| read -p "Enter the shared network path: " path | |
| read -p "Enter your username: " username | |
| read -p "What should the shared folder be named?: " shared | |
| # prepare folder | |
| umount /mnt/$shared | |
| rm -rf /mnt/$shared | |
| # createk folder and set up mount | |
| mkdir -p /mnt/$shared | |
| mount -t cifs $path /mnt/$shared -o username=$username | |
| echo "Network share location: /mnt/$shared" |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Download file via:
wget https://gist.githubusercontent.com/raupie/6db11e872287f392082a85babade53a0/raw/3531ec8d976e49293cfbbd2b513dc718ab1fa5cd/network-mount.bashRun via:
sudo bash network-mount.bash