tags:

views:

15488

answers:

4

What should I type on the Mac OS X terminal to run a script as root?

A: 

sudo ./scriptname

Bob
+8  A: 

As in any unix-based environment, you can use the sudo command:

$ sudo script-name

It will ask for your password (your own, not a separate root password).

dF
A: 

sudo ./scriptname

sudo bash will basically switch you over to running a shell as root, although it's probably best to stay as su as little as possible.

Dana
A: 

In order for sudo to work the way everyone suggest, you need to be in the admin group.

jackrabbit