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

Basic Unix

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

UNIX/LINUX operating System

what is OS?
It is help to communicate with users to access hardware

Unix:
1960

Features:
1.Freeware
2.Open source
3.multi user
4.Multi tasking
5.It is user friendly
CUI(Command User Interface)
GUI(Graphical User Interface)

mkdir dir{1..50}
touch dir{1..50}/f{1..100}
6.When compare to windows, UNIX is more secured

Flavours of Unix:

Ubundu
Redhat Linux
CentOs
Fedora
open solaris
Suse Linix Enterprise Server(SLES)
open Suse
slackware

www.distrowatch.com

Components of Unix:

shell
kernal
Hardware

Shell
Shell is resposible to read commands provided by user.
shell will check whether command is valid or not and whether properly used or not.
If everything is perfect then shell converts that command into kernal
undersatandble form. That converted command will be handover to kernal.

Kernel
Kernel is responsible to exec that command with the help of hardware.

Shell acts as interface between user and kernal


shell+kernel is nothing but Operating System.

Types of files:
1.Normal file or Ordinary file
2.Directory file
3.Device file
In linux not mandate to mention file extentition, it is just for user
identification we can mention extentition.
Bsed on file content linux will identify file types.

In unix os everythig is treated as file.

1.Normal File
normal txt, csv, binary files(image or video)

2.Directory file
Inside dir file we can create file or sub dir

3.Device File
In Linux, every device is represented as a file. By using this file we can
communicate with that device.

File system

Unix file system has Tree like strecture


It strats wirts with root(/)
/ is the top most directory

1.bin
Bin means binary.
This directory contains all binary exec related to our linux commands.
used by normal user

2.sbin
sbin--> system binary
secondery binary
High end admin commands(super or root)
used by super user.
Disk partition, Network management etc.

3.etc
Contains all system configration files.
like all user information, all group information, host informtion

4.tmp directory
tmp means temporary
It contains all temp files created in the current session.

5.dev directory
dev means device
In Linux, every device is represented as a file. By using this file we can
communicate with that device.
All device related fiels will be stored inside dev directory.

Eg:
tty

6.opt Directory
opt means optional
This directory conatins all 3rd party software instllation files.

7.var directory
var means varibale data.
log file file will be stored in var

8.home directory
As linux is multi user OS, for every user seprate directory will be created to hols
specific data like video files, image files etc.

9.mnt directory
mnt means mounting
We have to create external file system for pen drive, CD, external harddisk. then
only we can bale to use these external files.
In the old operating system, we have to perform mounting operation manually.But in
recent operating system, mounting operations are automated.
The files of manual mounting will be placed inside mnt directory

10.media directory
The fiels of automatic mounting will be palced inside media directory.

11.lib directory
lib means library, It contains LInux OS libraries which are required by our
commands ans applications.

12.proc Directory
proc means process
In linux multiple process are running simultinaously.For every process unique
id(PID) will be generated auto.
The data related to current running process will be stroed under proc directory.

13.usr directory
usr means user.
This directory contains all user related files.(2nd party software)

14.boot directory
This directory contains the files which are required to boot linux os.

15.root directory
It is home directory for super user.

Note:
/home/raja---> Raja user home directory
/root ----> super user home directory

How to navigate into root user?


sudo -i
password:

use exit command to come back to normal user.

what is defrence between / and root directory?


/ act as root for linux file system. It is top most directory of linux file system.
root is subdirectory of /, which act as a home directory for super user.

cd --->user home directory


cd . -->current directoty(useless)
cd .. -->previous directory
cd - -->previous working directory
cd ~ -->user home directory

. represent current dir


.. previous directory

You might also like