Jump to content

What are main Linux configuration files?


ilia_kr
 Share

Recommended Posts

Maybe this question was answered allready id different topics but i want to centralize the answers here.

What are main Linux configuration files and where are they on a disc, so one could edit them from CLI rather from MCC?

 

I know about these:

 

- /etc/samba/smb.conf -> samba configuration

- /etc/X11/xorg.conf or Xfree86.conf -> X server configuration

 

I would like to know:

- internet connection

- USB configure

- sound fonfigure

- anything else ...

 

thanks

Link to comment
Share on other sites

There are quite a lof of config files and you example shows just hopw many, I mean who would use Samba? Only people with large windows networks presumably. It all depends what you feel is important.

 

The best trick for this is probably just to look in the the package manager and look under files,

Lots of packages have more than one file, like apache has httpd.conf, apache.conf and probably a include.conf etc. but you can quickly spot them here.

 

Another good idea is using find ... if you are playing with drak tools then run find /etc -atime 1 and see all hte files modified.

 

USB and Sound is handled by modules ...

 

Your idea is good I would just advise you try package by package instead of overall because there are a bewildering array of files and its easy to be overwhelmed.

Link to comment
Share on other sites

Let me refraze myself: :D

I want to learn to configure the systerm without using distro specific tools like MCC, so if i change a distro, i still would be able to tune it my way. I know that Gentoo, Slackware and Arch for instance do not have GUI configuring tools, that is why they considered to be for advansed users.

The basic step is to enable internet connection so i could get help online.

- How do i setup this kind of connection lets say in Mandriva or Fedora by using CLI?

- What are basic & usefull configuration programs/scripts common to all major linux distributions?

 

Thanks

Link to comment
Share on other sites

I doubt you'll find any scripts that are common to all distros. Why? I'll show you:

 

Networking:

 

RPM distros - normally in /etc/sysconfig/network-scripts (ifcfg-eth0 example of a file)

Gentoo - /etc/conf.d/net (this file holds the config)

Arch - /etc/rc.conf (this holds quite a lot of stuff, modules, daemons, etc)

 

The script wouldn't necessarily know what distro your using and therefore wouldn't be able to do what you want it to do. That's why each distro has it's own gui tools or CLI tools to do the job.

 

Your easiest way is to install a distro and learn it. That way you know where everything is, and you'll know how to configure RPM distro's, Gentoo, Arch or whatever. You say you want to learn, you'll have to install to learn it. That's what I've done.

 

One thing that is standard between Linux is the "ifconfig" utility. You can use this to configure your network connection. Then you can use the "route" command to set the default gateway. This is only active for the system until you reboot, but it's common between each version.

 

man ifconfig
man route

 

will help you with parameters.

Link to comment
Share on other sites

Let me refraze myself: :D

I want to learn to configure the systerm without using distro specific tools like MCC, so if i change a distro, i still would be able to tune it my way. I know that Gentoo, Slackware and Arch for instance do not have GUI configuring tools, that is why they considered to be for advansed users.

The basic step is to enable internet connection so i could get help online.

- How do i setup this kind of connection lets say in Mandriva or Fedora by using CLI?

- What are basic & usefull configuration programs/scripts common to all major linux distributions?

 

Thanks

Nope that's cool... what I mean is you need to choose an item at once. Config files look frightening but are not anything but a bunch of text.

Distro's move them a little, that is they may have subdir's under /etc or like arch gruop them but overall the syntax is the same :D

The nice thing is once you learn it you just need to find the file independant of distro (with a couple of exceptions that make it deliberatly difficult but from your post this isn't going to affect you)

 

I would recommend a second install, that way you can mess about at will and if you break anything you can get online and ask for help:D you can also boot up and copy a config from the working distro....

 

Another tip is keep copies of the whole /etc directory, I make frequent tar's and gzip them and stick them on a second disk... I can then copy these into new installs etc. since I don't like having to redo my config files everytime ....

 

I would honestly recommend debian because its somewhere between what you want. apt-get will configure the whole thing but you can set the prompt level of dpkg to verbose and it informs you every conf file being overwritten etc. and asks if you want to keep one or not... this is great to fix a botched file .. you just fdo a apt-get install --reinstall and the config files are reset.

 

You can keep two mandrakes too. If you dual boot your fist file to edit is the /etc/lilo.conf or grub.conf :D

 

 

Your specific question depends on your network interface... i.e. if its modem, broadband or direct ethernet through a router.

For modem and broadband with a ppp connection you need /etc/ppp

If you want for instance broadband through a pppoe connection you can use the pppoe conf tool. Most distro's use this in the background anyway. Experiment with tools like webmin .. you can add an interface then use find on the /etc directory to see what changed for what you did.

 

This is largely how I learned....

 

Once you get used to the CLI its often easier than the GUI... you know what to change so you only need to find it... like adding a new interface is (in deb) is all in /etc/network ...

as an example if you want a static IP edit the interfaces and replace dhcp with the IP.... for the interface you want.

 

When you want something activated at boot you write a small script (or more likely edit one) in /etc/init.d and you simple symlink this to a link in /etc/rcx.d/S_ (where x is the run level you want it to run at) and then K_ for ones you want stopping in that run level....

 

Start off with things like cups which is pretty simple and you play about, edit a bit and then you can use cupsconfig to check what you did in a GUI... ir edit in the GUI and see what happenes in the config file :D

 

Its just spotting the stuff. Learn to use grep and find, especially together ..

find /etc  -print | xargs grep  'eth0';

To find all occurences of files containing eth0

 

or

find .  -a 1 -print | xargs grep  'eth0'

files containing eth0 accessed in the last 1x24 hours period....

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...