cancel
Showing results for 
Search instead for 
Did you mean: 

Unix commands

SOLVED
Go to solution
Francis Ancheta
Frequent Advisor

Unix commands

whenever I login and use a different account other than root I have problems running commands.

Scenario:

I loggin as xxx execute su to get root prev. run Iptables etc ... etc .. it won't work. But if I login in a different virtual screen using root I wont have any problems. ... I am now pissed off ... going from one screen to another. Isnt it that if you su you are suppose to get root prev.

I am a new user of Linux and I am not sure if Linux as environment settings for path like Windows.

Pls. help.
4 REPLIES
Francisco J. Soler
Honored Contributor
Solution

Re: Unix commands

Hi,

Try to use "su -" (without "")

this way you load the complete root enviroment.

Frank.
Linux?. Yes, of course.
Francis Ancheta
Frequent Advisor

Re: Unix commands

Right on the spot ... Thanks. My second question is there an environment equivalent of "Path" in Linux?
Claudio Cilloni
Honored Contributor

Re: Unix commands

I think your looking for the PATH environment variable. You can look its value in this way:

$ echo $PATH

that print the value of the variable; you can also use this:

$ env

that prints the whole environment variables set.

you can edit the PATH variable so (or just any variable):

$ export PATH=

remember that the ':' divides the entries in the PATH variable (I think it's ';' that does this in windows systems, if i'm not going wrong).
so, if you want add a new command search path:

$ export PATH=$PATH:

hth
Claudio
Caesar_3
Esteemed Contributor

Re: Unix commands

Hello!

The PATH in linux is the same variable name
as in UNIX systems -> $PATH

Caesar