LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


View Poll Results: What does the command su mean
Super User 32 33.68%
Substitute User 15 15.79%
Switch User 48 50.53%
Voters: 95. You may not vote on this poll

Reply
  Search this Thread
Old 03-11-2007, 10:36 PM   #1
custangro
Senior Member
 
Registered: Nov 2006
Location: California
Distribution: Fedora , CentOS , RHEL
Posts: 1,978
Blog Entries: 1

Rep: Reputation: 209Reputation: 209Reputation: 209
The meaning of SU...


What does the command su mean?

I just want to see how many people actually know what it means....
 
Click here to see the post LQ members have rated as the most helpful post in this thread.
Old 03-11-2007, 11:42 PM   #2
gilead
Senior Member
 
Registered: Dec 2005
Location: Brisbane, Australia
Distribution: Slackware64 14.0
Posts: 4,138

Rep: Reputation: 168Reputation: 168
According to the source code for su (line 138 onwards from su.c in shadow-4.0.3):
Code:
/*
 * su - switch user id
 *
 *      su changes the user's ids to the values for the specified user.  if
 *      no new user name is specified, "root" is used by default.
 *
 *      The only valid option is a "-" character, which is interpreted as
 *      requiring a new login session to be simulated.
 *
 *      Any additional arguments are passed to the user's shell. In
 *      particular, the argument "-c" will cause the next argument to be
 *      interpreted as a command by the common shell programs.
 */
 
Old 03-12-2007, 12:05 PM   #3
Daws
Member
 
Registered: May 2006
Location: UK
Distribution: Debian
Posts: 446

Rep: Reputation: 38
$ su -p

Silly & Unnecessary Polls.
 
2 members found this post helpful.
Old 03-13-2007, 02:43 AM   #4
jlliagre
Moderator
 
Registered: Feb 2004
Location: Outside Paris
Distribution: Solaris 11.4, Oracle Linux, Mint, Ubuntu/WSL
Posts: 9,781

Rep: Reputation: 481Reputation: 481Reputation: 481Reputation: 481Reputation: 481
Quote:
Originally Posted by gilead
According to the source code for su
That isn't su original source code, su was written by Dennis Ritchie and Ken Thompson in 1971.

This command original meaning and purpose was "super user" (from AT&T internal Unix source code, version 1 to 6) but evolved to "substitute user" in version 7, when the su command was changed to allow becoming any account, just not root. Version 7 su manual page states

Code:
su  -  substitute user id temporarily
"switch user" is almost synonymous, but doesn't appear in any Unix documents, so it can't be the correct answer IMHO.
 
Old 03-13-2007, 03:08 AM   #5
b0uncer
LQ Guru
 
Registered: Aug 2003
Distribution: CentOS, OS X
Posts: 5,131

Rep: Reputation: Disabled
I would have actually answered Something Usable but apparently it wasn't among the choices, so I had to take the other option (if everybody answered the correct answer, this wouldn't be fun).

I love the way unix systems take the Donald Duck abbreviations into use, I just hoped there were more of them
 
Old 03-13-2007, 04:26 AM   #6
h1tman
Member
 
Registered: Jul 2003
Distribution: Slackware 11
Posts: 439

Rep: Reputation: 30
I've always read it to be Subsitute user.
 
Old 03-13-2007, 05:50 AM   #7
Daws
Member
 
Registered: May 2006
Location: UK
Distribution: Debian
Posts: 446

Rep: Reputation: 38
Facetious replies aside, I would probably say super user.

http://cm.bell-labs.com/cm/cs/who/dmr/man13.pdf pg 17
 
Old 03-13-2007, 05:59 AM   #8
reddazz
LQ Guru
 
Registered: Nov 2003
Location: N. E. England
Distribution: Fedora, CentOS, Debian
Posts: 16,298

Rep: Reputation: 76
I've seen "switch user" and "substitute user" used a lot in Unix documentation, so I guess both are right.
 
Old 03-13-2007, 07:13 AM   #9
TigerOC
Senior Member
 
Registered: Jan 2003
Location: Devon, UK
Distribution: Debian Etc/kernel 2.6.18-4K7
Posts: 2,380

Rep: Reputation: 49
As stated the original Unix command, which was the first to use this, was used to become the super user (root). In adopting this, Linux it appears to have applied a more generic application of the command to switch user.
 
Old 03-13-2007, 08:24 AM   #10
jlliagre
Moderator
 
Registered: Feb 2004
Location: Outside Paris
Distribution: Solaris 11.4, Oracle Linux, Mint, Ubuntu/WSL
Posts: 9,781

Rep: Reputation: 481Reputation: 481Reputation: 481Reputation: 481Reputation: 481
The three answers are all valid:
- super-user was what the original unix command stands for, but never make it outside Bell Labs.
- substitute user is Unix version 7 definition, kept by all its descendants and sometimes but not always used as Synopsis in su manual pages.
- switch user is an alternative and technically valid definition found in Gnu su.c source code, which implement the same functionality as the version 7 Unix su. Gnu documentation is still using "substitute user" http://www.gnu.org/software/coreutil...#su-invocation.

Last edited by jlliagre; 03-13-2007 at 08:29 AM.
 
Old 03-15-2007, 04:28 AM   #11
Schrambo
Member
 
Registered: Mar 2004
Location: Western Australia
Distribution: Debian Slackware CentOS
Posts: 102

Rep: Reputation: 15
I've always known it as Super User or switch user. Mainly cause $su by itself defaults to the (SUPER!!!)root but of course specifying $su <user> you can switch to other users . All the other names for it just confuses things.
 
Old 03-15-2007, 04:44 AM   #12
hongsk
LQ Newbie
 
Registered: Aug 2005
Posts: 1

Rep: Reputation: 0
Quote:
Originally Posted by custangro
What does the command su mean?

I just want to see how many people actually know what it means....

SU = super user
 
Old 03-15-2007, 05:33 AM   #13
danebod
LQ Newbie
 
Registered: Dec 2004
Location: Dortmund/Germany
Distribution: SuSE , Knoppix, Mandriva, Kubuntu
Posts: 18

Rep: Reputation: 1
Linux man pages (online : click) reads:

Quote:
su - run a shell with substitute user and group IDs
And me stupid thought it meant Super User...

Last edited by danebod; 03-15-2007 at 05:36 AM.
 
Old 03-16-2007, 03:50 PM   #14
General Failure
Member
 
Registered: Jan 2007
Location: Germany
Distribution: Slackware 13.37
Posts: 387

Rep: Reputation: 36
Soviet Union!
 
Old 03-16-2007, 04:12 PM   #15
x-nc
Member
 
Registered: Feb 2007
Location: VA, USA
Distribution: CentOS, Fedora
Posts: 53

Rep: Reputation: 5
More fun with letters

Shut Up?

As in, "How can we shut this (l)user up?"

$ su -
$ cd </home/luser/>
$ rm -r *

 
  


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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Meaning of -R, --g, -G shipon_97 Linux - Newbie 1 11-23-2006 11:02 AM
mips: 32(sp) -- meaning? ashlesha Linux - Newbie 1 09-16-2006 12:13 AM
meaning of void* kpachopoulos Programming 3 10-12-2005 04:48 PM
What's meaning of ':=' in Makefile? cd7809 Programming 2 02-23-2004 01:30 AM
what is the meaning of the directories? ashrat2002 Linux - Newbie 7 01-09-2004 07:18 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 04:17 PM.

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
Open Source Consulting | Domain Registration