Manoj Linux
Manoj Linux
Manoj Linux
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
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
/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.
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.