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

[{'answer_id': 74830, 'author': 'Bob Wintemberg', 'author_id': 12999, 'author_profile': 'https://Stackoverflow.com/users/12999', 'pm_score': 2, 'selected': False, 'text': '<p>sudo ./<em>scriptname</em></p>\n'}, {'answer_id': 74833, 'author': 'dF.', 'author_id': 3002, 'author_profile': 'https://Stackoverflow.com/users/3002', 'pm_score': 7, 'selected': True, 'text': '<p>As in any unix-based environment, you can use the <a href="http://xkcd.com/149/" rel="noreferrer"><code>sudo</code></a> command:</p>\n\n<pre><code>$ sudo script-name\n</code></pre>\n\n<p>It will ask for your password (your own, not a separate <code>root</code> password).</p>\n'}, {'answer_id': 74846, 'author': 'Dana', 'author_id': 7856, 'author_profile': 'https://Stackoverflow.com/users/7856', 'pm_score': -1, 'selected': False, 'text': "<p>sudo ./scriptname</p>\n\n<p>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.</p>\n"}, {'answer_id': 75016, 'author': 'jackrabbit', 'author_id': 3707, 'author_profile': 'https://Stackoverflow.com/users/3707', 'pm_score': 2, 'selected': False, 'text': '<p>In order for sudo to work the way everyone suggest, you need to be in the <code>admin</code> group.</p>\n'}, {'answer_id': 5622489, 'author': 'Rob B', 'author_id': 141325, 'author_profile': 'https://Stackoverflow.com/users/141325', 'pm_score': 4, 'selected': False, 'text': '<p>Or you can access root terminal by typing sudo -s</p>\n'}]
['https://Stackoverflow.com/questions/74829', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/877/']