create command aliases for a user

Hi all,

I am using Solaris 10 OS on X86. When I add a new user from command

useradd -d /export/home/vikas -m -s /bin/bash vikas

files local.cshrc, local.login, local.profile and .profile get copied to my home directory (i.e. /export/home/vikas) from /etc/skel/

Which file I have to change to make command aliases and what is the format ?
for e.g. making alias of ls as ls -lrt.

Like in Linux, we have to change .bash_profile as

ls='ls -lrt'; export ls

to have this effect.

I tried this on local.profile and .profile but it wasnt working.

Also, suppose I need that each time a user logs in a script say /tmp/vikas.sh executes. How to achieve this ? Pls help !

Thanks and Regards,
Vikas

do a man alias

In your .profile
set ENV=~/.bashrc

In .bashrc
alias ll="ls -l"
and so on

The .bashrc is in your HOME (~) dir.
For more info see: man bash

Hope this helps,
Kind Regards,
Rene

format is

alias alias name='command'

Thanks all,

It worked by changing .profile

Regards,
Vikas