SlideShare a Scribd company logo
An Introduction to Linux 
Ishan A B Ambanwela
Contents 
● History 
● Linux System Architecture 
● Major Components Described 
– Kernel, Shell, Quickies, File System, Processes, I/O 
redirection, Networking Brief, Booting The System, 
Desktop Environments 
● Choose a Distribution 
● Make Your Own OS 
● Useful Resources 
● Q&A
History - Background 
● In late 60s every computer 
had a different operating 
system 
● Software was always 
customized to serve a 
specific purpose 
● Being able to work with 
one didn't automatically 
mean that you could work 
with another http://www.soemtron.org/images/jpgs/decimages/pdp7sn112delivery.jpg
History - Unix 
● In 1969, Bell Labs started 
working on this Software 
problem 
– Simple and elegant 
– Written in the C instead 
of in assembly code 
– Able to recycle code 
● OS with a “kernel”, a 
compatibility layer 
http://en.wikipedia.org/wiki/File:Ken_Thompson_%28sitting%29_and_Dennis_Ritchie_at_PDP-11_%282876612463%29.jpg 
http://en.wikipedia.org/wiki/File:AT%26T_logo.svg
History – Linus & Linux 
● Linus Torvalds, a 
computer science student 
from university of Helsinki 
● version 0.01 was released 
with 10,239 LOC in 1991 
● it would cost 
approximately 3 billion 
USD to redevelop 
http://en.wikipedia.org/wiki/File:Linus_Torvalds.jpeg
Linux - Pros & Cons 
● Pros 
● Free 
● Secure 
● Versatile 
● Scalable 
● Designed for continuous 
running 
● Portable 
● Short debug time 
● Community spirit 
● Cons 
● Too many distributions 
● Confusing for 
beginners 
● Games 
● Limited support for 
proprietary 
applications 
● Limited vendor support
A Linux System 
http://www.ibm.com/developerworks/opensource/library/l-linuxuniversal/figure1.gif
The Architecture 
http://www.tutorialspoint.com/operating_system/images/linux_architecture.jpg
The Kernel 
● Manage all hardware 
● Manage all processes 
and daemons 
● Inter Process 
Communications 
http://www.ibm.com/developerworks/library/l-linux-kernel/figure3.jpg
The Shell 
“the shell is the steering 
wheel of the car” 
Shortcut Function 
Ctrl+A Move cursor to beginning 
Ctrl+C End running program 
Ctrl+D End current session 
Ctrl+E Move cursor to end 
Ctrl+H Backspace 
Ctrl+L Clear 
Ctrl+R Search command history 
Ctrl+Z Suspend the program 
Tab Auto complete 
Tab Tab Show possible auto completes 
Up/Down Command history 
Left/Right Move cursor 
http://www.ibm.com/developerworks/linux/library/l-linux-shells/figure2.gif
The Shell 
● Shell loads settings and execute commands when 
starts 
– ~/.profile – login shells 
– ~/.bashrc – non login shells 
● Shell will execute commands 
– ~/.bash_logout 
● Command history will be saved in 
– .bash_history
Environment Variables 
● Export New/Modified Variables 
– export PATH=$PATH:/path/to/dir1 
● Make permanent Changes 
– Add changes to ~/.bashrc or ~/.profile 
– System wide changes : /etc/profile 
● Load settings 
– Ex: source /etc/profile
Quick Start Commands 
Command Use 
ls Display a list of files in current working directory 
cd <directory> Change directory 
pwd Display current working directory 
passwd Change the password 
cat <textfile> Display the content of a text file 
exit End the current session 
apropos <string> Search the “whatis” database 
info <command> Read info pages for the command 
man <command> Read man pages for the command
Linux File System 
● On a Linux system, 
everything is a file. 
● if something is not a 
file, it is a process. 
http://tldp.org/LDP/intro-linux/html/images/FS-layout.png
Partitions & Mount Points 
● Partition Types 
– Data – normal Linux system data 
– Swap – an extension of physical memory 
● All partitions are attached to the system via a 
mount point 
– defines the place of a data set in the file system 
– /etc/fstab holds the default structure 
fdisk -l 
/dev/sda3 28G 6.8G 20G 26% / 
/dev/sda5 376G 2.9G 354G 1% /home/ishanaba/Desktop 
/dev/sdc1 1.9T 1.6T 321G 83% /media/ishanaba/FreeAgent GoFlex Drive
Files Types 
Symbol Meaning 
- Regular file 
d Directory 
l Link 
c Special File 
s Socket 
p Named Pipe 
b Block Device 
ls -l 
drwxr-xr-x 2 ishanaba ishanaba 4096 May 20 18:09 Downloads 
-rw-r--r-- 1 ishanaba ishanaba 8980 Apr 19 12:53 examples.desktop
inode 
● In Linux file systems, 
files are indexed by a 
number, "the inode" 
● At the time a new file 
is created, it gets a 
free inode 
● Owner and group owner 
● File type (regular, directory, ...) 
● Permissions 
● Date/time of creation, last 
read/change 
● Date/time changes in the 
inode 
● Number of links to this file 
● File size 
● Actual location of the file data
Links 
● Symbolic Links 
● Hard Links 
http://linuxg.net/wp-content/uploads/2012/07/symlink-vs-hardlink.png
File Security 
ls -l 
drwxr-xr-x 2 ishanaba ishanaba 4096 May 20 18:09 Downloads 
-rw-r--r-- 1 ishanaba ishanaba 8980 Apr 19 12:53 examples.desktop 
● chmod 
– change the mode/access 
– user|group|other <=> rwx|r-x|r-x 
● chown 
– change the ownership 
– user group <=> ishanaba ishanaba
Some More Commands 
● File Manipulation 
– Copy 
● cp 
– Remove 
● rm 
– Create Directory 
● mkdir 
– Create a file 
● touch 
● Read Files 
– tail 
– head 
– grep 
– less 
– more 
● Locate Files 
– find 
– locate
Processes 
ps -af -e 
UID PID PPID C STIME TTY TIME CMD 
ishanaba 9762 7120 0 20:12 pts/0 00:00:00 ps -af 
ishanaba 3107 2086 7 14:51 ? 00:22:44 gnome-system-monitor 
● The process ID or PID 
● The parent process ID or PPID 
● Nice number 
● Terminal or TTY 
● User name of the real and effective user (RUID and EUID) 
● Real and effective group owner (RGID and EGID)
Process Creation 
● Fork and Exec 
● Usually a system call 
● Fork : a process 
creates an exact copy 
of it self with a different 
PID 
● Exec : address space 
of the child process is 
overwritten with the 
new process data http://www.tldp.org/LDP/intro-linux/html/images/fork-and-exec.png
Start Processes 
● Start a process 
– Simply type the 
command and enter 
– Ex: firefox 
● Start a process in 
Background 
– Type the command 
following & sign 
– Ex: firefox & 
● Related Commands 
– ps 
● ps -e 
– pstree 
– top 
– nice/renice 
– netstat
End Processes 
● When process ends normally, it will return “exit 
status” to the parent 
● Processes can be killed terminated using Signals 
● List all signals : kill -l 
Name Number Meaning 
SIGTERM 15 Terminate the process in orderly way 
SIGINT 2 Interrupt(can be ignored) 
SIGKILL 9 Interrupt(can not be ignored) 
SIGHUP 1 Reread the configuration file
I/O Redirection 
● Redirect 
– Input 
● Ex: mail example@example.com < to_do 
– Output 
● Write Ex: ls > sample.txt 
● Append Ex: ls >> sample.txt 
● Pipe 
– Ex: ls /dev/tty* | grep USB
Networking 
● Linux Supports almost all OSI model protocols 
Layer Name Protocols 
Application Layer HTTP, DNS, SMTP, POP, RPC, RTP 
Transport Layer TCP, UDP 
Network Layer IP, IPv6 
Network Access Layer PPP, PPPoE, Ethernet
Booting The System 
1.Initialize Hardware 
2.Boot Loader 
3.Kernel & initramfs 
4.init on initramfs 
5.init
Booting : Initialize Hardware 
● BIOS 
– Power On Self Test 
– Search for Master 
Boot Record(MBR) 
– First 512 bytes of first 
Hard Disk 
● UEFI 
– Power On Self Test 
– Load UEFI firmware 
– Initializes the hardware 
required for booting 
– Firmware reads its Boot 
Manager data 
– launches the UEFI application 
– the launched UEFI application 
may launch another 
application
Boot Loader, Kernel & initramfs 
● boot loader loads 
– Kernel 
– initial RAM–based file system (initramfs) 
into memory 
● initramfs contains a small executable, init 
● init handles the mounting of the real root file system 
● If special drivers are needed before the respective 
device be accessed, they must be in initramf
Booting : init in initramfs 
● mount the proper root file system 
● provide the Kernel functionality for the needed 
file system and device drivers with udev 
● After the root file system has been found, it is 
checked for errors and mounted
Booting : init 
● Init, process with id 1 
● All the other processes started by 
init 
● Ex: SysV, initng, Upstart, 
systemd 
● init continue boot with its 
configuration at /etc/inittab 
specifies 
– services 
– daemons 
which are available in each of the 
runlevels 
Run levels in SysV 
Run Level Description 
0 System halt 
1 Single user mode 
2 Local multiuser without 
network 
3 Full multiuser with network 
4 Undefined can be configured 
5 Full multiuser with network 
and X 
6 reboot
Desktop Environments 
● A software bundle 
which share a 
common GUI 
● Consist of 
– Window Manager 
– Widget toolkit 
● Ex : GNOME, KDE, 
LXDE, Unity, Xfce 
https://m.ak.fbcdn.net/sphotos-f.ak/hphotos-ak-prn2/t1.0-9/10262254_1020397582802299 
1_1421869568506953645_n.jpg
Choose a distribution 
● All major distributions works 
fine 
● Visit distrowatch.com and read 
more 
● My suggestions 
– Beginner – Ubuntu, Mint, 
Fedora, suse, Mandriva, debian 
– Moderate – debian, freeBSD, 
openBSD, Kali, Arch, slack ware 
Gentoo 
– Advanced – Gentoo, 
LinuxFromScratch https://scottlinux.com/wp-content/uploads/2012/07/linux-e1342279303170.png
Make Your Own OS 
● Approaches 
– Linux From Scratch 
– Gentoo Linux 
http://www.linuxfromscratch.org/iimmaaggeess//images/lfs-llffss--llooggoo..logo.png 
ppnngg 
https://www.gentoo.org/images/gtop-www.jpg
Useful Resources 
● http://tldp.org/LDP/intro-linux/html/ 
● An on line course will be start in next August 
● https://www.edx.org/course/linuxfoundationx/lin 
uxfoundationx-lfs101x-introduction-1621 
● Operating Systems: Design and 
Implementation by Andrew S. Tanenbaum 
● Linux in a Nutshell by Ellen Siever, Stephen 
Figgins, Robert Love, Arnold Robbins
Q & A
Thank You and Good Luck :-)
Ad

More Related Content

What's hot (20)

Linux basics part 1
Linux basics part 1Linux basics part 1
Linux basics part 1
Lilesh Pathe
 
Course 102: Lecture 26: FileSystems in Linux (Part 1)
Course 102: Lecture 26: FileSystems in Linux (Part 1) Course 102: Lecture 26: FileSystems in Linux (Part 1)
Course 102: Lecture 26: FileSystems in Linux (Part 1)
Ahmed El-Arabawy
 
Shell scripting
Shell scriptingShell scripting
Shell scripting
simha.dev.lin
 
systemd
systemdsystemd
systemd
nussbauml
 
Linux file system
Linux file systemLinux file system
Linux file system
Md. Tanvir Hossain
 
Linux systems - Linux Commands and Shell Scripting
Linux systems - Linux Commands and Shell ScriptingLinux systems - Linux Commands and Shell Scripting
Linux systems - Linux Commands and Shell Scripting
Emertxe Information Technologies Pvt Ltd
 
Lesson 2 Understanding Linux File System
Lesson 2 Understanding Linux File SystemLesson 2 Understanding Linux File System
Lesson 2 Understanding Linux File System
Sadia Bashir
 
UNIX/Linux training
UNIX/Linux trainingUNIX/Linux training
UNIX/Linux training
Michael Olafusi
 
