LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 08-13-2002, 02:47 PM   #1
northfield
LQ Newbie
 
Registered: Aug 2002
Location: UK
Distribution: mandrake, redhat
Posts: 29

Rep: Reputation: 15
What is my shell?


What is the command to find out what shell I am running.
I am setting up Java development kit from Sun and need to set the path, I need to edit "****" file and add the path to the bin directory.

But I do not know what my shell is?????
Nor do I know the name of the file????
 
Old 08-13-2002, 03:36 PM   #2
IceNineJon
Member
 
Registered: Jun 2002
Location: Los Angeles, Ca, USA
Distribution: Mandrake 9.1
Posts: 82

Rep: Reputation: 15
Type "env" and look for the line "SHELL=______"

That will tell you not only your shell but where it's located.
 
Old 08-13-2002, 03:50 PM   #3
trickykid
LQ Guru
 
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 234Reputation: 234Reputation: 234
Doesn't sound like you need to know the shell, but how to edit your path. Type $PATH to find out your current user's path. To edit the path you can edit the files .bashrc and or .bash_profile in most cases if your using Redhat.
By default, Redhat will most likely be using bash as the shell.
 
Old 08-13-2002, 06:40 PM   #4
northfield
LQ Newbie
 
Registered: Aug 2002
Location: UK
Distribution: mandrake, redhat
Posts: 29

Original Poster
Rep: Reputation: 15
>Type "env" and look for the line "SHELL=______"

SHELL=/bin/bash/


I have done a search for the .bashrc file and found the file at two locations:
(1) etc/skel/.bashrc
(2) home/sid/.bashrc

Question:

(1) Do I make changes to the path on both files,

if the bin drirectory of the java development kit is at:
home/sid/j2sdk1.4.1/bin would I set up the path as:

PATH home/sid/j2sdk1.4.1/bin
 
Old 08-13-2002, 06:56 PM   #5
trickykid
LQ Guru
 
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 234Reputation: 234Reputation: 234
Quote:
Originally posted by northfield
>Type "env" and look for the line "SHELL=______"

SHELL=/bin/bash/


I have done a search for the .bashrc file and found the file at two locations:
(1) etc/skel/.bashrc
(2) home/sid/.bashrc

Question:

(1) Do I make changes to the path on both files,

if the bin drirectory of the java development kit is at:
home/sid/j2sdk1.4.1/bin would I set up the path as:

PATH home/sid/j2sdk1.4.1/bin
You should be ok in just editing the .bashrc file in the users home directory which in your case it would be /home/sid/.bashrc
 
Old 08-13-2002, 09:48 PM   #6
northfield
LQ Newbie
 
Registered: Aug 2002
Location: UK
Distribution: mandrake, redhat
Posts: 29

Original Poster
Rep: Reputation: 15
My bashrc has the following text:
#.bashrc

# user specific aliases and functions

# source global definations
if [-f /etc/bashrc]; then
. /etc/bashrc
fi


Where should I set the path????
Please helPPPPPPPPPPPPPPP



I have searched the web and read this URL: http://java.sun.com/products/jdk/1.2/install-linux.html and now TOTALY CONFUSED.
I just want to run java and javac commands. I have done this many times in windows??????
 
Old 08-13-2002, 10:56 PM   #7
A-dummy
Member
 
Registered: Jun 2002
Location: Kanpur,India
Distribution: RH-7.0 , 7.3
Posts: 130

Rep: Reputation: 15
put a line at the end of .bashrc file:
PATH=$PATH:/home/sid/j2sdk1.4.1/bin

save it.....open a new xterm(or konsole or whatever) & type
"echo $PATH" ......
 
Old 08-14-2002, 09:05 AM   #8
northfield
LQ Newbie
 
Registered: Aug 2002
Location: UK
Distribution: mandrake, redhat
Posts: 29

Original Poster
Rep: Reputation: 15
Thanx, I think I am on the last hurddle and should be okay after the changes are made.

How do I open the .bascrc file?

So far I have done a search for the file.
And then clicked on the file and it opened with konqueror.
The problem is, with konqueror I cannot write anything.

