RHCE [Red Hat Certified Engneer ]
=======================================
1).what is linux
Ans. It is not a O.S it is a kernel .it is an open source
ORIGIN:
=======
Linux is created by Linux Torvalds in 1991.That time he was a student of Helsinki University in Finland. That time he was working on minix. Minix was a small application as unix.
He used the source code of minix and creat a unix like operating system.
UNIX :- has created by - Ken Thompsone and Denmis Ritchi ] in 1971. Mr.Denmis Ritchi is the creater of language "C".
MINIX :- has created by - Mr. Andreue. Teneboum in 1981.
LINUX :- has been created by - Mr.Linux Tordvalds in 1991.
Comanies are that makes Linux O.S.
-------------------------------------------
1. Red Hat 2).Fedora 3).Suje 4).Mint 5).Centos 6). Open Lx 7).Ubuntu 8).kubuntu 9).Debien
10).Knoppix 11).Slock sourse 12).Mendreake 13).Back-track 14).Puppy 15).Clodare 16).Boss
17).Chakra 18).sabayan 19).Music Linux
Version of Red Hat
==========================
RED HAT -1 (1994)
RED HAT -2
RED HAT -3
.
.
.
.
RED HAT -9
-----------------------------------------
Version of Fedora
=========================
FEDORA Core-1
FEDORA Core-2
.
.
.
.
.
FEDORA Core -6
-------------------------------------------
* (After 2003 Red Hat and Fedora murge in 2004 and they lunched - RHEL [Red Hat Enterprise Linux )
[ Red Hat + Fedora = RHEL ] - 2004
* RHEL -1
* RHEL -2
* RHEL -3
* RHEL -4
* RHEL -5
* RHEL -6 ( latest version of RHEL )
=========================================================
HARDWARE REQUIRMENT FOR RHEL-6
------------------------------------------
* C.P.U - minimum CORE C.P.U
* RAM - minimum 2 GB
* HDD - 6 TO 10 GB.
===========================================================
DIFRENSS BETWEEN - LINUX and RHEL -5
LINUX | RHEL -5
===========================================================
|
C.P.U - 444 MHz |C.P.U -1.2GHz
|
RAM - 8 MB |RAM -512 MB
|
HDD - 100MB |HDD -2 TO 6 GB
|
==============================================================
EXAM AND CERTIFICATIONS
----------------------------
1. RHCSA - Red Hat Certified system Administrator
2. RHCE - Red Hat Certified Engineer
3. RHCSS - Red Hat Certified Security Specialist
4. RHCVA - Red Hat Certified vertualization Administrator
5. RHCA - Red Hat Certified architect
6. RHCDB - Red Hat Certified Database
7. RHCJB - Red Hat Certified JBOSS.
=================================================================
BOOK OF RHCE
-------------------------
RH - 124 ]\---------------\
\ \
/ RHCSA \ RHCE
RH - 135 ]/ /
/
/
RH - 255 ]---------------/
==================================================================
EXAM OF RHCSA AND RHCE = 2 hrs.
--------------------------------------
BOOK OF RHCSS
---------------------------
RH - 333 Security \
\
RH - 423 LADAP RHCSS
/
RH - 429 Selinux /
--------------------------------------
BOOK OF RHCVA
--------------------------
RH - 318 = RHCVA
==========================================================
INSTALALTION
--------------------
/boot - 200 MB
SWAP - RAM x 2
/ - 30000 mb ( O.S. file )
============================================================
FILE SYSTEM
------------------------
it is a way to manager the directory and file in a right way .Every thing is file in Linux
1)./ -is the top level directory in Linux
2)./bin -binary filles information
3)./boot -booting file informations
4)./dev -hardware devicess information
5)./etc -most configurration files
6)./home -user's informations
7)./Cgroup -cntrol group
8)./media -removal devices informations
9)./mnt -mounting directory
10)./net -network informations
11)./proc -vertual informations
12)./lib -library files
13)./lib64 -only 64 bit O.S
14)./lost + found -file system information
15)./opt -instelled application packages
16)./root -root's home directory
17)./Sbin -binary files only for root
18)./selinux -security Enhance linux
19)./srv --\
-server information
20)./var --/
21)./tmp -temprory file
22)./misc -mounting information
23)./usr -system tabass/kernels/drive.
24)./sys -system information
=========================================================
SOME USE FULL SIGN IN LINUX
------------------------------------
1. ~ -tilde [ show the home direcotry as user ]
2. ! -exclamety sign (forcelly save/quit)
3. | -pipe (merge two or more command )
4. # -login by root
5. $ -dollor [ login by localy users ]
6. > -greater than [directory command to file ]
7. < -lessthan [ redirection file to command ]
8. : -collon [ use in command ]
9. ; -semicollon / terminator [ use in scripting ]
10. / -forword sless [ use for define the path ]
11. \ -backword sless [ user for seperate the home ]
12. ^ -cap [ use in scripting ]
===================================================================
THE BASIC COMMANDS OF THE LINUX
.............................................
#call [enter ] [show the calender of curunt month ]
#cal @ 2011 [show the all calender of 2011
]
#cal @ 9 @ 2011
#call @ 2011 @ |less
#call @ 2011 @ |more
[press q for exit ]
range - month [ 1-12]
year - [ 1-9999 ]
#cal @ -j [ show the julien date ]
#cal @ -j @ 9 @ 2011
#cal @ -3 [ show the currunt , prevellege and next month ]
#cal @ 9 @ 1752
#date [ show the date and time ]
#date @ -s @ mm/dd/yy [ to change the date ]
#date @ -s @ hh:mm:ss [ to change the time ]
#clear
#init @ 0 [shutdown the system ]
#init @ 6 [ to restart the system ]
#mkdir @ ram [ to creat a new directory ]
#cd @ dir.name [ to enter in the directory ]
#cd @ .. [ to go one step back ]
#cd @ / [ to reach on the sless ]
#cd [ to reach on the ~ ]tilled
#ls [ to show all the file and directory ]
#ls @ -l [ to show the log files are also ]
#ll
#cat @ > @ file name [ to creat a new file ]
ctrl + D [ to save the fiel ]
#cat @ < @ file name [ to open the fiel ]
# cat @ file name [ " ]
#cp @ source path @ destination path [ to copy the the file ]
#cp @ -r @source path @ destinatin path [ to copy the file and dir]
#cap @ -av @ source path @ destianation path [ to copy the file ]
#mv @ source name @ destination path [ to move the file and dir ]
#mv @ source @ old name @ new name [ to rename the dir/file ]
#mv @ name @ .name [to hide the file/dir ]
#mv @ .name @ name [to unhide the file/dir]
#ls @ -a [show the hidden dir/file ]
#rmdir @ dir name [ to remove the dir ]
#rm @ -rf @ dir/file name [ to remove the dir/file]
#rm @ -r @ dir/file name [ " ]
-------------------------------------------------------------------------
#mkdir @ ram
#ll
d rwx r -x r-x 2 root root 4056 10:25 12 oct. JET
- ----------- - ---- ---- ---- -------------- ---
1 2 3 4 5 6 7 8
1.- directory
2.- permission
3.- containt of the dir
4.- owner of the dir
5.- group of the dir
6.- size of the dir in bytes
7.- last modify date
8.- name of the dir
-----------------------------------------------------------------------
#mkdir @ alok
#cd @ alok
#ls @ -a
. ..
-- ---
self represent ouhting
[ to increase the size of terminal press - ctrl + + , ] and [ to minimise -ctrl + - ]
--------------------------------------------------------------------------------------------
DESKTOP
----------------------
1). GNOME :- GNU Network object model Environment
2). KDE :- K-Desktop Environment
(because most of the application packege begin with K - later )
* :- mycomputer - edit - prefrance - behavear
* :- Application - systemtool - filebrowser [ to open the window under the window ]
* :- place - connect to server - service type - SSH,FTP,WINDOWS SHARE, PUBLIC FTP , HTTP
1.) service type - FTP
server - 192.168.0.254
* command :- #service @ network @ restart
2.) service type - WINDOWS SHARE
service - _____
username - XXXXX
password - XXXXX
DESKTOP EFFECT
-------------------------
* system - prefrence - Desktop effect
=============================================================================================
PARTITION THE HDD
----------------------------------
* IDE - hda -[p.m] hdb -[p.s] hdc -[s.m] hdd -[s.s]
* SATA -\
SCSI - > sda -[p.m] sdb -[p.s] sdc -[s.m] sdd -[s.s]
USB -/
IBM Partition Scheme [ MBR ]
-------------------------------------
* PPPP
* PPPE
* PPE
* PE
* [ in windows we can creat maximum 23 drive ]
Partition in LINUX
-------------------------------
S.S (secondry salave )
........................
|
hdd1 -> I'st p.p
hdd2 -> extnded
hdd3 - \
hdd4 - /X
hdd5 -> logical I'st [always start from 5 no. of partition of every HDD
hdd6 ->
hdd7 ->
|
|
|
hdd63 -> max.
..................................
P.M [ primary master ]
sda1 -> I'st p.p
sda2 -> extnded
sda3 - \
sda4 - /X
sda5 -> logical I'st [always start from 5 no. of partition of every HDD
sda6 ->
sda7 ->
|
|
|
sda15-> max.
* MBR - Master Boot Record [ I'st 512 bytes space of HDD is reserve for MBR ]
SATA - 320 GB /IDE
---------------------------
|IDE P.M
|------------------------------------------|------------------|
| |--------------------------------------------------| |
| | C: NTFS| hda5| hda6 | hda7 |BOOT --------| |
| | O.S | D: | E: | F: |/ --------| |
| | WIN-7 | |logical| |SWAP --------| |
| |--------------------------------------------------| |
|----\--------/\----------------------------------------/-----|
\primar/ \ extended /
\----/ \------------------------------------/
hda1 hda2
|------------------------|
| |-----|
| PAN DRIVE | >>> sda1
| |-----|
|------------------------|
PARTITION BY COMMAND MODE
=================================
#fdisk @ -l [ to show all the partition ]
#fdisk @ -l @ /dev/sda [ to show the all partition]
#fdisk @ /dev/sda [ to make a partition ]
h :- for help
p :- to see the partitions
e :- to make extended partition
l :- show partitions ID
n :- new partition
d :- to delet the partitions
t :- change partition ID
w :- save partition table
q :- quit from fdisk
#command (m for help ):h [ to get the helpe ]
#command (m for help ):n [ to creat a new partition ]
#command (m for help ):e [to make an extanded volume ]
#command (m for help ):p [to make a primary volume ]
#size in block [enter]
#size in (K,M,G) [if enter than all space will use][but for pirticular give the size ]
#command (m for help ):+5G [ to creat a 5 GB partition ]
#command (m for help ):w [ to save and quit from fdisk ]
-----------------------------------------------------------------------------------
#partprobe [ to update the kernel ] [not in RHEL - 6 ]
#reboot [ reboot the system once after the partition ]
FORMATING OF THE DRIVE
---------------------------------
#mkfs.ext3 @ /dev/dsa5 [ format with ext3 ]
#mkfs.ext4 @ /dev/sda5 [ format with ext4 ]
#mkfs.vfat @ /dev/sda5 [ format with FAT ]
#mkfs.msdos@ /dev/sda5 [ format with MSDOS ]
MOUNTING OF THE DRIVE
-----------------------------------
#mount @ /dev/sda5 @ /mnt [ to mount the new drive sda5 in /mnt ]
#cd @ /mnt [
#ls
[ if we don't want to mount the +5G space in "/mnt" than out from /mnt come on ~ (tild)
#cd
#umount [ to not mount in /mnt ] [ always unmount from mounted drive]
............................................................................................
TO MAKE PARMANENT MOUNTING
-------------------------------------
#mkdir /dirname [ to make a new dir. on / by any name ]
#vi @ /etc/fstab [ ]
/dev/sda5 -/dir.name -ext4 defoults 0 0
:wq [ to save the mounting ]
#mount -a [ ]
#mount [ to check the mounting dire. ]
---------------------------------------------------------------------------------------------
TO MAKE PARMANENT MOUNTING GRAPHICALY
-----------------------------------------------
* my computer - file system - etc - fstab-open it
or
# gedit @ /etc/fstab
/dev/sda7 /mnt ext4 defoults 0 0
#mount -a
----------------------------------------------------------------------------------------------
CHAPTER - 5 [ BASH - SHELL ]
........................................
|------------------------------------------------|
| * USER - SHELL - KERNAL - HARDWARE |
| 4 3 2 1 | >>> O.S
|------------------------------------------------|
Shell :- shell is a language program. it consist of many languages ,like ,c, java python.
we use mostly english language F2 command. But computer knows only binary [O/I]
shell consister the language into binary. It was as a interperator between user
and kernal
It takes the instruction from user and ofer to the kernal
it retrive the instruction from kernal also.
TYPE OF SHELL
---------------------------
1. BASH - Bourn Again Shell [ from bignner to addministrator ]
2. SH - Secure Shell (expert level )
3. CSH - C Shell ---------------|
|
4. TCSH - Turbo - C shell |
| PROGRAMING SHELL
5. KSH - Korn Shell |
|
6. ZSH - Z - shell ---------------|
7. nologin - no instractive shell - reserve for system process
-------------------------------------------------------------------
# cat @ /etc/shells [ to show all the Shells ]
-------------------------------------------------------------------
* KERNAL
----------------------
" kernel is the heart of Linux O.S".
" It works as a interface between hardware and O.S "
" It is the first program of O.S runs every time booting of the system "
" It is the nearest file of O.S to hardware it is a platform for O.S.
TYPE OF KERNAL
---------------------------
1. MICRO KERNEL
win -9x
win -xp
win -2k3
2. MONOLYTHIC KERNAL
Unix like O.S
Linux
Minix.SUN, MA
3. HYBRIDE KERNEL
win -vista
win -7
win -server 2K8
----------------------------------------------------------------------------------------------
O.S VERSION KERNAL VERSION KERNAL NAME FILE SYSTEM MAX.SUPPROT SPACE MAX. DIR
RHEL - 3 2.4 TAROON EXT3 16TB 32000
RHEL - 4 2.4 NAHANT EXT3 16TB 32000
RHEL - 5 2.6 TIKANGA EXT3 16TB 32000
RHEL - 6 2.6.32.71 SENTIAGO EXT4 32TB NO LIMIT
2.6.32.131
----------------------------------------------------------------------------------------------
O.S FILE SYSTEME MAX SUPPORT
win -9x FAT 32 GB
win -NT FAT - 16 2 GB
win -xp NTFS 1 TB
-- EXT2 -- 8 TB
Linux EXT-|---EXT3 -- 16TB
-- EXT4 -- 32TB
----------------------------------------------------------------------------------------------
8bit - 1 byte
1000 byte - 1 KB
1000 KB - 1 MB
1000 MB - 1 GB
1000 GB - 1 TB
1000 TB - 1 PB -petabyte
1000 PB - 1 EB -exa byte
1000 EB - 1 ZB -zeta byte
1000 ZB - 1 YB -yota byte
----------------------------------------------------------------------------------------------
L.V.M ( Logical Volume Manager )
******************************************
* step -I
creat a partition of 20 GB with the id of L.V.M
(ID = 8e )
* step -II
#pvcreate @ /dev/sda5 [ creat the physical volume ]
#vgcreate @ /jetking @ /dev/sda5 [ creat the volume grupe ]
#lvcreate -L @ +2G @ -n @ /dev/jetking/linux [ to creat the logical volume ]
#mkfs.ext4 @ /dev/jetking/linux
* step -III
#mount @ /dev/jetking/linux @ /mnt
#ls @ /mnt
* step -IV
increase the LVM
--------------------
#umount @ /mnt
#lvextend @ -L @ +3G /dev/jetking/linux
#e2fsck @ -f @ /dev/jetking/linux [ to check the file system ]
#resize2fs @ /dev/jetking/linux
#mount @ /dev/jetking/linux @ /mnt
#ls @ /mnt
* step - V
#lvdisplay
#pvdisplay
#vgdisplay
#pvs
#vgs
#lvs
* step - VI
EXTEND THE V.G.
=======================
* creat a partition with the ID of L.V.M than reboot the system once then after run this commcands
#pvcreate @ /dev/sda6
#vgextend @ /jetking/dev/sda6
* step - VII
REDUCE THE L.V.M
=========================
#lvreduce @ -L @ 3G @ /dev/jetking/linux [ never use this command ]
#lvreduce @ -L @ -3G @/dev/jetking/linux [ always use this command ]
* step - VIII
REDUCE THE V.G.
==========================
#vgreduce @ /jetking/dev/sda6
* step - IX
BACKUP OF L.V.M (sanapshot)
[v.v.i] #lvcreat @ -s @ -L @ +100m @ -n @ backup @ /dev/jetking/linux
#mount @ /dev/jetking/backup @ /mnt
#cd /mnt
#ls
==============================================================================================
SYSTEM PROCESS
**********************************
* There are 3 type of process in Linux
1. Intractive Process [ run every booting of the system ]
2. Automatic Process [ run automatically ]
3. Deamon Process [ server process ; start on client request ]
4. Multi process [ run the process more the one in the same time ]
# ctrl + Z [ stop the command and run in the background ]
# ctrl + c [ cancle the command and not run in the background
# bg [ to shwo the runing process of background ]
# fg [ for ground - run the stoped process ]
# ps [ to show process of current terminal ]
# ps @ -a [ show all process of every terminal ]
# ps - A [ show all process with system process ]
# top [ to shwo the task bar ]
PID - 2563
press - q to Exit
# kill @ -9 @ 2554
* PID - Process ID :- it is a unique no. of every process
AUTOMATIC PROCESS [ SCHEDUALING ]
============================================
#date
#at @ 8:20 [ to give the time for pirticular proccess ]
>init @ 6 [ at 8:20 system shoude be resatr ]
ctrl + d [ to save the process ] [ but this just only temproty ]
#atq [ to show all process ]
#atrm @ -process no. [ to remove the process ]
* CHRONTAB :- Chrontab is a automatic proccess and difine the schedualing
* * * * *
min hrs date month day of week
0-59 0-23 1-31 1-12 0-6 [ where '0'is for sun and '1'sat]
# crontab @ -e [ to edit/set the crontab ]
25 15 * * * /sbin/init 6
(location of command)
:wq [ to save the crontab ]
OR
*/1 * * * * /sbin/init 6 [on every 1min]
(location of command)
:wq [ to save the crontab on ever min restart system ]
NOTE :- location of the command need to give when the it is 'sbin' command , but if it is bash command than no need to give the location of the command , directoly write the command
#whereis @ command name [ to check the command location ]
#locate @ command name [ " ]
#which @ command name [ " ]
*/1 * * * * echo @ hello >>/dev/console
[ "echo" that mins it will work only on console , command mode ]
*/1 * * * * wall @ hello
[ "wall" that mins it will work on both command mode and graphical command mode ]
# service @ crond @ restart [ restart the crontabe service ]
# crontab @ -l [ to show all crontab ]
# crontab @ -r [ to remove the crontab ]
# crontab @ -u @ usernam @ -e [ set the crontab for the pirticular user]
# crontab @ -e [ set the crontab of own ]
# vi @ /etc/cron.deny [ to deny the user for crontab ]
linx or tom or eric
:wq [ save the deny crontab for these users ]
# service @ crond @ restart
# crontab @ -l
MULTI PROCESS
=======================
# firefox @ & [ multiprocess]
# firefox @ & gedit @ & @ gcalctool @ & ....... [ run multiple process ]
# Alt + Ctrl + F1 [ go to the graphical mode ]
# pidof @ gedit [ to kill the application from command to grafic mode ]
# 3251 @ kill [ pid no. and then write kill to stop that process ]
-----------------------------------------------------------------------------------------------
* MANAGE/CONTROL THE PROCESS OR SYSTEM MONITORING
============================================================
* Graphically : Application > system tool > Systemmonitor
Nice Value :- ( -19 . to +19 )
* SYSTEM MONITORING BY THE COMMAND MODE
..........................................
# who [ to show loging user ]
# whoami [ " ]
# w [ " ]
# pinky [ " ]
# who @ -r [ to check the run level ]
# runlevel [ " ]
# last [ to show the last loging ]
# lastb [ to show the last bad login ]
# ps @ -aux [ to shw the all proccess same time ]
# uptime [ to show the login duration ]
# vi @ /var/log/wtmp [ to check the log file of "last" command ]
# vi @ /vat/log/btmp [ to check the log fiel of "lastb" command ]
KERNAL
=====================
# uname [ show kernal ]
# uname @ -a [ to show all ]
# uname @ -v [ to shwo version ]
# uname @ -i [ to show hardware ]
# uname @ -o [ to show O.S ]
# uname @ -p [ to show process ]
# uname @ -r [ to show the runlevel ]
# uname @ -n [ to show node name or hostname ]
# uname @ -s [ to show the kernel name ]
# dmidecode [Show the BIOS Information]
LOGFIELS
=======================
# vi @ /var/log/cron [ to check the cron log ]
# vi @ /var/log/messages [ to show the log ]
# vi @ /var/log/dmesg [ kernel log ]
# vi @ /var/spool/mail/root [ root's mail ]
# vi @ /var/spool/mail/username [ local user ]
# vi @ /var/log/secure [ security ]
process
=======================
# ps [ to show the process ]
# ps -a [ all proccess ]
# ps - A [ " ]
# kill @ -9 @ psno. [ to stop the process ]
nice value ;- [ priority of process ]
high low
|---------------|---------|--------|
-20 0 5 +20
# top [ to show all the process ]
**********************************************************************************************
MANAGE SYSTEM SOFTWARE
========================================
* Type of software in linux
--------------------------------
1. RPM :- Red hat packege Manager [ Redhat, Fedora, Suje, Centosh ]
2. DEB :- Debien [ Ubuntu, Kubuntu, Debien, boss,]
Tar --\
3. > [ for both type of O.S maker ]
Bin --/
PACKAGE MANAGEMENT
===============================
* RPM - [ Red hat packege Manager ]
* YUM - [ Yellow dog Updater Modifier ]
* Realplayer11.1.x86.rpm *Realplayer11.1.x86_64
--------- -- - -- ---
1 2 3 4 5
1. name of package
2. version
3. update
4. Archiatect
5. extension
# rpm @ -ivh @ package name [ i - install , v - show , h - hashing (progress)]
ex- # rpm @ -ivh @ Realplayer.rpm
# rpm @ -ivh @ package name* [ more than one ]
# rmp @ -Uvh @ package name [ update ]
# rpm @ -qa @ package name [ quary name ] ?
# rpm @ -qa @ --last [ show last install ]
# rpm @ -F @ package name [ freshen/Repair ]
# rpm @ -e @ package name [ erase/uninstall ]
# rpm @ -e @ Realplayer [ remove Realplayer ]
# rpm @ -ivh @ package name @ --aid @ --force
( aid = avoid dependancy )
( force = reinstall . )
# rpm @ -ivh @ package name @ --nodeps [ nodeps = nodependency ]
-----------------------------------------------------------------------------------------------
YUM. [ Yellow dog Updater Modifier ]
*******************************************
* It is an xml file. It resolve the dependency . It is front hand of RPM.
YUM
------
STEP - I
=========
* copy the RHEL-6.1 DVD in a directory
/var/ftp/pub
--------------
# mount @ /dev/cdrw @ /mnt
# cd @ /mnt
# cp @ -av @ * @ /var/ftp/pub
STEP - II
==========
# vi @ /etc/yum.repos.d/server.repo [ to creat a YUM server ]
* [ server ]
* name = server
* baseurl= file:///var/ftp/pub
* gpgcheck=0
* enable= 1
* :wq [ to seve the YUM server ]
STEP - III
=============
* install the package of createrepo.
#cd @ /var/ftp/pub/packeges
#rpm @ -ivh @ createrpackege _tab
STEP - IV
============
* creat the repository [ read the package ]
#cd @ ..
#cd @ ..
#createrepo @ pub
STEP - V
==========
#yum @ clean @ all
STEP - VI
==========
#yum @ install @ packagename
#yum @ install @ packagename* [ install all packeges ]
#yum @ remove @ packagename
#yum @ remove @ packagename* [ remove all packeges ]
#yum @ list @ all [ show all installed packeges ]
SERVER AND CLIENT SIDE
======================
* SERVER SIDE
---------------
# yum @ install @ vsftpd *
# service @ vsftpd @ restart
# chkconfig @ vsftpd @ on
*CLIENT SIDE
----------------
# vi @ /etc/yum.repos.d/server.repo
[ server ]
name=server
baseurl=ftp;//192.168.0.254/pub
gpdcheck=0
enabled=1
:wq
#yum @ list @ all
.TAR
=====
* Install from internet > AB.tar > R.C. [extracte fire ] > open it and see the rpm.
#cd @ AB
#./configure
# make
# make @ install
.BIN
========
* Install from internet > AB.bin
# chmod @ u + x @ AB.bin
# ./AB.bin
===============================================================================================
HISTORY [ command line history ]
**************************************
* Command line history
#history [ to find the history command ]
#!! [ run the last command ]
#!30 [ run the 30 no. command of the history ]
#!s [ run the character command ]
#!se [ run the character command ]
#history -c [ to cancle the all the histroy ]
#HISTSIZE=0 [ do not save the any command in the history ]
#HISTSIZE=1000 [ save the history command till 1000 ]
#history -r [ to recover of the deleted history ]
=================================================================
Chapter - 11
*****************
Basic Networking
NIC - Network Interface Card
1st NIC - eth0 in linux
2nd NIC - eth1 in linux
# ip -a [ to see the all ip ]
# ip -ad [ to show all the ip
# IP -add [ *]
# ip -addr [ *]
# ifconfig [ to find out the IP of the system ]
# system-config-network [ to change the IP through the command mod]
# service network restart [ to restart the network ]
# ping 192.168.1.1
^c to break the pinging
# ping -s 256 192.168.1.1
====================================================================================
Chapter - 12
************************
( USER GROUP )
Note: [ When we creat a new user in Linux, A group creat automatically with the name of user and this user is the
primary member of own group ]
UID GID
[user-id] [ group -ID ]
( A uniq no. of every users )
0
!
!
!
!
!
!
499 (reserve for system process )
----
500 (1st local user of the system
till
60,000 ( can creat the users )
[ Kernal - 2.4 1 million ]
[ Kernal - 2.6 4 million ]
Password
*********
*minimum lenth - 6 character
*maximum lenth - 256 character
================================================
PERMISSION
***********
#ll [ show the file in the list ]
2rwx r-x r-w 2 root root
---- ---- --- --- ----- -----
1 2 3 4 5 6
1. is the permission of the user
2. is the permission of the group
3. is the permission of the other
4. is the no. of file in the dir
4. user of the dir
5. group of the dir
Permisson
4 2 1 4 1 4 2
r w x r x r w
4 + 2 +1 = 7 4 + 1 = 5 4 + 2 = 6
4 = read
2 = write
1 = exicute
------------
u = user (owner) root
g = group
o = other
Bydefault
permission of is DIR = 755
FILE = 644
permission is the two type : (1) Normal permission [ set for all ]
(2) Special permission [ ACL, SUID, SUID, SCID ]
NUMERICAL MODE
**************
#chmod 777 dir/file [ to give the full permission to the dir/file]
#chmod 700 dir/file [ to give full permission only for user ]
#chmod 770 dir/file [ to give the full permission to user and group ]
#chmod 000 dir/file
#chmod 774 dir/file
#chmod 755 dir/file
SYMBOLIC METHOD
****************
#chmod u+rwx dir/file
#chmod g+rwx dir/file
#chmod ug+rwx dir/file
#chmod u + x dir/file
#chmod u - rwx dir/fiel [ where is + = add
- = min
user group directory
----- ------ ------------
erick rhce /jetking
johan
herry
* By defoult all user can read and exicute
* By defoult all other can read and exicute
#chmod 777 /jetking [ all users can read , write and exicute]
or
#chmod ugo + rwx /jetking
#chmod 755 /jetking
#chown erick /jetking *[ Note : to change the owner of the dir ] *
#chgrp 775 /jetking *[ to change the group ]*
#chmode 775 /jetking [ only user or RHCE can read and write ]
press = [ ctrl + D ] to logout from the terminal
drwx-wx-r-x 8 root root 4096 Nov 8 11:15 AM
----------- -- ---- ---- ---- ------ ---------
permission no.con. owner group size of data date time
#ll |less [ to scrol the detail ]
=======================================================
Test Paper
----------------------
q1. Creat the 3 users.
q2. password will be username
q3. Creat a directory by the name of /Linux
q4. /Linux should be readble and writable for user 'susaan'
q5. /Linux should be readble and writable for user poul and herry
q6. Login by user sujan in G.U.I mode
q7. login by root on CUI mode and creat a directory from here in 'susaan's Desktop with the name by alok.
q8. alok should be writable for user susaan.
===================================================================
Chapter - 15/16
-----------------
NFS SAMBA FTP SSH TELNET
Remote login - ssh/telnet
Remote desktop - Linux - Linux - Windows
NFS SAMBA FTP SSH TELNET
-----------------------------------------------------------------------------------------------------------------
1.linux to linux linux to linux linux-linux- Remote login Remote login linux
directory shairing other directory windows shairing linux-linux -linux-windows
shairing
2.port no. 2049 port no. 137/138/139 prot no. 20/21 port no. 22 port no. 23
/445
3.work on lan work on LAN work on LAN work on LAN/WAN work on LAN/WAN
-------------------------------------------------------------------------------------------------------------------
*NFS
#mount 192.168.1.1:/linux /mnt [ to mount a dir/file through NFS ]
#cd /mnt
#ls [ to see the mounted content ]
#umount /mnt [ to unmount the mounted dir/file ]
-----------------------
*SAMBA
#smbclient //192.168.1.1/jetking -U username [ To access the SAMBA server thought CLI mode ]
passwd :**** [ give the password of the samba server ]
smb>ls [ list the content ]
>exit [ to exit from SAMBA server ]
#mget filename* [ to download from SAMBA server ]
-----------------------
OR
FROM THE GUI MODE
Step - go to the > Place > connect to the server
> servertype SSH/FTP/FTP-login/Windows-share/HTTP/HTTPS/
> server 192.168.1.1 [ give the ip with whome you would like to connect ]
> username *****
> password *****
> click on Connect
--------------------------------------------------------
*FTP
#ftp 192.168.1.1 [ to connect to the FTP-SERVER ]
>username: tom
>passwd: *****
ftp>ls
ftp>help
ftp>ls *filename* [ to find the file ]
ftp>mget filename [ to download the file from FTP-Server]
ftp>bye [ to exit from FTP ] \
----------------------------------------------------------
FTP on WINDOWS
RUN > CMD
c:\ftp 192.168.1.1
or
open the web-brouser and wirte this
ftp://192.168.1.1
------------------------------------------------------------------
*SSH
#ssh username@192.168.1.1 [ to login on network-system through SSH-SERVER]
#passwd *******
#exit
#ssh -X username@192.168.1.1 [ login on network system through SSH in graphic mode
#passwd : ******
#ssh root@192.168.1.1 [ login from client to root through SSH ]
SSH : Login on Windows
step 1. install the putty software on Windows
step 2. open the putty and wirte th
server: 192.168.1.1
username:
passwd :*******
---------------------------------------------------------------------------
*REMOTE DESKTOP
step 1. enable the remote desktop
>mycomputer > properties > remote desktop > allow remote desktop > ok > ok
-----------------------------------------------------------------------------
*VNC
#vncviewer 192.168.1.1 [ to acess the network - system remotly through Linux system ]
[ip of the destination system]
----------------------------------------------------------------------------
*SCP ( secure copy )
1. #scp -r /home/tom/Desktop/jetking herry@192.168.1.1:/home/herry/Desktop [copy from host to destination ]
#passwd : ******
2. #scp -r herry@192.168.1.1:/home/herry/Desktop/007 /home/tom/Desktop [copy from Destination to host ]
#passwd : *******
-----------------------------------------------------------------------------
*TELNET
#telnet 192.168.1.1 [ accessing network-system through telnet ]
------------------------------------------------------------------------------
===========================================================================================================================
*FILE - SYSTEM*
============================
1.Ext4 [ new file system of RHEL6 ]
2.swap [ virtual memorry of system ]
Standard RAM SWAP
1 GB 2 GB
2 GB 4 GB
4 GB 4 GB
*How to increase the swap partition ?
Step.1 Creat the partition of 2 GB with the ID of 'swap'
[ ID of swap - 82 ]
#fdisk /dev/sda
Command (m for help): p [ press 'p' for partition ]
Command (m for help): n [ for creat a new partition]
Command action
l logical (5 or over)
p primary partition (1-4) [ to give the partition no. to creat a new partition]
-----------------------------------------------
step.2 (after creating the new partition mount this in to '/et/fstab')
------
#vim /etc/fstab
/dev/sda4 swap swap default 0 0
(partion
step.3 #mount -a
#mkswap /dev/sda4
#swapon -a [ activate ]
#swapon -s [ show ]
step.4 Creat a blank file as 2GB
#dd if = /dev/zero of=/swap bs=512 count=2
#vim /etc/fstab
/swap swap defoult 0 0
:wq [save the file after the editing in /etc/fstab]
step.5 #mount -a
#mkswap /swap
#swapon -a
#swapon -s
#reboot -f
---------------------------------------------------------------------------------------------------------------------
VIRTUAL MACHINE
===============================
*Virtualization :- share the hardware resouraces
*Type of virtualization
1. Software based virtualization
A. Para Virtualization
B. Fully virtualization
2. Hardware based virtualization
A. vmware = (vmware --Windows/Linux
B. Virtualpc = (Microsoft) - Windows
C. Virtual Box = (oracle) --Windows/Linux
D. Xen = (Red Hat ) - Linux
E. KVM = (Red Hat ) - Windows/Linux [ KVM - Kernal based Virtual Mac]
#vim /etc/services [ to check the port and services ]
(XEN ) - RHEL-5
(KVM) - RHEL-6 [ Kernal Based Virtualization Machine ]
( work on 64 Bit os )
(Hardware based virtualization )
1. Paravirtualization :- same as host O.S
2. Fully :- different from host O.S
KVM
| - Hyperviser (its helps to manage O.S and Virtual
OS
#cat /proc/cpuinfo |grep lm [ to check the bit size O.S
#cat /proc/cpuinfo |grep vmx (to check that does its support virtual this O.S or not )
#cat /proc/cpuinfo |grep sum ( AMD )
( Total Port and Protocol is = 65000 )
----------------------------------------------------------------------------------------------------------------------
Multi Process
============================
#firefox & [ multiprocess ]
#firefox & gcalctool & gedit & gnome-terminal & [ to open the multi proces at time ]
#Ctrl + Alt + F1 [ open the first Terminal ]
#Ctrl + Alt + F2
#pidof gedit [ to find the pid no. of gedit or any process ]
#kill -9 pid of process [ to close the runing proces ]
#last [ to find out the last login ]
#cd /tmp
#rm -rf * [ to delet the all temprory files ]
#rm -rf .* [ to delet the hidden files ]
--------------------------------------------------------------------------------------------------------------------
No comments:
Post a Comment