IOS – Where is the bash profile on iOS

bashiosipadjailbreakterminal

Where is the bash profile on iOS, I am jailbroken and can't find the bash profile, I would like to create some aliases and edit it.

Best Answer

The profile used for shells on iOS is /private/etc/profile, however it is recommended to add your own profile file to /etc/profile.d/ which is sourced by the shell when /private/etc/profile is run, using the following script:

for i in /etc/profile.d/*.sh ; do
    if [ -r "$i" ]; then
        . $i
    fi
done

I don't know if adding ~/.bash_profile yourself will cause it to be automatically sourced.