LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This 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


Reply
  Search this Thread
Old 03-18-2004, 11:22 PM   #1
beejayzed
Member
 
Registered: Jan 2004
Location: Auckland, New Zealand
Distribution: Ubuntu
Posts: 686

Rep: Reputation: 30
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.
 
Old 03-19-2004, 12:29 AM   #2
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928
Re: What are these files?

Quote:
Originally posted by beejayzed
What exactly are fstab and mtab and what is the difference between them?
fstab is the configuration file (so to speak),
mtab holds the actual values for currently
mounted devices...

Quote:
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.
Sure can ... it it's meant to be global just
put a shell-script in /etc/profile.d/ and set
the path's there ... e.g.:
my_paths.sh
Code:
#!/bin/sh
export PATH=$PATH:/usr/java/bin:/usr/local/pgsql/bin
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?
Just look at /etc/inittab :}


Cheers,
Tink

Last edited by Tinkster; 03-19-2004 at 12:31 AM.
 
Old 03-19-2004, 12:58 AM   #3
beejayzed
Member
 
Registered: Jan 2004
Location: Auckland, New Zealand
Distribution: Ubuntu
Posts: 686

Original Poster
Rep: Reputation: 30
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
 
Old 03-19-2004, 01:20 AM   #4
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928
Pleasure mate :)

Quote:
Can I add my own things to inittab?
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).



Cheers,
Tink
 
Old 03-19-2004, 02:06 AM   #5
beejayzed
Member
 
Registered: Jan 2004
Location: Auckland, New Zealand
Distribution: Ubuntu
Posts: 686

Original Poster
Rep: Reputation: 30
So, which file can I edit to add my own things?
 
Old 03-19-2004, 02:10 AM   #6
beejayzed
Member
 
Registered: Jan 2004
Location: Auckland, New Zealand
Distribution: Ubuntu
Posts: 686

Original Poster
Rep: Reputation: 30
Hey wait a minute, you're also from New Zealand. Never noticed that.
 
Old 03-19-2004, 02:43 AM   #7
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
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.
 
Old 03-19-2004, 02:54 AM   #8
beejayzed
Member
 
Registered: Jan 2004
Location: Auckland, New Zealand
Distribution: Ubuntu
Posts: 686

Original Poster
Rep: Reputation: 30
Alrighty, now I know a bit more
 
Old 03-19-2004, 09:58 AM   #9
JoeDuncan
Member
 
Registered: Aug 2003
Location: Ottawa
Distribution: Redhat 5.2, 6.0, 6.1, Mandrake 7.2, 8.0, 9.1, 9.2, 10.0, Gentoo, Debian 3.1r0
Posts: 224

Rep: Reputation: 30
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.
 
Old 03-19-2004, 02:58 PM   #10
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928
Quote:
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.


Cheers,
Tink
 
Old 03-19-2004, 03:20 PM   #11
beejayzed
Member
 
Registered: Jan 2004
Location: Auckland, New Zealand
Distribution: Ubuntu
Posts: 686

Original Poster
Rep: Reputation: 30
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.
 
Old 03-19-2004, 05:02 PM   #12
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928
Got that right mate :)


Cheers,
Tink
 
  


Reply



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
Able to write files to MP3 player but no files written into actual device? olnex Linux - Hardware 0 11-11-2005 06:32 AM
How program to read files with extension .dat y .cfg files COMTRADE in fedora 1? ivonne Linux - Software 0 11-22-2004 11:42 AM
How can konqueror view html files in .gz & .bz2 files directly? ailinzhe Linux - Software 5 05-24-2004 08:36 AM
xine plays only (a part of) the sound of a wmv, some divx files and crushes mp4 files bezoomny Linux - Software 1 03-10-2004 07:33 PM
How to filter files in files and files which are in a sub-directory with "grep"? Piero Linux - Newbie 9 08-29-2003 02:38 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 03:27 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
Open Source Consulting | Domain Registration