"Eject device" from command line

19,100

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.

Share:
19,100

Related videos on Youtube

Alexander
Author by

Alexander

Updated on September 18, 2022

Comments

  • Alexander
    Alexander almost 2 years

    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?

  • dobey
    dobey almost 7 years
    '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.
  • lesca
    lesca about 5 years
    try lsblk to list block device