SlideShare a Scribd company logo
 
 
What is Linux?
Level of Abstraction
1. Linux is  multitasking  and  multi-user  operating system.  2. The shell is a program that  interprets your commands  and passes them to kernel for processing.  3. The kernel is written is  C  which makes it relatively easy to  port from one machine to an other . 4. The kernel is the mastermind program that  schedules jobs  and  allocate resources  (time, memory, disks and other peripherals) thereby shielding the user from hardware.
Ubuntu Distrobution Linux for human Beings
Hands-on at the  Commandline ls , mv , clear , mkdir , cd , pwd
 
 
 
Commands 1. Commands are  executable binary files  supplied with Linux 2. Commands have  arguments/options/switches  to change the default actions of the command  3. alias mine=“echo Welcome SOMS”
 
 
 
 
 
All about Shell Type commands directly to Linux  The commandline offers power and flexibility The command-line utilized in Ubuntu is known as bash—the  B ourne A gain  Sh ell Command-line programs are sometimes known as  shells bash is the default in most popular Linux distros
Linux Navigation Roam around in filesystem Remove Directory pwd cd mkdir rmdir ls Print Working Directory Change Directory Make Directory List files and directories cp Copy mv Move file/folder ln Link files
Default Directories
File System
Change and list directories  You can use the following commands to change the active directory and list the contents of a directory: 1.  pwd Print Working Directory  2.  ls List files and directories 3.  cd Change Directory
 
Create a user  > sudoadduser  “ur name without quotes” Create an other user  > sudoadduser  “someone else name without quotes” Navigate to “home” directory and list file/folders there > cd  (enter)> pwd  (enter)> ls  (enter)  Make directories as shown in the tree > mkdir  user1/Documets/mail user1/Documets/tmp  user2/Documets/mail Copy tmp from user1 to user2 > cp  –r user1/Documets/tmp user2/Documets Navigate to user2’s tmp folder > cd  user2/Documents/tmp Remove user1’s mail folder > rmdir  /home/user1/Documents/mail /home user1 user2 Documents Documents mail mail tmp tmp
Relative vs Absolute path Absolute path : Starting with “/” Relative path : Starting with the current directory  Considering the previous tree  > pwd  <enter> /home/user1/Documents/mail Now navigate to user2’s mail  > cd /home/user2/Documents/mail <enter>  (Absolute) > cd ../../../user2/Documents/mail <enter> (Relative) /home user1 user2 Documents Documents mail mail tmp tmp
File System
Personal extensions  Make a directory named “myext” > mkdir  ~/myext Write plain files using any editor like: “nano” > nano  memo.maths memo.english > nano  score.maths score.english List files to confirm files creation > ls memo.maths memo.english score.maths score.english  One of the advantage of personal extensions  > ls –al  *.maths memo.maths score.maths
Two names for the same file? / home etc media user1 user2 Desktop Desktop … Every file and folder has a unique i-node  ln  geeko.txt gg  <enter> nano  gg  <enter>  (geeko.txt will be displayed) Practical application: To avoid long paths
 
Mount Directories Mount even windows drives
Now we are going to mount Windows drives to Ubuntu Mounting Drive: C mkdir  ~/Desktop/DriveC mount  strage_device mount_point mount  /dev/sda1 / ~/Desktop/DriveC Unmounting Drive: C umount  /dev/sda1 / ~/Desktop/DriveC Storage devices like CD-ROM and USB mounted automatically as soon as u plug them in.  /media/cdrom /media/<name of USB>
Customize filesystem managing files and directories
Create files
 
Exercise  1. View the hidden files on your ~ directory 2. Create a directory called new_dir in your ~ 3. Create a file called old there 4. Create a hard and symbolic link for this file 5. View the inode numbers of these links 6. Try removing new_dir using rmdir 7. Remove new_dir and all its children
Exercise  1. View the hidden files on your ~ directory ls -a 2. Create a directory called new_dir in your ~ mkdir ~/newdir 3. Create a file called old there touch old 4. Create a hard link for this file ln old link2old 5. View the inode numbers of these links ls -i 6. Try removing new_dir using rmdir rmdir new_dir
 
