Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
first of all, make sure you have no "open" cd directory...meaning that you:
1) don't have any open window that displays the contents of the cd
2) if you work in a terminal/console, cd off from the cd-directory
3) any program is not reading anything from the cd
if you have the cd's file(s) open in any way or any app displaying them, you cannot umount the cd. this happens, for example, if you have moved yourself into the cd with "cd" command and try to umount the cd while still "being in there".
so if you're in a terminal, type
to go to your homedir and then umount. if you have some graphical app open like nautilus or konqueror that displays the cd, close it first or open some other location.
The CD-Rom will not umount or eject when it is used by a process. So, how do we find the processes using the cdrom and kill them?
1) Do an 'lsof /mnt/cdrom', and see these results:
COMMAND PID USER FD TYPE DEVICE SIZE NODE NAME
bash 3964 rsolomon cwd DIR 22,0 2048 615732 /mnt/cdrom/info
bash 8649 rsolomon cwd DIR 22,0 2048 585974 /mnt/cdrom/doc
lsof 8763 rsolomon cwd DIR 22,0 2048 585974 /mnt/cdrom/doc
lsof 8764 rsolomon cwd DIR 22,0 2048 585974 /mnt/cdrom/doc
2) To see the names of the process do a 'ps -A|grep 3964'. Replace 3964 with what ever is in the second column. The result will be something like:
3964 pts/10 00:00:00 bash
3) Kill the process. Either close the process directly do a 'kill -9 3964'. Of course killing processes is dangerous if you wanted to save data. Be careful.