Operating System - HP-UX
1834485 Members
3394 Online
110067 Solutions
New Discussion

Do you know where these aliases is declared?

 
SOLVED
Go to solution
Lee Tae-kyung
Regular Advisor

Do you know where these aliases is declared?

Hi, everyone~~
The below aliases isn't declared in /etc/profile and $HOME/.profile.

#alias
history='fc -l'
integer='typeset -i'
local=typeset
mail=/usr/bin/mail
nohup='nohup '
r='fc -e -'
stop='kill -STOP'
suspend='kill -STOP $$'
type='whence -v'

I want to know where these aliases is declared.

Thanks many~~
I think I am a specialist in IT Korea^^. I am a programmer and SE and DBA
4 REPLIES 4
Michael Tully
Honored Contributor

Re: Do you know where these aliases is declared?

Aliases can be defined in a few files.
The login order is this way:
/etc/profile
$HOME/.profile
if korn shell
$HOME/.kshrc
if C shell
$HOME/.cshrc

It will depend on what the user's default shell is. Check the user entry in /etc/passwd

Regards
Michael
"When I have trouble spelling, it's called fat finger syndrome"
Anyone for a Mutiny ?
T G Manikandan
Honored Contributor

Re: Do you know where these aliases is declared?

Just check you have any script which is sourced at /etc/profile and $HOME/.profile.

Do check $HOME/.kshrc

If you are running csh then check /etc/csh.login and .cshrc and .login files

Revert
Con O'Kelly
Honored Contributor
Solution

Re: Do you know where these aliases is declared?

Hi

I believe most of the aliases you are talking about are compiled into the posix or korn shell (see man sh-posix or man ksh) and hence are not necessarily defined in .profile or /etc/profile.

Cheers
Con
Jdamian
Respected Contributor

Re: Do you know where these aliases is declared?

you can find the following paragrph in the man pages of ksh(1) and sh-posix(1):

The following exported aliases are compiled into the shell but can be unset or redefined:
autoload='typeset -fu'
command='command '
functions='typeset -f'
history='fc -l'
integer='typeset -i'
local=typeset
nohup='nohup '
r='fc -e -'
stop='kill -STOP'
suspend='kill -STOP $$'
type='whence -v'