Topic 105: Shells and Shell Scripting
8% of the examWhat this topic covers
Configure Bash login environments with variables such as PATH, using /etc/profile and user profiles. Create reusable Bash functions and maintain skeleton directories for new accounts.
Where should I put a PATH change so every Bash login shell picks it up?
Put the change in /etc/profile, because Bash reads that file at every login shell. Use export so the new PATH is passed to child processes. Shells started later from that session inherit it, but a shell that is not a login shell skips this file.