Make your own free website on

X-windows system

X Windows System:


XFree86 process is used for only a GUI mode processing. Red hat Linux 8.0 uses

xfree86 version 4.2 as the base X Windows system which includes the necessary X Libraries, Fonts, utilities, documents and development tools. Red hat Linux 9.0 uses XFree86 version 4.3


XWindows files are stored in below path:

                  /etc/X11R6 directory will be display.



           In this path is containing XClients binaries, header files, libraries and manual pages.

When the XWindow is first to run in this path.

                    /etc/X11/Xf86config          XWindow Configuration files.


Changing the resolution:

                  # redhat-config-XFree86


XClient run file path:



Default XServer run file path:


To editing a main window in redhat Linux press e


Grub (Grand Unified Boot Loader)

            You install a two operating system namely Linux & windows 2000. You can easily change name in (Linux & windows 2000) main window (desktop). (It is fully customize option)

      Grub Configuration files


        O/P =>

               Default =0

               time out=50

               splash image (hdo,4) /grub/splash xpm.gz


               title Redhat Linux (2.4-20-2.48)

               root (hdo,h)

               kernel /boot/umlinux -2.4.20-2.8 o root=LABEL =/



               title Windows

               root verify (had,0)

               chain load +1


1, Specify in which operating system o be loaded in default.

2, How much time boot screen for waiting.

3, Boot screen image file.

4, title will be display in the grub screen.

LILO (Linux Loader)

             It is not customize time, name .etc. could not to be change in LILO method. (Like Typical)


                             Press ^x to edit.

Configuration File


            /etc/lilo.conf.anaconda  Found the grub.


/etc/lilo.conf  o/p is given below:





            time out=50



            default = Linux










How to change GRUB to LILO Format:

            You copy a file name lilo.conf.anaconda to lilo.conf


            cp lilo.conf.anaconda lilo.conf

After copy a file goes to prompt

# lilo

# init 6

A system is restart. A boot loader is change in lilo format.



            After changing the file lilo.conf to lilo.conf.anaconda

# boot: linux s

#grub-install/dev/hda (To start Linux single)

Lilo is change to grub.



When init starts, it becomes the parent or grants parent of all the process that startup automatically in redhat linux. First, it runs the /etc/rc.d.rc.sysinit script, which set your path, starts swapping, and checks the file system & so on.


/etc/inittab This program after loaded a kernel. The default run level is 5 in this example, the number after the first colon. If you want to change it, you can enter a /etc/inittab and you can change the run level careful to handle, when you are editing the inittab file.

To change from a console to a graphical login, you should change the number in the line id:3:initdefault: from a 3 to a 5.



            Once          Only one time Execute.



            Init Default 







Init run level

0 Halt

1 Single user mode.

2 Multi user mode (with out XWindow -NFS-NIS)

3 Fulmulti user mode with out GUI.

4 Fulmulti user mode with out GUI.

5 Fulmulti user mode with GUI.

6 Reboot.


You can enter a Linux, when a processing & checking some files. This processing are include in this path /etc/inittab. Whenever you can boot a system immediately checking each configuration file.

(e.g) keyboard file, hard disk file etc.

After checking, it will come to GUI mode.

Last file for init processing: rc.local      /etc/rc.d/rc.local


/etc/rc.d This directory contains the following directory.

i, /init.d  ii,/rc0.d    iii, /rc1.d   iv, /rc2.d up to  /rc6.d


rc.sysinit First start up file.

rc.local    last file for init process.

rc This file is responsible for starting/stopping a service. When the run level is change.


Shutdown command

         Shutdown [option] [-t sec] time [warning message]

# shutdown -k            Message should be display but system is not shutdown.

# shutdown  12:45     System will be shutdown in 12:45

# shutdown g 12:45 System will be shutdown 3 minutes later in 12:45.

# shutdown r Reboot after shutdown.

# shutdown h Halt after shutdown.

                     -f   do a Fast   reboot (skip sack).

                     -F Force fsck on reboot.

                     -n Do not go through init but go down real fast.

                     -c Cancel a running shutdown.

                     -t sec delay between warning and kill signal.


User creation in GUI mode:

                                    Start System Setting Usr

User creation in CUI (Character user interface)

        # useradd [option] <username>

