[Courses] [Networking] Lesson 1

Telsa Gwynne hobbit at aloss.ukuu.org.uk
Thu Mar 20 15:15:18 EST 2003


On Thu, Mar 20, 2003 at 09:11:14PM +1100 or thereabouts, Sue Stones wrote:
> On Thu, 20 Mar 2003 03:40 am, Hamster wrote:
> > LESSON 1 - Welcome!
> ## Homework ##
> 
> > 1. If you don't understand the difference between "su" and "su -", have a
> > read of the manpage for su (man su) and write to the list asking about
> > things in the manpage you don't understand.
> 
> I did that, but I didn't understand the answer.  So I tried it out.
> "su" loged me in as root, and left me in the current directory
> "su -" put me into the /root directory (the eqivalent of "su" followed by cd)
> 
> I would have thought it would be more usefull to be in the / directory.

That's your home directory. Your home directory is stored in $HOME.
If you type "printenv" it will print out lots of such things. These
are environment variables, and set up your environment for you. Try
'printenv' after 'su' and 'su -' and you'll see differences. Two 
very important differences: 

  * If you su from one account to another, trying to read the new 
    account's email gets different results with 'su' and 'su -'.

  * root has extra directories on its path.

Some distributions also alias rm to "rm -i" for the root account but
not for most user accounts. (Varies by distro, obviously.)

Telsa


More information about the Courses mailing list