SlideShare a Scribd company logo
BASICS OF UNIX
• Unix was developed by ken Thompson in 1969
• Unix is CUI operating system
• CUI stands for command user interface OS
• It is a case sensitive
• It is multitasking operating system
• It is derived from UNICS assembly language
• UNICS stands for Uniplexed information computing system
Features of Unix
• Multi User Capability
• Multi Tasking Capability
• Portability
• Communication(Electronic Mail)
• Security
• Open System
• Help Facility
• $ indicates login in Normal User Level
• # indicates Login in Super User Level
Flavors of Unix
Unix level we have multiple flavors of Operating systems using Unix Code they
can implemented Different operating systems ‘s those are
Company Operating System Plat Form
Sun Micro Systems Solaris SPARC Server
IBM AIX Main Frames level
HP HP – UX (HP – UNIX) ProLiant
Compaq true64 Alpha Processors
BSD BSD OS Intel Processors
Red Hat Linux RHEL ,Centos,Fedora,Ubuntu, SUSE
Linux
Etc Nearly 120 Flavours developed in
Linux
Basic commands
logname : It displays current user
Syntax : $logname
pwd : It displays present working directory path
Syntax : $pwd
date : It displays system date and time
Syntax : $date
cal : It displays current month calendar
Syntax: $cal
clear: To clear the screen
Syntax: $clear
cal 2010 : It displays 2010 calendar
Syntax: $cal 2010
cont.
uname : It displays operating system name
Syntax : $uname
uname -r : It displays kernel version
Syntax : $uname -r
hostname : It displays server name
Syntax : $hostname
hostname -i : It displays server IP address
Syntax : $hostname -I
who : It displays list of users who connected to the server
Syntax : $who
finger : It displays user information
Syntax : $finger username
cont.
who am i : It displays current user information (parent user)
syntax : $who am i
whoami : It displays switched user name (child user)
syntax : whoami
tty : It displays terminal name
syntax:$tty
uptime : It displays how long server is up and running ,No. of users
connected and avg load on the serever
syntax : $uptime
su : It is used to switch from one user account to another user account
syntax : $su -username
cont.
which : It displays location of the given command
syntax: $which
exit : To logout from current user
syntax: $exit
man : It displays help page of given command
syntax: man commandname
Working with files
cat : This is used to create a new files (or) To open existing
files (or) To append data to existing file
1.Creatinganewfile:
Syntax : $cat>filename
---------------
---------------
ctrl +d
Cont.
2. How to open a file :
syntax : $cat<filename (or) $cat filename
3. Appending data to a file :
syntax : $cat>>filename
- - - - - - - - -
- - - - - - - - -
ctrl + d
Cont.
4.howtoopenmultiplefiles:
syntax : $cat<file1 file2 file3 - - - - - - file n
It displays first file1 file contents followed by file2 file followed by file3
i.e. It joins multiple files vertically without space
touch : It is used to create empty files i.e. zero bytes
files
syntax : $touch filename
Creatingmultiplefiles:
syntax : $touch file1 file2 - - - - - file n
It creates f1,f2,…..etc as new empty files
Deleting files
1. rm : To delete a file
syntax : $rm filename
2. rm -i : It deletes a file with conformation
syntax : $rm -i filename
ex : $rm -i sample ? Y (yes) or N (no)
3. rm -f : It deletes a file forcibly
syntax : rm -f filename
Remove multiple files :
syntax : $rm file1 file2 file3 - - - - - - file n
Working with directories:
1.Mkdir : To create a new directory
Syntax : $mkdir directory name Ex : $mkdir sample
2.Cd : To change a directory path
Syntax : $cd directory name
3. Cd .. : To come out from current working directory
Syntax : $cd ..
4. cd : It a changes to root directory
Syntax : $cd
5. Creating multiple directories :
Syntax : $mkdir abc xyz axc
Then create The abc xyz axc directories
Cont.
Removing directory :
1. Rmdir : To remove directory but directory must be
empty
Syntax : $rmdir directory name
Options :
a) rm -r : It deletes recursively entire directory structure with conformation
Syntax : rm -r directory name
b) rm -ri : It deletes recursively entire directory structure with
conformation
syntax : $rm –ri directory name
Copying a file :
cp : To copy a file from source to target
syntax : $cp source file Target file
ex : $cp file1 file2 : This will copy the contents of file 1 into file 2 . If file 2 is
already existed it overwrites
$cp -i file1 file2 : if file2 is already existed then it ask the confirmation
Syntax : $cp -i file1 file2
Cont.
• Movingfiles:
mv : To rename (or) move the file/directory
Syntax : $mv file1 file2 (for file)
mv -R :
syntax : $mv file1 file2 (for directory)
For Hiddenfiles : To hide a file or directory start filename or directory with
“.” (dot) character
syntax : $cat > .filename
- - - - - - - -
ctrl + d
1.$mv file .file : To hide existing a file
2. $mv .file file : To unhide a file
3. $mkdir .dirname : To hide directory
Viewing list of files
ls : It list current directory all files and subdirectories in the ascending order based on
ASCII values
syntax : $ls
Options :
ls -a : It list all files along with the hidden files
syntax : $ls –a
ls -r : It list all files in reverse order
syntax : $ls -r
ls -R : It list all files recursively
syntax : $ls -R
ls -t : It list all files based on date and time of creation
syntax : ls -t
ls -l : It list all files in log list format
syntax : $ls -l
Cont .
wc : It counts total no. of lines, words and characters in given file
syntax : wc filename
Options:
1.wc -l : itcountsno.oflinesinthegivenfile
syntax:$wc -l
2.wc -w : itcountsno.of wordsinthegivenfile
syntax:$wc -w
3.wc -c : itcountsno.ofcharactersinthegivenfile
syntax:$wc -c
4.wc -lw: itcountsno.oflinesandwordsinthegivenfile
syntax:$wc -lw
Cont.
cmp : It compares two files character by character if no output ,then files
are same other wise the files are not same
syntax : $cmp file1 file2
diff : It displays different lines b/w two files (line by line)
syntax : diff file1 file2
file : It displays the given filename
syntax : $file filename

