PDA

View Full Version : How do you run things as root?



adamherb
01-16-2005, 01:22 AM
I know this sounds really stupid but how do you run scripts as root. i have an install if that makes a difference.

firebyrd10
01-16-2005, 01:26 AM
sudo command

or

su

if you want to stay root.

adamherb
01-16-2005, 04:09 PM
But say that I had a script in my home, called SCRIPT, then how would I run that as root.

KanotixUser
01-16-2005, 05:25 PM
But say that I had a script in my home, called SCRIPT, then how would I run that as root.

sudo ./script
or if you are not in the sudoers list

su
enter root password if needed
then
./script

the file has to be executable
chmod +x script

linux is case sensitive, so if it is SCRIPT you must type it as such.