LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Terminal problems (https://www.linuxquestions.org/questions/linux-newbie-8/terminal-problems-377201/)

teto 10-26-2005 04:13 PM

Terminal problems
 
I'm a newbie in this area, but i'm tring to learn, I've got tutorials and stuff but my terminal only recognizes a few comands, recently i found out the "man" command and i saw that the commands exists (i thought that i'am a newbie and i don't know how to do it), but my terminal woun't do it . I'm using Fedora Core 4
i would realy aprecheate it


[Teto@localhost ~]$ su
Password:
[root@localhost Teto]# useradd Adrian
bash: useradd: command not found
[root@localhost Teto]# fdisk -l
bash: fdisk: command not found
[root@localhost Teto]# gftp
bash: gftp: command not found
[root@localhost Teto


??????????????????????

homey 10-26-2005 04:15 PM

When you do su, put a dash after it so you won't have a problem finding programs.
su -

teto 10-26-2005 04:55 PM

yeah
 
what can i say? :)
sorry to to bother u

but what does the dash "-" stands for?

homey 10-26-2005 06:28 PM

No bother at all! :)

The information from: man su says this...
Code:

    -, -l, --login
              make the shell a login shell

    A mere - implies -l.  If USER not given, assume root.

And googling around, I see this diddy.
"The - option establishes a default environment for the user."

So, if I just type: su fred, I am not really in the same place as if I typed su -l fred or even drop the l and just su - fred.

All you really need to know is that ( su - ) is what I always use so I don't have problems locating programs and commands as the root user.


All times are GMT -5. The time now is 10:59 PM.