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
mount
explicitly. – Léo Léopold Hertz 준영 Jul 27 '16 at 13:02mount -L MasiWeek /media/masi/MasiWeek
? I cannot think that Ubuntu's mount works withoutlabel
. – Léo Léopold Hertz 준영 Jul 27 '16 at 13:43mount
, which does. – Graipher Jul 27 '16 at 13:45blkid /dev/sdb1
, creates the mountpoint if necessary with that label and then usesgvfs-mount -d /dev/sdb1
or similar to mount it. But I'm really just guessing here. – Graipher Jul 27 '16 at 13:49