Linux OS presentation
Linux OS presentationLinux OS presentation
Linux OS presentation
SahilGothoskar
 
Linux Tutorial For Beginners | Linux Administration Tutorial | Linux Commands...
Linux Tutorial For Beginners | Linux Administration Tutorial | Linux Commands...Linux Tutorial For Beginners | Linux Administration Tutorial | Linux Commands...
Linux Tutorial For Beginners | Linux Administration Tutorial | Linux Commands...
Edureka!
 
Storage Management in Linux OS.ppt
Storage Management in Linux OS.pptStorage Management in Linux OS.ppt
Storage Management in Linux OS.ppt
Rakesh Kadu
 
Linux basic commands with examples
Linux basic commands with examplesLinux basic commands with examples
Linux basic commands with examples
abclearnn
 
Linux Run Level
Linux Run LevelLinux Run Level
Linux Run Level
Gaurav Mishra
 
Filepermissions in linux
Filepermissions in linuxFilepermissions in linux
Filepermissions in linux
Subashini Pandiarajan
 
Presentation on linux
Presentation on linuxPresentation on linux
Presentation on linux
Veeral Bhateja
 
Linux file system
Linux file systemLinux file system
Linux file system
Burhan Abbasi
 
Shell scripting
Shell scriptingShell scripting
Shell scripting
Manav Prasad
 
Shell scripting
Shell scriptingShell scripting
Shell scripting
Geeks Anonymes
 
Course 102: Lecture 5: File Handling Internals
Course 102: Lecture 5: File Handling Internals Course 102: Lecture 5: File Handling Internals
Course 102: Lecture 5: File Handling Internals
Ahmed El-Arabawy
 
Virtual Machines - Virtual Box
Virtual Machines  - Virtual BoxVirtual Machines  - Virtual Box
Virtual Machines - Virtual Box
Lahiru Danushka
 
Linux basics part 1
Linux basics part 1Linux basics part 1
Linux basics part 1
Lilesh Pathe
 
Course 102: Lecture 26: FileSystems in Linux (Part 1)
Course 102: Lecture 26: FileSystems in Linux (Part 1) Course 102: Lecture 26: FileSystems in Linux (Part 1)
Course 102: Lecture 26: FileSystems in Linux (Part 1)
Ahmed El-Arabawy
 
Lesson 2 Understanding Linux File System
Lesson 2 Understanding Linux File SystemLesson 2 Understanding Linux File System
Lesson 2 Understanding Linux File System
Sadia Bashir
 
Linux Tutorial For Beginners | Linux Administration Tutorial | Linux Commands...
Linux Tutorial For Beginners | Linux Administration Tutorial | Linux Commands...Linux Tutorial For Beginners | Linux Administration Tutorial | Linux Commands...
Linux Tutorial For Beginners | Linux Administration Tutorial | Linux Commands...
Edureka!
 
Storage Management in Linux OS.ppt
Storage Management in Linux OS.pptStorage Management in Linux OS.ppt
Storage Management in Linux OS.ppt
Rakesh Kadu
 
Linux basic commands with examples
Linux basic commands with examplesLinux basic commands with examples
Linux basic commands with examples
abclearnn
 
Course 102: Lecture 5: File Handling Internals
Course 102: Lecture 5: File Handling Internals Course 102: Lecture 5: File Handling Internals
Course 102: Lecture 5: File Handling Internals
Ahmed El-Arabawy
 
Virtual Machines - Virtual Box
Virtual Machines  - Virtual BoxVirtual Machines  - Virtual Box
Virtual Machines - Virtual Box
Lahiru Danushka
 

Similar to An Introduction To Linux (20)

