Exploring what the su command means

No readers like this yet.
Technology

Opensource.com

Do you still prefer using the command line to accomplish tasks on your Linux or UNIX based system?

For some, navigating the filesystem and firing off commands in a terminal window can be extremely productive. SSHing from one machine to another or running scripts in the background are everyday occurences for system administrators.

I was watching a conversation happen on a mailing list a few weeks ago about the "su" command. There was some debate about what it meant and, in fact, a history lesson started—gotta love some of the shared knowledge you discover on mailing lists.

As we discover and use technology, we learn different ways to do things or different ways to accomplish the same thing. Let's explore more about the "su" command. How did you first learn about it and what do you think it stands for?

Avatar
Jason Hibbets is a Community Director at Red Hat with the Digital Communities team. He works with the Enable Architect, Enable Sysadmin, Enterprisers Project, and Opensource.com community publications.

10 Comments

Well.. since I mostly run Linux on headless servers, and manage them remotely... yes, I prefer ssh and the command line :-)

Since I started using Android devices 15 months ago, I've been wishing I had a good, usable SSH and terminal window. (I'm sure there are, I just haven't found them yet.) Why: I post on numerous forums, and when I post pics (screenshots of issues, or watch glamor pics on watch enthusiast sites), I prefer to link to images on my domain vice attaching them in the forum site's dB. On a desktop, this is trivially easy, just ssh to the domain, get the full link to the image, and preface with http. On a tablet (an increasingly useful way of consuming and participating in community discussions), I have to do various kinds of tap-hold, copy, paste, edit, fudge it, rinse, repeat ... taking three to four minutes longer. "Patience is a virtue," some say. So's a keyboard, I say.

Touch screens and handhelds are marvelous until you hit the brick wall of something you want to do which actually involves more than 140 characters. (sigh)

I have been using "ConnectBot" .on my tablets and phones.

shadow-utils

I have always thought of it as "set user", but I guess that is pretty similar to "switch user".

I use a simple GUI DE (LXDE) most of the time, but I do many things at the command line. I do most file manipulation from the CLI, also package management. I use a CLI app for IRC (irssi).

GUI's are there so I can see more terminals efficiently than a single TTY and screen.

I like the command line. I am confortable with it, but I am not as productive as people who use the GUI for browsing the file system.

I learned long, long ago su = switch user. It allows one to change to any other user if the password is known. By default it switches to the super user hence some think su means super user. Supply a user id argument to switch to that user. I sometimes do that.

find and tree are great tools for browsing the file system.

I guess "switch User" would be correct in a Windows environment or a Plymouth/XOrg thing as "switch user" really makes a switch between 2 sessions spawned from the same parent process.
However, whatever the meaning, su creates a new child session from the current session, even inheriting from the current environment (when omitting the '-' in "su -"). Therefore, it would mean something like "Spawn Session Using UID". Sorry for the stuttering...

For what it's worth:

Under Debian Linux, man su yields:
su - change user ID or become superuser

Under MacOS (BSD derived, delivers BSD man pages), man su yields:
su -- substitute user identity

Creative Commons LicenseThis work is licensed under a Creative Commons Attribution-Share Alike 3.0 Unported License.