C Board  

Go Back   C Board > Community Boards > Tech Board

Reply
 
LinkBack Thread Tools Display Modes
Old 02-05-2008, 04:01 AM   #1
Super unModrator
 
Join Date: Dec 2007
Posts: 321
What is the alternative for Ctrl+Alt+Delete in Linux Ubuntu ?

Well, you don't have to end tasks that often in Linux, but I had to once. I tried Ctrl+Alt+Delete but it didn't work. Is there a different shortcut key combination for that ?
abh!shek is offline   Reply With Quote
Old 02-05-2008, 04:06 AM   #2
Banned
 
Join Date: Nov 2007
Posts: 678
Code:
# do this
$ top
# read the process id of the process to kill
$ kill -KILL id

# do man kill
# i don't remember the kill command properly :D
manav is offline   Reply With Quote
Old 02-05-2008, 04:14 AM   #3
Cat without Hat
 
CornedBee's Avatar
 
Join Date: Apr 2003
Posts: 8,492
kill <pid>

or if that doesn't help

kill -KILL <pid>
__________________
All the buzzt!
CornedBee

"There is not now, nor has there ever been, nor will there ever be, any programming language in which it is the least bit difficult to write bad code."
- Flon's Law
CornedBee is offline   Reply With Quote
Old 02-05-2008, 04:17 AM   #4
Super unModrator
 
Join Date: Dec 2007
Posts: 321
what ? kill what ?
abh!shek is offline   Reply With Quote
Old 02-05-2008, 04:34 AM   #5
Kernel hacker
 
Join Date: Jul 2007
Location: Farncombe, Surrey, England
Posts: 15,686
Right, us "ps" or "top" to find the process ID (pid) of the task you want to end, then use "kill 1234", where "1234" is the pid of the task you want to end.

If that doesn't work [because the task is "stubborn"] you can try "kill -KILL 1234" (or the shorter form that does exactly the same thing "kill -9 1234").

--
Mats
__________________
Compilers can produce warnings - make the compiler programmers happy: Use them!
Please don't PM me for help - and no, I don't do help over instant messengers.
matsp is offline   Reply With Quote
Old 02-05-2008, 04:43 AM   #6
Super unModrator
 
Join Date: Dec 2007
Posts: 321
Quote:
Originally Posted by matsp View Post
Right, us "ps" or "top" to find the process ID (pid) of the task you want to end, then use "kill 1234", where "1234" is the pid of the task you want to end.

If that doesn't work [because the task is "stubborn"] you can try "kill -KILL 1234" (or the shorter form that does exactly the same thing "kill -9 1234").

--
Mats
Great! Now how do I get the pid ? and where to write the "kill pid" thing ? The command prompt won't open. The system was not responding at all!
abh!shek is offline   Reply With Quote
Old 02-05-2008, 04:52 AM   #7
Kernel hacker
 
Join Date: Jul 2007
Location: Farncombe, Surrey, England
Posts: 15,686
You get the pid from "ps" or "top", but it sounds like you have a bigger problem than that. If the system isn't responding, try "ctrl-alt-1" and see if you get a login prompt in text mode. If that doesn't work, then "big red switch" (power off) is the only answer, and you may have to hold the power-button in for a few seconds to make a forced power-down, if the OS is really dead.

--
Mats
__________________
Compilers can produce warnings - make the compiler programmers happy: Use them!
Please don't PM me for help - and no, I don't do help over instant messengers.
matsp is offline   Reply With Quote
Old 02-05-2008, 05:29 AM   #8
Cat without Hat
 
CornedBee's Avatar
 
Join Date: Apr 2003
Posts: 8,492
Suppose Firefox doesn't react. I do
ps -A
and get
Code:
...
 5821 ?        00:00:00 ruby
 6600 ?        00:00:00 gconfd-2
 6610 ?        00:00:00 mozilla-launche
 6619 ?        00:02:51 firefox-bin
 7330 ?        00:00:39 java
 7368 ?        00:00:01 konsole
