I am on AIX 7.1.
I have a bunch of aliases defined in my personal .profile.
alias df='df -k'
alias cl=clear
alias h=history
alias ll='ls -al'
alias lt='ls -latr'
alias ls='ls -Fa'
alias psj='ps -ef | grep java'
If I issue a 'sudo su' or 'sudo su other_user' command, I am not able to use these aliases. I was under the impression that using a 'sudo su' without a '-' (sudo su -) would make me root while using my personal .profile?
jg10371@asdepdm1: /home/jg10371
$ ll
total 88
drwx------ 3 jg10371 unxusers 4096 May 29 09:21 ./
drwxr-xr-x 154 bin bin 12288 May 29 09:35 ../
-rw------- 1 root system 200 Jul 04 2010 .bash_history
-rw-r--r-- 1 jg10371 unxusers 1943 May 29 09:35 .profile
-rw------- 1 jg10371 unxusers 6944 May 29 09:36 .sh_history
drwx------ 2 jg10371 unxusers 256 May 28 11:06 .ssh/
-rw------- 1 jg10371 unxusers 44 May 28 12:21 .vas_disauthcc_9168
-rwx------ 1 jg10371 unxusers 28 May 28 12:21 .vas_logon_server*
-rwx------ 1 jg10371 unxusers 18 Mar 28 18:06 .vi_history*
jg10371@asdepdm1: /home/jg10371
$ sudo su
Password:
jg10371@asdepdm1: /home/jg10371
$ ll
ksh: ll: not found.
jg10371@asdepdm1: /home/jg10371
.profile
is only read for login shells. You should define aliases in.bashrc
not.profile
.