• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

Solved learned about /etc/profile and ~/.profile files; what else?

clawhammer

Member

Thanks: 5
Messages: 91

#1
Can anyone recommend what other files like these I should read about that would help me understand whats going on in the console better? Using the bash shell. I'm a beginner. Thanks.

EDIT:________________

Thanks for all the suggestions.
 
Last edited:

ralphbsz

Aspiring Daemon

Thanks: 326
Messages: 765

#2
/etc/bash.bashrc, and ~/.bashrc. On various Linux distributions, also look in /etc/profile.d/*: the standard profile executes all files it finds in there, and some of them are huge. On a Mac, there is also the program path_helper.
 

Sensucht94

Active Member

Thanks: 144
Messages: 182

#4
Can anyone recommend what other files like these I should read about that would help me understand whats going on in the console better?
See also a couple of quick info sheets about envirinmental variables
As well as some useful man pages:
To learn how the virtual console (ttyv*) works in FreeBSD see:
Using the bash shell
Since you're on FreeBSD you'd better start learning first tcsh(1) instead :)
 

ralphbsz

Aspiring Daemon

Thanks: 326
Messages: 765

#5
Whether to use (ba)sh or (t)csh is a religious debate. Comparable to the emacs versus vi(m) debate. It is actually interesting to read various "position papers" on the web that argue in favor of one or the other shell, as long as you understand that many of the "facts" presented are really religious proselytizing.

Another thing: When writing shell scripts that are intended to be executed as if they were programs (stored, installed, used over and over), one really has two choices. Either say that one is always going to use one particular shell (say bash or tcsh), or try to make them portable. If one makes them portable, I think the best baseline is V7 shell. That's ancient, but all modern shells support that subset correctly. A good book about old shells would be a good primer.