Linux Important Command Service Important Step

Open list of files particular protocol
lsof –i  TCP,lsof –i TCP:80,
list of open file particular service,user
lsof –c http,user
Backup tar,gzip,bunzip2,cpio
tar –cvf backup.tar sourcefile file,bunizp2 sourcefile,find / -name *.c | cpio –o –format=tar cfile.tar

RAID-3 , RAID -5
Parity separate disk, parity across disk
RAID -0,RAID -1
Striping , mirroring,
Iptables –chain –Accept-Reject-Drop, rules
-A,-s,-d,-p,-j,-i,
Log file,
/var/log/messages,/var/log/lastlog,dmesg
http log file
/var/log/httpd/error_log,/var/log/httpd/access_log
Shutdown option
Shutdown –r,-f,-h
Raid
Mdadm –c /dev/md0 –l1 –n2 –x1 /dev/had(1,2)
Zombie Process
Kills –S SIGCHILD [processed], ps –el | grep ‘s’
/etc/passwd
Usernme:xyx:3:4:Commend:Home Directory:shell login
/etc/fstab
/dev/sda3 /mnt ext3 defaults 1 0
deviceName MountPoint FileSystem mount optiong dumb fsck order
Cut
Cut -d –f3,4 /etc/passwd
Booting option
BIOS –MBR-kernel-init-Run Level
Networkg monitor command
Netstat | Routing table,masquerade connection,
Netstat –r,netstat –an | grep 80, Network statics netst -s
Difference Between ext2 to ext3 file system
Availablity, Data Integrity, Speed, Easy Transition
Ext2 to ext3 | Ext3 to ext2
tune2fs –j /dev/hda1 | #tune2fs –O ^has_journal /dev/hda10
Port Number SSH-IMPAS-mysql-smpts
22-993-3306-465-
/proc File system
Details about kernel,Hardware,Running process
/proc/PID, mdstat,cpuinfo,meminfo,modules
,mount,partition
Kernel job
System initialization ,Memory Management, Network Management ,Security,
Userid ,groupid, stick bit
setuid: chmod 4000
setgid: chmod 2000
 sticky bit : chmod 1777

Sudo
/etc/sudoers,visudo ,
[username] [system name] = [paths] restart
rhel5  sys1.redhat.com=/etc/httpd/restart
vmstat
Monitor virtual memory
Id-idle time wa –watingi for input
Us-[user time] –time spending on kernel mode
Sys-[sys time]-time spending on kernel mode
Umask
Root 022 user 002




SERVICES

/usr/share/doc/dhcp-3.0.5/dhcpd.conf.sample
subnet 192.168.0.0 netmask 255.255.255.0 { -- line 4
range dynamic-bootp 192.168.0.128 192.168.0.254;  –line 21
Web Server
/var/www/html
/etc/httpd/conf/httpd.conf
NIS
1)install yp* package
2)add the /etc/sysconfig/network NIS Domain=rhel5
3)portmap &  ypserv restart
4)Add Host /usr/lib/yp/ypinit –m
5)Add the user
6)/var/yp ->make
client Add the NIS domain using setup
3)
NFS
/etc/exports 2) restart 3)showmount –e ip
User quota
1)etc/fstab , usrquota ,
2)mount –o remount /home
3)quotacheck –cf /home
4)eduquota –u username

LVM Reduce or Extended
1)resize2fs /dev/vg1/data 12M
2)lvreduce –L 12M /dev/vg1/data
LVM Create
1)pvcreate /dev/had6 /dev/hda7 /dev/hda8
2)vgcreate /dev/vg0 /dev/hda6 /dev/hda7 /dev/hda8
3)lvcreat –L 20M –n /dev/vg1/data
ACL
1)setface –m u:username:permission file
Samba
1)install samba*
2)add samba user
3)change ownership
4)create the samba password
4)/etc/samba/smb.conf,path,writable,read only




Rsync
-e,-a.-z,-v,-=r
TCP
Connection,3 way handshake,acknologment,low speed
UDP
Connectionless protocol, no 3 way handshake ,no acknologment ,high speed
DNS is Normally use UDP
DNS,DHCP,TFTP
Iptables
Iptables –A Input –s 0/0 –d 12.12.0.5 –p TCP –j ACCEPT
Awk
ls –l  | awk  ‘{ print $3 }’
Df
Partition
Du
Folder size
Network Monitor Analysis
Monitor network traffic- capture Network Traffic

Network
/etc/sysconfig/network-scripts/ifcfg-eth0
/etc/sysconfig/network-IP Address
Mysql




Request Time Out
Turn off firewall
Destination Host unreachable
Maintain the Same IP


Related post