LinuxQuestions.org
Review your favorite Linux distribution.
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 11-15-2004, 04:57 PM   #1
chakkerz
Member
 
Registered: Dec 2002
Location: Brisbane, Australia
Distribution: a few...
Posts: 654

Rep: Reputation: 32
Determining which shell is in use


I'm guessing i'm going for the stupidest question of the month award, but:

How do i work out which shell i'm working in? I know that the default shell is set for ever user, and kuser shows me what shell is used for any particular user, but i notice that if you working as myself and i change to root (via su) coloring and so forth disappears (as in file type highlighting).

How do i check which shell i'm in, and is this change in color an intentional mode change ??
 
Old 11-15-2004, 05:12 PM   #2
gabeucsd
LQ Newbie
 
Registered: Nov 2004
Location: San Diego, CA
Distribution: RH 8/9
Posts: 4

Rep: Reputation: 0
Re: Determining which shell is in use

Hi chakkerz,
try the ps command.
If you look at the output below it shows you that bash is the shell running for both users (gabe and root).
also "echo $SHELL" will tell you what shell is running.
As far as the colors go, I'm not sure what the problem is. try typing export to see if the shell variable LS_COLORS is set or if the shell variable COLORS is set. you can do this by typing:
echo $LS_COLORS
echo $COLORS

[/CODE]
[root@koso gabe]# whoami
root
[root@koso gabe]# ps
PID TTY TIME CMD
860 pts/0 00:00:00 su
861 pts/0 00:00:00 bash
1193 pts/0 00:00:00 ps
[root@koso gabe]# exit
exit
[gabe@koso gabe]$ whoami
gabe
[gabe@koso gabe]$
[gabe@koso gabe]$ ps
PID TTY TIME CMD
818 pts/0 00:00:00 bash
1195 pts/0 00:00:00 ps
[gabe@koso gabe]$
[/CODE]

--gabe
 
Old 11-15-2004, 05:47 PM   #3
chakkerz
Member
 
Registered: Dec 2002
Location: Brisbane, Australia
Distribution: a few...
Posts: 654

Original Poster
Rep: Reputation: 32
Ahh ... sweet ... i knew it had to be something simple ... Thanks for that.
 
  


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
Shell: Tar files: programmatically determining the name of the target directory stefanlasiewski Programming 3 08-17-2005 08:48 PM
determining shell abk4523 Linux - Newbie 2 06-09-2005 08:28 AM
Determining current shell subu_s Programming 11 01-04-2005 07:10 AM
determining if shell is local connection or remote SaxyWeed Linux - General 3 01-26-2004 11:17 PM
Determining IP bluethundr Linux - Newbie 1 08-11-2003 11:16 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 02:34 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
Open Source Consulting | Domain Registration