...
This tells me that firefox-bin, the actual Firefox executable, has PID 6619. I can now send it a SIGTERM, asking it politely to quit right now, kthxbai.
kill 6619

If Firefox doesn't react because, for example, it hangs in deadlock and even signal handlers don't get through, I can send a SIGKILL, telling the OS to just kill the stupid thing.
kill -KILL 6619
__________________
All the buzzt!
CornedBee

"There is not now, nor has there ever been, nor will there ever be, any programming language in which it is the least bit difficult to write bad code."
- Flon's Law
CornedBee is offline   Reply With Quote
Old 02-05-2008, 05:32 AM   #9
Banned
 
Join Date: Nov 2007
Posts: 678
Quote:
Originally Posted by matsp View Post
. . . then "big red switch" (power off) is the only answer, and you may have to hold the power-button in for a few seconds to make a forced power-down, if the OS is really dead.
And people say that Microsoft makes bad Windows
manav is offline   Reply With Quote
Old 02-05-2008, 05:39 AM   #10
Cat without Hat
 
CornedBee's Avatar
 
Join Date: Apr 2003
Posts: 8,492
*shrug*
It's only bad device drivers that can lock up the computer so completely. And that goes for Windows, too.

Coincidently, the only driver I've had lock up the computer was the closed-source ATI driver.
__________________
All the buzzt!
CornedBee

"There is not now, nor has there ever been, nor will there ever be, any programming language in which it is the least bit difficult to write bad code."
- Flon's Law
CornedBee is offline   Reply With Quote
Old 02-05-2008, 05:47 AM   #11
Kernel hacker
 
Join Date: Jul 2007
Location: Farncombe, Surrey, England
Posts: 15,686
I have been using both Linux and Windows for several years. Despite what anyone says, there isn't any huge difference in stability - Windows XP and 2K, I've had uptimes of 150+ days [and the cause of reboot is usually either a software update or some kind of power failure or such]. Linux I've had more problems with hardware failure than with the OS crashing - it's really stable as long as you avoid experimental drivers [of which I've worked on several - and the uptime then is usually measured in single digit hours or even minutes].

I was at Windows Driver Developers Conference a few years ago. Microsoft has a pretty large database of all the faults reported against it's products [you know the box that says "Something failed, do you want to report this to Microsoft?"]. When the data has been classified, the biggest group of "faults" is in drivers, not surprisingly - there are many, many more lines of driver code than there are any other form of kernel code, bot in Linux and Windows.

Further, unsurprisingly, the biggest of that group, by a good margin, was graphics drivers.

--
Mats
__________________
Compilers can produce warnings - make the compiler programmers happy: Use them!
Please don't PM me for help - and no, I don't do help over instant messengers.
matsp is offline   Reply With Quote
Old 02-05-2008, 06:02 AM   #12
Banned
 
Join Date: Nov 2007
Posts: 678
yeah, i also feel that hardware vendors need to be more standardized, more disciplined and need to appoint better driver writer OR better yet just make their hardware open source.
manav is offline   Reply With Quote
Old 02-05-2008, 07:51 AM   #13
Super unModrator
 
Join Date: Dec 2007
Posts: 321
Quote:
Originally Posted by CornedBee View Post
*shrug*
It's only bad device drivers that can lock up the computer so completely. And that goes for Windows, too.

Coincidently, the only driver I've had lock up the computer was the closed-source ATI driver.
Bingo! I have ATI radeon graphics card. And that driver had already messed up the GUI of my Kubuntu partition.
abh!shek is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
blocking ctrl + alt + delete Bug Windows Programming 20 06-30-2003 04:42 AM
why is this prog crashing on delete? Waldo2k2 Windows Programming 2 12-04-2002 11:17 PM
Ctrl + Alt +Delete golfinguy4 Windows Programming 4 10-27-2002 07:46 PM
Problem need help Srpurdy C++ Programming 1 07-24-2002 12:45 PM
memory management... master5001 Game Programming 24 01-07-2002 05:50 PM


All times are GMT -6. The time now is 09:55 PM.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.3.2

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22