Entry tags:
Setting an alias with BusyBox ash
I installed a VM with Alpine Linux. It uses BusyBox, including for the default shell,
I tried startup scripts of various names. No joy. They were ignored. The internet suggested that if I put the name of the script in an environment variable called
After poking around, all scripts in
Now I can set an alias in
Anyway, this post is mostly in case I ever need to do this again.
ash
. How do I set an alias?I tried startup scripts of various names. No joy. They were ignored. The internet suggested that if I put the name of the script in an environment variable called
ENV
, the named script would be run at shell startup. But where do I set *that*?After poking around, all scripts in
/etc/profile.d
get run, so I added /etc/profile.d/setashrc.sh
which just containsexport ENV=$HOME/.ashrc
Now I can set an alias in
~/.ashrc
but I'm wondering why there isn't some sort of default?Anyway, this post is mostly in case I ever need to do this again.