0% found this document useful (0 votes)
26 views5 pages

Basics of Linux, For Analyzing Logs & Events.

Linux basic
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
26 views5 pages

Basics of Linux, For Analyzing Logs & Events.

Linux basic
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 5

Index:

 Architecture of UNIX
 File system Hierarchy
 File Permissions

ARCHITECTURE OF UNIX

The architecture of UNIX can be divided into three levels of functionality, as


shown in the below Figure.

Kernel: It is the lowest level, which schedules tasks, manages resources, and
controls security.

Shell: It is the Median level, which acts as the user interface, interpreting user
commands and starting applications.

Utilities: It is the highest level, which provides utility functions. In other words
it is the USER level, as user is the one who operates those utilities.
FILESYSTEM HIRARCHY SYSTEM

Linux Uses single rooted, inverted tree like file system File System Hierarchy.

Partition Detailed description Similar examples in


Name (In Windows OS
Linux)
/ (Root) This is top level directory. C:\ of windows
It is parent directory for all other
directories.
It is called as ROOT directory.
It is represented by forward slash (/).
/root It is home directory for root user (super C:\Documents and
user). Settings\Administrator
It provides working environment for root
user.
/home It is home directory for other users. C:\Documents and
It provide working environment for other Settings\username
users (other than root).
/boot It contains bootable files for Linux.
Like vmlinuz (kernel) - ntoskrnl
Initrd (INITial Ram Disk)and
GRUB (GRand Unified Boot loader) -
boot.ini, ntldr.
/etc It contains all configuration files C:\windows\system32\
Like /etc/passwd - User info dirvers\
/etc/resolv.conf - Preferred DNS
/etc/dhcpd.conf - DHCP server
/usr By default software’s are installed in /usr C:\program files
directory (UNIX Sharable Resources).
/opt It is optional directory for /usr. C:\program files
It contains third party software’s.
/bin It contains commands used by all users
(Binary files)
/sbin It contains commands used by only Super
User (root).
/dev It contains device files Similar to device
Like /dev/hda - for hard disk manager of windows
/dev/cd rom - for cd rom
/proc It contain process files.
Its contents are not permanent, they keep
changing.
It is also called as Virtual Directory.
Its file contain useful information used by
OS.
like /proc/meminfo - information of
RAM/SWAP
/proc/cpuinfo - information of CPU
/var It is containing variable data like mails, log
files.
/mnt It is default mount point for any partition.
It is empty by default.
/media It contains all of removable media like CD-
ROM, pen drive.
/lib It contains library files which are used by It is similar to .dll files of
OS. windows
Library files in Linux are Shared object
(SO) files.

Files which is related to mounting in Linux


It is a file which stores the information of
/etc/mtab all the currently mounted file systems; it
is dynamic and keeps changing.

It is the file which keeps information


/etc/fstab about the permanent mount point. If you
want to make your mount point
permanent, so that it will be mounted
even after reboot, then you need to make
an appropriate entry in this file.
File Permissions

Permissions are applied on three levels.

 Owner or User level


 Group Level
 Other Level

Access modes are of three types.


 r – Read only
 w – Write/Edit/Delete/Append
 x – Execute/ Run a command

Access modes are different on file and directory

Permission Files Directory


s
r Open the file ‘ls’ is the contents of dir
w Write, edit, append, delete file Add/Del/Rename contents of dir
x To run a command / shell To enter into dir, use ‘cd’
script

File type + permission, links, owner, group name of owner, size in bytes, date of
modification, file name.

Permission can be set on any file/dir by two methods:-

1. Symbolic method (ugo)


2. Absolute methods (numbers)

Symbolic method (ugo): General form of symbolic mode is:


# chmod [who] [+/-/=] [permissions] file
who  To whom the permissions to be assigned
User/owner (u); group (g); others (o)
Example: - Assigning different permissions to the file (user=rwx, group=rw and
others=r)
#chmod u=rwx,g=rw,o=r ktfile (where ktfile is the name of the file)

Assigning full permission to the file i.e. rwx to all


#chmod ugo=rwx <file name>

Absolute Method (numbers): In Absolute method we use numbers instead of


using symbols i.e.
 Read=4
 Write=2
 Execute=1

Example: Assigning different permissions to the file (user=rwx, group=rw and


others=r)
#chmod 764 ktfile (where 7 means rwx i.e. 4+2+1, rw=6 i.e. 4+2 and 1 indicates x)

Assigning full permission to the file i.e. rwx to all


#chmod 777 ktfile

You might also like