Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
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.
Hi all,
I've been using Mandrake Linux for a few months now but still don't know the different files.
For example, I know fstab and mtab have something to do with filesystems and xf86config is what I edited to get my mouse wheel working.
What exactly are fstab and mtab and what is the difference between them?
Also which file contains the path? I've heard of running a command to add something to the path but can't I just edit a file? I prefer that.
Which scripts are run every time my system boots? I've heard of rc.d for Redhat in another forum but is it the same for Mandrake?
Is there a file equivalent to autoexec.bat in Windows?
If it's for your user create/edit (depending on how
you invoke your shell) a) ~/.bashrc and put an
export statement like the above in it, or b) create
~/.bash_profile and put the above statement in it
or c) create both, put above statement in one, and
Code:
if [ -x <other_file> ]; then
source <other_file>
fi
in the second :}
Quote:
Which scripts are run every time my system boots? I've heard of rc.d for Redhat in another forum but is it the same for Mandrake?
Is there a file equivalent to autoexec.bat in Windows?
Thanks for the reply Tinkster.
So fstab contains the config for the devices, right? I understood about the path.
Can I add my own things to inittab?
Are there any other interesting files I should know about?
Thanks
Umm, no, it just points you to the "real" thing... don't
change any of the files it points to directly, either,
unless you're 100% you know what you're doing,
or how to recover from what you did ;)
In my case (Slackware) it's rc.M
# Script to run when going multi user.
rc:2345:wait:/etc/rc.d/rc.M
Mandreck and DeadRat will probably look
somewhat different ...
Quote:
Are there any other interesting files I should know about?
Basically EVERYTHING in /etc is interesting,
they're pretty much all configuration files or
system scripts (with a few exceptions).
There are files which run when you log in, and there are different files which run every time you start a new shell. For the bash shell, man bash will give you the details of /etc/profile /etc/bashrc ~/.bashrc ~/.bash_profile and ~/.bash_logout. If you use a different shell, there will be different scripts.
There are scripts in /etc/init.d which may be run when booting up. These tend to be scripts that control the daemons (services) which run in the background.
The equivalent to "autoexec.bat" on Mandrake systems is the following file:
etc/rc.d/rc.local
You can edit it to add what you like, but don't remove anything that's already in there.
As for setting the path, Mandrake does it in a very convoluted way, and no one except Mandrake is really sure where the *master* PATH is set (r.csysconfig plus a bunch of other files... IIRC)
However, your best bet to edit the PATH for your own purposes is just to add to the PATH variable in
.bash_profile
You have to be careful about the differences between rc.local and .bash_profile, .bashrc etc...
The bash files run when you launch a new shell (terminal window, console, command line whatever you like to call it...) whereas rc.local runs everytime the machine starts up.
Originally posted by beejayzed Hey wait a minute, you're also from New Zealand. Never noticed that.
Yep, well, not exactly from, but in sunny Wellington :}
As for the files: Even though the things
JSchiwal pointed out are correct I consider
it bad practice to modify the ones in /etc because
of upgrades ... either a) your modifications will
be overwritten or b) you have to put them in
the upgraded file manually. The approach with
/etc/profile.d/ is CLEAN.
Okay I gather the following from these posts:
1. Autoexec.bat = /etc/rc.d/rc.local
2. Path = many places but I can edit .bash_profile, /etc/profile.d/, /etc/profile
3. fstab = config for devices, mtab = mounted devices.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.