More Related Content

PPTX
Basics of unix
PDF
Basic linux commands
DOCX
Basic linux commands
PPT
Basic command ppt
PDF
Character_Device_drvier_pc
PDF
Unix commands in etl testing
PPTX
Linux Basic commands and VI Editor
Basics of unix
Basic linux commands
Basic linux commands
Basic command ppt
Character_Device_drvier_pc
Unix commands in etl testing
Linux Basic commands and VI Editor

What's hot (20)

PDF
Basics of UNIX Commands
ODP
Linux commd
ODP
Linux commd
PDF
Unix primer
PPTX
R- create a table from a list of files.... before webmining
PPT
Unix And Shell Scripting
PPTX
Unix - Shell Scripts
PDF
Linux system admin
PDF
PPT
Linux shell scripting
PPTX
Directory Commands - R.D.Sivakumar
PPTX
Shell scripting
PPTX
system management -shell programming by gaurav raikar
PDF
Unix / Linux Command Reference
PDF
Service intergration
PDF
Quick start bash script
PPTX
SHELL PROGRAMMING
ODP
intro unix/linux 02
PDF
Php file handling in Hindi
Basics of UNIX Commands
Linux commd
Linux commd
Unix primer
R- create a table from a list of files.... before webmining
Unix And Shell Scripting
Unix - Shell Scripts
Linux system admin
Linux shell scripting
Directory Commands - R.D.Sivakumar
Shell scripting
system management -shell programming by gaurav raikar
Unix / Linux Command Reference
Service intergration
Quick start bash script
SHELL PROGRAMMING
intro unix/linux 02
Php file handling in Hindi
Ad

Similar to Basics of Unix Adminisration (20)

PDF
Raspberry Pi - Lecture 2 Linux OS
PDF
Linux file commands and shell scripts
PDF
Bozorgmeh os lab
PPTX
Linux powerpoint
PPTX
Linux System commands Essentialsand Basics.pptx
PPTX
Rishav Mishra final presentation on UNIX Final.pptx
PDF
Basic shell programs assignment 1_solution_manual
PDF
Linux Command Line - By Ranjan Raja
PPTX
OS-Module 2 Linux Programming Important topics
PPTX
Unix Linux Commands Presentation 2013
PPTX
Know the UNIX Commands
PPT
Linux commands and file structure
DOCX
40 basic linux command
DOCX
40 basic linux command
PPT
linux-lecture4.pptuyhbjhbiibihbiuhbbihbi
PDF
Linux Notes-1.pdf
PPT
8.1.intro unix
PPT
linux-lecture4.ppt
PPT
Anandha ganesh linux1.ppt
Raspberry Pi - Lecture 2 Linux OS
Linux file commands and shell scripts
Bozorgmeh os lab
Linux powerpoint
Linux System commands Essentialsand Basics.pptx
Rishav Mishra final presentation on UNIX Final.pptx
Basic shell programs assignment 1_solution_manual
Linux Command Line - By Ranjan Raja
OS-Module 2 Linux Programming Important topics
Unix Linux Commands Presentation 2013
Know the UNIX Commands
Linux commands and file structure
40 basic linux command
40 basic linux command
linux-lecture4.pptuyhbjhbiibihbiuhbbihbi
Linux Notes-1.pdf
8.1.intro unix
linux-lecture4.ppt
Anandha ganesh linux1.ppt
Ad

