![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum Rules | FAQ | Contribute | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !! |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Basic variable questions | NycUnxer | UNIX for Dummies Questions & Answers | 6 | 02-28-2008 11:17 AM |
| Basic Aix Administration Questions... | NycUnxer | UNIX for Dummies Questions & Answers | 2 | 10-11-2007 09:51 AM |
| Basic Unix Questions | Kitchen Zinc | UNIX for Dummies Questions & Answers | 0 | 11-04-2005 03:46 PM |
| Basic SFTP questions | JohnRodey | UNIX for Dummies Questions & Answers | 1 | 09-28-2005 06:01 AM |
| basic UNIX questions | buk5d | UNIX for Dummies Questions & Answers | 3 | 04-04-2005 11:30 AM |
|
|
Submit Tools | LinkBack | Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
Some basic questions
Hi-
Newbie here with some basic questions: 1) I can't get alias to work. I tried alias ll='ls -al', but it doesn't work. When just typing 'alias', the new definition doesn't appear. I'm in a bash shell -- is that the problem. I tried switching to csh, but that didn't seem to help. This brings me to my second question. 2) How can I tell what shell I am in? I thought I was in the bash shell so I typed "csh". The shell prompt remained as $. Thanks |
| Forum Sponsor | ||
|
|
|
#2
|
|||
|
|||
|
I'm in the BASH shell, and your alias works fine for me. Are you using BASH, or just sh?
Also, are you using these aliases in the shell, or in a script? Aliases are usually turned off in scripts, but you can enable them with 'shopt -s expand_aliases'. You can tell what shell you're in like this: Code:
$ echo "${SHELL}"
/bin/bash
$
|
|
#3
|
||||
|
||||
|
'echo $0' will give you your 'current' shell interpreter.
Last edited by vgersh99; 10-02-2006 at 12:06 PM. |
|
#4
|
||||
|
||||
|
Quote:
Code:
$ echo $0 -bash $ echo $SHELL /usr/local/bin/bash $ csh >echo $0 csh >echo $SHELL /usr/local/bin/bash > |
|
#5
|
|||
|
|||
|
Why does this happen?
|
|
#6
|
||||
|
||||
|
quoting ''man bash':
Code:
SHELL The full pathname to the shell is kept in this environment vari-
able. If it is not set when the shell starts, bash assigns to
it the full pathname of the current user's login shell.
|
||||
| Google The UNIX and Linux Forums |