What are these files?
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? Thanks to everone in advance. |
Re: What are these files?
Quote:
mtab holds the actual values for currently mounted devices... Quote:
put a shell-script in /etc/profile.d/ and set the path's there ... e.g.: my_paths.sh Code:
#!/bin/sh 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 Quote:
Cheers, Tink |
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 |
Pleasure mate :)
Quote:
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:
they're pretty much all configuration files or system scripts (with a few exceptions). Cheers, Tink |
So, which file can I edit to add my own things?
|
Hey wait a minute, you're also from New Zealand. Never noticed that.
|
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. |
Alrighty, now I know a bit more :)
|
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. |
Quote:
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. Cheers, Tink |
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. Many thanks to everyone helped. |
Got that right mate :)
Cheers, Tink |
All times are GMT -5. The time now is 06:21 AM. |