Grub and dracut ii
Grub and dracut iiGrub and dracut ii
Grub and dracut ii
plarsen67
 
Linux
LinuxLinux
Linux
Giridaran Manivannan
 
Adhocr T-dose 2012
Adhocr T-dose 2012Adhocr T-dose 2012
Adhocr T-dose 2012
Gratien D'haese
 
Linux Internals - Part I
Linux Internals - Part ILinux Internals - Part I
Linux Internals - Part I
Emertxe Information Technologies Pvt Ltd
 
Resource Monitoring and management
Resource Monitoring and management  Resource Monitoring and management
Resource Monitoring and management
Duressa Teshome
 
Ericas-Linux-Plus-Study-Guide
Ericas-Linux-Plus-Study-GuideEricas-Linux-Plus-Study-Guide
Ericas-Linux-Plus-Study-Guide
Erica StJohn
 
Native Android Userspace part of the Embedded Android Workshop at Linaro Conn...
Native Android Userspace part of the Embedded Android Workshop at Linaro Conn...Native Android Userspace part of the Embedded Android Workshop at Linaro Conn...
Native Android Userspace part of the Embedded Android Workshop at Linaro Conn...
Opersys inc.
 
Android for Embedded Linux Developers
Android for Embedded Linux DevelopersAndroid for Embedded Linux Developers
Android for Embedded Linux Developers
Opersys inc.
 
Linux basics
Linux basics Linux basics
Linux basics
suniljosekerala
 
Introduction to linux
Introduction to linuxIntroduction to linux
Introduction to linux
plarsen67
 
Linux Booting Process
Linux Booting ProcessLinux Booting Process
Linux Booting Process
Rishabh5121993
 
Linux basics
Linux basics Linux basics
Linux basics
suniljosekerala
 
Linux Presentation
Linux PresentationLinux Presentation
Linux Presentation
Muhammad Qazi
 
Tuning systemd for embedded
Tuning systemd for embeddedTuning systemd for embedded
Tuning systemd for embedded
Alison Chaiken
 
Tips and Tricks for Increased Development Efficiency
Tips and Tricks for Increased Development EfficiencyTips and Tricks for Increased Development Efficiency
Tips and Tricks for Increased Development Efficiency
Olivier Bourgeois
 
Basis Linux (aan de hand van LPIC-1)
Basis Linux (aan de hand van LPIC-1)Basis Linux (aan de hand van LPIC-1)
Basis Linux (aan de hand van LPIC-1)
Peter Martin
 
Basic Linux Internals
Basic Linux InternalsBasic Linux Internals
Basic Linux Internals
mukul bhardwaj
 
Linux Booting Procedure system and networking.ppt
Linux Booting Procedure system and networking.pptLinux Booting Procedure system and networking.ppt
Linux Booting Procedure system and networking.ppt
ubaidullah75790
 
FreeBSD Portscamp, Kuala Lumpur 2016
FreeBSD Portscamp, Kuala Lumpur 2016FreeBSD Portscamp, Kuala Lumpur 2016
FreeBSD Portscamp, Kuala Lumpur 2016
Muhammad Moinur Rahman
 
Linux introduction (eng)
Linux introduction (eng)Linux introduction (eng)
Linux introduction (eng)
Anatoliy Okhotnikov
 
Grub and dracut ii
Grub and dracut iiGrub and dracut ii
Grub and dracut ii
plarsen67
 
Resource Monitoring and management
Resource Monitoring and management  Resource Monitoring and management
Resource Monitoring and management
Duressa Teshome
 
Ericas-Linux-Plus-Study-Guide
Ericas-Linux-Plus-Study-GuideEricas-Linux-Plus-Study-Guide
Ericas-Linux-Plus-Study-Guide
Erica StJohn
 
Native Android Userspace part of the Embedded Android Workshop at Linaro Conn...
Native Android Userspace part of the Embedded Android Workshop at Linaro Conn...Native Android Userspace part of the Embedded Android Workshop at Linaro Conn...
Native Android Userspace part of the Embedded Android Workshop at Linaro Conn...
Opersys inc.
 
Android for Embedded Linux Developers
Android for Embedded Linux DevelopersAndroid for Embedded Linux Developers
Android for Embedded Linux Developers
Opersys inc.
 
Introduction to linux
Introduction to linuxIntroduction to linux
Introduction to linux
plarsen67
 
Tuning systemd for embedded
Tuning systemd for embeddedTuning systemd for embedded
Tuning systemd for embedded
Alison Chaiken
 
Tips and Tricks for Increased Development Efficiency
Tips and Tricks for Increased Development EfficiencyTips and Tricks for Increased Development Efficiency
Tips and Tricks for Increased Development Efficiency
Olivier Bourgeois
 
Basis Linux (aan de hand van LPIC-1)
Basis Linux (aan de hand van LPIC-1)Basis Linux (aan de hand van LPIC-1)
Basis Linux (aan de hand van LPIC-1)
Peter Martin
 
Linux Booting Procedure system and networking.ppt
Linux Booting Procedure system and networking.pptLinux Booting Procedure system and networking.ppt
Linux Booting Procedure system and networking.ppt
ubaidullah75790
 
Ad

Recently uploaded (20)

Secure Test Infrastructure: The Backbone of Trustworthy Software Development
Secure Test Infrastructure: The Backbone of Trustworthy Software DevelopmentSecure Test Infrastructure: The Backbone of Trustworthy Software Development
Secure Test Infrastructure: The Backbone of Trustworthy Software Development
Shubham Joshi
 
