LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions
User Name
Password
Linux - Distributions This forum is for Distribution specific questions.
Red Hat, Slackware, Debian, Novell, LFS, Mandriva, Ubuntu, Fedora - the list goes on and on...

Notices

Reply
 
Search this Thread
Old 04-25-2002, 03:55 PM   #1
wprescott
LQ Newbie
 
Registered: Apr 2002
Location: Cheltenham UK
Distribution: Redhat 7.2
Posts: 3

Rep: Reputation: 0
Question 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
 
Old 04-25-2002, 04:09 PM   #2
dorward
Member
 
Registered: Sep 2001
Distribution: Gentoo
Posts: 760

Rep: Reputation: 31
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 -
 
Old 04-25-2002, 06:29 PM   #3
wprescott
LQ Newbie
 
Registered: Apr 2002
Location: Cheltenham UK
Distribution: Redhat 7.2
Posts: 3

Original Poster
Rep: Reputation: 0
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.
 
Old 04-25-2002, 09:51 PM   #4
dorward
Member
 
Registered: Sep 2001
Distribution: Gentoo
Posts: 760

Rep: Reputation: 31
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.
 
Old 04-26-2002, 03:28 AM   #5
mikek147
Member
 
Registered: Mar 2002
Location: Elyria, Ohio
Distribution: Debian, Nothing else required
Posts: 141

Rep: Reputation: 15
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
 
Old 04-26-2002, 05:10 AM   #6
wprescott
LQ Newbie
 
Registered: Apr 2002
Location: Cheltenham UK
Distribution: Redhat 7.2
Posts: 3

Original Poster
Rep: Reputation: 0
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.]
 
Old 04-27-2002, 02:56 PM   #7
mikek147
Member
 
Registered: Mar 2002
Location: Elyria, Ohio
Distribution: Debian, Nothing else required
Posts: 141

Rep: Reputation: 15
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
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
bash commands davatar Slackware 2 04-06-2005 03:05 AM
i need help with some newbie bash commands Alexander.s Programming 14 12-24-2004 02:33 PM
bash commands Obie Linux - Security 4 08-15-2004 02:42 PM
Help with BASH Commands rridler Linux - Newbie 3 04-16-2004 04:43 PM
Bash commands PhuckFonix Linux - Newbie 2 03-30-2004 07:13 PM


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

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration