LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 09-03-2008, 05:55 PM   #1
taurusx5
Member
 
Registered: Jan 2008
Posts: 424

Rep: Reputation: 30
How Do I Turn Services Off?


I recently installed sysv-rc-conf and I want to know how to turn off services. I have ubuntu 8.04.

.

Last edited by taurusx5; 09-03-2008 at 06:36 PM.
 
Old 09-03-2008, 06:06 PM   #2
matthewg42
Senior Member
 
Registered: Oct 2003
Location: UK
Distribution: Kubuntu 12.10 (using awesome wm though)
Posts: 3,530

Rep: Reputation: 65
What distro are you using, and which services do you want to turn off?
 
Old 09-03-2008, 06:37 PM   #3
taurusx5
Member
 
Registered: Jan 2008
Posts: 424

Original Poster
Rep: Reputation: 30
Quote:
Originally Posted by matthewg42 View Post
What distro are you using, and which services do you want to turn off?
hey matthew, we meet again. In reply to your question, I got ubuntu 8.04. And I want to turn off uneeded services.

.
 
Old 09-03-2008, 06:43 PM   #4
j.todd
Member
 
Registered: Feb 2008
Location: Michigan
Distribution: Debian GNU/Linux Unstable
Posts: 144

Rep: Reputation: 16
# aptitude install rcconf
# rcconf
 
Old 09-03-2008, 07:07 PM   #5
matthewg42
Senior Member
 
Registered: Oct 2003
Location: UK
Distribution: Kubuntu 12.10 (using awesome wm though)
Posts: 3,530

Rep: Reputation: 65
When you say services, there is a little room for confusion. The term "service" is mostly used in the windows world, and in that context I believe it refers to those background processes which do "stuff" of various kinds like Windows Update, Messenger, Windows Time Service.

On unix systems "services" usually refers to daemon processes which listen on some port, e.g. sshd, telnetd, a web server and so on.

There is some cross over, but it is not an exact match.

By default, Ubuntu comes with relatively few services running. Do this to list them:
Code:
sudo netstat -tulp
It is of course very difficult for me to know what you do or do not need. Please post the output of the command above and say which of them you know you need, which you are unsure of, and which are not needed, and we can go into detail with each on to work out what to do.

Further to these services, there are also some daemons which run and do not listn for incoming connections from other machines. For example, gdm, the graphical login manager.

These are all the domain of the init system, which can be managed with the tool j.todd suggested, or by changing settings in /etc/default/.

There is one more category of programs - those which your window manager starts when you log in. Are you using gnome? If so, there is a tool for managing these programs.
 
Old 09-04-2008, 02:44 AM   #6
taurusx5
Member
 
Registered: Jan 2008
Posts: 424

Original Poster
Rep: Reputation: 30
Quote:
Originally Posted by matthewg42 View Post
When you say services, there is a little room for confusion. The term "service" is mostly used in the windows world, and in that context I believe it refers to those background processes which do "stuff" of various kinds like Windows Update, Messenger, Windows Time Service.

On unix systems "services" usually refers to daemon processes which listen on some port, e.g. sshd, telnetd, a web server and so on.

There is some cross over, but it is not an exact match.

By default, Ubuntu comes with relatively few services running. Do this to list them:
Code:
sudo netstat -tulp
It is of course very difficult for me to know what you do or do not need. Please post the output of the command above and say which of them you know you need, which you are unsure of, and which are not needed, and we can go into detail with each on to work out what to do.

Further to these services, there are also some daemons which run and do not listn for incoming connections from other machines. For example, gdm, the graphical login manager.

These are all the domain of the init system, which can be managed with the tool j.todd suggested, or by changing settings in /etc/default/.

There is one more category of programs - those which your window manager starts when you log in. Are you using gnome? If so, there is a tool for managing these programs.
Hey, Matt. According to what sysv-rc-conf is showing me, I've got more than 15 services running. I basically know which ones to turn off. I just don't know how to properly turn them off in sys-rc-conf.

.

.
 
Old 09-04-2008, 04:00 AM   #7
matthewg42
Senior Member
 
Registered: Oct 2003
Location: UK
Distribution: Kubuntu 12.10 (using awesome wm though)
Posts: 3,530

Rep: Reputation: 65
Which services do you want to turn off?
 
Old 09-04-2008, 12:23 PM   #8
taurusx5
Member
 
Registered: Jan 2008
Posts: 424

Original Poster
Rep: Reputation: 30
Quote:
Originally Posted by matthewg42 View Post
Which services do you want to turn off?
Hey matt. I've got a bunch I want to turn off. My question to you is, how do I properly turn them off in sysv-rc-conf?

.
 
Old 09-04-2008, 12:39 PM   #9
matthewg42
Senior Member
 
Registered: Oct 2003
Location: UK
Distribution: Kubuntu 12.10 (using awesome wm though)
Posts: 3,530

Rep: Reputation: 65
It depends. Which ones?
 
Old 09-04-2008, 02:02 PM   #10
farslayer
LQ Guru
 
Registered: Oct 2005
Location: Northeast Ohio
Distribution: linuxdebian
Posts: 7,247
Blog Entries: 5

Rep: Reputation: 191Reputation: 191
Simply type sysv-rc-conf in your shell with no parameters..

Then just use the arrow keys to move the service and runlevel you want to enable or disable use the space bar to toggle the entry. an X means the service will run at that runlevel, no X means it will not. These changes will not take effect until the run level is next changed (such as the next time you start your PC)

using + or - will immediately stop or start the currently selected service

I'm kind of curious why the question though since when you run sysv-rc-conf the directions for it's use are right on the screen....
http://likunarmstrong.googlepages.com/sysv-rc-conf.png


for further instructions see man sysv-rc-conf

Last edited by farslayer; 09-04-2008 at 02:03 PM.
 
Old 09-04-2008, 02:02 PM   #11
djjoshuad
Member
 
Registered: Apr 2007
Location: Corinth, TX
Distribution: CentOS, RHEL, SLES, ubuntu
Posts: 44

Rep: Reputation: 15
I'm sure he means daemons, not services. The proper usage of the term service was "reclaimed" by windows years ago, and even though the the rest *nix world held onto the original definition for a long time, RedHat did not. And since RedHat is a major contender in the enterprise linux world... other distros have buckled and the term "service" no longer means what it used to.

to understand the usage of a typical command, use "man <typical command>". Or, see the sourceforge page for sysv-rc-conf for documentation: http://sysv-rc-conf.sourceforge.net/
 
Old 09-05-2008, 12:23 AM   #12
taurusx5
Member
 
Registered: Jan 2008
Posts: 424

Original Poster
Rep: Reputation: 30
Quote:
Originally Posted by farslayer View Post
Simply type sysv-rc-conf in your shell with no parameters..

Then just use the arrow keys to move the service and runlevel you want to enable or disable use the space bar to toggle the entry. an X means the service will run at that runlevel, no X means it will not. These changes will not take effect until the run level is next changed (such as the next time you start your PC)

using + or - will immediately stop or start the currently selected service

I'm kind of curious why the question though since when you run sysv-rc-conf the directions for it's use are right on the screen....
http://likunarmstrong.googlepages.com/sysv-rc-conf.png


for further instructions see man sysv-rc-conf
Hey farslayer how are you? It seems that I keep asking the same question and although I'm getting answers, I never seem to get the answer I need. It's weird.

I'll ask it again in an easier way. Here it goes...

1) How do I disable services in sys-rc-conf? Someone said that it depends on the service. Fine. Here's a list of services I want disabled. Now I want to know HOW to TURN THEM OFF.

2) Is there a list of services for ubuntu 8.04 that tells me what services to safely turn off?

- anacron
- vbesave
- mdadm
- rsync
- nvidia kernel
- pcmcia
- apmd
- bluetooth



.

Last edited by taurusx5; 09-05-2008 at 12:40 AM.
 
Old 09-05-2008, 03:43 AM   #13
matthewg42
Senior Member
 
Registered: Oct 2003
Location: UK
Distribution: Kubuntu 12.10 (using awesome wm though)
Posts: 3,530

Rep: Reputation: 65
Finally you answered the question - "what do you want to turn off?". I don't really understand why you were being so evasive about giving people the information they need to advise you properly. Help us help you!

Right, now the services, one at a time:
  • anacron. It is generally not wise to turn off your cron daemon. It keeps the filesystem's tmp area clean and performs other essential tasks like rotating the logs which, if they do not run for an extended period, will eventually lead to system instability (because the drive will fill up). If you still wish to do this (i.e. you have some other strategy for doing system maintenance tasks), you can use sysv-rc-conf to disable the daemon in all runlevels (see below for exactly how to do it). A better approach would probably be to check which cron jobs you really need to run, and disable those jobs which you don't need (e.g. re-building the slocate database and perl documentation index).
  • vbesave. If you don't need DPMS video hardware functionality, just use sysv-rc-conf to disable it.
  • mdadm - I don't know about this one. If you don't need it though, why is it installed? It's not installed on my system. Maybe uninstall it rather than disable the service.
  • rsync - nothing special - just use sysv-rc-conf if you don't need it.
  • nvidia kernel - if you don't use the proprietary nvidia drivers, you might as well completely uninstall them, rather than disable the service. Use synaptic or another apt front end to do this.
  • pcmcia - nothing special.
  • apmd - nothing special.
  • bluetooth - nothing special.


Using sysv-rc-conf to disable/enable services
First understand what a runlevel is, and check out what the different runlevels are used for in debian/ubuntu.

To include/exclude programs from the various runlevels, you can use the tool sysv-rc-conf. Note that you can also do it manually by creating/deleting appropriately named links in the various /etc/rcn.d directories (where n is the runlevel) - sysv-rc-conf just provides a more noob friendly interface to this activity.

