>>>>> "oisin" == oisin <okgoulding at eircom.net> writes:
oisin> Hi, I've a few questions about setting up RedHat 6. Does it
oisin> have a central folder like thecontrol panel in Windows for
oisin> setting up hardware like sound card, or for fixing the
oisin> screen resolution, at the moment it doesn't use an
oisin> inch-wide strip around the edge of the monitor. What
oisin> significance have the various folders, is there a central
oisin> "linux" folder holding all the significant files?I have the
oisin> ASLA drivers for the sound-card but have no idea how to
oisin> install them.Other good questions are: Am I boring you
oisin> yet?, or Is there a book I could find out general
oisin> information like this in? I'd appreciate the help, Oisin
Hi Oisin,
Linux does not have a central folder like the control panel in Windows
for setting up hardware. Things can be done at a few levels, command
line is the default. This can be offputting at first but once you get
used to it you will wonder how you ever worked without a command line.
Open up a terminal, or xterm, or shell, it could be called any of
those things and type 'linuxconf'.
Have a look through that and come back with more questions.
As to the significance of the various folders, that is a big question
but I'll try and give a quick overview here. You use the cd (change
directory command) to move around between directories (the things that
you call folders) and the root directory (the first one that all other
directories are kept under) is specified by the forward slash. So, to
go to the root directory of your filesystem and see what other
directories it contains you do:
dmcgahon at dnrc:/$ cd /
dmcgahon at dnrc:/$ ls
bin cdrom etc home lib mnt root tmp var
boot dev floppy initrd lost+found proc sbin usr vmlinuz
dmcgahon at dnrc:/$
The prompts will be different at your machine. On my machine the
prompt specifies my username (dmcgahon):
dmcgahon at dnrc:/$ whoami
dmcgahon
dmcgahon at dnrc:/$
and the name that was given to my machine when linux was set up
(dnrc):
dmcgahon at dnrc:/$ hostname
dnrc
dmcgahon at dnrc:/$ uname -a
Linux dnrc 2.2.17 #1 Sun Jun 25 09:24:41 EST 2000 i686 unknown
dmcgahon at dnrc:/$
Ok, so get a directory listing of the root directory again and we'll
look at each directory:
dmcgahon at dnrc:/$ ls
bin cdrom etc home lib mnt root tmp var
boot dev floppy initrd lost+found proc sbin usr vmlinuz
dmcgahon at dnrc:/$
To get a listing of directories with more information you use the l
switch to the ls command. The l switch says to give a long (extra
information) listing. This shows you (from left to right), the
permissions on the file, a number I'm not sure about, the owner of
the file, the group the file belongs to, the size of the file, the
date it was last modified and the name of the file.
dmcgahon at dnrc:/$ ls -l
total 92
drwxr-xr-x 2 root root 4096 Oct 9 12:55 bin
The bin directory holds programs that can be run or executed. Type
'man programname' for more information than you ever wanted to know.
drwxr-xr-x 2 root root 4096 Oct 9 12:36 boot
The boot directory holds files that are used when linux is booting up.
You won't change any files in here unless you recompile your kernel
which you won't need to do for a while.
drwxr-xr-x 2 root root 4096 Jul 5 18:47 cdrom
This is the cdrom, a directory containing whatever files exist on the
cdrom currently in the cdrom drive.
drwxr-xr-x 5 root root 20480 Nov 13 06:26 dev
This holds all the devices in the system. Broadly analagous to the
device manager in Windows. These are all special files and in general
you won't mess with these.
drwxr-xr-x 66 root root 4096 Nov 6 11:41 etc
Lots of stuff goes into etc. System configuration files, scripts that
are run at startup and lots of other stuff.
drwxr-xr-x 2 root root 4096 Jul 5 18:47 floppy
The floppy drive. Same as cdrom except for the floppy.
drwxrwsr-x 3 root staff 4096 Oct 9 12:38 home
Unix/Linux is a multiuser system by design. Although you can have
different logins with Windows it is not really the same thing. Each
user who has an account on your machine will have a home directory
here. Many people these days just have two accounts per machine, the
root (or superuser) account and a person account (maybe oisin).
drwxr-xr-x 2 root root 4096 Jul 5 18:47 initrd
Not important for the moment.
drwxr-xr-x 4 root root 4096 Nov 1 16:53 lib
Holds all the libraries used by the programs on your system. Windows
has DLLs, Unix has Shared Objects (.so files) and these are files that
can be dynamically loaded (loaded on request) by programs instead of
statically linked in at compile time.
drwxr-xr-x 2 root root 16384 Oct 9 12:34 lost+found
When a hard drive crashes or a system is not shutdown properly a file
system check is performed on it (fsck). Sometimes it may find some
corrupted data and may be able to restore the files completely but if
not it will restore them to the lost+found directory.
drwxr-xr-x 2 root root 4096 May 27 19:55 mnt
This is a mount point where other drives or devices can be seen after
they have been mounted using funnily enough the mount command (man
mount). You may want to investigate this if you have a dual boot
machine (Win/Linux) and you would like to access the Windows file
systems from within Linux. The opposite is not posssible BTW,
Miscosoft would never stoop so low as to think that being able to read
files off a Linux formatted disk would be useful.
dr-xr-xr-x 50 root root 0 Nov 6 11:39 proc
This is a special directory that gives you a window of sight into the
inner workings of the operating system. Have a look and do (cat
filename) to look at each of the files.
drwxr-xr-x 9 root root 4096 Nov 6 16:33 root
Home directory for the root account. Yours may be under /home, I use
Debian, not RedHat so there will be small differences.
drwxr-xr-x 2 root root 4096 Nov 1 16:54 sbin
Another bin directory full of executable programs. This time it is the
system bin and is full of system type executable programs like fsck
that was referred to previously (file system check) and many other
system level programs.
drwxrwxrwt 5 root root 4096 Nov 13 19:33 tmp
For storing temporary files. A process (program) should clean up
whatever temporary files it creates when it finishes running.
drwxr-xr-x 14 root root 4096 Oct 9 12:44 usr
Have a good look under here. This is where much of what you will use
and change resides.
drwxr-xr-x 17 root root 4096 Oct 9 14:16 var
Data files to do with various programs.
lrwxrwxrwx 1 root root 19 Oct 9 12:34 vmlinuz -> boot/vmlinuz-2.2.17
This last one isn't a directory but a file. This particular file is
the linux kernel itself! This is the program that loads into memory
when you boot up linux. Amazing eh!
The official word of the filesystem is available as the Filesystem
Hierarchy Standard at:
http://www.pathname.com/fhs/2.0/fhs-toc.html
Regards,
Dermot.
--
Maintained by the ILUG website team. The aim of Linux.ie is to
support and help commercial and private users of Linux in Ireland. You can
display ILUG news in your own webpages, read backend
information to find out how. Networking services kindly provided by HEAnet, server kindly donated by
Dell. Linux is a trademark of Linus Torvalds,
used with permission. No penguins were harmed in the production or maintenance
of this highly praised website. Looking for the
Indian Linux Users' Group? Try here. If you've read all this and aren't a lawyer: you should be!