Finance[US] Career Guide Free Tutorials Go to Your University Placement Preparation 
0 like 0 dislike
2.7k views
in JECRC University B.Tech(CSE-III Sem) Linux Programming Lab by Goeduhub's Expert (7.6k points)

Study of .bashrc, /etc/bashrc and Environment variables

1 Answer

0 like 0 dislike
by Goeduhub's Expert (7.6k points)
edited by
 
Best answer

Study of .bashrc, /etc/bashrc and Environment variables

 The /etc/bashrc is executed for both interactive and non-interactive shells. /etc/bashrc or /etc/bash.bashrc is the systemwide bash per-interactive-shell startup file. Is is used system wide functions and aliases. However, environment stuff goes in /etc/profile file.the /etc/profile is executed only for interactive shells

.bashrc is a shell script that Bash runs whenever it is started interactively. It initializes an interactive shell session.

.bashrc runs on every interactive shell launch.

Following is the partial list of important environment variables :-

  1. DISPLAY : Contains the identifier for the display that X11 programs should use by default. 

  2. HOME : Indicates the home directory of the current user: the default argument for the cd built-in command.

  3. IFS : Indicates the Internal Field Separator that is used by the parser for word splitting after expansion.

  4. LANG : LANG expands to the default system locale; LC_ALL can be used to override this. For example, if its value is pt_BR, then the language is set to (Brazilian) Portuguese and the locale to Brazil.

  5. LD_LIBRARY_PATH : On many Unix systems with a dynamic linker, contains a colonseparated list of directories that the dynamic linker should search for shared objects when building a process image after exec, before searching in any other directories.

  6. PATH : Indicates search path for commands. It is a colon-separated list of directories in which the shell looks for commands.

  7. PWD : Indicates the current working directory as set by the cd command.

  8. RANDOM : Generates a random integer between 0 and 32,767 each time it is referenced.

  9. SHLVL : Increments by one each time an instance of bash is started. This variable is useful for determining whether the built-in exit command ends the current session.

  10. TERM : Refers to the display type

  11. VZ : Refers to Time zone. It can take values like GMT, AST, etc.

  12. UID : Expands to the numeric user ID of the current user, initialized at shell startup. 


For more JECRC University CSE-III Sem Linux Programming Lab Experiments Click Here


Learn & Improve In-Demand Data Skills Online in this Summer With  These High Quality Courses[Recommended by GOEDUHUB]:-

Best Data Science Online Courses[Lists] on:-

Claim your 10 Days FREE Trial for Pluralsight.

Best Data Science Courses on Datacamp
Best Data Science Courses on Coursera
Best Data Science Courses on Udemy
Best Data Science Courses on Pluralsight
Best Data Science Courses & Microdegrees on Udacity
Best Artificial Intelligence[AI] Courses on Coursera
Best Machine Learning[ML] Courses on Coursera
Best Python Programming Courses on Coursera
Best Artificial Intelligence[AI] Courses on Udemy
Best Python Programming Courses on Udemy

Related questions

 Important Lists:

Important Lists, Exams & Cutoffs Exams after Graduation PSUs

 Goeduhub:

About Us | Contact Us || Terms & Conditions | Privacy Policy ||  Youtube Channel || Telegram Channel © goeduhub.com Social::   |  | 

 

Free Online Directory

...