How to restart services on Linux box you’re not familiar with?

Posted by

One of the things that I inevitably run into when my group takes over some servers from another company or department and we haven’t set them up ourselves, is where everything is and how to start and restart services. One trick that I use a lot is to do a “history” and pipe it to grep.

If I know the server runs Apache but I’m not sure how they’re restarting it, you can usually do this to see:

Or to be super-pedantic, a case-insensitive grep:

The results actually tell me a lot about the system without having to dig around very far:

You can replace “apache” with whatever service you’re looking for.

Happy history grepping!

Leave a Reply

Your email address will not be published. Required fields are marked *