Linux - NewbieThis 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
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Anyway, I wanted to make a certain wifi network work with Debian, so I searched up how to do this. One guide that worked basically had me go into the /etc/wicd/encryption/templates folder on my file system and create a file with no extension that looked like this:
name = PEAP with MSCHAPv2
author = ElitestFX
version = 1
require identity *Identity password *Password
-----
ctrl_interface=/var/run/wpa_supplicant
network={
ssid="$_ESSID"
scan_ssid=$_SCAN
key_mgmt=WPA-EAP
eap=PEAP
phase2="auth=MSCHAPV2"
identity="$_IDENTITY"
password="$_PASSWORD"
}
I then added a line with the name of the above file to another extension-less file called "active." This changed things in the program I was using (wicd). I was really amazed by this, I even changed the names of things in these files around to personalize some stuff.
Excuse my noob-ness, but what are these called? They literally allow for configuration of stuff in wicd, it's really awesome. Can I do this with any program in Linux? I want to learn more about how to work with these, but unfortunately Google searches don't really give me what I'm looking for (so maybe I got the name wrong).
What you have touched like a live-wire is the simple power of Unix-like operating systems, of which GNU/Linux is one!
It is refreshing to see a noob touch the awesomeness of it all and be excited - most simply complain about how hard it is!
A design constraint of *nix systems is that everything is text. Configuration data should be plain text, human readable and human editable. It is a core idea which when adhered to unleashes the power of the hardware and the OS!
These are just common config files, some may call them templates, but mostly they are called config files.
You can learn this for most programs, but sadly some newer programmers do not respect this as a design principle and think that they know better, so you sometime see things like "This file is machine generated - do not edit!".
If you like this approach then you might want to give Slackware a try! It is the most Unix-like Linux and you will never see any "Do not edit this file!" nonsense, you are encouraged to make it just they way you like it - great stuff!
Where would I learn how to write these? Are they all of the same language, or are specifications usually in a program's README file, or something like that? (Trying to think of writing these as programming.)
This is my first time being exposed to this. Would I be able to find more if I read about Unix-like systems?
Also, is editing these sorts of files also possible in OS X for Macs, since it's Unix-like? I know OS X is proprietary, so I wouldn't think they'd allow users to edit software like this.
Yes, they are usually just called configs or config files.
No they are not all alike, although there is quite a bit of shared style in many of them.
You really just have to learn what is recognized by each application, and of course read the man pages as a good place to start. Also the READMEs when they are available.
To get an overview of how many are commonly avaliable just look down the various paths in the /etc/ directory tree which is the main (but not only) location for system configs - but be careful about just trying to modify things - you can easily break your system too!
Some imporant ones to look at, just off the cuff:
Code:
/etc/hosts - see man hosts for details
/etc/resolv.conf - see man 5 resolv.conf
/etc/inputrc - controls many aspects of your shell behavior, see man readline for an introduction
/etc/profile.d/... - location of multiple configs for various applications
/etc/X11/... - runtime configs for the X server
In your home directory...
~/.bashrc
~/.bash_profile - these allow pretty much unlimited customization of your login shell, aliases, keymappings, startup progs...
~./.XDefaults
~./.XResources - Configs for X programs, terminals, colors, fonts, styles, actions
The possibilities are genuinely endless! Well worth learning your way around!
A great resource to learn Linux in general, and which will lead you to many common configs and their uses is the Rute User's Tutorial and Exposition.
OSX, I have no idea. It is built on a BSD Unix base but hides most of the empowering stuff from the poor user.
Last edited by astrogeek; 11-29-2015 at 03:39 AM.
Reason: tpos, typs, typos and added comments
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.