EASEUS Partition Master Crack + License Code
EASEUS Partition Master Crack + License CodeEASEUS Partition Master Crack + License Code
EASEUS Partition Master Crack + License Code
aneelaramzan63
 
Pixologic ZBrush Crack Plus Activation Key [Latest 2025] New Version
Pixologic ZBrush Crack Plus Activation Key [Latest 2025] New VersionPixologic ZBrush Crack Plus Activation Key [Latest 2025] New Version
Pixologic ZBrush Crack Plus Activation Key [Latest 2025] New Version
saimabibi60507
 
Microsoft AI Nonprofit Use Cases and Live Demo_2025.04.30.pdf
Microsoft AI Nonprofit Use Cases and Live Demo_2025.04.30.pdfMicrosoft AI Nonprofit Use Cases and Live Demo_2025.04.30.pdf
Microsoft AI Nonprofit Use Cases and Live Demo_2025.04.30.pdf
TechSoup
 
Avast Premium Security Crack FREE Latest Version 2025
Avast Premium Security Crack FREE Latest Version 2025Avast Premium Security Crack FREE Latest Version 2025
Avast Premium Security Crack FREE Latest Version 2025
mu394968
 
Download Wondershare Filmora Crack [2025] With Latest
Download Wondershare Filmora Crack [2025] With LatestDownload Wondershare Filmora Crack [2025] With Latest
Download Wondershare Filmora Crack [2025] With Latest
tahirabibi60507
 
Who Watches the Watchmen (SciFiDevCon 2025)
Who Watches the Watchmen (SciFiDevCon 2025)Who Watches the Watchmen (SciFiDevCon 2025)
Who Watches the Watchmen (SciFiDevCon 2025)
Allon Mureinik
 
How to Optimize Your AWS Environment for Improved Cloud Performance
How to Optimize Your AWS Environment for Improved Cloud PerformanceHow to Optimize Your AWS Environment for Improved Cloud Performance
How to Optimize Your AWS Environment for Improved Cloud Performance
ThousandEyes
 
Adobe Illustrator Crack FREE Download 2025 Latest Version
Adobe Illustrator Crack FREE Download 2025 Latest VersionAdobe Illustrator Crack FREE Download 2025 Latest Version
Adobe Illustrator Crack FREE Download 2025 Latest Version
kashifyounis067
 
Revolutionizing Residential Wi-Fi PPT.pptx
Revolutionizing Residential Wi-Fi PPT.pptxRevolutionizing Residential Wi-Fi PPT.pptx
Revolutionizing Residential Wi-Fi PPT.pptx
nidhisingh691197
 
Adobe After Effects Crack FREE FRESH version 2025
Adobe After Effects Crack FREE FRESH version 2025Adobe After Effects Crack FREE FRESH version 2025
Adobe After Effects Crack FREE FRESH version 2025
kashifyounis067
 
Requirements in Engineering AI- Enabled Systems: Open Problems and Safe AI Sy...
Requirements in Engineering AI- Enabled Systems: Open Problems and Safe AI Sy...Requirements in Engineering AI- Enabled Systems: Open Problems and Safe AI Sy...
Requirements in Engineering AI- Enabled Systems: Open Problems and Safe AI Sy...
Lionel Briand
 
Top 10 Client Portal Software Solutions for 2025.docx
Top 10 Client Portal Software Solutions for 2025.docxTop 10 Client Portal Software Solutions for 2025.docx
Top 10 Client Portal Software Solutions for 2025.docx
Portli
 
Exploring Code Comprehension in Scientific Programming: Preliminary Insight...
Exploring Code Comprehension  in Scientific Programming:  Preliminary Insight...Exploring Code Comprehension  in Scientific Programming:  Preliminary Insight...
Exploring Code Comprehension in Scientific Programming: Preliminary Insight...
University of Hawai‘i at Mānoa
 
How to Batch Export Lotus Notes NSF Emails to Outlook PST Easily?
How to Batch Export Lotus Notes NSF Emails to Outlook PST Easily?How to Batch Export Lotus Notes NSF Emails to Outlook PST Easily?
How to Batch Export Lotus Notes NSF Emails to Outlook PST Easily?
steaveroggers
 
Download YouTube By Click 2025 Free Full Activated
Download YouTube By Click 2025 Free Full ActivatedDownload YouTube By Click 2025 Free Full Activated
Download YouTube By Click 2025 Free Full Activated
saniamalik72555
 
Douwan Crack 2025 new verson+ License code
Douwan Crack 2025 new verson+ License codeDouwan Crack 2025 new verson+ License code
Douwan Crack 2025 new verson+ License code
aneelaramzan63
 
Expand your AI adoption with AgentExchange
Expand your AI adoption with AgentExchangeExpand your AI adoption with AgentExchange
Expand your AI adoption with AgentExchange
Fexle Services Pvt. Ltd.
 
FL Studio Producer Edition Crack 2025 Full Version
FL Studio Producer Edition Crack 2025 Full VersionFL Studio Producer Edition Crack 2025 Full Version
FL Studio Producer Edition Crack 2025 Full Version
tahirabibi60507
 
Designing AI-Powered APIs on Azure: Best Practices& Considerations
Designing AI-Powered APIs on Azure: Best Practices& ConsiderationsDesigning AI-Powered APIs on Azure: Best Practices& Considerations
Designing AI-Powered APIs on Azure: Best Practices& Considerations
Dinusha Kumarasiri
 
Secure Test Infrastructure: The Backbone of Trustworthy Software Development
Secure Test Infrastructure: The Backbone of Trustworthy Software DevelopmentSecure Test Infrastructure: The Backbone of Trustworthy Software Development
Secure Test Infrastructure: The Backbone of Trustworthy Software Development
Shubham Joshi
 
EASEUS Partition Master Crack + License Code
EASEUS Partition Master Crack + License CodeEASEUS Partition Master Crack + License Code
EASEUS Partition Master Crack + License Code
aneelaramzan63
 
Pixologic ZBrush Crack Plus Activation Key [Latest 2025] New Version
Pixologic ZBrush Crack Plus Activation Key [Latest 2025] New VersionPixologic ZBrush Crack Plus Activation Key [Latest 2025] New Version
Pixologic ZBrush Crack Plus Activation Key [Latest 2025] New Version
saimabibi60507
 
Microsoft AI Nonprofit Use Cases and Live Demo_2025.04.30.pdf
Microsoft AI Nonprofit Use Cases and Live Demo_2025.04.30.pdfMicrosoft AI Nonprofit Use Cases and Live Demo_2025.04.30.pdf
Microsoft AI Nonprofit Use Cases and Live Demo_2025.04.30.pdf
TechSoup
 
Avast Premium Security Crack FREE Latest Version 2025
Avast Premium Security Crack FREE Latest Version 2025Avast Premium Security Crack FREE Latest Version 2025
Avast Premium Security Crack FREE Latest Version 2025
mu394968
 
Download Wondershare Filmora Crack [2025] With Latest
Download Wondershare Filmora Crack [2025] With LatestDownload Wondershare Filmora Crack [2025] With Latest
Download Wondershare Filmora Crack [2025] With Latest
tahirabibi60507
 
Who Watches the Watchmen (SciFiDevCon 2025)
Who Watches the Watchmen (SciFiDevCon 2025)Who Watches the Watchmen (SciFiDevCon 2025)
Who Watches the Watchmen (SciFiDevCon 2025)
Allon Mureinik
 
How to Optimize Your AWS Environment for Improved Cloud Performance
How to Optimize Your AWS Environment for Improved Cloud PerformanceHow to Optimize Your AWS Environment for Improved Cloud Performance
How to Optimize Your AWS Environment for Improved Cloud Performance
ThousandEyes
 
Adobe Illustrator Crack FREE Download 2025 Latest Version
Adobe Illustrator Crack FREE Download 2025 Latest VersionAdobe Illustrator Crack FREE Download 2025 Latest Version
Adobe Illustrator Crack FREE Download 2025 Latest Version
kashifyounis067
 
Revolutionizing Residential Wi-Fi PPT.pptx
Revolutionizing Residential Wi-Fi PPT.pptxRevolutionizing Residential Wi-Fi PPT.pptx
Revolutionizing Residential Wi-Fi PPT.pptx
nidhisingh691197
 
Adobe After Effects Crack FREE FRESH version 2025
Adobe After Effects Crack FREE FRESH version 2025Adobe After Effects Crack FREE FRESH version 2025
Adobe After Effects Crack FREE FRESH version 2025
kashifyounis067
 
Requirements in Engineering AI- Enabled Systems: Open Problems and Safe AI Sy...
Requirements in Engineering AI- Enabled Systems: Open Problems and Safe AI Sy...Requirements in Engineering AI- Enabled Systems: Open Problems and Safe AI Sy...
Requirements in Engineering AI- Enabled Systems: Open Problems and Safe AI Sy...
Lionel Briand
 
Top 10 Client Portal Software Solutions for 2025.docx
Top 10 Client Portal Software Solutions for 2025.docxTop 10 Client Portal Software Solutions for 2025.docx
Top 10 Client Portal Software Solutions for 2025.docx
Portli
 
Exploring Code Comprehension in Scientific Programming: Preliminary Insight...
Exploring Code Comprehension  in Scientific Programming:  Preliminary Insight...Exploring Code Comprehension  in Scientific Programming:  Preliminary Insight...
Exploring Code Comprehension in Scientific Programming: Preliminary Insight...
University of Hawai‘i at Mānoa
 
How to Batch Export Lotus Notes NSF Emails to Outlook PST Easily?
How to Batch Export Lotus Notes NSF Emails to Outlook PST Easily?How to Batch Export Lotus Notes NSF Emails to Outlook PST Easily?
How to Batch Export Lotus Notes NSF Emails to Outlook PST Easily?
steaveroggers
 
Download YouTube By Click 2025 Free Full Activated
Download YouTube By Click 2025 Free Full ActivatedDownload YouTube By Click 2025 Free Full Activated
Download YouTube By Click 2025 Free Full Activated
saniamalik72555
 
Douwan Crack 2025 new verson+ License code
Douwan Crack 2025 new verson+ License codeDouwan Crack 2025 new verson+ License code
Douwan Crack 2025 new verson+ License code
aneelaramzan63
 
Expand your AI adoption with AgentExchange
Expand your AI adoption with AgentExchangeExpand your AI adoption with AgentExchange
Expand your AI adoption with AgentExchange
Fexle Services Pvt. Ltd.
 
