7

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?

1
  • Try the answer below. It may not be enough. Usually, usb_modeswitch does that automatically.
    – user692175
    Sep 19, 2017 at 18:07

1 Answer 1

14

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.

2
  • 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, 2017 at 19:30
  • 1
    try lsblk to list block device
    – lesca
    May 15, 2019 at 5:28

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .