Thursday, April 25, 2024
13
rated 0 times [  13] [ 0]  / answers: 1 / hits: 5394  / 1 Year ago, sun, february 26, 2023, 8:09:24

I'm writing a backup script in which I need to mount a drive in the media bay of my laptop.



I know that I can get the job done by messing with fstab and the mount command. Perhaps that's the easiest way. Anyway, I'm interested in the following:




  1. Initially the media bay drive is unmounted.


  2. I click on the drive in the side-panel in a nautilus window and the drive is mounted.


  3. I can access it at /media/baydrive.







My question:



Is there an easy way of performing step 2 from the command line? I.e., mount the drive to /media/<device name> without messing with fstab.


More From » command-line

 Answers
3

Try udisks --mount <device name>



To mount by partition label, you can do



udisks --mount /dev/disk/by-label/baydrive

[#44970] Monday, February 27, 2023, 1 Year  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
brailloni

Total Points: 122
Total Questions: 108
Total Answers: 108

Location: North Korea
Member since Tue, Apr 4, 2023
1 Year ago
brailloni questions
Tue, Jun 21, 22, 21:51, 2 Years ago
Thu, Jul 29, 21, 05:25, 3 Years ago
Sat, Apr 2, 22, 17:32, 2 Years ago
Mon, Oct 31, 22, 21:39, 2 Years ago
;