I also know that "." files are hidden so I have opened up an editor like gedit and browsed to /home/sid/ but cannot see it, how do I see it?
Is gedit okay to make the changes?
 
Old 08-14-2002, 09:43 AM   #9
northfield
LQ Newbie
 
Registered: Aug 2002
Location: UK
Distribution: mandrake, redhat
Posts: 29

Original Poster
Rep: Reputation: 15
Thanx guys made it work.
No need to respond to last post
I think I should be okay now, fingers crossed.
 
Old 08-14-2002, 12:34 PM   #10
northfield
LQ Newbie
 
Registered: Aug 2002
Location: UK
Distribution: mandrake, redhat
Posts: 29

Original Poster
Rep: Reputation: 15
OH dear new problem:
My problem is I cannot log into computer with user sid, I can log into system under root.

Here is my:
#.bashrc

# user specific aliases and functions

# source global definations
if [-f /etc/bashrc]; then
. /etc/bashrc
fi

export PATH=/home/sid/j2sdk1.4.1/bin


I was able to run java programs and compile. Then I logged off the system and went for a break. I came back after 1 hour but I was unable to log back into the system under user name "sid"

Please help.

Question:

When I am logged into as root the command prompt is
[root@localhost ...]#

How can I go into user "sid" then I can run the java tools I think? Although this is not ideal since under root user I cannot see all my desktop icons
 
Old 08-14-2002, 01:09 PM   #11
fIREfox
LQ Newbie
 
Registered: Aug 2002
Location: UK
Distribution: Gentoo
Posts: 7

Rep: Reputation: 0
When you try to login as sid, what error do you get?

Can you login as sid while logged in as root? Type 'su sid', and your password. Does the same happen?
 
Old 08-14-2002, 02:01 PM   #12
northfield
LQ Newbie
 
Registered: Aug 2002
Location: UK
Distribution: mandrake, redhat
Posts: 29

Original Poster
Rep: Reputation: 15
>When you try to login as sid, what error do you get?

No error,
It tries to log in as normal, that is the process when it checks for password etc and load the desktop. But it doesn't actually finish so the result is that I back to the login window. No matter how many time I enter user name "sid" and password, I don't actually get logged in.

>Type 'su sid', and your password.
[root@localhost root]$ su sid
[sid@localhost root]$ javac

This works.
However I am still logged in as root so do not have all my desktop icons, I think I would like to login as sid, but HOW?
 
Old 08-14-2002, 04:26 PM   #13
Mara
Moderator
 
Registered: Feb 2002
Location: Grenoble
Distribution: Debian
Posts: 9,568

Rep: Reputation: 164Reputation: 164
What does it mean that you can't log in? Check into /etc/passwd, line with 'sid:'. After last ':' in this file you have your shell, for example /bin/bash. Look if it is set correctly.
If you just can't log as sid because of password problems, log in as root and
passwd sid
to change the password.
 
Old 08-14-2002, 05:16 PM   #14
northfield
LQ Newbie
 
Registered: Aug 2002
Location: UK
Distribution: mandrake, redhat
Posts: 29

Original Poster
Rep: Reputation: 15
Problem I think was with

export PATH=$PATH:/home/sid/j2sdk1.4.1/bin

Where I didn't have the second $PATH after the equals sign
 
Old 08-15-2002, 04:55 AM   #15
fIREfox
LQ Newbie
 
Registered: Aug 2002
Location: UK
Distribution: Gentoo
Posts: 7

Rep: Reputation: 0
Your last comment being in past tense.... all ok now m8?
 
  


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
Difference between normal shell and login shell Manish Linux - General 7 11-14-2012 09:30 AM
Shell Scripting: Getting a pid and killing it via a shell script topcat Programming 15 10-28-2007 03:14 AM
'sh' shell - Actually calls legacy Bourne shell, or uses system default? Dtsazza Linux - Software 1 10-28-2005 10:20 AM
shell interface vs shell scripting? I'm confused jcchenz Linux - Software 1 10-26-2005 04:32 PM
[SHELL SCRIPT] Write at the right of the shell window Creak Linux - General 2 04-02-2004 04:00 PM


All times are GMT -5. The time now is 07:03 AM.

Main Menu
Advertisement
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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration