Linux Shell

Shell Environments

Linux shell is made up of components that can be customized to the user’s preference using:

  • VARIABLES: The most commonly customized part of the shell.
  • FUNCTIONS: Defines the core functionalities of the shell
  • ALIASES: Shortcuts

Shell Variables and settings

Global Profiles (All Users)

When invoked interactively with the –login option or when invoked as sh, Bash reads the /etc/profile instructions.

/etc/profile

  • /etc/profile.d/*.sh
  • the /etc/profile.d directory, which contains files configuring system-wide behavior of specific programs.
  • /etc/profile.local

etc/bashrc contains system-wide definitions for shell functions and aliases.

/etc/bash.bashrc

  • /etc/bash_completion.d/*.sh
  • /etc/bash.bashrc.local

These files might not be in your home directory by default; create them if needed.

User specific profiles

  • ~/.profile
  • ~/.bashrc
  • ~/.alias

Comment

Your email address will not be published. Required fields are marked *

Vivaldi