Currently it is set to run level 5 which means whenever the the machine get boot up it will end up displaying X console(Graphical User Interface).However I believe in working on non graphical environment i.e terminal and not so interested in graphical look of Linux.
So I have decided to change its run level to 3 .By doing this i will be able to start the machine in terminal rather than Graphical mode.
Need to modify /etc/inittab file.
modify following parameter
from
id:5:initdefault:
to
id:3:initdefault:
restart the machine
Recheck the runlevel by typing.
# runlevel
N 3
To Implement More security measures i went ahead doing some extra stuff.
(This is not so required if you the machine you are working is not intended for linux hardening purpose)
At this stage I was able to get terminal of machine after reboot
I wasn't satisfied at this stage as i was able to get the graphical console by merely typing
#init 5
So i searched google and find out that the reason for loading the graphical user interface was a script resided in
/etc/X11/prefdm
being called by system after executing
#init 5
So i renamed it thinking OS will fail in finding it when invoked by inittab file .
To my surprise i was able to get the terminal back even if i hit
#init 5
but then i realize i keep on getting following error lines.
INIT: cannot execute "/etc/X11/prefdm"
INIT: cannot execute "/etc/X11/prefdm"
INIT: Id "x" respawning too fast: disabled for 5 minutes
I found out the reason behind this was a line in /etc/inittab
x:5:respawn:/etc/X11/prefdm -nodaemon
(respawn The process will be restarted whenever it terminates)
Since the file prefdm was renamed and respawned the OS was keep on trying to execute it considering it is terminated.
Now i have made the above line commented and
removed execute bit of the file .
System is now behaving as i wish it would behave.
Now Even if i run
#init 5
it wont get into graphical mode.
I’ve desired to post about something similar to this on one of my blogs and this has given me an idea. Cool Mat.
ReplyDeletepython training in rajajinagar | Python training in btm | Python training in usa
Your good knowledge and kindness in playing with all the pieces were very useful. I don’t know what I would have done if I had not encountered such a step like this.
ReplyDeleteadvanced excel training in bangalore
Well you use a hard way for publishing, you could find much easier one!
ReplyDeleteJava training in Chennai | Java training in Bangalore
Java interview questions and answers | Core Java interview questions and answers
Great post! I am actually getting ready to across this information, It’s very helpful for this blog.Also great with all of the valuable information you have Keep up the good work you are doing well.
ReplyDeleteData Science training in rajaji nagar | Data Science with Python training in chenni
Data Science training in electronic city | Data Science training in USA
Data science training in pune | Data science training in kalyan nagar
It's a wonderful post and very helpful, thanks for all this information about Java. You are including better information regarding this topic in an effective way.Thank you so much.
ReplyDeleteJava training in Chennai
Java Online training in Chennai
Java Course in Chennai
Best JAVA Training Institutes in Chennai
Java training in Bangalore
Java training in Hyderabad
Java Training in Coimbatore
Java Training
Java Online Training
Thanks for your informative article,Your post helped me to understand the future and career prospects &Keep on updating your blog with such awesome article.
ReplyDeletehardware and networking training in chennai
hardware and networking training in porur
xamarin training in chennai
xamarin training in porur
ios training in chennai
ios training in porur
iot training in chennai
iot training in porur
Thanks for the blog. It was very useful.
ReplyDeleteLinux Course in Pune