Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

Manoj Linux

Download as odt, pdf, or txt
Download as odt, pdf, or txt
You are on page 1of 3

The kernel

It allocates time and memory to programs and handles the filestore and communications in response
to system calls.
E.g suppose a user types rm myfile (which has the effect of removing the file myfile). The shell
searches the filestore for the file containing the program rm, and then requests the kernel, through
system calls, to execute the program rm on myfile. When the process rm myfile has finished
running, the shell then returns the UNIX prompt % to the user, indicating that it is waiting for
further commands.

The shell
The shell acts as an interface between the user and the kernel. When a user logs in, the login
program checks the username and password, and then starts another program called the shell. The
shell is a command line interpreter (CLI). It interprets the commands the user types in and arranges
for them to be carried out. The commands are themselves programs: when they terminate, the shell
gives the user another prompt (% on our systems)
To check shell in your linux sytems
cat /etc/shells
To know the current shill
echo $SHELL

how to change shell


chsh help
chsh -s /bin/bash

Directory Structure
Unix uses a hierarchical file system structure, much like an upside-down tree, with root (/) at the
base of the file system and all other directories spreading from there.
A UNIX filesystem is a collection of files and directories that has the following properties
It has a root directory (/) that contains other files and directories.
Each file or directory is uniquely identified by its name, the directory in which it resides, and
a unique identifier, typically called an inode.
By convention, the root directory has an inode number of 2 and the lost+found directory has
an inode number of 3. Inode numbers 0 and 1 are not used. File inode numbers can be seen
by specifying the -i option to ls command.
It is self contained. There are no dependencies between one filesystem and any other.
Note :In a Unix-style file system, an index node, informally referred to as an inode,

/
/bin
/dev
/etc
/lib
/boot
/home

This is the root directory which should contain only the directories needed at the top level
of the file structure.
This is where the executable files are located. They are available to all user.
These are device drivers.
Supervisor directory commands, configuration files, disk configuration files, valid user
lists, groups, ethernet, hosts, where to send critical messages.
Contains shared library files and sometimes other kernel-related files.
Contains files for booting the system.
Contains the home directory for users and other accounts.

/mnt

Used to mount other temporary file systems, such as cdrom and floppy for the CD-ROM
drive and floppy diskette drive, respectively

/proc

Contains all processes marked as a file by process number or other information that is
dynamic to the system.

/tmp

Holds temporary files used between system boots

/usr

Used for miscellaneous purposes, or can be used by many users. Includes administrative
commands, shared files, library files, and others

/var

Typically contains variable-length files such as log and print files and any other type of file
that may contain a variable amount of data

/sbin

Contains binary (executable) files, usually for system administration. For example fdisk
and ifconfig utlities.

/kernel Contains kernel files

To check the manual of any command


use man command
e.g : man ls

ls (list)
The ls command ( lowercase L and lowercase S ) lists the contents of your current working
directory.
-l will show with permission.
-a will show all the hidden file.

mkdir (make directory)


mkdir manoj: It will create the new directory in the current directory
e.g mkdir manoj
-m : It us use to set the peremission to the user
e.g :mkdir -m a=rwx mydir

You might also like