Thursday, September 29, 2011

Linux file system







Directory Description
/
 Primary hierarchy root and root directory of the entire file system hierarchy.
/bin/
Essential command binaries that need to be available in single user mode; for all users, e.g., ls, cp.
/boot/
 Boot loader files, e.g., kernels, initrd; often a separate partition.
/dev/
Essential devices, e.g., /dev/null.
/etc/
 Host-specific system-wide configuration files.There has been controversy over the meaning of the name itself. In early versions of the UNIX Implementation Document from Bell labs, /etc is referred to as the etcetera directory, as this directory historically held everything that did not belong elsewhere (however, the FHS restricts /etc to static configuration files and may not contain binaries). Since the publication of early documentation, the directory name has been re-designated in various ways. Recent interpretations include Backronyms such as "Editable Text Configuration" or "Extended Tool Chest".
 /etc/opt/
Configuration files for /opt/.
/etc/X11/
Configuration files for the X Window System, version 11.
/etc/sgml/
Configuration files for SGML.
/etc/xml/
 Configuration files for XML.
/home/
 Users' home directories, containing saved files, personal settings, etc.; often a separate partition.
/lib/
Libraries essential for the binaries in /bin/ and /sbin/.
/media/
 Mount points for removable media such as CD-ROMs.
/mnt/
 Temporarily mounted filesystems.
/opt/
Optional application software packages.
/proc/
 Virtual filesystem documenting kernel and process status as text files, e.g., uptime, network. In Linux, corresponds to a Procfs mount.
/root/
 Home directory for the root user.
/sbin/
 Essential system binaries, e.g., init, ip, mount.
/srv/
Site-specific data which is served by the system.
/tmp/
 Temporary files (see also /var/tmp). Often not preserved between system reboots.
/usr/
 Secondary hierarchy for read-only user data; contains the majority of (multi-)user utilities and applications.
/usr/bin/
Non-essential command binaries (not needed in single user mode); for all users.
/usr/include/
 Standard include files.
/usr/lib/
 Libraries for the binaries in /usr/bin/ and /usr/sbin/.
/usr/sbin/
Non-essential system binaries, e.g., daemons for various network-services.
/usr/share/
 Architecture-independent (shared) data.
/usr/src/
Source code, e.g., the kernel source code with its header files.
/usr/X11R6/
 X Window System, Version 11, Release 6.
/usr/local/
Tertiary hierarchy for local data, specific to this host. Typically has further subdirectories, e.g., bin/, lib/, share/
/var/
Variable files—files whose content is expected to continually change during normal operation of the system—such as logs, spool files, and temporary e-mail files. Sometimes a separate partition.
/var/cache/
 Application cache data. Such data is locally generated as a result of time-consuming I/O or calculation. The application must be able to regenerate or restore the data. The cached files can be deleted without data loss
/var/lib/
 State information. Persistent data modified by programs as they run, e.g., databases, packaging system metadata, etc.
/var/lock/
Lock files. Files keeping track of resources currently in use.
/var/log/
Log files. Various logs.
/var/mail/
Users' mailboxes.
/var/run/
Information about the running system since last boot, e.g., currently logged-in users and running daemons.
/var/spool/
Spool for tasks waiting to be processed, e.g., print queues and unread mail.
/var/spool/mail/
 Deprecated location for users' mailboxes.
/var/tmp/ Temporary files to be preserved between reboots.

Login as root in fedora 15

Fedora 15 released and I am posting solution for root lovers who like to login with root. Fedora 15 root login is exactly same like Fedora 14 root login.

WARNING: - It’s not at all good to login as root from GUI. It’ Dangerous.
In Fedora 15 You cannot login as a root from GUI. By Default, only Normal users are allowed to login from GUI mode.
I Managed to Login as a root from GUI on Fedora 15. Follow these steps and you will able to Login as a root from GUI on Fedora 15

If you want to login as a root from GUI in Fedora 15 then you have to edit something like some files which are located to /etc/pam.d/

Open your Terminal from Applications -> System Tools -> Terminal
Now Login as a root from your terminal

Step 1:- [itsolutions@ask4itsolutions.com]$ su – root
Password:-


Step 2:- Now go to your /etc/pam.d/ directory.

[root@ask4itsolutions]# cd /etc/pam.d/
(Then first take a backup of gdm file)
[root@ask4itsolutions]# cp gdm gdm.bkp ( always take backup if anything goes wrong you can correct it by original file)
Step 3:- Now open gdm file in your favorites editor. I am using vi as my editor.
[root@ask4itsolutions pam.d]# vi gdm
Find and Comment or remove this line into your gdm file
auth required pam_succeed_if.so user != root quiet

(Delete ! Exclamation mark )

Step 4:- Save & Exit From that File. ( In Fedora10 Till step 4 is enough to Login as a root from GUI but for Fedora 15 you need one more file to edit otherwise you cannot Login as a root even though you edited gdm file).

Step 5:- Here is the additional file that you need to edit and that file name is gdm-password. Open gdm-password file in your favorite’s editor. I am using vi as my editor.
Then first take a backup of gdm-password file
[root@ask4itsolutions pam.d]# cp gdm-password gdm-password.bkp ( always take backup if anything goes wrong you can correct it by original file)
[root@ask4itsolutions.com pam.d]#vi gdm-password
Find and Comment or remove this line into your gdm file

auth required pam_succeed_if.so user != root quiet

(Delete ! Exclamation mark)

Now login as root user and end enjoy work with fedora