“ tty “ the terminal command shows the pseudo terminals.
“ echo “ command show the given value or shows the valueof the environment varriables.
“ grep “ is the command which displays the line with thematching pattern. It can be executed with more options.Option Definition -i Searches for both uppercase and lowercase characters -l Lists the names of files with matching lines -n Precedes each line with the relative line number in the file -v Inverts the search to display lines that do not match the pattern -c Counts the lines that contain the pattern -w Searches for the expression as a complete word, ignoring those matches that are substrings of larger words.
The “ grep “ command supports several regular expressionMeta characters to further define a search pattern. This tabledescribes some of the regular expression meta characters.Regular expression meta characters:Metacharacter Purpose Example Result ^ Beginning of ’^pattern’ Matches all lines line anchor beginning with “pattern” $ End of line ’pattern$’ Matches all lines anchor ending with “pattern”
Additional regular expression meta characters:Metacharacter Purpose Example Result Matches one ’p.....n’ Matches lines . character containing a “p,” followed by Five characters, and followed by an “n” Matches the ’[a-z]*’ Matches * preceding Lowercase item zero or Alphanumeric more times characters or nothing at all
“ grep “ continues …Metacharacter Purpose Example Result Matches one Matches lines character in ’[Pp]attern’ Containing  “Pattern” or the pattern “pattern” Matches one Matches lines that character not do not contain “a” [^] ’[^am] in the pattern through “m” and attern’ followed by“attern”
EgrepThe egrep command searches the contents of one or more filesfor a pattern using extended regular expression metacharacters.Extended regular expression metacharacters include the regularexpression metacharacters that the grep command uses, plussome additional metacharacters.
Egrep Metacharacter Purpose Sample Result+ Matches one or ’[a-z]+ark’ Matches one or more more of the lowercase letters preceding followed by “ark” (for characters example, “airpark,” “bark,” “dark,” “landmark,” “shark,” “sparkle,” “trademark”)? Matches zero ‘patte[r?]’ Matches lines or one Containing the literal character character or metacharacter it followsx|y Matches either x or ’apple | orange’ Matches for either y expression
Using VI EditorIdentifying the Fundamentals of vi Editor operation• Introducing the vi editor modes of operation• The command mode• The edit mode• The last line mode• Switching between the command and edit modes• Introducing the vi command
Solaris User AdministrationEach user account consists of five main components:• User name• Password• User’s home directory• User’s login shell• User initialization files
Managing User AccountsBefore you can add user accounts to the system, you mustdetermine the following information for each new user:• Login name• User identification (UID) number• Group identification (GID) number• Comment• home directory• Login shell• Password aging
Storing User and Group Account informationThe Solaris Operating Environment stores user account and group accountinformation in the following system files:• /etc/passwd – Authorized system users have login account entries in the/etc/passwd file.• /etc/shadow – All passwords are encrypted and maintained in a separateshadow file named/etc/shadow.• /etc/group – The /etc/group file defines the default system group accounts.
The “ /etc/shadow “ file formatroot:LXeoktCoMtwZN:6445::::::daemon:NP:6445::::::bin:NP:6445::::::sys:NP:6445::::::adm:NP:6445::::::lp:NP:6445::::::smtp:NP:6445::::::uucp:NP:6445::::::nuucp:NP:6445::::::listen:*LK*:::::::nobody:NP:6445::::::noaccess:NP:6445::::::nobody4:NP:6445::::::
The “ /etc/group “ file formatroot::0:rootother::1:bin::2:root,bin,daemonsys::3:root,bin,sys,admadm::4:root,adm,daemonuucp::5:root,uucpmail::6:roottty::7:root,tty,admlp::8:root,lp,admnuucp::9:root,nuucpstaff::10:daemon::12:root,daemonsysadmin::14:lister,toreynobody::60001:noaccess::60002:nogroup::65534:
Command line User Account AdministrationThe following command-line tools add, modify, and deleteuser accounts and group accounts on the local system:• useradd – Adds a new user account• usermod – Modifies a user’s account• userdel – Deletes a user’s account• groupadd – Adds (creates) a new group account• groupmod – Modifies a group account• groupdel – Deletes a group account