An interactive ksh
sources the file named in the environment variable $ENV
at startup if its EUID and UID match and $ENV
- after being subjected to shell expansions - evaluates to the name of a readable file. And so if alias
es specified in your ~/.kshrc
are not loaded at runtime, then it is probably because it is not being sourced, and that is probably because it is not in $ENV
.
So your solution could be to put it in a file sourced before that - (such as /etc/profile
or ~/.profile
for ssh
login shells).
echo 'ENV=~/.kshrc' >> ~/.profile
alias su='su - '
.oh, that's not it.ksh
isn't sourcing your .rc. It needs to be put in$ENV
byssh
at login.