LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Distributions (https://www.linuxquestions.org/questions/linux-distributions-5/)
-   -   Bash commands (https://www.linuxquestions.org/questions/linux-distributions-5/bash-commands-19469/)

wprescott 04-25-2002 03:55 PM

Bash commands
 
I'm Relatively new to Linux - getting there sloooowly:

In Redhat 6.5 I used to use commands such as shutdown . . .

Now in Redhat 7.2 I have to su - to get access to those commands.
This is causing a major problem at the moment because I'm
trying to set environment variables for JDK systems but when I
use setenv CLASSPATH . . . .
The system comes back with Bash: command not known.

Why can I no longer access these commands?

Cheers in advance

dorward 04-25-2002 04:09 PM

The shutdown binary is in the /sbin directory, under recent versions of Red Hat this is not placed in the default users path.

The simpliest way round this is to create a login shell when you su

Code:

su -

wprescott 04-25-2002 06:29 PM

Not really what I want to do
 
I don't want to keep logging into su -

I need to be able to run some of the commands. For example
I want to run the setenv command, even if I change to the
sbin directory I can't run it. Likewise with other commands such
as shutdown.

dorward 04-25-2002 09:51 PM

Edit your path to include /sbin and
Code:

man chmod
However most of the commands you shouldn't need as a normal user, which is why there are placed in the System BINaries directory in the first place.

mikek147 04-26-2002 03:28 AM

What shell are you using. setenv is a csh command for setting variables. If you're using sh, ksh or bash, you need to do:

export var_name=something

-mk

wprescott 04-26-2002 05:10 AM

Excellent - Now all I need to know is. . .
 
You are a star!!

I got lost in Java Documentation - I tried set, setenv, . . .

How do I remove that environment variable?

unset myVariableName seems to work

God that one bogged me down!

[Linux is hard work for a newbie person but with the time
I save in not rebooting and reinstalling because of M$ apps
killing the machine it probably works out better - Damned
nice system.]

mikek147 04-27-2002 02:56 PM

Seems you didn't have to ask this last question, since you seem to have gotten it. Yes, unset is the command you use. -mk


All times are GMT -5. The time now is 12:36 PM.