Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

For example:

nginx and php-cgi are in the defaults run level, and they are not started yet.

What's the command to start them all, instead of starting then individually?

I know there is a command, but I totally forgot it.

share|improve this question

You may run this command as root:

# rc

That should do the trick. ;)

share|improve this answer

Seems that rc-config + rc-status is an answer, with some shell scripting. Running

rc-config list default

lists all the scripts in the runlevel default. On the other hand, it uses colors and can mess things up, so an alternative app, rc-status, does the trick:

rc-status -nc default

shows all services from runlevel default without colors. We'll awk from this:

rc-config start `rc-status -nc default | awk -v ORS=" " '/^ .+\[ stopped  ]$/{print $1}'`

The regular expression pattern takes care that the entry must begin with a space, and end with "[ stopped ]". When run with some stopped services, the oneliner does what you want. If there aren't any, rc-config gives a simple syntax error, nothing happens.

I know this wasn't what you wanted, a single command, but it's easily wrapped in a script if you need it often! The programs lie in packages equery and baselayout so they should exist in every Gentoo installation.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.