Thursday, December 11, 2008

Introduction to LINUX

Introduction to LINUX

Typical Installation of Linux is as simple as installing windows operating systems. Custom installation requires some expertise in understanding the Linux directory structure. Linux always takes the unformatted partition to load operating system

Directory structure
root bin etc usr home dev lib boot .. d01

‘/’ is the starting point, under this various default, user-defined subdirectories like d01 in which oracle applications is created

Logging to Linux server using telnet will take the user to user’s home directory.Eg. For user1 the home directory is /home/user1

Using Telnet

Telnet provides user support for the Telnet protocol, a remote access protocol you can use to log on to a remote computer , network device, or private TCP/IP network.
• To open Telnet, click Start, click Run, and then type telnet. You can also type telnet at the
command prompt.
• Using Telnet, you can make a remote connection.
• To use Telnet, you must have the TCP/IP protocol installed and configured on your computer and you must have a user account established on a remote host.
• To display help for Telnet, type help at the command prompt.

Linux Commands

ls - list directory contents

ls [OPTION]... [FILE]...
-a displays all the files including starting with .
-A displays all the files excluding implicit “.” “..”
-t sort by modification time
-r reverse order
-R recursively displays the files , subdirectories and it’s contents
-s print the size of each file, in blocks
-S sort by file size
-l displays long format

example: when you use ls -ls
4 -rw-r--r-- 1 sdaggupa users 803 Apr 1 10:10 test.c
4 drwxr-xr-x 3 sdaggupa users 4096 Apr 7 11:00 conv
[number of operating system blocks; permissions (d- directory,- file); unknown; username; usergroup; size in bytes; month; date; time; file or directory name]

clear – Clears the screen

more -

mkdir - Create the DIRECTORY(ies), if they do not already exist.
-m, --mode=MODE set permission mode (as in chmod), not rwxrwxrwx - umask
-p, --parents no error if existing, make parent directories as needed

cd - change directory
cd [ or or ] relative path : path from the working directory absolute path : complete path from “/” virtual path : path defined in the current environment

cd -changes to user’s home directory

cp - copy files and directories


OPTION -R copies the source (including subdirectories and its contents) recursively.
-u copy only when the file is newer than the destination, and when destination file is missing.

mv - move (rename) files
Rename SOURCE to DEST, or move SOURCE(s) to DIRECTORY.
-f, --force never prompt before overwriting
-i, --interactive prompt before overwriteNote: Practice well before using otherwise you may not get back your file some times

rm - remove files or directories

rm [OPTION]... FILE...
This manual page documents the GNU version of rm. rm removes each specified file. By default, it does not remove directories.
-f, --force ignore nonexistent files, never prompt
-i, --interactive prompt before any removal
-r, -R, --recursive remove the contents of directories recursively

rmdir - remove empty directory

chmod - change file access permissions
chmod [OPTION]... MODE[,MODE]... FILE...
-R to change the mode recursively if it is directory

ex: $chmod 755 test.cafter executing the above command test.c will have rwx permissions for the user, r-x permissions for group, r-x permissions for Other users

chgrp - chgrp - change group ownership
chgrp [OPTION]... GROUP FILE...
-R to change the group ownership recursively if it is Directory

No comments: