3

I have seen enough answers on how to mount USB Disks via command line but I would like to know if is it there a text tool for managing the USB Drives.

Scenery

I own a server in a remote place. The server one HDD for the Operating System and Data, and a USB Drive for Backups.

Sometimes I need to remotely (SSH) manage the USB Drive in order to mount/unmount as desired.

It would be useful if we find a text only USB Disk manager.

Thanks in advance.

Glossary

  • "manage" = Mount and Unmount in a visual mode, without doing magic in order to guess which /dev/sdX drive is and without having to memorize and write every single command in order to mount and unmount.
  • "Manage" = Mount and Unmount in a terminal as you do in your favorite file browser.
muru
  • 193,181
  • 53
  • 473
  • 722
Geppettvs D'Constanzo
  • 19,364
  • 7
  • 51
  • 106
  • What exactly do you mean my "manage the USB drive"? If you just need to mount it, why doesn't the normal `mount` command suit your requirements? – cocomac Jan 13 '22 at 16:07
  • @cocomac "manage" = Mount and Unmount in a visual mode, without doing magic in order to guess which /dev/sdX drive is and without having to memorize and write every single command in order to mount and unmount. "Manage" = Mount and Unmount in a terminal as you do in your favorite file browser. Thank you – Geppettvs D'Constanzo Jan 13 '22 at 16:17
  • I'm not sure one exists right now, sadly. I might make one later, but AFAIK, that doesn't exist. Look up [the `lsblk` command](https://manpages.ubuntu.com/manpages/bionic/en/man8/lsblk.8.html). It will give you a list of block devices (drives) in the system, and how big they are, so that might be enough. But in terms of a real ncurses-style text user interface, I don't know of any that exist – cocomac Jan 13 '22 at 16:29
  • The question seems unclear without that clarification in the comments -- please edit your question to add your use case. – user535733 Jan 13 '22 at 16:35
  • 2
    There is https://github.com/FedeDP/ncursesFM – user535733 Jan 13 '22 at 16:37
  • Dear @user535733, yes. That's exactly what I expected as an answer. Thank you very much. I will accept it if you add it as an answer to this question. Regards – Geppettvs D'Constanzo Jan 13 '22 at 17:37

1 Answers1

0

If you are using udisks2 you can consider using udiskie for this.

udiskie-info -a

This command will show all manageable attached devices. to mount or unmount these devices use these commands:

udiskie-mount /dev/device
udiskie-umount /dev/device

Where devices are mounted can be specified in a config file for udiskie, default is /media or /run/media.

Ferdi
  • 519
  • 2
  • 5
  • I have installed but it shows only device locations, not the actual device's information. Looks useful but -somehow- when I run `udiskie-info -a` I get a list of almost 25 devices when I have only 3 physical devices connected. Thank you. – Geppettvs D'Constanzo Jan 13 '22 at 18:44
  • use udiskie-info -av for more information about the listed devices. Don't forget to read the manual.... – Ferdi Jan 13 '22 at 18:50
  • Thank you Ferdi, but the expected solution is a visual tool, something to just hit *ENTER* or a key in order to do it. The way you just clic on the sidepane in your favorite file browser in order to mount or right click to choose "Safely remove" (unmount). Regards – Geppettvs D'Constanzo Jan 13 '22 at 19:07