PDA

View Full Version : killall -i[id] init command working ?



Abdul_Haseeb
November 13th, 2015, 05:27 PM
when i use killall -1 init command in terminal it will give me an error that " init(1): Operation not permitted "

for i in `seq 1 100`;
do
killall -$i init
done

but the above script will kill some process. Can any one guide me what actually this command do and why it will restart my system when i run this script ?

After several runs of the script my system became halt, i want to know that reason ?

i am not using sudo permission.

Habitual
November 13th, 2015, 07:03 PM
init 1 : Single user mode or emergency mode means no network no multitasking is present in this mode only root has access in this runlevel

http://www.krishnababug.com/2009/04/what-are-init-0-init-1-init-2-init-3.html

Not a very 'smart' script. What are you trying to achieve?

Abdul_Haseeb
November 14th, 2015, 02:19 PM
i have an assignment to crash the kernel from user mode so i find this script that’s all. It is working but i want to know whats going on behind that ?

Habitual
November 15th, 2015, 02:00 AM
Well then, carry on!

Abdul_Haseeb
November 15th, 2015, 09:37 PM
can you guide me what that script is doing ? why and how this script crash my system ?

Habitual
November 15th, 2015, 11:03 PM
Sorry, I cannot.
And it is considered poor manners to send PMs to folks who haven't asked you to do so.

We're volunteers, not dedicated support staff.

Good day and good luck.

Abdul_Haseeb
November 16th, 2015, 04:25 PM
i just ask you for a help if you can not just ignore it. Is this a good manner to advices some one publicly? just think :) Good Day Sir

Habitual
November 16th, 2015, 05:54 PM
Is this a good manner to advices some one publicly?

Yes, lots of people read these posts, sometime years from now. So publicly saying "PMing is poor manners" publicly is doing not just you, but others a service.