I’ve just found something new. By default, alias is working with tc id whiles doesn’t with root id. Please let me know how to load these alias setting in root as well.
tc@box:~$ alias
ls='ls -p'
cp='cp -i'
c='clear'
df='df -h'
reboot='sudo reboot'
rm='rm -i'
mv='mv -i'
la='ls -la'
du='du -h'
d='dmenu_run &'
ce='cd /etc/sysconfig/tcedir'
i='ifconfig | grep dd'
ll='ls -l'
tc@box:~$
tc@box:~$ sudo su
root@box:~# alias
root@box:~#
tc@box:~$ ls -la
total 12
drwxrws--- 3 tc staff 120 Aug 12 06:29 ./
drwxrwxr-x 3 root staff 60 Mar 4 2010 ../
-rw-rw-r-- 1 tc staff 2216 Aug 12 06:38 .ash_history
-rw-r--r-- 1 tc staff 517 Aug 12 05:46 .ashrc
drwxr-sr-x 3 tc staff 60 Aug 12 06:29 .local/
-rw-rw-r-- 1 tc staff 920 May 5 21:57 .profile
tc@box:~$
tc@box:~$ cat .ashrc
# ~/.ashrc: Executed by SHells.
#
. /etc/init.d/tc-functions
if [ -n "$DISPLAY" ]
then
`which editor >/dev/null` && EDITOR=editor || EDITOR=vi
else
EDITOR=vi
fi
export EDITOR
# Alias definitions.
#
alias df='df -h'
alias du='du -h'
alias ls='ls -p'
alias ll='ls -l'
alias la='ls -la'
alias i='ifconfig | grep dd'
alias c=clear
alias reboot='sudo reboot'
# Avoid errors... use -f to skip confirmation.
alias cp='cp -i'
alias mv='mv -i'
alias rm='rm -i'
alias d='dmenu_run &'
alias ce='cd /etc/sysconfig/tcedir'
tc@box:~$
root@box:~# cd ~
root@box:~# pwd
/root
root@box:~# ls -al
total 12
drwxrwxr-x 2 root staff 100 Aug 12 06:33 .
drwxrwxr-x 17 root staff 360 Dec 21 2012 ..
-rw-rw-r-- 1 root staff 248 Mar 4 2010 .Xdefaults
-rw------- 1 root root 83 Aug 12 06:35 .ash_history
-rw-rw-r-- 1 root staff 278 Aug 20 2012 .profile
root@box:~#
I’ve also found that there is no .ashrc file in root. Should I create one to fix this issue?