Recently uploaded (20)

PPTX
Cardiovascular Pharmacology for pharmacy students.pptx
PPTX
Open Quiz Monsoon Mind Game Prelims.pptx
PPTX
IMMUNITY IMMUNITY refers to protection against infection, and the immune syst...
PPTX
Pharma ospi slides which help in ospi learning
PDF
BÀI TẬP BỔ TRỢ 4 KỸ NĂNG TIẾNG ANH 9 GLOBAL SUCCESS - CẢ NĂM - BÁM SÁT FORM Đ...
PPTX
The Healthy Child – Unit II | Child Health Nursing I | B.Sc Nursing 5th Semester
PDF
English Language Teaching from Post-.pdf
PDF
Microbial disease of the cardiovascular and lymphatic systems
PDF
Origin of periodic table-Mendeleev’s Periodic-Modern Periodic table
PPTX
Renaissance Architecture: A Journey from Faith to Humanism
PDF
TR - Agricultural Crops Production NC III.pdf
PDF
O7-L3 Supply Chain Operations - ICLT Program
PDF
Open folder Downloads.pdf yes yes ges yes
PPTX
Onica Farming 24rsclub profitable farm business
PDF
Mark Klimek Lecture Notes_240423 revision books _173037.pdf
PPTX
Introduction_to_Human_Anatomy_and_Physiology_for_B.Pharm.pptx
PPTX
human mycosis Human fungal infections are called human mycosis..pptx
PDF
The Final Stretch: How to Release a Game and Not Die in the Process.
PPTX
UNDER FIVE CLINICS OR WELL BABY CLINICS.pptx
PPTX
Microbial diseases, their pathogenesis and prophylaxis
Cardiovascular Pharmacology for pharmacy students.pptx
Open Quiz Monsoon Mind Game Prelims.pptx
IMMUNITY IMMUNITY refers to protection against infection, and the immune syst...
Pharma ospi slides which help in ospi learning
BÀI TẬP BỔ TRỢ 4 KỸ NĂNG TIẾNG ANH 9 GLOBAL SUCCESS - CẢ NĂM - BÁM SÁT FORM Đ...
The Healthy Child – Unit II | Child Health Nursing I | B.Sc Nursing 5th Semester
English Language Teaching from Post-.pdf
Microbial disease of the cardiovascular and lymphatic systems
Origin of periodic table-Mendeleev’s Periodic-Modern Periodic table
Renaissance Architecture: A Journey from Faith to Humanism
TR - Agricultural Crops Production NC III.pdf
O7-L3 Supply Chain Operations - ICLT Program
Open folder Downloads.pdf yes yes ges yes
Onica Farming 24rsclub profitable farm business
Mark Klimek Lecture Notes_240423 revision books _173037.pdf
Introduction_to_Human_Anatomy_and_Physiology_for_B.Pharm.pptx
human mycosis Human fungal infections are called human mycosis..pptx
The Final Stretch: How to Release a Game and Not Die in the Process.
UNDER FIVE CLINICS OR WELL BABY CLINICS.pptx
Microbial diseases, their pathogenesis and prophylaxis