v  uid       user id

v  gid       group id  ( primary & Secondary )

v  shell    This has to be activating when the user is logged in.

v  command  

v  password  

v  valid date  



         -u  For specifying the user id.

         -g  For specifying the primary group id.

          -G  For specifying the secondary group id.

         -c  For specifying the command.

          -d  For specifying home directory path.

         -m For specifying the create a home directory in particular path.

          -s  For specifying a shell.

          -e  For specifying a expiry date.

          -f   Number of days account can be activated after the password will be expire.

          -f0 Account number & password are expiring.

       # usradd u 503 g 601 G 602,603 s /bin/bash f2 e3 d /home/test m test


                  -D  Default values.

                  Useradd => immediately checking in this file.

(i)         read /etc/login.defs

(ii)       create entries in




(iii)      copies file from /etc/skel directory to user home directory.

/etc/login.defs        contains default account polices. (First, read this file).







UID MAX 60000


GID MAX 60000


Password Command

                  After creating a user account you must set a passwd for that account using the 

       passwd command as follow.

       root# passwd ibrahim (user name)

       Enter the password:

       Confirm password  :

       Username : password : uid : gid : command : homedir : shell


User mod command

         The usermod command is used is used to modify the user parameters as follows.

           # Usermod [-u uid] [-g GID] [-G group1, group2] [-c comment] [-s shell] [d home]      

              [-e expire -date] l L m <username>


               -I  change the user login name.

               -L used to lock a user account.

               -U used to unlock the user account.


Chage command

      It is used to set password aging policies.

            # chage [option] username

               -m minimum days required between password change.

               -M maximum number of days a user can use the same password with out changing.

               -E <date> Password expiry date in YYYY MM DD  Format.

               -W  Set warning days message as the number of days before password expiration

                          during which user is warned that is password is due to expire.


User delete command

         # userdel [-r] username    Userdel command can be used to delete a user account.


Groupadd Command

         # groupadd [-g GID] groupname     This command will create a new group called aita.

         # groupadd aita


Groupmod Command

                  It is used to modify the group parameters, normally the gid or the group name as follows.

                  groupmod [-g new gid] [-n new name] group name

-g Change the group id.

-n Change the group name alone.


Groupdel Command

         #groupdel  groupname     It is used to delete the user account as follows.


Shadow Password

                  Improved system security by moving the encrypted passwords normally found in

           /etc/shadow, which is readable only by root.

v     Account name.

v     Account encrypted password.

v     The number of days elapsed since 1st January 1970 to the day last password changed.

v     The minimum number of days required between the passwords changed.

v     The maximum number of days after which password must be changed.

v     The number of days before password expires the user is warned.

v     The number of days after the password expires before the account is disabled.

v     The number of days since1 Jan 1970 after which the account is disabled.


To View the group details

                  # vi /etc/group

                  # group


To view the user details

                  #id <user name>        ( etc# id ibrahim )

                  # id  To view root details.


Su Command

                  The su- switch user command is used to get privilege of a different user with out logging to the system using that user name.

                  Su-<user name> Totally changes the user environment outside from root. It returns to root.

                                               It ask root password.

                  Su <user name> This user name only works on root environment.


Change History

      /etc/profile To change history. etc#vi profile To change the modification on the all user   

      or system wide environment.


Send Message

                  /etc/motd This is message command file.

                  etc#vi motd 

                                    Hai welcome to all

                  Press ^d

                  After enter any user Hai welcome to all message will be display.

   Remove this message etc#vi motd delete hai welcome to all message.


Block all users

                  etc#cat > nologin   (after)

                  : wq

                  After this command could not enter any user in our system.

    Remove the permission

                  etc# rm nologin This command is removed easily enter all user in our system.


Default Alias settings

                  # alias cls = clear Set alias name its working very well. However, restart in your system alias name is corrupted. If you want to standard work means, you can set default alias settings.

# cls means system screen should be cleared up to reboot your system. But any times and whenever

Work in this command means set default alias.

/usr/bin/clear copy from clear to cls

bin#cp clear cls Clear & cls are work in same condition.


Ownership and File Permissions

Earlier in this chapter, when you tried to change to root's login directory, you received the following message:

cd /root

bash: /root: Permission denied

