LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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!

Notices


Reply
  Search this Thread
Old 01-24-2003, 10:18 AM   #1
salparadise
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, 10:30 AM   #2
Mik
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, 05:40 PM   #3
jglen490
Member
 
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>

exit

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


Reply


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 09:12 PM
cd,ing to directory texasjailer Linux - Newbie 1 06-17-2004 01:45 PM
S*[t-r]+[ing]?g gr33ndata Programming 10 03-13-2004 06:15 AM
Hopefully a quicky modem question.... Fusioncases Linux - Hardware 2 09-30-2003 01:36 AM
Quicky: searching for files in directory hierarchy leeman_s Linux - General 1 01-25-2003 11:22 AM


All times are GMT -5. The time now is 09:05 AM.

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