Basics of Unix Adminisration

  • 1. BASICS OF UNIX • Unix was developed by ken Thompson in 1969 • Unix is CUI operating system • CUI stands for command user interface OS • It is a case sensitive • It is multitasking operating system • It is derived from UNICS assembly language • UNICS stands for Uniplexed information computing system
  • 2. Features of Unix • Multi User Capability • Multi Tasking Capability • Portability • Communication(Electronic Mail) • Security • Open System • Help Facility • $ indicates login in Normal User Level • # indicates Login in Super User Level
  • 3. Flavors of Unix Unix level we have multiple flavors of Operating systems using Unix Code they can implemented Different operating systems ‘s those are Company Operating System Plat Form Sun Micro Systems Solaris SPARC Server IBM AIX Main Frames level HP HP – UX (HP – UNIX) ProLiant Compaq true64 Alpha Processors BSD BSD OS Intel Processors Red Hat Linux RHEL ,Centos,Fedora,Ubuntu, SUSE Linux Etc Nearly 120 Flavours developed in Linux
  • 4. Basic commands logname : It displays current user Syntax : $logname pwd : It displays present working directory path Syntax : $pwd date : It displays system date and time Syntax : $date cal : It displays current month calendar Syntax: $cal clear: To clear the screen Syntax: $clear cal 2010 : It displays 2010 calendar Syntax: $cal 2010
  • 5. cont. uname : It displays operating system name Syntax : $uname uname -r : It displays kernel version Syntax : $uname -r hostname : It displays server name Syntax : $hostname hostname -i : It displays server IP address Syntax : $hostname -I who : It displays list of users who connected to the server Syntax : $who finger : It displays user information Syntax : $finger username
  • 6. cont. who am i : It displays current user information (parent user) syntax : $who am i whoami : It displays switched user name (child user) syntax : whoami tty : It displays terminal name syntax:$tty uptime : It displays how long server is up and running ,No. of users connected and avg load on the serever syntax : $uptime su : It is used to switch from one user account to another user account syntax : $su -username
  • 7. cont. which : It displays location of the given command syntax: $which exit : To logout from current user syntax: $exit man : It displays help page of given command syntax: man commandname
  • 8. Working with files cat : This is used to create a new files (or) To open existing files (or) To append data to existing file 1.Creatinganewfile: Syntax : $cat>filename --------------- --------------- ctrl +d
  • 9. Cont. 2. How to open a file : syntax : $cat<filename (or) $cat filename 3. Appending data to a file : syntax : $cat>>filename - - - - - - - - - - - - - - - - - - ctrl + d
  • 10. Cont. 4.howtoopenmultiplefiles: syntax : $cat<file1 file2 file3 - - - - - - file n It displays first file1 file contents followed by file2 file followed by file3 i.e. It joins multiple files vertically without space touch : It is used to create empty files i.e. zero bytes files syntax : $touch filename Creatingmultiplefiles: syntax : $touch file1 file2 - - - - - file n It creates f1,f2,…..etc as new empty files
  • 11. Deleting files 1. rm : To delete a file syntax : $rm filename 2. rm -i : It deletes a file with conformation syntax : $rm -i filename ex : $rm -i sample ? Y (yes) or N (no) 3. rm -f : It deletes a file forcibly syntax : rm -f filename Remove multiple files : syntax : $rm file1 file2 file3 - - - - - - file n
  • 12. Working with directories: 1.Mkdir : To create a new directory Syntax : $mkdir directory name Ex : $mkdir sample 2.Cd : To change a directory path Syntax : $cd directory name 3. Cd .. : To come out from current working directory Syntax : $cd .. 4. cd : It a changes to root directory Syntax : $cd 5. Creating multiple directories : Syntax : $mkdir abc xyz axc Then create The abc xyz axc directories
  • 13. Cont. Removing directory : 1. Rmdir : To remove directory but directory must be empty Syntax : $rmdir directory name Options : a) rm -r : It deletes recursively entire directory structure with conformation Syntax : rm -r directory name b) rm -ri : It deletes recursively entire directory structure with conformation syntax : $rm –ri directory name Copying a file : cp : To copy a file from source to target syntax : $cp source file Target file ex : $cp file1 file2 : This will copy the contents of file 1 into file 2 . If file 2 is already existed it overwrites $cp -i file1 file2 : if file2 is already existed then it ask the confirmation Syntax : $cp -i file1 file2
  • 14. Cont. • Movingfiles: mv : To rename (or) move the file/directory Syntax : $mv file1 file2 (for file) mv -R : syntax : $mv file1 file2 (for directory) For Hiddenfiles : To hide a file or directory start filename or directory with “.” (dot) character syntax : $cat > .filename - - - - - - - - ctrl + d 1.$mv file .file : To hide existing a file 2. $mv .file file : To unhide a file 3. $mkdir .dirname : To hide directory
  • 15. Viewing list of files ls : It list current directory all files and subdirectories in the ascending order based on ASCII values syntax : $ls Options : ls -a : It list all files along with the hidden files syntax : $ls –a ls -r : It list all files in reverse order syntax : $ls -r ls -R : It list all files recursively syntax : $ls -R ls -t : It list all files based on date and time of creation syntax : ls -t ls -l : It list all files in log list format syntax : $ls -l
  • 16. Cont . wc : It counts total no. of lines, words and characters in given file syntax : wc filename Options: 1.wc -l : itcountsno.oflinesinthegivenfile syntax:$wc -l 2.wc -w : itcountsno.of wordsinthegivenfile syntax:$wc -w 3.wc -c : itcountsno.ofcharactersinthegivenfile syntax:$wc -c 4.wc -lw: itcountsno.oflinesandwordsinthegivenfile syntax:$wc -lw
  • 17. Cont. cmp : It compares two files character by character if no output ,then files are same other wise the files are not same syntax : $cmp file1 file2 diff : It displays different lines b/w two files (line by line) syntax : diff file1 file2 file : It displays the given filename syntax : $file filename