Figure 13-11. Permissions for sneakers.txt

Other information to the right of the group includes file size, date and time of file creation, and file name.

The first column shows current permissions; it has ten slots. The first slot represents the type of file. The remaining nine slots are actually three sets of permissions for three different categories of users.

For example:


Those three sets are the owner of the file, the group in which the file belongs, and "others," meaning other users on the system.

-    (rw-)   (rw-)   (r--) 1 sam sam

|      |       |       |

type  owner  group   others


The first item, which specifies the file type, can show one of the following:

mission has not been granted. Look again at the first column of sneakers.txt and identify its permissions.

ls -l sneakers.txt

-rw-rw-r--    1 sam sam     150 Mar 19 08:08 sneakers.txt

The file's owner (in this case, sam) has permission to read and write to the file. The group, sam, has permission to read and write to sneakers.txt, as well. It is not a program, so neither the owner or the group has permission to execute it.


The chmod Command

Use the chmod command to change permissions. This example shows how to change the permissions on sneakers.txt with the chmod command.

The original file looks like this, with its initial permissions settings:

-rw-rw-r--    1 sam sam     150 Mar 19 08:08 sneakers.txt

If you are the owner of the file or are logged into the root account, you can change any permissions for the owner, group, and others.

Right now, the owner and group can read and write to the file. Anyone outside of the group can only read the file (r--).




Remember that file permissions are a security feature. Whenever you allow anyone else to read, write to, and execute files, you are increasing the risk of files being tampered with, altered, or deleted. As a rule, you should only grant read and write permissions to those who truly need them.

In the following example, you want to allow everyone to write to the file, so they can read it, write notes in it, and save it. That means you will have to change the "others" section of the file permissions.

Look at the file first. At the shell prompt, type:

ls -l sneakers.txt

The previous command displays this file information:

-rw-rw-r--    1 sam sam     150 Mar 19 08:08 sneakers.txt

Now, type the following:

chmod o+w sneakers.txt

The o+w command tells the system you want to give others write permission to the file sneakers.txt. To check the results, list the file's details again. Now, the file looks like this:

-rw-rw-rw-    1 sam sam     150 Mar 19 08:08 sneakers.txt

Now, everyone can read and write to the file.

To remove read and write permissions from sneakers.txt use the chmod command to take away both the read and write permissions.

chmod go-rw sneakers.txt

By typing go-rw, you are telling the system to remove read and write permissions for the group and for others from the file sneakers.txt.

The result will look like this:

-rw-------    1 sam sam    150 Mar 19 08:08 sneakers.txt


Want to test your permissions skills? Remove all permissions from sneakers.txt for everyone.

chmod a-rwx sneakers.txt

Now, see if you can read the file with the command cat sneakers.txt, which should return the following:

cat: sneakers.txt: Permission denied

Removing all permissions, including your own, successfully locked the file. But since the file belongs to you, you can always change its permissions back with the following command:

chmod u+rw sneakers.txt


chmod a-x tigger

to remove everyone has execute permissions.

Here is what happens now when you try to cd to into tigger:

bash: tigger: Permission denied

Next, restore your own and your group's access:

chmod ug+x tigger

Now, if you check your work with ls -l you will see that only others will be denied access to the tigger directory.


Changing Permissions With Numbers

Remember the reference to the shorthand method of chmod? Here is another way to change permissions, although it may seem a little complex at first.

Go back to the original permissions for sneakers.txt:

-rw-rw-r--    1 sam sam     150 Mar 19 08:08 sneakers.txt

Each permission setting can be represented by a numerical value:

         r = 4

 -  (rw-)   (rw-)  (r--)

      |       |      |

    4+2+0   4+2+0  4+0+0

Tould become six, four, and four (644).

To implement these new settings, type:

chmod 644 sneakers.txt

Now verify the changes by listing the file. Type:

ls -l sneakers.txt

The output should be:

-rw-r--r--    1 sam sam     150 Mar 19 08:08 sneakers.txt

Now, neither the group nor others have write permission to sneakers.txt. To return the group's write access for the file, add the value of w (2) to the second set of permissions.

chmod 664 sneakers.txt