FL Studio Producer Edition Crack 2025 Full Version
FL Studio Producer Edition Crack 2025 Full VersionFL Studio Producer Edition Crack 2025 Full Version
FL Studio Producer Edition Crack 2025 Full Version
tahirabibi60507
 
Designing AI-Powered APIs on Azure: Best Practices& Considerations
Designing AI-Powered APIs on Azure: Best Practices& ConsiderationsDesigning AI-Powered APIs on Azure: Best Practices& Considerations
Designing AI-Powered APIs on Azure: Best Practices& Considerations
Dinusha Kumarasiri
 
Ad

An Introduction To Linux

  • 1. An Introduction to Linux Ishan A B Ambanwela
  • 2. Contents ● History ● Linux System Architecture ● Major Components Described – Kernel, Shell, Quickies, File System, Processes, I/O redirection, Networking Brief, Booting The System, Desktop Environments ● Choose a Distribution ● Make Your Own OS ● Useful Resources ● Q&A
  • 3. History - Background ● In late 60s every computer had a different operating system ● Software was always customized to serve a specific purpose ● Being able to work with one didn't automatically mean that you could work with another http://www.soemtron.org/images/jpgs/decimages/pdp7sn112delivery.jpg
  • 4. History - Unix ● In 1969, Bell Labs started working on this Software problem – Simple and elegant – Written in the C instead of in assembly code – Able to recycle code ● OS with a “kernel”, a compatibility layer http://en.wikipedia.org/wiki/File:Ken_Thompson_%28sitting%29_and_Dennis_Ritchie_at_PDP-11_%282876612463%29.jpg http://en.wikipedia.org/wiki/File:AT%26T_logo.svg
  • 5. History – Linus & Linux ● Linus Torvalds, a computer science student from university of Helsinki ● version 0.01 was released with 10,239 LOC in 1991 ● it would cost approximately 3 billion USD to redevelop http://en.wikipedia.org/wiki/File:Linus_Torvalds.jpeg
  • 6. Linux - Pros & Cons ● Pros ● Free ● Secure ● Versatile ● Scalable ● Designed for continuous running ● Portable ● Short debug time ● Community spirit ● Cons ● Too many distributions ● Confusing for beginners ● Games ● Limited support for proprietary applications ● Limited vendor support
  • 7. A Linux System http://www.ibm.com/developerworks/opensource/library/l-linuxuniversal/figure1.gif
  • 9. The Kernel ● Manage all hardware ● Manage all processes and daemons ● Inter Process Communications http://www.ibm.com/developerworks/library/l-linux-kernel/figure3.jpg
  • 10. The Shell “the shell is the steering wheel of the car” Shortcut Function Ctrl+A Move cursor to beginning Ctrl+C End running program Ctrl+D End current session Ctrl+E Move cursor to end Ctrl+H Backspace Ctrl+L Clear Ctrl+R Search command history Ctrl+Z Suspend the program Tab Auto complete Tab Tab Show possible auto completes Up/Down Command history Left/Right Move cursor http://www.ibm.com/developerworks/linux/library/l-linux-shells/figure2.gif
  • 11. The Shell ● Shell loads settings and execute commands when starts – ~/.profile – login shells – ~/.bashrc – non login shells ● Shell will execute commands – ~/.bash_logout ● Command history will be saved in – .bash_history
  • 12. Environment Variables ● Export New/Modified Variables – export PATH=$PATH:/path/to/dir1 ● Make permanent Changes – Add changes to ~/.bashrc or ~/.profile – System wide changes : /etc/profile ● Load settings – Ex: source /etc/profile
  • 13. Quick Start Commands Command Use ls Display a list of files in current working directory cd <directory> Change directory pwd Display current working directory passwd Change the password cat <textfile> Display the content of a text file exit End the current session apropos <string> Search the “whatis” database info <command> Read info pages for the command man <command> Read man pages for the command
  • 14. Linux File System ● On a Linux system, everything is a file. ● if something is not a file, it is a process. http://tldp.org/LDP/intro-linux/html/images/FS-layout.png
  • 15. Partitions & Mount Points ● Partition Types – Data – normal Linux system data – Swap – an extension of physical memory ● All partitions are attached to the system via a mount point – defines the place of a data set in the file system – /etc/fstab holds the default structure fdisk -l /dev/sda3 28G 6.8G 20G 26% / /dev/sda5 376G 2.9G 354G 1% /home/ishanaba/Desktop /dev/sdc1 1.9T 1.6T 321G 83% /media/ishanaba/FreeAgent GoFlex Drive
  • 16. Files Types Symbol Meaning - Regular file d Directory l Link c Special File s Socket p Named Pipe b Block Device ls -l drwxr-xr-x 2 ishanaba ishanaba 4096 May 20 18:09 Downloads -rw-r--r-- 1 ishanaba ishanaba 8980 Apr 19 12:53 examples.desktop
  • 17. inode ● In Linux file systems, files are indexed by a number, "the inode" ● At the time a new file is created, it gets a free inode ● Owner and group owner ● File type (regular, directory, ...) ● Permissions ● Date/time of creation, last read/change ● Date/time changes in the inode ● Number of links to this file ● File size ● Actual location of the file data
  • 18. Links ● Symbolic Links ● Hard Links http://linuxg.net/wp-content/uploads/2012/07/symlink-vs-hardlink.png
  • 19. File Security ls -l drwxr-xr-x 2 ishanaba ishanaba 4096 May 20 18:09 Downloads -rw-r--r-- 1 ishanaba ishanaba 8980 Apr 19 12:53 examples.desktop ● chmod – change the mode/access – user|group|other <=> rwx|r-x|r-x ● chown – change the ownership – user group <=> ishanaba ishanaba
  • 20. Some More Commands ● File Manipulation – Copy ● cp – Remove ● rm – Create Directory ● mkdir – Create a file ● touch ● Read Files – tail – head – grep – less – more ● Locate Files – find – locate
  • 21. Processes ps -af -e UID PID PPID C STIME TTY TIME CMD ishanaba 9762 7120 0 20:12 pts/0 00:00:00 ps -af ishanaba 3107 2086 7 14:51 ? 00:22:44 gnome-system-monitor ● The process ID or PID ● The parent process ID or PPID ● Nice number ● Terminal or TTY ● User name of the real and effective user (RUID and EUID) ● Real and effective group owner (RGID and EGID)
  • 22. Process Creation ● Fork and Exec ● Usually a system call ● Fork : a process creates an exact copy of it self with a different PID ● Exec : address space of the child process is overwritten with the new process data http://www.tldp.org/LDP/intro-linux/html/images/fork-and-exec.png
  • 23. Start Processes ● Start a process – Simply type the command and enter – Ex: firefox ● Start a process in Background – Type the command following & sign – Ex: firefox & ● Related Commands – ps ● ps -e – pstree – top – nice/renice – netstat
  • 24. End Processes ● When process ends normally, it will return “exit status” to the parent ● Processes can be killed terminated using Signals ● List all signals : kill -l Name Number Meaning SIGTERM 15 Terminate the process in orderly way SIGINT 2 Interrupt(can be ignored) SIGKILL 9 Interrupt(can not be ignored) SIGHUP 1 Reread the configuration file
  • 25. I/O Redirection ● Redirect – Input ● Ex: mail [email protected] < to_do – Output ● Write Ex: ls > sample.txt ● Append Ex: ls >> sample.txt ● Pipe – Ex: ls /dev/tty* | grep USB
  • 26. Networking ● Linux Supports almost all OSI model protocols Layer Name Protocols Application Layer HTTP, DNS, SMTP, POP, RPC, RTP Transport Layer TCP, UDP Network Layer IP, IPv6 Network Access Layer PPP, PPPoE, Ethernet
  • 27. Booting The System 1.Initialize Hardware 2.Boot Loader 3.Kernel & initramfs 4.init on initramfs 5.init
  • 28. Booting : Initialize Hardware ● BIOS – Power On Self Test – Search for Master Boot Record(MBR) – First 512 bytes of first Hard Disk ● UEFI – Power On Self Test – Load UEFI firmware – Initializes the hardware required for booting – Firmware reads its Boot Manager data – launches the UEFI application – the launched UEFI application may launch another application
  • 29. Boot Loader, Kernel & initramfs ● boot loader loads – Kernel – initial RAM–based file system (initramfs) into memory ● initramfs contains a small executable, init ● init handles the mounting of the real root file system ● If special drivers are needed before the respective device be accessed, they must be in initramf
  • 30. Booting : init in initramfs ● mount the proper root file system ● provide the Kernel functionality for the needed file system and device drivers with udev ● After the root file system has been found, it is checked for errors and mounted
  • 31. Booting : init ● Init, process with id 1 ● All the other processes started by init ● Ex: SysV, initng, Upstart, systemd ● init continue boot with its configuration at /etc/inittab specifies – services – daemons which are available in each of the runlevels Run levels in SysV Run Level Description 0 System halt 1 Single user mode 2 Local multiuser without network 3 Full multiuser with network 4 Undefined can be configured 5 Full multiuser with network and X 6 reboot
  • 32. Desktop Environments ● A software bundle which share a common GUI ● Consist of – Window Manager – Widget toolkit ● Ex : GNOME, KDE, LXDE, Unity, Xfce https://m.ak.fbcdn.net/sphotos-f.ak/hphotos-ak-prn2/t1.0-9/10262254_1020397582802299 1_1421869568506953645_n.jpg
  • 33. Choose a distribution ● All major distributions works fine ● Visit distrowatch.com and read more ● My suggestions – Beginner – Ubuntu, Mint, Fedora, suse, Mandriva, debian – Moderate – debian, freeBSD, openBSD, Kali, Arch, slack ware Gentoo – Advanced – Gentoo, LinuxFromScratch https://scottlinux.com/wp-content/uploads/2012/07/linux-e1342279303170.png
  • 34. Make Your Own OS ● Approaches – Linux From Scratch – Gentoo Linux http://www.linuxfromscratch.org/iimmaaggeess//images/lfs-llffss--llooggoo..logo.png ppnngg https://www.gentoo.org/images/gtop-www.jpg
  • 35. Useful Resources ● http://tldp.org/LDP/intro-linux/html/ ● An on line course will be start in next August ● https://www.edx.org/course/linuxfoundationx/lin uxfoundationx-lfs101x-introduction-1621 ● Operating Systems: Design and Implementation by Andrew S. Tanenbaum ● Linux in a Nutshell by Ellen Siever, Stephen Figgins, Robert Love, Arnold Robbins
  • 36. Q & A
  • 37. Thank You and Good Luck :-)