Ash profile/configuration file

Ash first reads the following files (if they exist):

  • System: /etc/profile
  • User: ~/.profile

A non-login shell will also read a file if specified in the environment variable ENV.

So if you set that somehow (Maybe in your ~/.profile, or some other 'overarching' environment control), then any future forked shells will run that script. Very handy for non-login cases.

It's hard to find documentation on this, but it is confirmed to work on busybox-w32 (running on Windows). In fact it's hard to find good documentation on the featureset of ash at all.

UPDATE: There are a range of ash variants in the wild. 'ENV' may not work with all of them. There is some info on variants here: https://www.in-ulm.de/~mascheck/various/ash/

There is a suggestion in there that some ash variants may use 'SHINIT' in place of ENV.

Tags:

Profile

Ash