Setting permissions to 666 will allow everyone to read and write to a file or directory. Setting permissions to 777 allows everyone read, write, and execute permission. These permissions could allow tampering with sensitive files, so in general, it is not a good idea to use these settings.

He effect.

# mount tvfat o ro /dev/fdo /mnt/floppy
            The above command will mount a windows formatted (vfat) floppy in the read only mode under the sub directory /mnt/floppy (mount point). After mounting the floppy you can access it by entering in to the /mnt/floppy subdirectories. After mounting a floppy what ever you are copying to /mnt/floppy directory will be getting copied to the floppy disk.
            # mount /dev/fdo /mnt/floppy
            # mount /dev/cdrom /mnt/cdrom
            # mount /dev/hda3 /mnt/c ( it is directory name to create own a /mnt directory.)
The mount command
            #umount /mnt/cdrom
            #umount /mnt/fdo
The /etc/mtab file: 

            The /etc/mtab file contain the information above the currently mounted file system. This file will automatically update. When you are mounting or unmounting partitions. Do not try to edit this file manually.


The etc/fstab file

            This is a text file which contain the information of the file system. [The rc.sysinit file is automatically mounted the this file]


            /dev/hda1                      /                       ext2                  defaults             1  1

            /dev/hda5                      /home               ext2                  defaults,rw 1     2  1

            /dev/hda3                      /usr                   ext2                  defaults             1  1

            /dev/hdc                        /mnt/cdrom        iso9660             user,noauto,ro   0  0

            /dev/hda2                      none                 swap                 sw                    0  0

            (Device name what partion         (mount point)           (fiel system type)   (mount point option or permission)  (dump interval)

                     what device)                                                                                                        no of days since backup) 


Disk Usage

            mkfs   make file name

            # mkfs t <>fs /dev/hds5  format the particular partition.

            #df       Say in blocks.

            #df h <mount point>    Human readable format.

            # du     Directory Usage.

            # du <director name>  Say in blocks.

            # du h <directory name>  Human readable format.


Convert file system ext2 to ext3

            # tune2fs j  say in blocks.(but not convert to ext3 to ext2)


RPM Redhat Package Manager

            One of the Linux most enjoyable qualities is the variety and number of s/w packages available it. User can download and install new or update s/w with little or no difficulty with RPM. It is provides detailed information and instructions for adding, removing, updating, checking and querying the s/w package using RPM.


                  # rpm <option> <package>

Generally a packages file name will be in the following format.



Opendap 2.0 1.9 i386.rpm

The RPM Command

            Linux is having inbuilt command line tool named RPM to administrator the s/w package.

v      Installing Package

v      Upgrading Package.

v      Removing Package.

v      Querying Package.

v      Verifying package.


Common Option

            -I installing.

            -v verbose (show some useful information during the installation)

            -h Hash (print up to 50 hash mark (#) to illustrate the progress of the installation).

            -e uninstalling & removing.

            -q querying.

Installing Package

            # rpm l []option package


            insert cd in the drive.

            # mount /dev/cdrom /mnt/cdrom

            # cd /mnt/cdrom

            # ls

            #cd redhat

            # cd RPMS

            # rpm I openldap


            # rpm irh force openldap 2.0 1.9 .1386.rpm


            To install old version package using use --oldpackage for --force


            # rpm ivh oldpackage openladap 1.0 -1.9 .i386 .rpm


--replace files  To replace in all files.


-- nodeps          Do not  perform dependency check before installing or upgrading a



--test                (To check a file it is corrupted or not) dont install the package or update the

   database. Just identify and display possible conflicts or dependence error.


            --ignorearch   dont check for a architecture.


            # rpm qf /etc/ahcpd.conf    (to search a file)


            # rpm qa    To view a install all package.


            # rpm qi  <Package name>   To display in all information in this package.


            # rpm ql <package>  Check all corresponding file in package.


            # rpm -qc <>package name>  Only a configuration file.


            # rpm qR <package name>   libraries files and commands in corresponding package.


            /usr/share/doc  All documentation file.


# rpm qd <package name> All documentation files are show in this method.


# rpm V [package] To verify the status of files in package.



Backup And Recovery

            Floppy, cdrom, Harddisk and Tap drive this are Backup storage device.

I)                     tar  tab archive.

II)                   cpio.

III)                  dd.