Manage User & Groups chmod
 
 
Exercise  From Command Line See the /etc/passwd  Make a new user “hero” with default home directory Give it the password “zero” See the changes in /etc/passwd Switch to user “hero” and change its password to “d!g!t@l” Delete the account of “hero”
File permissions and modes
System Diagnostics  Examining system health
Linux Utilities  ssh, ftp, scp
SSH
SSH Open protocol for network communication  Functionality of SSH: Secure Command shell  Secure File transfer Data tunneling/Port forwarding
Packages  Snatch, configure and install and customize
Using apt utility - Automatic > apt-get  install <package name>  This is automatically snatch the package from the repositories listed in /etc/apt/sources.list and install on your distro  > apt-cache  search <package name> To remove the package  > apt-get remove  <package name> To intsall the <package-name.deb> > dpkg  <package name>
Get Source package - Manual Download source code in compressed format  Decompress the package  Navigate into the package folder  Apply the triangle command in sequence  > ./configure > make > make install To run the software/package just type the name  > package-name <enter>
Code compilation Using gnu compiler
C source file compilation  Packages: gcc-*.*, g++ Create a file  > nano  ~/hello.c Paste the following code lines #include<iostream.h> void main(){ cout<<“Hello Geeks”; } </code> Compile the file using gcc compiler  > gcc  hello –o hello <enter> This will drop a file hello in the same folder  Give permission to make it executable  > chmod a+x  hello <enter> > ./hello  <enter> Hello Geeks
Upcoming Lectures ? SL03 - Exploit Shell Scripting  SL04 - System Administration
Questions ?

More Related Content

What's hot (20)

PDF
Text mining on the command line - Introduction to linux for bioinformatics
BITS
 
ODP
Basic C L I
Bahaa Salama
 
PDF
Linux 101
Strongback Consulting
 
PDF
Linux system admin useful commands
ali98091
 
PDF
Linux basic
Pragyagupta37
 
PDF
Linux Getting Started
Angus Li
 
PPTX
Basic command of hadoop
Ahmad Kabeer
 
PDF
Rhel 6.2 complete ebook
Yash Gulati
 
DOCX
BASIC COMMANDS OF LINUX
Mr.AKHILESH KUMAR {Computer Lab Technician}
 
PDF
Basics Ubuntu commands
Prabath Jayawardena
 
DOCX
Rhel 6.2 complete ebook
Yash Gulati
 
PDF
NCSU MGSA Unix Presentation
Jon Ernstberger
 
PDF
Introduction to Linux, Pico, G++
Michael Gordon
 
DOCX
Basic linux commands
Dheeraj Nambiar
 
PDF
2.Accessing the Pi
Mayank Joneja
 
PPT
Linux
Ankush Jain
 
PDF
Linux for CS Majors
worr1244
 
ODP
Day 2-some fun coding
Open Knowledge Nepal
 
PDF
Part 6 of "Introduction to linux for bioinformatics": Productivity tips
Joachim Jacob
 
PPTX
Terminal commands ubuntu 2
raj upadhyay
 
Text mining on the command line - Introduction to linux for bioinformatics
BITS
 
Basic C L I
Bahaa Salama
 
Linux system admin useful commands
ali98091
 
Linux basic
Pragyagupta37
 
Linux Getting Started
Angus Li
 
Basic command of hadoop
Ahmad Kabeer
 
Rhel 6.2 complete ebook
Yash Gulati
 
Basics Ubuntu commands
Prabath Jayawardena
 
Rhel 6.2 complete ebook
Yash Gulati
 
NCSU MGSA Unix Presentation
Jon Ernstberger
 
Introduction to Linux, Pico, G++
Michael Gordon
 
Basic linux commands
Dheeraj Nambiar
 
2.Accessing the Pi
Mayank Joneja
 
Linux for CS Majors
worr1244
 
Day 2-some fun coding
Open Knowledge Nepal
 
Part 6 of "Introduction to linux for bioinformatics": Productivity tips
Joachim Jacob
 
Terminal commands ubuntu 2
raj upadhyay
 

Viewers also liked (20)

PPTX
Impact of Satellite Networks on Transport Layer Protocols
Reza Gh
 
PPTX
IP based communications over satellites
Bektaş Şahin
 
PDF
Ip Networking Over Satelite Course Sampler
Jim Jenkins
 
PPTX
Satellite link design
Jeetendra Ahirwar
 
PDF
10 Principles of Mobile App Design
TechAhead
 
PPT
Shell programming
Moayad Moawiah
 
PPT
Shell Scripting in Linux
Anu Chaudhry
 
PPS
Satellite communication
Satyajit Das
 
PPT
Operating system (remuel)
Remuel Malinao
 
PPTX
Introduction to satellite communication
Padma Sree
 
PPTX
Satelite communication
Syam Kumar
 
PPTX
INTRODUCTION TO SATELLITE
Mr. Swapnil G. Thaware
 
PPT
Unix/Linux Basic Commands and Shell Script
sbmguys
 
ODP
Linux Introduction (Commands)
anandvaidya
 
PPTX
Linux ppt
lincy21
 
PDF
The shell structure system
Mazin Elbashkatib
 
PPTX
Satellite communication
Mannu Khani
 
PPT
Satellite communications
SARITHA REDDY
 
PPT
Satellites presentation
Vikas Sharma
 
PPT
Satellite communications ppt
Niranjan kumar
 
Impact of Satellite Networks on Transport Layer Protocols
Reza Gh
 
IP based communications over satellites
Bektaş Şahin
 
Ip Networking Over Satelite Course Sampler
Jim Jenkins
 
Satellite link design
Jeetendra Ahirwar
 
10 Principles of Mobile App Design
TechAhead
 
Shell programming
Moayad Moawiah
 
Shell Scripting in Linux
Anu Chaudhry
 
Satellite communication
Satyajit Das
 
Operating system (remuel)
Remuel Malinao
 
Introduction to satellite communication
Padma Sree
 
Satelite communication
Syam Kumar
 
INTRODUCTION TO SATELLITE
Mr. Swapnil G. Thaware
 
Unix/Linux Basic Commands and Shell Script
sbmguys
 
Linux Introduction (Commands)
anandvaidya
 
Linux ppt
lincy21
 
The shell structure system
Mazin Elbashkatib
 
Satellite communication
Mannu Khani
 
Satellite communications
SARITHA REDDY
 
Satellites presentation
Vikas Sharma
 
Satellite communications ppt
Niranjan kumar
 
Ad

Similar to Sls01 Lecture02 Linux In Practice (20)

PPTX
Linux Presentation
Muhammad Qazi
 
PPT
Linux
sravan kumar
 
PPT
BITS: Introduction to Linux - Text manipulation tools for bioinformatics
BITS
 
PDF
Linux Basic Commands
Hanan Nmr
 
PPT
Tutorial 2
tech2click
 
PPT
Linux
Hema Prasanth
 
PDF
Introduction to the linux command line.pdf
CesleySCruz
 
PPT
8.1.intro unix
southees
 
PPTX
Linux basics part 1
Lilesh Pathe
 
PPT
Unix Basics 04sp
Dr.Ravi
 
PDF
Linux basic for CADD biologist
Ajay Murali
 
PDF
beginner.en.print
aniruddh Tyagi
 
PDF
beginner.en.print
aniruddh Tyagi
 
PDF
beginner.en.print
Aniruddh Tyagi
 
PPT
Linux filesystemhierarchy
Dr. C.V. Suresh Babu
 
PDF
Module 3 Using Linux Softwares.
Tushar B Kute
 
ODP
Lamp1
Nadhi ya
 
ODP
Lamp
Reka
 
ODP
Lamp1
Reka
 
Linux Presentation
Muhammad Qazi
 
BITS: Introduction to Linux - Text manipulation tools for bioinformatics
BITS
 
Linux Basic Commands
Hanan Nmr
 
Tutorial 2
tech2click
 
Introduction to the linux command line.pdf
CesleySCruz
 
8.1.intro unix
southees
 
Linux basics part 1
Lilesh Pathe
 
Unix Basics 04sp
Dr.Ravi
 
Linux basic for CADD biologist
Ajay Murali
 
beginner.en.print
aniruddh Tyagi
 
beginner.en.print
aniruddh Tyagi
 
beginner.en.print
Aniruddh Tyagi
 
Linux filesystemhierarchy
Dr. C.V. Suresh Babu
 
Module 3 Using Linux Softwares.
Tushar B Kute
 
Lamp1
Nadhi ya
 
Lamp
Reka
 
Lamp1
Reka
 
Ad

Recently uploaded (20)

PDF
The dynastic history of the Chahmana.pdf
PrachiSontakke5
 
PPTX
Cultivation practice of Litchi in Nepal.pptx
UmeshTimilsina1
 
PDF
Chapter-V-DED-Entrepreneurship: Institutions Facilitating Entrepreneurship
Dayanand Huded
 
PPTX
A PPT on Alfred Lord Tennyson's Ulysses.
Beena E S
 
PPTX
How to Set Maximum Difference Odoo 18 POS
Celine George
 
PDF
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 - GLOBAL SUCCESS - CẢ NĂM - NĂM 2024 (VOCABULARY, ...
Nguyen Thanh Tu Collection
 
PDF
Knee Extensor Mechanism Injuries - Orthopedic Radiologic Imaging
Sean M. Fox
 
PPTX
I AM MALALA The Girl Who Stood Up for Education and was Shot by the Taliban...
Beena E S
 
PDF
Reconstruct, Restore, Reimagine: New Perspectives on Stoke Newington’s Histor...
History of Stoke Newington
 
PPT
Talk on Critical Theory, Part II, Philosophy of Social Sciences
Soraj Hongladarom
 
PPT
Talk on Critical Theory, Part One, Philosophy of Social Sciences
Soraj Hongladarom
 
PDF
Exploring the Different Types of Experimental Research
Thelma Villaflores
 
PDF
LAW OF CONTRACT (5 YEAR LLB & UNITARY LLB )- MODULE - 1.& 2 - LEARN THROUGH P...
APARNA T SHAIL KUMAR
 
PDF
0725.WHITEPAPER-UNIQUEWAYSOFPROTOTYPINGANDUXNOW.pdf
Thomas GIRARD, MA, CDP
 
PPTX
Universal immunization Programme (UIP).pptx
Vishal Chanalia
 
PPTX
How to Set Up Tags in Odoo 18 - Odoo Slides
Celine George
 
PDF
The Constitution Review Committee (CRC) has released an updated schedule for ...
nservice241
 
PPTX
How to Handle Salesperson Commision in Odoo 18 Sales
Celine George
 
PPTX
MENINGITIS: NURSING MANAGEMENT, BACTERIAL MENINGITIS, VIRAL MENINGITIS.pptx
PRADEEP ABOTHU
 
PPTX
STAFF DEVELOPMENT AND WELFARE: MANAGEMENT
PRADEEP ABOTHU
 
The dynastic history of the Chahmana.pdf
PrachiSontakke5
 
Cultivation practice of Litchi in Nepal.pptx
UmeshTimilsina1
 
Chapter-V-DED-Entrepreneurship: Institutions Facilitating Entrepreneurship
Dayanand Huded
 
A PPT on Alfred Lord Tennyson's Ulysses.
Beena E S
 
How to Set Maximum Difference Odoo 18 POS
Celine George
 
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 - GLOBAL SUCCESS - CẢ NĂM - NĂM 2024 (VOCABULARY, ...
Nguyen Thanh Tu Collection
 
Knee Extensor Mechanism Injuries - Orthopedic Radiologic Imaging
Sean M. Fox
 
I AM MALALA The Girl Who Stood Up for Education and was Shot by the Taliban...
Beena E S
 
Reconstruct, Restore, Reimagine: New Perspectives on Stoke Newington’s Histor...
History of Stoke Newington
 
Talk on Critical Theory, Part II, Philosophy of Social Sciences
Soraj Hongladarom
 
Talk on Critical Theory, Part One, Philosophy of Social Sciences
Soraj Hongladarom
 
Exploring the Different Types of Experimental Research
Thelma Villaflores
 
LAW OF CONTRACT (5 YEAR LLB & UNITARY LLB )- MODULE - 1.& 2 - LEARN THROUGH P...
APARNA T SHAIL KUMAR
 
0725.WHITEPAPER-UNIQUEWAYSOFPROTOTYPINGANDUXNOW.pdf
Thomas GIRARD, MA, CDP
 
Universal immunization Programme (UIP).pptx
Vishal Chanalia
 
How to Set Up Tags in Odoo 18 - Odoo Slides
Celine George
 
The Constitution Review Committee (CRC) has released an updated schedule for ...
nservice241
 
How to Handle Salesperson Commision in Odoo 18 Sales
Celine George
 
MENINGITIS: NURSING MANAGEMENT, BACTERIAL MENINGITIS, VIRAL MENINGITIS.pptx
PRADEEP ABOTHU
 
STAFF DEVELOPMENT AND WELFARE: MANAGEMENT
PRADEEP ABOTHU
 

Sls01 Lecture02 Linux In Practice

  • 1.  
  • 2.  
  • 5. 1. Linux is multitasking and multi-user operating system. 2. The shell is a program that interprets your commands and passes them to kernel for processing. 3. The kernel is written is C which makes it relatively easy to port from one machine to an other . 4. The kernel is the mastermind program that schedules jobs and allocate resources (time, memory, disks and other peripherals) thereby shielding the user from hardware.
  • 6. Ubuntu Distrobution Linux for human Beings
  • 7. Hands-on at the Commandline ls , mv , clear , mkdir , cd , pwd
  • 8.  
  • 9.  
  • 10.  
  • 11. Commands 1. Commands are executable binary files supplied with Linux 2. Commands have arguments/options/switches to change the default actions of the command 3. alias mine=“echo Welcome SOMS”
  • 12.  
  • 13.  
  • 14.  
  • 15.  
  • 16.  
  • 17. All about Shell Type commands directly to Linux The commandline offers power and flexibility The command-line utilized in Ubuntu is known as bash—the B ourne A gain Sh ell Command-line programs are sometimes known as shells bash is the default in most popular Linux distros
  • 18. Linux Navigation Roam around in filesystem Remove Directory pwd cd mkdir rmdir ls Print Working Directory Change Directory Make Directory List files and directories cp Copy mv Move file/folder ln Link files
  • 21. Change and list directories You can use the following commands to change the active directory and list the contents of a directory: 1. pwd Print Working Directory 2. ls List files and directories 3. cd Change Directory
  • 22.  
  • 23. Create a user > sudoadduser “ur name without quotes” Create an other user > sudoadduser “someone else name without quotes” Navigate to “home” directory and list file/folders there > cd (enter)> pwd (enter)> ls (enter) Make directories as shown in the tree > mkdir user1/Documets/mail user1/Documets/tmp user2/Documets/mail Copy tmp from user1 to user2 > cp –r user1/Documets/tmp user2/Documets Navigate to user2’s tmp folder > cd user2/Documents/tmp Remove user1’s mail folder > rmdir /home/user1/Documents/mail /home user1 user2 Documents Documents mail mail tmp tmp
  • 24. Relative vs Absolute path Absolute path : Starting with “/” Relative path : Starting with the current directory Considering the previous tree > pwd <enter> /home/user1/Documents/mail Now navigate to user2’s mail > cd /home/user2/Documents/mail <enter> (Absolute) > cd ../../../user2/Documents/mail <enter> (Relative) /home user1 user2 Documents Documents mail mail tmp tmp
  • 26. Personal extensions Make a directory named “myext” > mkdir ~/myext Write plain files using any editor like: “nano” > nano memo.maths memo.english > nano score.maths score.english List files to confirm files creation > ls memo.maths memo.english score.maths score.english One of the advantage of personal extensions > ls –al *.maths memo.maths score.maths
  • 27. Two names for the same file? / home etc media user1 user2 Desktop Desktop … Every file and folder has a unique i-node ln geeko.txt gg <enter> nano gg <enter> (geeko.txt will be displayed) Practical application: To avoid long paths
  • 28.  
  • 29. Mount Directories Mount even windows drives
  • 30. Now we are going to mount Windows drives to Ubuntu Mounting Drive: C mkdir ~/Desktop/DriveC mount strage_device mount_point mount /dev/sda1 / ~/Desktop/DriveC Unmounting Drive: C umount /dev/sda1 / ~/Desktop/DriveC Storage devices like CD-ROM and USB mounted automatically as soon as u plug them in. /media/cdrom /media/<name of USB>
  • 31. Customize filesystem managing files and directories
  • 33.  
  • 34. Exercise 1. View the hidden files on your ~ directory 2. Create a directory called new_dir in your ~ 3. Create a file called old there 4. Create a hard and symbolic link for this file 5. View the inode numbers of these links 6. Try removing new_dir using rmdir 7. Remove new_dir and all its children
  • 35. Exercise 1. View the hidden files on your ~ directory ls -a 2. Create a directory called new_dir in your ~ mkdir ~/newdir 3. Create a file called old there touch old 4. Create a hard link for this file ln old link2old 5. View the inode numbers of these links ls -i 6. Try removing new_dir using rmdir rmdir new_dir
  • 36.  
  • 37. Manage User & Groups chmod
  • 38.  
  • 39.  
  • 40. Exercise From Command Line See the /etc/passwd Make a new user “hero” with default home directory Give it the password “zero” See the changes in /etc/passwd Switch to user “hero” and change its password to “d!g!t@l” Delete the account of “hero”
  • 42. System Diagnostics Examining system health
  • 43. Linux Utilities ssh, ftp, scp
  • 44. SSH
  • 45. SSH Open protocol for network communication Functionality of SSH: Secure Command shell Secure File transfer Data tunneling/Port forwarding
  • 46. Packages Snatch, configure and install and customize
  • 47. Using apt utility - Automatic > apt-get install <package name> This is automatically snatch the package from the repositories listed in /etc/apt/sources.list and install on your distro > apt-cache search <package name> To remove the package > apt-get remove <package name> To intsall the <package-name.deb> > dpkg <package name>
  • 48. Get Source package - Manual Download source code in compressed format Decompress the package Navigate into the package folder Apply the triangle command in sequence > ./configure > make > make install To run the software/package just type the name > package-name <enter>
  • 49. Code compilation Using gnu compiler
  • 50. C source file compilation Packages: gcc-*.*, g++ Create a file > nano ~/hello.c Paste the following code lines #include<iostream.h> void main(){ cout<<“Hello Geeks”; } </code> Compile the file using gcc compiler > gcc hello –o hello <enter> This will drop a file hello in the same folder Give permission to make it executable > chmod a+x hello <enter> > ./hello <enter> Hello Geeks
  • 51. Upcoming Lectures ? SL03 - Exploit Shell Scripting SL04 - System Administration