Thursday, June 17, 2010

Command Line Interface




1.  Press Ctrl + Alt + F1
2.  Type username and password as root and redhat or whatever the password
3.  Now if you enter using root you will get # prompt
4.  If you have entered using other user you will get $ prompt
5.  # is fully privileged $ is unprivileged so in some commands it will ask for root password not only in  CLI but also in GUI

COMMANDS
Normal format for Linux Commands

command options arguments

Rules
-Each item is separated by space
-Argument is given by -a -b or -ab etc
- For help of any command add --help at end of the same
- Multiple commands are separated by ; e.g. ls ; vim …..


Commands…….
1. date – displays date and time ….
e.g. date +”today is %A, %B %d, %Y. %nIT is %r, %Z.”

here %A is date e.g. Friday for %a -> fri
%B is month e.g. January for %b -> jan
%d is date
%Y is indicates year e.g. 2006 for %y ->06
%r is time in am or pm e.g. 12:06:23 PM and for %R is 23:23
%Z is indicates time zone e.g. EST and for %z -> +05:30 (means GMT + 05:30)
We can also apply date to see current date and time…….
2.  cal  - display calendar
Shows calendar for present year
->  cal 09  à will show calendar for year 2009 
-> cal 9 2010 -> will show 9th month year 2010
->  So abbreviation is  simple….whatever is first is month if 2 parameter and if single than its year
3. whatis  - Displays short description for any command
e.g. whatis cal  shows the description for cal command
   4. help , man , info – is used to get help for command
e.g. -> command –help
     -> man command
     ->  info command

No comments:

Post a Comment