8

For a cheap Chinese 3G modem, which has a builtin USB mass storage device with Windows drivers, I have a generic linux install manual that tells me to

"Plug in your modem in USB port , on inserting you will notice icon on your desktop screen , right click on it and eject it.

However, my Ubuntu is a server without GUI. Which commands does the GUI call when I click "eject" on an USB mass storage device?

muru
  • 207,970
Alexander
  • 183
  • Try the answer below. It may not be enough. Usually, usb_modeswitch does that automatically. –  Sep 19 '17 at 18:07

1 Answers1

15

To eject the usb you can type in your terminal :

eject /dev/sr0

where sr0 is your device, it can be sr1,sr2 or /dev/sdb,/dev/sdc and so on, its depends on your computer.

to show the device , just type in terminal :

sudo fdisk -l or mount

it will show the device.

Elder Geek
  • 36,813
Deki
  • 655
  • 2
    'mount' is probably a better command to run than fdisk, as it should be obvious. However, it's also plausible the device is not auto-mounted under Ubuntu Server, and so the ejecting instructions can just be ignored. – dobey Sep 19 '17 at 19:30
  • 1
    try lsblk to list block device – lesca May 15 '19 at 05:28