Copy this file to your home folder.
Change its permisions to make it executable with sudo chmod 700 easyMount.sh
Execute the script with . ./easyMount.sh
#!/bin/bash | |
lsblk | |
echo | |
read -p "What do you want to mount?(sdb1, sdb2 ect?): " | |
echo | |
drive=$REPLY | |
read -p "Where do you want to mount it?(media/<LOCATION>): " | |
echo | |
target=$REPLY | |
cd /. | |
sudo mkdir -p media/$target | |
sudo mount -t ntfs /dev/$drive /media/$target | |
cd media/$target | |
ls | |
echo 'boom' |
Copy this file to your home folder.
Change its permisions to make it executable with sudo chmod 700 easyMount.sh
Execute the script with . ./easyMount.sh