Run it from a terminal/console. You should run it as your primary user (or from any other user account which is in the admin group on your Ubuntu system):
Code:
sudo sysv-rc-conf
Down the left side you should see a list of service names, along the top the numbers of the various runlevels.
Work our which runlevels you want to disable/enable your service in, and using the cursor keys, navigate to the appropriate position in the grid, and use the space key to toggle whether or not to run the service. I believe you can also click on grid squares to toggle values. Note that changes made in sysv-rc-conf are instantaneous - there is no "save changes" or "undo changes" option. The ^n hint at the bottom of the page, which tells you how to page down, means "press control-n".

Note that many services can also be disabled by editing files in the /etc/default directory. For example, tor may be disabled by editing the file /etc/default/tor and changing the value of RUN_DAEMON to "no".
 
Old 09-05-2008, 04:58 PM   #14
taurusx5
Member
 
Registered: Jan 2008
Posts: 424

Original Poster
Rep: Reputation: 30
Quote:
Originally Posted by matthewg42 View Post
Finally you answered the question - "what do you want to turn off?". I don't really understand why you were being so evasive about giving people the information they need to advise you properly. Help us help you!

Right, now the services, one at a time:
  • anacron. It is generally not wise to turn off your cron daemon. It keeps the filesystem's tmp area clean and performs other essential tasks like rotating the logs which, if they do not run for an extended period, will eventually lead to system instability (because the drive will fill up). If you still wish to do this (i.e. you have some other strategy for doing system maintenance tasks), you can use sysv-rc-conf to disable the daemon in all runlevels (see below for exactly how to do it). A better approach would probably be to check which cron jobs you really need to run, and disable those jobs which you don't need (e.g. re-building the slocate database and perl documentation index).
  • vbesave. If you don't need DPMS video hardware functionality, just use sysv-rc-conf to disable it.
  • mdadm - I don't know about this one. If you don't need it though, why is it installed? It's not installed on my system. Maybe uninstall it rather than disable the service.
  • rsync - nothing special - just use sysv-rc-conf if you don't need it.
  • nvidia kernel - if you don't use the proprietary nvidia drivers, you might as well completely uninstall them, rather than disable the service. Use synaptic or another apt front end to do this.
  • pcmcia - nothing special.
  • apmd - nothing special.
  • bluetooth - nothing special.


Using sysv-rc-conf to disable/enable services
First understand what a runlevel is, and check out what the different runlevels are used for in debian/ubuntu.

To include/exclude programs from the various runlevels, you can use the tool sysv-rc-conf. Note that you can also do it manually by creating/deleting appropriately named links in the various /etc/rcn.d directories (where n is the runlevel) - sysv-rc-conf just provides a more noob friendly interface to this activity.

Run it from a terminal/console. You should run it as your primary user (or from any other user account which is in the admin group on your Ubuntu system):
Code:
sudo sysv-rc-conf
Down the left side you should see a list of service names, along the top the numbers of the various runlevels.
Work our which runlevels you want to disable/enable your service in, and using the cursor keys, navigate to the appropriate position in the grid, and use the space key to toggle whether or not to run the service. I believe you can also click on grid squares to toggle values. Note that changes made in sysv-rc-conf are instantaneous - there is no "save changes" or "undo changes" option. The ^n hint at the bottom of the page, which tells you how to page down, means "press control-n".

Note that many services can also be disabled by editing files in the /etc/default directory. For example, tor may be disabled by editing the file /etc/default/tor and changing the value of RUN_DAEMON to "no".
Hi, Matt. Thank you so much for the lengthy reply. I read the wiki on the runlevel info from the link you provided. However, the info doesn't tell me at which runlevels I should turn off certain services in sysv-rc-conf. I'm still in the dark about this. Aren't there online guides that fully explain how to do this safely in ubuntu 8.04? I did see one webpage on how to do this but it was an old webpage and made for 6.10, so that doesn't qualify for 8.04, I'm sure.

.

Last edited by taurusx5; 09-05-2008 at 04:59 PM.
 
Old 09-05-2008, 05:21 PM   #15
matthewg42
Senior Member
 
Registered: Oct 2003
Location: UK
Distribution: Kubuntu 12.10 (using awesome wm though)
Posts: 3,530

Rep: Reputation: 65
Well, it depends... What are you using the system for? If you are using it as a regular desktop user, you probably don't use anything except runlevel 2.

If you don't know what runlevels you use, you only use 2. Don't worry about the others.

I suspect that if you don't know what you want yourself, you probably don't really know enough about the internals of the system to be turning off anything. What makes you think you should disable any services?
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How Do I Turn Off Services In sysv-rc-conf ? taurusx5 Linux - Software 1 09-02-2008 11:50 AM
how to turn off unwanted services in FC5 mystic_durle12 Linux - Newbie 3 08-13-2007 01:32 AM
added HDD in linux services failed to turn on swap krishna_kawhale Linux - Server 3 08-09-2006 10:58 PM
how to turn off services SpiderIRE Linux - Newbie 2 04-30-2006 05:35 PM
How to turn off Xserver in the gui and turn it off in the command line geminiviper Linux - Newbie 8 08-20-2004 08:05 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 03:38 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration