nixCraft Linux Forum

nixCraft

Linux Tech Support Forum

Ubuntu Set Default Runlevel /etc/inittab

This is a discussion on Ubuntu Set Default Runlevel /etc/inittab within the Linux software forums, part of the Linux Getting Started category; Hi everyone, As I read some linux books, and most of them are saying there are 6 run levels in ...


Go Back   nixCraft Linux Forum > Linux Getting Started > Linux software

Register FAQ Members List Calendar Forgotten your password? Mark Forums Read
  #1 (permalink)  
Old 06-05-2007, 08:22 AM
Member
User
 
Join Date: May 2007
Posts: 56
Rep Power: 2
lacloai is on a distinguished road
Default Ubuntu Set Default Runlevel /etc/inittab

Hi everyone,

As I read some linux books, and most of them are saying there are 6 run levels in linux. My Desktop computer is running on SuSe 10, which I can change the default run leve very easy by editting the file called /etc/inittab. However, I coudn't figure out how to do with Ubuntu. It looks like Ubuntu doesn't have /etc/inittab file . So, does anyone in here know how to change the default run level for Ubuntu 6.10 ? I mean to change it permanently so that it will boot straight to it. For example runlevel 3. I believe that there must be a file so that it can be modified for the certain runlevel. Please reply. I would like to know the idea/response or at least somebody will say something to make this forum a little bit more active. Thank you. Very apreciate that.
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 06-05-2007, 11:06 AM
nixcraft's Avatar
Never say die
User
 
Join Date: Jan 2005
Location: BIOS
My distro: Ubuntu
Posts: 1,036
Rep Power: 10
nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute
Default

There is not /etc/inittab file in Ubuntu because Ubuntu uses /etc/event.d/rc-default file

You can fix this problem by editing /etc/event.d/rc-default file
First backup file,
Code:
sudo cp /etc/event.d/rc-default /etc/event.d/rc-default.bakup
Open vi /etc/event.d/rc-default
Code:
sudo vi /etc/event.d/rc-default
Find all lines read as - telinit 2 and replace with telinit 3
Code:
telinit 3
Reboot the system
__________________
Vivek | My personal blog
Linux Evangelist
Play hard stay cool
Reply With Quote
  #3 (permalink)  
Old 06-06-2007, 08:54 AM
Member
User
 
Join Date: May 2007
Posts: 56
Rep Power: 2
lacloai is on a distinguished road
Default Hi

Thanks a lot for your reply. However, I can't change it to the way it works in SuSe. For instance, I can change it to boot straight to the command with no X server. All I do in SuSe is do this in /etc/inittab and make it like this id:3:initdefault

Looks like to me Ubuntu has only 2 runlevels. One is single user mode (that's is 1) and another is for all with GUI (that's is from 2 to 5). That's kind of turn me down. Say, if someone wants to use Ubuntu to run for a file server, and she/he only needs to run with full multiuser with network without GUI. That's impossible. Right? Because you can't change it to telinit 1 sine that is single user mode only. I like the traditional way like Redhat and SuSe, which have 6 runlevels. Also, after I modified the file in /etc/event.d/rc-default and change to telinit1 for single user mode, my machine didn't pass the reboot. It's hanging right before it loads windows manager.

I don't know if anyone in here know how to make Ubuntu boot straight to the command line without GUI involved? I heard about upstart? Did anyone use this kind of thing yet? Please helppppppppppp. Very appreciate that.
Reply With Quote
  #4 (permalink)  
Old 06-07-2007, 03:22 AM
tom tom is offline
Contributors
User
 
Join Date: Jun 2005
Location: London, UK
Posts: 213
Rep Power: 4
tom is on a distinguished road
Default

vivek is correct, there is no /etc/inittab file and /etc/event.d/rc-default is default upstart config file. After above modification type the command
Code:
sudo apt-get install rcconf
sudo rcconf
Turn off GDM or Gnome and save change and reboot the system. Rcconf allows you to control which services are started when the system boots up or reboots. It displays a menu of all the services which could be started at boot. The ones that are configured to do so are marked and you can toggle individual services on and off. So you will be dropped into text mode and no GUI.
Reply With Quote
  #5 (permalink)  
Old 06-09-2007, 07:54 AM
Member
User
 
Join Date: May 2007
Posts: 56
Rep Power: 2
lacloai is on a distinguished road
Default Hi

Thanks a lot for that. I'll give it a try this weekend and see how it goes. Very appreciate that.
Reply With Quote
  #6 (permalink)  
Old 11-09-2008, 10:13 PM
Junior Member
User
 
Join Date: Nov 2008
My distro: Ubuntu
Posts: 1
Rep Power: 0
mxyzptlk2063 is on a distinguished road
Default How to disable the GUI in Ubuntu

Hi,

I know this topic is slightly old, but I think maybe the next generations can learn from this:

lacloai posted this message long time ago:


"Say, if someone wants to use Ubuntu to run for a file server, and she/he only needs to run with full multiuser with network without GUI. That's impossible. Right? Because you can't change it to telinit 1 sine that is single user mode only."

Of course this is not true, and we should not quickly point people to download some magic "runlevel setup helper" tools. The original problem was to avoid loading GUI on boot. It was correctly answered how to change the default runlevel to level 3 under Ubuntu, but then you should only disable the gdm at runlevel 3 in the config files in order to get rid of the hated GUI like this:

1.) cd /etc/rc3.d
2.) sudo mv S30gdm K70gdm

This should do the trick. To get more info why you shall do it like this enter the command "cat /etc/rc3.d/README" and you'll get it.

May the GUI also be added to runlevel 2, you can also disable it in "/etc/rc2.d" like in the example above.

HTH,
Mx
Reply With Quote
  #7 (permalink)  
Old 11-18-2008, 06:42 AM
Junior Member
User
 
Join Date: Nov 2008
My distro: Ubuntu
Posts: 1
Rep Power: 0
pyeatman is on a distinguished road
Default

I'm surprised that no one suggested installing Ubuntu server (vs. desktop) which sounds to me to be what the original poster may be wanting.
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads

Thread Thread Starter Forum Replies Last Post
Default webpage anichhatre Getting started tutorials 3 07-13-2008 02:05 PM
howto update inittab amsreeku Linux software 2 09-02-2007 08:36 PM
Runlevel in Linux 009satya Networking, Firewalls and Security 4 03-06-2007 09:21 PM
Ubuntu Linux runlevel and its meaning Linux software 1 07-21-2006 12:28 AM
Default Route puppen Linux software 2 04-27-2006 12:33 AM


All times are GMT +5.5. The time now is 09:23 PM.


Powered by vBulletin® Version 3.7.4 - Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36