Basics
Login: root
Password: Redhat
Login can be in 2 ways
1. Text (Console)
2. Graphics
• Gnome (GNU Network Object Model Environment)
• KDE (K desktop Environment)
• Fail safe terminal (Graphical text based console)
Run levels
• Level 0 – Halt
• Level 1 – Single user mode, mainly for trouble shooting and no authentication is required.
• Level 2 – Multi user environment with out NFS and NIS support.
• Level 3 – Multi user environment with all the network and services support.
• Level 4 – Unused (Not configured by REDHAT).
• Level 5 – GUI mode
• Level 6 – Reboot
# init <0..6> //to switch between the run levels//
# startx //to enter into GUI mode from run level 3//
# runlevel //to display the present and previous runlevels//
# tty //to display the present terminal//
Ctrl+Alt+(F1<->F6) //to switch between the terminals//
# cat /etc/issue //Message for before login//
# cat /etc/motd // Message for after login//
Note: - man page of “finger” and “w’ will give more information.
Commands and getting help
1. # date
syntax: # command
# date +%a /only day/
# date +%A /full form of day//
B /full form of month/
b //month form/
y and Y //year format//
many options are available when we visit the man page of date command.
# date 021010102009 //to change the date//
2. # cal //calendar of present month//
# cal -1 //default calendar output//
# cal -1 //present and previous calendar output//
# cal -j 2009 //inform of 365 days, j - Julian calendar//
# cal 09 1752 //no dates available between 3rd to 13th//
- Because September 3rd 1952 Gregorian Reformation was
taken place to match universal calendar
Help Levels
1. # whatis
2. #
3. # man
We have total 8 sections under manual pages
1. User Commands
2. System Calls
3. Library Functions
4. Special Files
5. File Formats
6. Games
7. Conventions and miscellany
8. Administration and privileged commands
# man (1 to 8) intro //man pages for all 8 sections//
Example: # man date
Output = date(1) //1 means first section//
: - passwd is a command and /etc/passwd is a password file, manual entries for these are follows.
# man passwd //information from section 1//
# man 5 passwd //information from section 5 for passwd file//
also # man –a
all sections related to that command and use ‘q’ to switch between the sections//
Tip: # init q //to update ‘inittab’ file//
# telinit //link file to init command//
# man fork
4. # info
Ex: - # info date
Node(*) //* indicates a link to some more information//
Press ‘tab’ to switch to another node and press ‘enter’ into particular node
information and press ‘u’ to come out from that.
Press ‘n’ to go to the next node information from where you entered already
by hitting ‘enter’ from node(*) and press ‘p’ for previous node.
Check ‘/usr/share/doc’ directory for more information
In GUI mode go to system/documentation/deployment guide for documentation
File Systems
File: - Collection of information
Filesystem: - Systematic arrangement of file on any storage media
Types of file
1. Regular file
2. Directory file
3. Special file //(/dev)//
# file
Features of filesystem
1. ‘/’ is the parent directory
2. File system is inverted tree structured
3. File names can be of 255 characters length and except ‘/’ we can use anything as file name
4. # cd .. // .. represents parent directory//
5. File names are case sensitive
Journaling
For example: -
# vi file1 //open a new file//
Then this information stores in journal space and if there is any improper shut down due to power down, in the next reboot, it will check or scan only the journal space instead of checking the whole hard disk.
EXT3 file system is having the journal and EXT2 does not.
Tip: - # blkid //to know the attributes//
Explanation of directories
• / - root directory
Under root directory
• /bin – contains the commands, which can be executed by both the root and normal user.
• /sbin – contains commands which can be executed only by root user
• /root – home directory for root user
• /home – home directory for normal user
• /boot – where boot related files are stored
• /lib – contains library files, where the commands have links to these library files
• /var – variable length information (data varies as per time), for example: - user login details
• /tmp – stores temporary data like cache. For example: - cookies (by default, it keeps the data for 10 days and deletes, if not accessing)
• /dev – stores device files. For example: - information about hardware.
• /opt – for configuration of third party software, the information stores under this directory.
• /etc – stores all the configuration files
• /mnt and /media – mount points, where we use to mount cd, dvd and usb.
• /usr – contains storable resources like UNIX system resource
Types of path
1. Absolute path – path starting with ‘/’. For example: - # cd /usr/share/doc.
2. Relative path – path starting with out ‘/’. For example: - # cd share/doc.
# cat –n
# cat >
Ctrl+d //to create a file//
# touch
# touch file1 file2 file3 //to create multiple files at a time//
# touch –t 01021210 file1 //to change the time stamp of a file in format of
mmddtime//
# uname //for system information//
# mkdir
options are
• i – interactive
• r – recursive • v – verbose
• f – forceful
# cp –r dir1 dir2 //to copy dir1 to dir2//
# mv file1 file2 //to rename file1 as file2//
/root is required to mention the path while copying
# rmdir
# rm //to remove a directory//
# rm –r
# rm –rf
# ls –F //to list while differentiating the directories with the symbol ‘/’ and executable files with ‘*’//

1 comments:
Really nice doc
g8
Post a Comment