Profiles: Difference between revisions

From Hackepedia
Jump to navigationJump to search
No edit summary
No edit summary
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
All users on a system have the ability to customize their [[environment]] to their taste.  This can involve choosing a [[shell]] such as bash, zsh, or tcsh, setting the environment, shell aliases, or running scripts at startup.  These tasks are all handled by various "profile scripts".
All users on a system have the ability to customize their [[environment]] to their taste.  This can involve choosing a [[shell]] such as bash, zsh, or tcsh, setting the environment, shell aliases, or running scripts at startup.  These tasks are all handled by various "profile scripts".
A detailed comparison of multiple shells can be found at https://mikemol.github.io/graphviz/refactor/sh/zsh/bash/2018/02/04/graphviz-sh-zsh-bash-refactor.html while a shorter, simpler comparison of basic options between <code>bash</code> and <code>tsch</code> is below.


There can be a fair amount of confusion as to what scripts are called, and  in what order (tcsh is especially bad in this regard).
There can be a fair amount of confusion as to what scripts are called, and  in what order (tcsh is especially bad in this regard).
Line 7: Line 9:
; [[image:bash_profile_scripts.png]]
; [[image:bash_profile_scripts.png]]
: [[bash profile image source | Image source]]
: [[bash profile image source | Image source]]
Another way to look at this information:
{|border=2
! *ENV*
! Interactive Login = Yes
! Interative Login = No
|-
! Login = Yes
|  <code>/etc/profile<br />~/.bash_profile</code>
|  <code>/etc/profile<br />~/.bash_profile<br />$BASH_ENV</code>
|-
! Login = No
| <code>/etc/profile<br/> ~/.bash_profile <br/>~/.bashrc</code>
| <code>$BASH_ENV</code>
|}
----




; [[image:tcsh_profile_scripts.png]]
; [[image:tcsh_profile_scripts.png]]
:[[tcsh profile image source | Image source]]
:[[tcsh profile image source | Image source]]

Latest revision as of 17:02, 4 February 2020

All users on a system have the ability to customize their environment to their taste. This can involve choosing a shell such as bash, zsh, or tcsh, setting the environment, shell aliases, or running scripts at startup. These tasks are all handled by various "profile scripts".

A detailed comparison of multiple shells can be found at https://mikemol.github.io/graphviz/refactor/sh/zsh/bash/2018/02/04/graphviz-sh-zsh-bash-refactor.html while a shorter, simpler comparison of basic options between bash and tsch is below.

There can be a fair amount of confusion as to what scripts are called, and in what order (tcsh is especially bad in this regard).

The profile scripts used by Bash (version 3) and tcsh (v6.13) look something like this:

Image source

Another way to look at this information:

*ENV* Interactive Login = Yes Interative Login = No
Login = Yes /etc/profile
~/.bash_profile
/etc/profile
~/.bash_profile
$BASH_ENV
Login = No /etc/profile
~/.bash_profile
~/.bashrc
$BASH_ENV




Image source