Situation: Ubuntu-mount USB drive on the system by a terminal command, same as Ubuntu's GUI mount Configurations
# http://askubuntu.com/q/648159/25388
gsettings set org.gnome.desktop.media-handling automount-open false
- Command
ls /media/masi
gives blank. - You see the disk icon in the panel. If you click it, the file-manager opens. Now, you can
ls /media/masi
and you see the disk.
My unsuccessful script
USER="masi"
LABEL="MasiWeek" # https://unix.stackexchange.com/q/297425/16920
PARTION="sdb" #$(basename $(readlink $LABEL))
sudo mkdir -p /media/"$USER"/"$LABEL"
sudo mount /dev/"$PARTITION" /media/"$USER"/"$LABEL"
Output
mount: /dev is not a block device
System: Linux Ubuntu 16.04 64 bit
Hardware: Macbook Air 2013-mid
Related: Find kernel name for a partition when only the label is known