Send to a Friend

bomyne's avatar

How do I get my bash script to fail if it's being run as root?

Asked by bomyne (639points) May 23rd, 2010

I’m writing a bash script and I want to make sure it fails to run if the root user is the one running it. How do I do this?

Using Fluther

or

Using Email

Separate multiple emails with commas.
We’ll only use these emails for this message.