"Eject Device" from Command Line

"Eject Device" from Command Line

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

1 Answer

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Elena Rostova
Author

Elena Rostova

Elena Rostova holds a Master's degree in Public Health Journalism. She covers groundbreaking medical research, holistic wellness trends, mental health awareness, and nutritional science.