IV)                dump.


            # tar <option <>soured file [destination file]


            -c creating archive.

            -t  list of all files in the backup.

            -x restoring the backup or extracting.

            -v verbose.

            -f  force.


            # tar cvf /files.tar /etc




                         Destination     source file                      


            # tar cvf /dev/fdo /etc     To send, backup store.

            # tar tvf /dev/fdo            view a backup store files.                  

            # tar xvf /dev/fdo            Extract method.   

            When you store a destination files. Destination storage device is greater than source file means, it is not ask question to insert another disk.

Linux and Unix are all full incremental backup method. Tar means full backup.


cpio  (copy input and output)

            -o Tacking backup.            Tape drive only use in this method.

            -I    Restoring Backup.

            -p Tacking backup from one directory to another directory. (p means pass)

            # cd /etc

            # ls l | cpio pcvf /file   (file is a destination path)

            # cat /etc | cpio pcvf /file.  Fully content are all store.

            # dd  Copy a file one by one.

            # dd if = /etc/passwd of = /dev/ ..


            # dump <option> <argument> <files to be backup >

                        level 1     Fully backup.

                        level 1-9  Incremental backup.(Incremental backup is possible in dump command )

                                            ( it is same as bank data processing store method)

                  # /etc/dumpdates


                  -u Full backup

Restore a data

            # restore <option> /dev/hda6

            -r Restore all.

            -x Particular file only.

            -c To compare a backup proper or not. (source file to destination file)

            -c /dev/hda6 D/etc

            -D To compare a directory

                                    to compare

                        -c /dev/hda6 D/etc


            # restore rf /dev/hda6

            -I Restore a interactive command.


Performance Monitoring

            To check process of the system.


v      ps

v      pgrep       viewing the process, which is running in the system.

v      Top


# ps  a  It will be show in which terminal and what process are running.

            # ps  A Overall what process are running. ( same as  ps -e)

            # ps  -f   File listing, priority, time, parent processed. This are all include in file listing.

            # ps u <user name>   That current users starting time process only display.


            -u <user name>   efficient user id.

            -U <user id>         real user id.

            -g <group name> group.

            -G <>Group id>    real group.


            pgrep process grep.

                          Find the process status with the help of process name.


            pgrep <option> <pattern>


                -n exactly matching pattern

                -l Process id will be display.

            -v executed the particular pattern.

            -V version will be display.


            # <process name>

            # vi thenu &      Background processes are running.

            # jobs                View the background process.

            # top                 


            # kill <process id> To terminal the process.

                        -9  Force killing.

                        -15 Terminating.

            kill 9 <process id>

            pkill <processname>

            # vmstat  Details of virtual memory  ( it is part of HDD for the RAM) virtual memory.

            cd proc    Details of memory / swap information.

            cpuinfo    Details of cpu information.

Process Scheduling

            In Linux, tasks can be configured to run automatically with in a specified period of time, on a specified date, or when the system load average is below a specified number. Redhat Linux comes reconfigured to run important system tasks to keep the system update. For example, the slocate database used by the locate command is update daily. A system administrator can use automated tasks to perform periodic backups, monitor the system run custom scripts, and more.

Redhat Linux comes with four automated tasks utilities: cron, anacron, at and batch.


            Cron is a daemon that can be used to schedule the execution of recurring tasks according to a combination of the time, date of the month, month, day of the week, and week. (Process is repeated to run at particular time). cron assumes that the system is on continuously. If the system is not on when a task is scheduled, it is not executed.






            # crontab e     Show VI editors mode.


       Minutes          hours         day         month          day of week         command

            1-59            1-24          1-30           1-12                  1-7                echohai> /dev/tty/


            50 16 12 8 *    All Times.


            # crontab l    View all the command  (option in crontab)





            Processes are run at particular time. (Only one time)

                  at l  list of all jobs.

                  at rm  remove the jobs.

                  at rm jobid            

                  at rm 5                To remove the job.    



About Me
Islamic Sites
Earth Quake
Hardware Rate
SMS Jokes
Latest Games
About Adirai
Islamic Name
PC kural
Art Gallery
Latest IT News
Islamic Picture
About Linux
Latest Virus
Interview Tips
Ring Tones
Chennai Map
Longhorn O/S