Welcome to the most active Linux Forum on the web.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 01-24-2003, 09:18 AM   #1
Senior Member
Registered: Nov 2002
Location: Birmingham UK
Distribution: Various
Posts: 1,736

Rep: Reputation: 146Reputation: 146
just a quicky...(su-ing)

can anyone tell me if there's a difference between su and su root ?

and if there is, is it important ?

many ta's
Old 01-24-2003, 09:30 AM   #2
Senior Member
Registered: Dec 2001
Location: The Netherlands
Distribution: Ubuntu
Posts: 1,316

Rep: Reputation: 47
default if no name is specified is to su to the root user. So no there is no difference between those two commands.

There is however a difference in adding the - or not. Without it you won't really login as root and you won't get the root environment. So you would probably want to do 'su -' for most cases. Might want to read the man pages for more info.
Old 01-24-2003, 04:40 PM   #3
Registered: Apr 2002
Location: The next brick house on the right.
Distribution: Kubuntu 8.04
Posts: 668

Rep: Reputation: 31
Mik is absolutely correct.

With su, by itself, you get root permissions, but with su - you get the root path environment also. The difference being that without the path environment, finding and executing root permissioned executables becomes more of a problem.

What I always do when I need root access at the CLI when I'm my "normal" user:

su -

<Respond to password prompt>

<Do what I need to do>


And I'm back to my "normal"user.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
iso-ing a disk mimithebrain Linux - Software 9 07-04-2005 08:12 PM
cd,ing to directory texasjailer Linux - Newbie 1 06-17-2004 12:45 PM
S*[t-r]+[ing]?g gr33ndata Programming 10 03-13-2004 05:15 AM
Hopefully a quicky modem question.... Fusioncases Linux - Hardware 2 09-30-2003 12:36 AM
Quicky: searching for files in directory hierarchy leeman_s Linux - General 1 01-25-2003 10:22 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 05:51 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration