Handbook
Handbook
• ,,,,))))))))))))))
• #lsblk
• # w -f {From }
• # w -h { To remove header }
• #touch /krishantechblog
• #file /krishantechblog
o [krishantech@localhost~]$
• #useradd krishantech
• #passwd krishantech {password for krishantech user}
o 123
o 123 {password}
'mkdir,,ls,,cd,,,touch,,,echo,,,,wall,,,,cat,,,,t
ac,,,wc’
wall (is used to print any message over the entire network..)
#ls /home
• symbols in linux.
▪ 1) ; {semi-colon,, it is used to run more than ''one
command at a time'' }.
Examples of ; (semi-colon)
#date
#date ; cal ; who {three commands will fire at a same time}..
#who ; date
head & tail
head by defaults shows 10 lines from top of the file ,,,
tail by defaults shows 10 lines from bottom of the file ,,,,
#head /etc/passwd
#head /etc/group
#tail /etc/shadow
#tail /etc/group
#head -n 10 /etc/group
#head -n 17 /etc/passwd
#tail -n 15 /etc/passwd
#history
#history | tail -n 26
• Grep,,,Egrep,,,Fgrep
grep= it grep only "one pattern" from " one file"..
Egrep=it grep " multiple pattern " from " one file ".
egerp = enhance grep
▪ -i = ignore k-sensitive
▪ -o = only a particular word
▪ -n = those lines in which word present
▪ -v = reverse match
▪ -w = for exact word
▪ -A2 = it shows after two lines.
▪ -B3 = it shows before two lines.
▪ -C4 = top & bottom
▪ -R = to grep over "folder"..
▪ ^ = carrot symbol search begining of line..
▪ $ = dollar symbol search end of line.
• #init 6 (reboot)
<<<<<<<<<<<<TARGETS in RHEL-7>>>>>>>>>>>>>>>>>
fileds= {username:passwd:uid:gid:comment:home:shell}
this file contains " (7) fileds"
fields={username:passwd_encrpted_form:passwdpolicy}
this file contains "(9)" fields.
((1)) filled contain "username".
((2)) filled contain "password in encrypted form".
rest of ((7)) filleds contains "passwd policy"....