LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 04-30-2016, 11:48 PM   #1
bluesclues227
LQ Newbie
 
Registered: Apr 2016
Posts: 25

Rep: Reputation: Disabled
Configuring configuration files


Hello LinuxQuestions people! I need help in understanding on how to know in what order configuration files run in. I already know that system-wide files run first, and then personal files run next. But what I'm having difficulty in grasping is the referencing of files, in the files (this is so I could better understand in which order files are being ran in, if they even relate to each other...) Also do I have know C code or BASH scripting, just so I could understand in what the order is, and which file sources what, etc? And lastly is it safe to call both system-wide files and personal files, system files? (As they both are on the system) Thanks in advanced!!

Last edited by bluesclues227; 05-01-2016 at 12:28 AM.
 
Old 05-01-2016, 01:56 AM   #2
hazel
Senior Member
 
Registered: Mar 2016
Location: Harrow, UK
Distribution: LFS, AntiX, Slackware
Posts: 3,406
Blog Entries: 9

Rep: Reputation: 1897Reputation: 1897Reputation: 1897Reputation: 1897Reputation: 1897Reputation: 1897Reputation: 1897Reputation: 1897Reputation: 1897Reputation: 1897Reputation: 1897
All configuration files are text files. They are neither scripts nor programs, so they are not written in bash or in C. They are just data files. So of course they don't "run" at all.

System configuration files are usually in the /etc directory. Your personal configuration files are in your home directory. There is an absolute rule that your personal configuration files take precedence in the sense that, wherever there is a difference, your version overrides the system version.

As to what you choose to call a "system file", that's up to you. Of course all these files are on the system. But most people use the term to describe the configuration files in /etc that apply to all users.
 
Old 05-01-2016, 02:28 AM   #3
bluesclues227
LQ Newbie
 
Registered: Apr 2016
Posts: 25

Original Poster
Rep: Reputation: Disabled
Ohh okay I get it now, except I don't understand when you say there's no code in these files... Because for instance when I type more /etc/profile it outputs what looks like code with comments, and "if then" statements and all that.. If that's not code then what would that be called?
 
Old 05-01-2016, 02:53 AM   #4
hazel
Senior Member
 
Registered: Mar 2016
Location: Harrow, UK
Distribution: LFS, AntiX, Slackware
Posts: 3,406
Blog Entries: 9

Rep: Reputation: 1897Reputation: 1897Reputation: 1897Reputation: 1897Reputation: 1897Reputation: 1897Reputation: 1897Reputation: 1897Reputation: 1897Reputation: 1897Reputation: 1897
Yes, you're right. /etc/profile and /etc/bashrc are scripts, written in bash. But they are the exception. As I've said, most configuration files are simply data files that programs read when they start up.

The personal equivalents of profile and bashrc are .bash_profile and .bashrc. You will find both of them in your home directory but, as their names begin with a period, they are hidden files and won't appear in directory listings unless you ask for them.

Feel free to edit your bash initialisation files as you like, for example to set personal aliases for commands. There are a lot of guides on bash scripting that you can read if you're interested. You could start with the bash info file.
Code:
info bash
 
Old 05-01-2016, 03:03 AM   #5
bluesclues227
LQ Newbie
 
Registered: Apr 2016
Posts: 25

Original Poster
Rep: Reputation: Disabled
Thank you so much it all makes sense now, thanks Hazel you're a life saver!!

Last edited by bluesclues227; 05-01-2016 at 03:06 AM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
System wide configuration parameters in configuration files (/etc, e.g.) Kromitvs Linux - Newbie 15 06-06-2013 05:11 PM
[SOLVED] Equivalent files in Arch configuration of services to Debian configuration... Alexvader Debian 2 10-17-2011 07:44 AM
Configuring Wireless Internet using Network Configuration Window difficulties jeriryan Red Hat 2 05-13-2008 06:19 PM
configuring Dns server configuration on mandriva 2008 kent157 Linux - Server 7 02-18-2008 09:35 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 08:01 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration