SlideShare une entreprise Scribd logo
1  sur  52
 
 
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 ?

Contenu connexe

Tendances

Text mining on the command line - Introduction to linux for bioinformatics
Text mining on the command line - Introduction to linux for bioinformaticsText mining on the command line - Introduction to linux for bioinformatics
Text mining on the command line - Introduction to linux for bioinformaticsBITS
 
Linux system admin useful commands
Linux system admin useful commandsLinux system admin useful commands
Linux system admin useful commandsali98091
 
Linux Getting Started
Linux Getting StartedLinux Getting Started
Linux Getting StartedAngus Li
 
Basic command of hadoop
Basic command of hadoopBasic command of hadoop
Basic command of hadoopAhmad Kabeer
 
Rhel 6.2 complete ebook
Rhel 6.2  complete ebookRhel 6.2  complete ebook
Rhel 6.2 complete ebookYash Gulati
 
Rhel 6.2 complete ebook
Rhel 6.2 complete ebookRhel 6.2 complete ebook
Rhel 6.2 complete ebookYash Gulati
 
NCSU MGSA Unix Presentation
NCSU MGSA Unix PresentationNCSU MGSA Unix Presentation
NCSU MGSA Unix PresentationJon Ernstberger
 
Introduction to Linux, Pico, G++
Introduction to Linux, Pico, G++Introduction to Linux, Pico, G++
Introduction to Linux, Pico, G++Michael Gordon
 
Linux for CS Majors
Linux for CS MajorsLinux for CS Majors
Linux for CS Majorsworr1244
 
Part 6 of "Introduction to linux for bioinformatics": Productivity tips
Part 6 of "Introduction to linux for bioinformatics": Productivity tipsPart 6 of "Introduction to linux for bioinformatics": Productivity tips
Part 6 of "Introduction to linux for bioinformatics": Productivity tipsJoachim Jacob
 
Terminal commands ubuntu 2
Terminal commands ubuntu 2Terminal commands ubuntu 2
Terminal commands ubuntu 2raj upadhyay
 

Tendances (20)

Text mining on the command line - Introduction to linux for bioinformatics
Text mining on the command line - Introduction to linux for bioinformaticsText mining on the command line - Introduction to linux for bioinformatics
Text mining on the command line - Introduction to linux for bioinformatics
 
Basic C L I
Basic  C L IBasic  C L I
Basic C L I
 
Linux 101
Linux 101Linux 101
Linux 101
 
Linux system admin useful commands
Linux system admin useful commandsLinux system admin useful commands
Linux system admin useful commands
 
Linux basic
Linux basicLinux basic
Linux basic
 
Linux Getting Started
Linux Getting StartedLinux Getting Started
Linux Getting Started
 
Basic command of hadoop
Basic command of hadoopBasic command of hadoop
Basic command of hadoop
 
Rhel 6.2 complete ebook
Rhel 6.2  complete ebookRhel 6.2  complete ebook
Rhel 6.2 complete ebook
 
BASIC COMMANDS OF LINUX
BASIC COMMANDS OF LINUXBASIC COMMANDS OF LINUX
BASIC COMMANDS OF LINUX
 
Basics Ubuntu commands
Basics Ubuntu commandsBasics Ubuntu commands
Basics Ubuntu commands
 
Rhel 6.2 complete ebook
Rhel 6.2 complete ebookRhel 6.2 complete ebook
Rhel 6.2 complete ebook
 
NCSU MGSA Unix Presentation
NCSU MGSA Unix PresentationNCSU MGSA Unix Presentation
NCSU MGSA Unix Presentation
 
Introduction to Linux, Pico, G++
Introduction to Linux, Pico, G++Introduction to Linux, Pico, G++
Introduction to Linux, Pico, G++
 
Basic linux commands
Basic linux commandsBasic linux commands
Basic linux commands
 
2.Accessing the Pi
2.Accessing the Pi2.Accessing the Pi
2.Accessing the Pi
 
Linux
LinuxLinux
Linux
 
Linux for CS Majors
Linux for CS MajorsLinux for CS Majors
Linux for CS Majors
 
Day 2-some fun coding
Day 2-some fun codingDay 2-some fun coding
Day 2-some fun coding
 
Part 6 of "Introduction to linux for bioinformatics": Productivity tips
Part 6 of "Introduction to linux for bioinformatics": Productivity tipsPart 6 of "Introduction to linux for bioinformatics": Productivity tips
Part 6 of "Introduction to linux for bioinformatics": Productivity tips
 
Terminal commands ubuntu 2
Terminal commands ubuntu 2Terminal commands ubuntu 2
Terminal commands ubuntu 2
 

En vedette

Impact of Satellite Networks on Transport Layer Protocols
Impact of Satellite Networks on Transport Layer ProtocolsImpact of Satellite Networks on Transport Layer Protocols
Impact of Satellite Networks on Transport Layer ProtocolsReza Gh
 
IP based communications over satellites
IP based communications over satellitesIP based communications over satellites
IP based communications over satellitesBektaş Şahin
 
Ip Networking Over Satelite Course Sampler
Ip Networking Over Satelite Course SamplerIp Networking Over Satelite Course Sampler
Ip Networking Over Satelite Course SamplerJim Jenkins
 
10 Principles of Mobile App Design
10 Principles of Mobile App Design10 Principles of Mobile App Design
10 Principles of Mobile App DesignTechAhead
 
Shell Scripting in Linux
Shell Scripting in LinuxShell Scripting in Linux
Shell Scripting in LinuxAnu Chaudhry
 
Satellite communication
Satellite   communicationSatellite   communication
Satellite communicationSatyajit Das
 
Operating system (remuel)
Operating system (remuel)Operating system (remuel)
Operating system (remuel)Remuel Malinao
 
Introduction to satellite communication
Introduction to satellite communicationIntroduction to satellite communication
Introduction to satellite communicationPadma Sree
 
Satelite communication
Satelite communicationSatelite communication
Satelite communicationSyam Kumar
 
Unix/Linux Basic Commands and Shell Script
Unix/Linux Basic Commands and Shell ScriptUnix/Linux Basic Commands and Shell Script
Unix/Linux Basic Commands and Shell Scriptsbmguys
 
Linux Introduction (Commands)
Linux Introduction (Commands)Linux Introduction (Commands)
Linux Introduction (Commands)anandvaidya
 
Linux ppt
Linux pptLinux ppt
Linux pptlincy21
 
Satellite communication
Satellite communicationSatellite communication
Satellite communicationMannu Khani
 
Satellite communications
Satellite communicationsSatellite communications
Satellite communicationsSARITHA REDDY
 
Satellites presentation
Satellites presentationSatellites presentation
Satellites presentationVikas Sharma
 
Satellite communications ppt
Satellite communications pptSatellite communications ppt
Satellite communications pptNiranjan kumar
 

En vedette (20)

Impact of Satellite Networks on Transport Layer Protocols
Impact of Satellite Networks on Transport Layer ProtocolsImpact of Satellite Networks on Transport Layer Protocols
Impact of Satellite Networks on Transport Layer Protocols
 
IP based communications over satellites
IP based communications over satellitesIP based communications over satellites
IP based communications over satellites
 
Ip Networking Over Satelite Course Sampler
Ip Networking Over Satelite Course SamplerIp Networking Over Satelite Course Sampler
Ip Networking Over Satelite Course Sampler
 
Satellite link design
Satellite link designSatellite link design
Satellite link design
 
10 Principles of Mobile App Design
10 Principles of Mobile App Design10 Principles of Mobile App Design
10 Principles of Mobile App Design
 
Shell programming
Shell programmingShell programming
Shell programming
 
Shell Scripting in Linux
Shell Scripting in LinuxShell Scripting in Linux
Shell Scripting in Linux
 
Satellite communication
Satellite   communicationSatellite   communication
Satellite communication
 
Operating system (remuel)
Operating system (remuel)Operating system (remuel)
Operating system (remuel)
 
Introduction to satellite communication
Introduction to satellite communicationIntroduction to satellite communication
Introduction to satellite communication
 
Satelite communication
Satelite communicationSatelite communication
Satelite communication
 
INTRODUCTION TO SATELLITE
INTRODUCTION TO SATELLITEINTRODUCTION TO SATELLITE
INTRODUCTION TO SATELLITE
 
Unix/Linux Basic Commands and Shell Script
Unix/Linux Basic Commands and Shell ScriptUnix/Linux Basic Commands and Shell Script
Unix/Linux Basic Commands and Shell Script
 
Linux Introduction (Commands)
Linux Introduction (Commands)Linux Introduction (Commands)
Linux Introduction (Commands)
 
Linux ppt
Linux pptLinux ppt
Linux ppt
 
The shell structure system
The shell structure systemThe shell structure system
The shell structure system
 
Satellite communication
Satellite communicationSatellite communication
Satellite communication
 
Satellite communications
Satellite communicationsSatellite communications
Satellite communications
 
Satellites presentation
Satellites presentationSatellites presentation
Satellites presentation
 
Satellite communications ppt
Satellite communications pptSatellite communications ppt
Satellite communications ppt
 

Similaire à Sls01 Lecture02 Linux In Practice

BITS: Introduction to Linux - Text manipulation tools for bioinformatics
BITS: Introduction to Linux - Text manipulation tools for bioinformaticsBITS: Introduction to Linux - Text manipulation tools for bioinformatics
BITS: Introduction to Linux - Text manipulation tools for bioinformaticsBITS
 
Linux Basic Commands
Linux Basic CommandsLinux Basic Commands
Linux Basic CommandsHanan Nmr
 
Introduction to the linux command line.pdf
Introduction to the linux command line.pdfIntroduction to the linux command line.pdf
Introduction to the linux command line.pdfCesleySCruz
 
8.1.intro unix
8.1.intro unix8.1.intro unix
8.1.intro unixsouthees
 
Linux basics part 1
Linux basics part 1Linux basics part 1
Linux basics part 1Lilesh Pathe
 
Unix Basics 04sp
Unix Basics 04spUnix Basics 04sp
Unix Basics 04spDr.Ravi
 
Linux basic for CADD biologist
Linux basic for CADD biologistLinux basic for CADD biologist
Linux basic for CADD biologistAjay Murali
 
Module 3 Using Linux Softwares.
Module 3 Using Linux Softwares.Module 3 Using Linux Softwares.
Module 3 Using Linux Softwares.Tushar B Kute
 
Lamp1
Lamp1Lamp1
Lamp1Reka
 
Lamp
LampLamp
LampReka
 

Similaire à Sls01 Lecture02 Linux In Practice (20)

Linux Presentation
Linux PresentationLinux Presentation
Linux Presentation
 
Linux
LinuxLinux
Linux
 
BITS: Introduction to Linux - Text manipulation tools for bioinformatics
BITS: Introduction to Linux - Text manipulation tools for bioinformaticsBITS: Introduction to Linux - Text manipulation tools for bioinformatics
BITS: Introduction to Linux - Text manipulation tools for bioinformatics
 
Linux Basic Commands
Linux Basic CommandsLinux Basic Commands
Linux Basic Commands
 
Tutorial 2
Tutorial 2Tutorial 2
Tutorial 2
 
Linux
Linux Linux
Linux
 
Introduction to the linux command line.pdf
Introduction to the linux command line.pdfIntroduction to the linux command line.pdf
Introduction to the linux command line.pdf
 
8.1.intro unix
8.1.intro unix8.1.intro unix
8.1.intro unix
 
Linux basics part 1
Linux basics part 1Linux basics part 1
Linux basics part 1
 
Unix Basics 04sp
Unix Basics 04spUnix Basics 04sp
Unix Basics 04sp
 
Linux basic for CADD biologist
Linux basic for CADD biologistLinux basic for CADD biologist
Linux basic for CADD biologist
 
beginner.en.print
beginner.en.printbeginner.en.print
beginner.en.print
 
beginner.en.print
beginner.en.printbeginner.en.print
beginner.en.print
 
beginner.en.print
beginner.en.printbeginner.en.print
beginner.en.print
 
Linux filesystemhierarchy
Linux filesystemhierarchyLinux filesystemhierarchy
Linux filesystemhierarchy
 
Module 3 Using Linux Softwares.
Module 3 Using Linux Softwares.Module 3 Using Linux Softwares.
Module 3 Using Linux Softwares.
 
Lamp1
Lamp1Lamp1
Lamp1
 
Lamp1
Lamp1Lamp1
Lamp1
 
Lamp
LampLamp
Lamp
 
Linux
LinuxLinux
Linux
 

Dernier

Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Celine George
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13Steve Thomason
 
Student login on Anyboli platform.helpin
Student login on Anyboli platform.helpinStudent login on Anyboli platform.helpin
Student login on Anyboli platform.helpinRaunakKeshri1
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdfQucHHunhnh
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityGeoBlogs
 
Disha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdfDisha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdfchloefrazer622
 
fourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writingfourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writingTeacherCyreneCayanan
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)eniolaolutunde
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeThiyagu K
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introductionMaksud Ahmed
 
Arihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfArihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfchloefrazer622
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdfQucHHunhnh
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformChameera Dedduwage
 
General AI for Medical Educators April 2024
General AI for Medical Educators April 2024General AI for Medical Educators April 2024
General AI for Medical Educators April 2024Janet Corral
 
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...fonyou31
 
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...Sapna Thakur
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfAdmir Softic
 
9548086042 for call girls in Indira Nagar with room service
9548086042  for call girls in Indira Nagar  with room service9548086042  for call girls in Indira Nagar  with room service
9548086042 for call girls in Indira Nagar with room servicediscovermytutordmt
 

Dernier (20)

Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13
 
Student login on Anyboli platform.helpin
Student login on Anyboli platform.helpinStudent login on Anyboli platform.helpin
Student login on Anyboli platform.helpin
 
Advance Mobile Application Development class 07
Advance Mobile Application Development class 07Advance Mobile Application Development class 07
Advance Mobile Application Development class 07
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activity
 
Disha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdfDisha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdf
 
fourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writingfourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writing
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and Mode
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introduction
 
Arihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfArihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdf
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy Reform
 
General AI for Medical Educators April 2024
General AI for Medical Educators April 2024General AI for Medical Educators April 2024
General AI for Medical Educators April 2024
 
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
 
Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1
 
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdf
 
9548086042 for call girls in Indira Nagar with room service
9548086042  for call girls in Indira Nagar  with room service9548086042  for call girls in Indira Nagar  with room service
9548086042 for call girls in Indira Nagar with room service
 

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