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.
When in Win98 on my Dell Dimension, I have become all too familiar with the CTRL-ALT-DEL key combination as the last refuge of scoundrels. When everything going to pieces and all is frozen, one can (most times) bail out with CTRL-ALT-DEL, bringing up a dialog box to shut down applications, or to reboot the computer. Rarely, even that doesn't work and I just have to turn off the power, then turn it back on again, and wait for scandisk to do its thing.
Now I have a dual-boot system, Libranet linux 2.8.1 on the linux partition. I know linux is legendary for its stability and lack of need for reboots. But I'm curious: if one *really* gets into trouble on Linux and needs to "bail out," what are the options? In other words, what is the equivalent of CTRL-ALT-DEL? And the equivalent of turning off the power? (I assume just turning off the power switch is a bad idea, but what would happen if you did?)
Crap, I am not fimilar with Libranet or IceWM...umm someone else want to take this with IceWM? Look through help files, look in find files search the forum do something but look for something like "Force Quit"
In most cases, even if your X session is totally screwed you should still be able to go in one of the virtual consoles (CTRL+F1-6 by default) and kill the offending process, or CTRL+BACKSPACE to force X to shutdown. Unlike Windows, it is very unlikely that a crash in user space application can bring down the whole system along with it *cough* explorer *cough*.
I think when a single program hangs in linux, the system is most probably still running stablely in the background, so what u need to do is just to open another terminal window, i.e. xterm, and type in the command "$ ps -aux" to list the names of all running programs...
if you know the name of the program, type "$ps -aux | grep program-name" instead to ease the hassle of looking for the hanged program. When you found the name of the hanged program, there is a process id associated with it. Just type "$ kill process-id" to stop the hanged program. But be aware not to kill certain important programs.
If the window manager itself hangs(I havent met this before...), press "Ctrl-Alt-F<n>" where <n> is a number from 1 to 6 usually to bring out the text-based login prompt. Log in and do the above.
OK, I think that bit about how to get a terminal window no matter what else is happening is very useful. Didn't know that. As a corollary: once I have the terminal window, what command will shut down the entire computer and turn it off (gracefully)?
OK, I'm getting some more experience with this "mayday" shutdown stuff.
Running Libranet 2.8.1.
I created user accounts for all my kids, and now they like to play with Tuxpaint (a drawing program), and they have all put images on their desktop backgrounds, and they like to run xpenguins, which makes little penguins roam all over the screen, no matter what else you are doing. I don't know if these are standard Linux things, or if they are unique to Libranet. (Libranet is Debian-based, as I understand it.)
Anyway, if all those things are running, and they go to logout, the whole system hangs. Logout does not progress to conclusion. No buttons respond to mouse clicks. CPU load monitor goes basically to zero. But tuxpaint and the little penguins keep right on going. CTRL-F1 (or -F2, or F-anything) does not open up a terminal window. CTRL-backspace and CTRL-escape do nothing.
I can right-click on the desktop and get a popup menu, that lets me open a terminal window. I can kill some processes, but others seem to survive the kill command and reappear with my next ps command. When I type shutdown now, or shutdown -h now, in that terminal, I am told that shutdown command does not exist. If I type /sbin/shutdown now, I am told I must be root to do that. Switching to root and then doing /sbin/shutdown now gets me logged out, but I can't be letting all the kids have the root password.
So my two questions: Why does my system hang/freeze like that? And I still need a foolproof, reliable way of extricating myself, as a simple user (not root) from this situation.
I will post this to Libranet forum too, of course.
I also use Red Hat 9 although I use Gnome instead. On both of my computers, X-Windows can be shut down by pressing <CTRL><ALT><BACKSPACE>. I hold down <CTRL><ALT> simultaneously and then at the same time I press the <BACKSPACE> key once. Gnome and X-Windows will then be shut down in a rather forefull manner. At that point I find myself in the text mode and am still able to use command line commands. If that works you will most likely find that Linux is still working fine but that your problem had only been a problem with running something under X-Windows.
At that point you can restart X-Windows and your window manager by typeing startx. It will most likely be working OK at that point. I should add that I have very rarely found it necessary to do that.
i can't answer all your questions, but i hope this helps. if you lock up the keystrokes are
<Ctrl>+<Alt>+<F1> . you can use F1, etc to F6, you have 6 virtual terminals at your disposal. all can be in use at the same time doing diffrent stuff, by different peole, if you like the command line that much, most don't. i'm half and half. anyway to get back, press <Alt>+<F7>. if
doesnt work, try
kill -9 processnumber
this should kill it outright, as a last resort, use
kill -KILL processnumber
because the -KILL option is fairly destructive, as in, it doesn't give a process any chance to close open files or network connections, as it closes them forcefully. you should use it sparingly, but effectively.
the issue of why
shutdown - h now
doesnt work sometimes is because you logged on as a normal user, then presumably used su to become root. this only opens a sub-shell within the normal user shell. so you have to give the
/sbin/shutdown -h now
command instead. if you log on as root initially,
shutdown - h now
will suffice. i hope this was of help
I misread which distro you were using, although most of these kinds are not disto specific. Two of the commands that you mentioned can only be run when logged in as root. GlobeTrotter makes a good point about needing to use the su commnand to temporarily gain root priveledges.
Do all keyboard commands still work in that situation? If so then knowing all the keyboard shortcuts might be helpfull. Your window manager can probably be run without the help of a mouse. A couple of weeks ago I had an occasional, hard to track down hardware problem with my mouse (it was half unplugged). I had to figure out how to run nearly everything in Gnome without the help of a mouse. The mouse problem is now fixed.