Gentoo Wiki


This article is part of the Tips & Tricks series.
Terminals / Shells Network X Window System Portage System Filesystems Kernel Other

By installing and administering your installation of Gentoo Linux you will have learned about how to add services to a specific runlevel, and how to start and stop those services.

But most users are not aware of some other nifty functions in the Gentoo initscripts that have the potential for making their lives easier in administering their Gentoo boxes.

Q: What to do if I can’t stop a service? What if the processes were killed but my system thinks they are still running?

A: Execute /etc/init.d/<service> zap to reset the status of the service.

Q: How do I figure out if a service is running or not?

A: /etc/init.d/<service> status will tell you the current status of the given service.

Q: And while we're at it, how can I see all services running?

A: rc-status lists all services that have been started and their current status.

Q: How to restart a service?

A: /etc/init.d/<service> restart restarts the service.

Q: How do I find out what other services have to be started when I want to use <service>?

A: /etc/init.d/<service> ineed will give you a list of services that need to be running before this service can be started.

Q: Which services need/depend on this <service>?

A: /etc/init.d/<service> needsme lists all services that depend on the service given.

For further information on how runlevels work in Gentoo Linux please take a look at the Initscript guide that is part of the Gentoo System Documentation.

From Gentoo Weekly Newsletter: October 18, 2004, reprinted with permission

--SmokesLikeaPoet 02:59, 12 Nov 2004 (GMT)

See Irssi Init Script for a working example.

Retrieved from ""

Last modified: Fri, 05 Sep 2008 08:47:00 +0000 Hits: 15,943