LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
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 03-18-2004, 08:13 AM   #1
atirya_yodha
LQ Newbie
 
Registered: Mar 2004
Posts: 1

Rep: Reputation: 0
Finding information about the current shell


How do I find out the information about the current shell ?
ie , whether it is bash,csh or korn shell etc ?
The reason i ask this question is that i want to make the vi
editor commands to work on the command line . I tried using
set -o vi
but the shell says "set: Variable name must begin with a letter."
Does set -o vi work only with bash ?
I wanted to find out what is my current shell and accordingly make
vi editor commands to work on the shell command line for editing

Thanks,
Athirya
 
Old 03-18-2004, 08:18 AM   #2
snacky
Member
 
Registered: Feb 2004
Distribution: Debian
Posts: 286

Rep: Reputation: 30
1. "grep `whoami` /etc/passwd" to find out what shell you run at login.
2. If you're the only one on the system, "ps |grep sh" would be a reasonable way to find out what shell you're running at the moment.
 
Old 03-18-2004, 10:19 AM   #3
slakmagik
Senior Member
 
Registered: Feb 2003
Distribution: Slackware
Posts: 4,113

Rep: Reputation: Disabled
Code:
~
1008>> echo $0                                                                 
bash

~
1009>> set -o vi
Works fine with my bash - maybe you're not using bash. It probably is bash-specific.
 
Old 03-18-2004, 01:30 PM   #4
mightymouse
Member
 
Registered: Mar 2004
Posts: 31

Rep: Reputation: 15
most shells have a number of environment variables set to provided information about them. You can find out what shell you are using by typing "echo $SHELL". If you are using bach, then have a look at the man page, specifically the "bash variables" section.
 
  


Reply



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
finding information on image properties datatab1 Programming 4 10-07-2005 01:16 AM
How to get the current process information balasquare@yahoo.com Programming 4 09-29-2005 04:39 AM
Finding what the current desktop is ashusharma Programming 8 07-15-2004 09:01 AM
Need help finding information for Mandrake. CyberLord_7 Mandriva 3 10-15-2003 03:30 PM
Finding current load on the system kbeaver Linux - Newbie 2 09-04-2003 10:41 PM

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

All times are GMT -5. The time now is 08:58 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