Monday 29 October 2012

how to create terminal in redhat linux


How to create terminal in linux

Vi /etc/inittab

1: 2345:res                               tty 1
Upto 10 whatever
#          init q
#          chvt 13


Vi /etc/securetty
#          vi /etc/securetty

Vc        1         
Tty       1

Password = dGht4
:grub-md5-crypt

creating bootable pen drive or cd drive


Using cd and pendrive

Creating bootable cd or dvd
Copy the image folder from linux dvdor cd by mounting

#          Cp image /root/Desktop

Unmount the cd or dvd

#          Eject
#          Eject –t


Now copy the boot.iso file from image folder in blank cd or dvd by mounting and run the command
First
 #         cd /root/Desktop/image
#          cdrecord –v boot.iso


For bootable pendrive

We have copy diskboot.img file in pendrive
#          Cd /root/Desktop/image
#          Cat diskboot.img > /dev/sda1


Creating image of the dvd
 Insert the dvd or cd and writer this command to create image of disk
#          dd if=/dev/cdwriter /Deepak.iso

Write the image in cd or dvd
#          Cdrecord –v /Deepak.iso




Splitting the dvd image into many parts so that it can be written into cd.

Step 1 create image of the dvd or cd
#        dd if = /dev/cdwriter /vijay.iso
Step 2 to split the image
#        split vijay.iso     [it will split the image into default size]
To manually split the cd according to size
#        split –b 70000 (always in byte) /vijay.iso

Then write the image into blank cd
#        Cdrecord –v /vijay.iso1


To merge the cd into dvd

#        mkisofs –o 1.iso

Sunday 7 October 2012

how to set disk quota in linux for a user



Crete a partition if required

Fdisk /dev/sda

Create partition

Create user =vijay

#useradd vijay  [user add]

#passwd 12345  [set password for user vijay]

Create directory =redhat

#mkdir redhat [for create redhat directory]
 
Setp =2 

#chmod 777 /redhat [set default permission on the directory]

#vi  /etc/fstab    [entry in this file below mention detail ]

/dev/sda3         /redhat           ext3     usrquota          0 0
:wq
 [note: entry only that partition which is you make like that /dev/sda3, /dev/sda4, dev/sda5]

Mount –a

Mkfe2fs –J /dev/sda3     [format the partition ]

Mount –o remount /redhat

Quotacheck –mug /redhat

Ls /redhat [show quota]

Setquota –u vijay 30 70 5 8 /redhat 

30 warning disk quota 70 disk quota 5 warning file quota  8 file quota

Quotaon /redhat

Repquota –a [show all user quota ]

Quotaoff /vijay     [quota off on the user]