Philosophy Concept of Users File Handling in Linux Process Handling in Linux Licenses
Introduction to Linux
by Ashish Bhatia
TechBuddy Consulting Pvt. Ltd.
19-21 June 2010
Ashish Bhatia Introduction to Linux
Philosophy Concept of Users File Handling in Linux Process Handling in Linux Licenses
Why learn Linux?
Ashish Bhatia Introduction to Linux
Philosophy Concept of Users File Handling in Linux Process Handling in Linux Licenses
What is OS?
What is OS?
1 BIOS - Boot Loader - OS
2 Hardware - OS - Application Software - User
3 multi-user?
4 multi-tasking?
Ashish Bhatia Introduction to Linux
Philosophy Concept of Users File Handling in Linux Process Handling in Linux Licenses
History of GNU/Linux
based on ideas from UNIX (originated in 1969 at AT&T)
created by Linus Torvalds in 1991
General Public License
GPL
distribution of source code with binary is must
more details later
Ashish Bhatia Introduction to Linux
Philosophy Concept of Users File Handling in Linux Process Handling in Linux Licenses
Files and Processes
A running program is a process
it has unique process identifier (PID)
Everything else is file
even devices like mouse, keyboard etc.
every file has a unique inode number in Linux
Ashish Bhatia Introduction to Linux
Philosophy Concept of Users File Handling in Linux Process Handling in Linux Licenses
File Hierarchy
Unlike windows(except recent versions) where data storage is
partitioned into various drives
In Linux all (accessible) data is under /
Ashish Bhatia Introduction to Linux
Philosophy Concept of Users File Handling in Linux Process Handling in Linux Licenses
File Hierarchy
/ The ancestor of all directories on the system
Ashish Bhatia Introduction to Linux
Philosophy Concept of Users File Handling in Linux Process Handling in Linux Licenses
File Hierarchy
/ The ancestor of all directories on the system
/bin Essential tools and other programs (or binaries)
Ashish Bhatia Introduction to Linux
Philosophy Concept of Users File Handling in Linux Process Handling in Linux Licenses
File Hierarchy
/ The ancestor of all directories on the system
/bin Essential tools and other programs (or binaries)
/dev Files representing the system’s various hardware devices
(eg. /dev/dvd)
Ashish Bhatia Introduction to Linux
Philosophy Concept of Users File Handling in Linux Process Handling in Linux Licenses
File Hierarchy
/ The ancestor of all directories on the system
/bin Essential tools and other programs (or binaries)
/dev Files representing the system’s various hardware devices
(eg. /dev/dvd)
/etc Misc system configuration files, startup files (eg.
/etc/networking)
Ashish Bhatia Introduction to Linux
Philosophy Concept of Users File Handling in Linux Process Handling in Linux Licenses
File Hierarchy
/ The ancestor of all directories on the system
/bin Essential tools and other programs (or binaries)
/dev Files representing the system’s various hardware devices
(eg. /dev/dvd)
/etc Misc system configuration files, startup files (eg.
/etc/networking)
/home The home dir for all of the system’s users
Ashish Bhatia Introduction to Linux
Philosophy Concept of Users File Handling in Linux Process Handling in Linux Licenses
File Hierarchy
/ The ancestor of all directories on the system
/bin Essential tools and other programs (or binaries)
/dev Files representing the system’s various hardware devices
(eg. /dev/dvd)
/etc Misc system configuration files, startup files (eg.
/etc/networking)
/home The home dir for all of the system’s users
/proc Files that give information about current system
processes
Ashish Bhatia Introduction to Linux
Philosophy Concept of Users File Handling in Linux Process Handling in Linux Licenses
File Hierarchy
/ The ancestor of all directories on the system
/bin Essential tools and other programs (or binaries)
/dev Files representing the system’s various hardware devices
(eg. /dev/dvd)
/etc Misc system configuration files, startup files (eg.
/etc/networking)
/home The home dir for all of the system’s users
/proc Files that give information about current system
processes
/root superuser’s home directory, whose username is root
Ashish Bhatia Introduction to Linux
Philosophy Concept of Users File Handling in Linux Process Handling in Linux Licenses
File Hierarchy
/ The ancestor of all directories on the system
/bin Essential tools and other programs (or binaries)
/dev Files representing the system’s various hardware devices
(eg. /dev/dvd)
/etc Misc system configuration files, startup files (eg.
/etc/networking)
/home The home dir for all of the system’s users
/proc Files that give information about current system
processes
/root superuser’s home directory, whose username is root
/tmp Temp files
Ashish Bhatia Introduction to Linux
Philosophy Concept of Users File Handling in Linux Process Handling in Linux Licenses
File Hierarchy
/ The ancestor of all directories on the system
/bin Essential tools and other programs (or binaries)
/dev Files representing the system’s various hardware devices
(eg. /dev/dvd)
/etc Misc system configuration files, startup files (eg.
/etc/networking)
/home The home dir for all of the system’s users
/proc Files that give information about current system
processes
/root superuser’s home directory, whose username is root
/tmp Temp files
/usr Subdir with files related to user tools and applications
Ashish Bhatia Introduction to Linux
Philosophy Concept of Users File Handling in Linux Process Handling in Linux Licenses
Linux Alternative for Windows
Internet Explorer = Firefox
Ashish Bhatia Introduction to Linux
Philosophy Concept of Users File Handling in Linux Process Handling in Linux Licenses
Linux Alternative for Windows
Internet Explorer = Firefox
Outlook Express = Thunderbird
Ashish Bhatia Introduction to Linux
Philosophy Concept of Users File Handling in Linux Process Handling in Linux Licenses
Linux Alternative for Windows
Internet Explorer = Firefox
Outlook Express = Thunderbird
Google Talk = Pidgin (and Skype)
Ashish Bhatia Introduction to Linux
Philosophy Concept of Users File Handling in Linux Process Handling in Linux Licenses
Linux Alternative for Windows
Internet Explorer = Firefox
Outlook Express = Thunderbird
Google Talk = Pidgin (and Skype)
media player = amarok
Ashish Bhatia Introduction to Linux
Philosophy Concept of Users File Handling in Linux Process Handling in Linux Licenses
Linux Alternative for Windows
Internet Explorer = Firefox
Outlook Express = Thunderbird
Google Talk = Pidgin (and Skype)
media player = amarok
Microsoft Office = Open Office
Ashish Bhatia Introduction to Linux
Philosophy Concept of Users File Handling in Linux Process Handling in Linux Licenses
Linux Alternative for Windows
Internet Explorer = Firefox
Outlook Express = Thunderbird
Google Talk = Pidgin (and Skype)
media player = amarok
Microsoft Office = Open Office
Notepad = kate,vim
Ashish Bhatia Introduction to Linux
Philosophy Concept of Users File Handling in Linux Process Handling in Linux Licenses
Linux Alternative for Windows
Internet Explorer = Firefox
Outlook Express = Thunderbird
Google Talk = Pidgin (and Skype)
media player = amarok
Microsoft Office = Open Office
Notepad = kate,vim
A more comprehensive list at
http://wiki.linuxquestions.org/wiki/
Linux software equivalent to Windows software
Ashish Bhatia Introduction to Linux
Philosophy Concept of Users File Handling in Linux Process Handling in Linux Licenses
What is a user
A user represents a real-world entity and it has
username (and user ID)
Ashish Bhatia Introduction to Linux
Philosophy Concept of Users File Handling in Linux Process Handling in Linux Licenses
What is a user
A user represents a real-world entity and it has
username (and user ID)
group (and group ID)
Ashish Bhatia Introduction to Linux
Philosophy Concept of Users File Handling in Linux Process Handling in Linux Licenses
What is a user
A user represents a real-world entity and it has
username (and user ID)
group (and group ID)
Password
Ashish Bhatia Introduction to Linux
Philosophy Concept of Users File Handling in Linux Process Handling in Linux Licenses
What is a user
A user represents a real-world entity and it has
username (and user ID)
group (and group ID)
Password
Home Dir
Ashish Bhatia Introduction to Linux
Philosophy Concept of Users File Handling in Linux Process Handling in Linux Licenses
What is a user
A user represents a real-world entity and it has
username (and user ID)
group (and group ID)
Password
Home Dir
Default Shell
Ashish Bhatia Introduction to Linux
Philosophy Concept of Users File Handling in Linux Process Handling in Linux Licenses
What is a user
A user represents a real-world entity and it has
username (and user ID)
group (and group ID)
Password
Home Dir
Default Shell
User Details
Ashish Bhatia Introduction to Linux
Philosophy Concept of Users File Handling in Linux Process Handling in Linux Licenses
Users and Processes
GNU/Linux is a multi-user OS
Ashish Bhatia Introduction to Linux
Philosophy Concept of Users File Handling in Linux Process Handling in Linux Licenses
Users and Processes
GNU/Linux is a multi-user OS
Everything is a file or a process
Ashish Bhatia Introduction to Linux
Philosophy Concept of Users File Handling in Linux Process Handling in Linux Licenses
Users and Processes
GNU/Linux is a multi-user OS
Everything is a file or a process
Each process must specify which user is the owner
Ashish Bhatia Introduction to Linux
Philosophy Concept of Users File Handling in Linux Process Handling in Linux Licenses
Users and Processes
GNU/Linux is a multi-user OS
Everything is a file or a process
Each process must specify which user is the owner
No one except owner has right to access that process*
Ashish Bhatia Introduction to Linux
Philosophy Concept of Users File Handling in Linux Process Handling in Linux Licenses
Users and Processes
GNU/Linux is a multi-user OS
Everything is a file or a process
Each process must specify which user is the owner
No one except owner has right to access that process*
what about files?
Ashish Bhatia Introduction to Linux
Philosophy Concept of Users File Handling in Linux Process Handling in Linux Licenses
Users and Files
Each file has three (boolean) permissions
Read(r)
Write(w)
Execute(x)
Ashish Bhatia Introduction to Linux
Philosophy Concept of Users File Handling in Linux Process Handling in Linux Licenses
Users and Files
Each file has three (boolean) permissions
Read(r)
Write(w)
Execute(x)
All users can be grouped into
Owner(u)
Group (members) (g)
Others (o)
Ashish Bhatia Introduction to Linux
Philosophy Concept of Users File Handling in Linux Process Handling in Linux Licenses
Users and Files
Each file has three (boolean) permissions
Read(r)
Write(w)
Execute(x)
All users can be grouped into
Owner(u)
Group (members) (g)
Others (o)
9 bits
r w x r w x r w x
Ashish Bhatia Introduction to Linux
Philosophy Concept of Users File Handling in Linux Process Handling in Linux Licenses
Users and Files
Each file has three (boolean) permissions
Read(r)
Write(w)
Execute(x)
All users can be grouped into
Owner(u)
Group (members) (g)
Others (o)
9 bits
r w x r w x r w x
Super-user bypasses file permissions
Ashish Bhatia Introduction to Linux
Philosophy Concept of Users File Handling in Linux Process Handling in Linux Licenses
A few examples
chmod 600 file1
Ashish Bhatia Introduction to Linux
Philosophy Concept of Users File Handling in Linux Process Handling in Linux Licenses
A few examples
chmod 600 file1
chmod 400 file2
Ashish Bhatia Introduction to Linux
Philosophy Concept of Users File Handling in Linux Process Handling in Linux Licenses
A few examples
chmod 600 file1
chmod 400 file2
chmod 711 file3
Ashish Bhatia Introduction to Linux
Philosophy Concept of Users File Handling in Linux Process Handling in Linux Licenses
A few examples
chmod 600 file1
chmod 400 file2
chmod 711 file3
chmod 644 file4
Ashish Bhatia Introduction to Linux
Philosophy Concept of Users File Handling in Linux Process Handling in Linux Licenses
A few examples
chmod 600 file1
chmod 400 file2
chmod 711 file3
chmod 644 file4
chmod -R 644 dir1
Ashish Bhatia Introduction to Linux
Philosophy Concept of Users File Handling in Linux Process Handling in Linux Licenses
Users and Files
File Permissions on Dir
Execute permission is required for a user to cd into a directory
Ashish Bhatia Introduction to Linux
Philosophy Concept of Users File Handling in Linux Process Handling in Linux Licenses
Users and Files
File Permissions on Dir
Execute permission is required for a user to cd into a directory
Execute-only permission allows a user to access the files in a
directory as long as the user knows the names of the files in
the directory(and the user is allowed to read the files)
Ashish Bhatia Introduction to Linux
Philosophy Concept of Users File Handling in Linux Process Handling in Linux Licenses
Users and Files
File Permissions on Dir
Execute permission is required for a user to cd into a directory
Execute-only permission allows a user to access the files in a
directory as long as the user knows the names of the files in
the directory(and the user is allowed to read the files)
Execute+Read permission is required to view files contained
in dir (eg. ls)
Ashish Bhatia Introduction to Linux
Philosophy Concept of Users File Handling in Linux Process Handling in Linux Licenses
Users and Files
File Permissions on Dir
Execute permission is required for a user to cd into a directory
Execute-only permission allows a user to access the files in a
directory as long as the user knows the names of the files in
the directory(and the user is allowed to read the files)
Execute+Read permission is required to view files contained
in dir (eg. ls)
Execute+Read+Write permission allows the user to create,
delete, or modify any files or subdirectories(even if the file or
subdirectory is owned by another user)
Ashish Bhatia Introduction to Linux
Philosophy Concept of Users File Handling in Linux Process Handling in Linux Licenses
Users and Files
Ashish Bhatia Introduction to Linux
Philosophy Concept of Users File Handling in Linux Process Handling in Linux Licenses
Users and Files
Something More
SetUID(u+s)
Ashish Bhatia Introduction to Linux
Philosophy Concept of Users File Handling in Linux Process Handling in Linux Licenses
Users and Files
Something More
SetUID(u+s)
SetGID(g+s)
Ashish Bhatia Introduction to Linux
Philosophy Concept of Users File Handling in Linux Process Handling in Linux Licenses
Users and Files
Something More
SetUID(u+s)
SetGID(g+s)
Sticky Bit(t)
Ashish Bhatia Introduction to Linux
Philosophy Concept of Users File Handling in Linux Process Handling in Linux Licenses
Is Linux (really) secure?
Ashish Bhatia Introduction to Linux
Philosophy Concept of Users File Handling in Linux Process Handling in Linux Licenses
Is Linux (really) secure?
Security of system or data?
1 Security by design
designed for connectivity and security
users do not login into admin account (by default)
users do not install packages from unverified sources
some distros require admin account even for connecting usb
Ashish Bhatia Introduction to Linux
Philosophy Concept of Users File Handling in Linux Process Handling in Linux Licenses
Is Linux (really) secure?
Security of system or data?
1 Security by design
designed for connectivity and security
users do not login into admin account (by default)
users do not install packages from unverified sources
some distros require admin account even for connecting usb
2 intelligent users
Ashish Bhatia Introduction to Linux
Philosophy Concept of Users File Handling in Linux Process Handling in Linux Licenses
Is Linux (really) secure?
Security of system or data?
1 Security by design
designed for connectivity and security
users do not login into admin account (by default)
users do not install packages from unverified sources
some distros require admin account even for connecting usb
2 intelligent users
3 Smaller market to target for attackers
Ashish Bhatia Introduction to Linux
Philosophy Concept of Users File Handling in Linux Process Handling in Linux Licenses
Shell
provides the traditional user interface for the Unix operating
system and for Unix-like systems
Ashish Bhatia Introduction to Linux
Philosophy Concept of Users File Handling in Linux Process Handling in Linux Licenses
Shell
provides the traditional user interface for the Unix operating
system and for Unix-like systems
Some popular shells
bash
ksh
csh
Unless mentioned all slides assume bash
Ashish Bhatia Introduction to Linux
Philosophy Concept of Users File Handling in Linux Process Handling in Linux Licenses
Process in Linux
Main Attributes
uid - user with whose permissions process executes
Ashish Bhatia Introduction to Linux
Philosophy Concept of Users File Handling in Linux Process Handling in Linux Licenses
Process in Linux
Main Attributes
uid - user with whose permissions process executes
pid - process id
Ashish Bhatia Introduction to Linux
Philosophy Concept of Users File Handling in Linux Process Handling in Linux Licenses
Process in Linux
Main Attributes
uid - user with whose permissions process executes
pid - process id
ppid - parent process id
Ashish Bhatia Introduction to Linux
Philosophy Concept of Users File Handling in Linux Process Handling in Linux Licenses
Process in Linux
Main Attributes
uid - user with whose permissions process executes
pid - process id
ppid - parent process id
terminal - to which process is attached
Ashish Bhatia Introduction to Linux
Philosophy Concept of Users File Handling in Linux Process Handling in Linux Licenses
Standard I/O
Every process has access to three (standard) files
stdin (usually keyboard) - 0
Ashish Bhatia Introduction to Linux
Philosophy Concept of Users File Handling in Linux Process Handling in Linux Licenses
Standard I/O
Every process has access to three (standard) files
stdin (usually keyboard) - 0
stdout (usually monitor) - 1
Ashish Bhatia Introduction to Linux
Philosophy Concept of Users File Handling in Linux Process Handling in Linux Licenses
Standard I/O
Every process has access to three (standard) files
stdin (usually keyboard) - 0
stdout (usually monitor) - 1
stderr (usually monitor) - 2
Ashish Bhatia Introduction to Linux
Philosophy Concept of Users File Handling in Linux Process Handling in Linux Licenses
I/O Redirection
Standard I/O of the process can be redirected to other file(s)
cmd >filename
redirects output from stdout to filename
original contents of file are overwritten
use >>to append the output to original content
Ashish Bhatia Introduction to Linux
Philosophy Concept of Users File Handling in Linux Process Handling in Linux Licenses
I/O Redirection
Standard I/O of the process can be redirected to other file(s)
cmd >filename
redirects output from stdout to filename
original contents of file are overwritten
use >>to append the output to original content
cmd 2>filename
redirects output from stderr to filename
original contents of file are overwritten
use >>to append the output to original content
Ashish Bhatia Introduction to Linux
Philosophy Concept of Users File Handling in Linux Process Handling in Linux Licenses
I/O Redirection
Standard I/O of the process can be redirected to other file(s)
cmd >filename
redirects output from stdout to filename
original contents of file are overwritten
use >>to append the output to original content
cmd 2>filename
redirects output from stderr to filename
original contents of file are overwritten
use >>to append the output to original content
cmd <filename
redirects input from stdin to filename
Ashish Bhatia Introduction to Linux
Philosophy Concept of Users File Handling in Linux Process Handling in Linux Licenses
I/O Redirection
Standard I/O of the process can be redirected to other file(s)
cmd >filename
redirects output from stdout to filename
original contents of file are overwritten
use >>to append the output to original content
cmd 2>filename
redirects output from stderr to filename
original contents of file are overwritten
use >>to append the output to original content
cmd <filename
redirects input from stdin to filename
use /dev/null as output file to discard the output
Ashish Bhatia Introduction to Linux
Philosophy Concept of Users File Handling in Linux Process Handling in Linux Licenses
Executing multiple processes(sequentially)
What are the possible cases?
Ashish Bhatia Introduction to Linux
Philosophy Concept of Users File Handling in Linux Process Handling in Linux Licenses
Executing multiple processes(sequentially)
What are the possible cases?
cmd1 ; cmd2
cmd2 is executed after completion of cmd1
Ashish Bhatia Introduction to Linux
Philosophy Concept of Users File Handling in Linux Process Handling in Linux Licenses
Executing multiple processes(sequentially)
What are the possible cases?
cmd1 ; cmd2
cmd2 is executed after completion of cmd1
cmd1 && cmd2
cmd2 is executed after successful completion of cmd1
eg. rm abc && mkdir abc
creates directory abc only if abc file is deleted successfully
Ashish Bhatia Introduction to Linux
Philosophy Concept of Users File Handling in Linux Process Handling in Linux Licenses
Executing multiple processes(sequentially)
What are the possible cases?
cmd1 ; cmd2
cmd2 is executed after completion of cmd1
cmd1 && cmd2
cmd2 is executed after successful completion of cmd1
eg. rm abc && mkdir abc
creates directory abc only if abc file is deleted successfully
cmd1 || cmd2
cmd2 is executed on un-successful completion of cmd1
Ashish Bhatia Introduction to Linux
Philosophy Concept of Users File Handling in Linux Process Handling in Linux Licenses
Executing multiple processes(sequentially)
What are the possible cases?
cmd1 ; cmd2
cmd2 is executed after completion of cmd1
cmd1 && cmd2
cmd2 is executed after successful completion of cmd1
eg. rm abc && mkdir abc
creates directory abc only if abc file is deleted successfully
cmd1 || cmd2
cmd2 is executed on un-successful completion of cmd1
cmd1 | cmd2
cmd2 is executed on successful completion of cmd1 and takes
output of cmd1 as its input
Ashish Bhatia Introduction to Linux
Philosophy Concept of Users File Handling in Linux Process Handling in Linux Licenses
Executing multiple processes(in parallel)
what is background mode?
Ashish Bhatia Introduction to Linux
Philosophy Concept of Users File Handling in Linux Process Handling in Linux Licenses
Executing multiple processes(in parallel)
what is background mode?
start process in background mode directly
using & at the end of command
Ashish Bhatia Introduction to Linux
Philosophy Concept of Users File Handling in Linux Process Handling in Linux Licenses
Executing multiple processes(in parallel)
what is background mode?
start process in background mode directly
using & at the end of command
start process normally (foreground)
press ˆz (stops the process)
execute bg (to start most recently stopped process in
background mode)
Ashish Bhatia Introduction to Linux
Philosophy Concept of Users File Handling in Linux Process Handling in Linux Licenses
Executing multiple processes(in parallel)
Handling processes running in background
Ashish Bhatia Introduction to Linux
Philosophy Concept of Users File Handling in Linux Process Handling in Linux Licenses
Executing multiple processes(in parallel)
Handling processes running in background
jobs - print currently pending (running + stopped) jobs
Ashish Bhatia Introduction to Linux
Philosophy Concept of Users File Handling in Linux Process Handling in Linux Licenses
Executing multiple processes(in parallel)
Handling processes running in background
jobs - print currently pending (running + stopped) jobs
kill %1 - kills job corresponding to number 1 in the jobs
output
Ashish Bhatia Introduction to Linux
Philosophy Concept of Users File Handling in Linux Process Handling in Linux Licenses
Executing multiple processes(in parallel)
Handling processes running in background
jobs - print currently pending (running + stopped) jobs
kill %1 - kills job corresponding to number 1 in the jobs
output
fg - brings a background process back to foreground
Ashish Bhatia Introduction to Linux
Philosophy Concept of Users File Handling in Linux Process Handling in Linux Licenses
Executing multiple processes(in parallel)
More process handling
Ashish Bhatia Introduction to Linux
Philosophy Concept of Users File Handling in Linux Process Handling in Linux Licenses
Executing multiple processes(in parallel)
More process handling
ps [-ely] - see all processes of all users
Ashish Bhatia Introduction to Linux
Philosophy Concept of Users File Handling in Linux Process Handling in Linux Licenses
Executing multiple processes(in parallel)
More process handling
ps [-ely] - see all processes of all users
pstree - shows processes in tree-like (father-child) relation
Ashish Bhatia Introduction to Linux
Philosophy Concept of Users File Handling in Linux Process Handling in Linux Licenses
Executing multiple processes(in parallel)
More process handling
ps [-ely] - see all processes of all users
pstree - shows processes in tree-like (father-child) relation
top - show list of running processes interactively
q - quit
k - kill a process
signal -9 kill without warning
signal -15 kill after warning (allows cleanup)
Ashish Bhatia Introduction to Linux
Philosophy Concept of Users File Handling in Linux Process Handling in Linux Licenses
Executing multiple processes(in parallel)
More process handling
ps [-ely] - see all processes of all users
pstree - shows processes in tree-like (father-child) relation
top - show list of running processes interactively
q - quit
k - kill a process
signal -9 kill without warning
signal -15 kill after warning (allows cleanup)
kill [signal] process-id
kill -9 process-id
Ashish Bhatia Introduction to Linux
Philosophy Concept of Users File Handling in Linux Process Handling in Linux Licenses
Executing multiple processes(in parallel)
More process handling
ps [-ely] - see all processes of all users
pstree - shows processes in tree-like (father-child) relation
top - show list of running processes interactively
q - quit
k - kill a process
signal -9 kill without warning
signal -15 kill after warning (allows cleanup)
kill [signal] process-id
kill -9 process-id
killall [signal] process-cmd-name
Ashish Bhatia Introduction to Linux
Philosophy Concept of Users File Handling in Linux Process Handling in Linux Licenses
Free Software
As defined by FSF (1986)
1 run the program (for any purpose)
Ashish Bhatia Introduction to Linux
Philosophy Concept of Users File Handling in Linux Process Handling in Linux Licenses
Free Software
As defined by FSF (1986)
1 run the program (for any purpose)
2 study how the program works (and change it to your needs)
Ashish Bhatia Introduction to Linux
Philosophy Concept of Users File Handling in Linux Process Handling in Linux Licenses
Free Software
As defined by FSF (1986)
1 run the program (for any purpose)
2 study how the program works (and change it to your needs)
3 redistribute copies
Ashish Bhatia Introduction to Linux
Philosophy Concept of Users File Handling in Linux Process Handling in Linux Licenses
Free Software
As defined by FSF (1986)
1 run the program (for any purpose)
2 study how the program works (and change it to your needs)
3 redistribute copies
4 improve the program and release your improvements to the
public
Ashish Bhatia Introduction to Linux
Philosophy Concept of Users File Handling in Linux Process Handling in Linux Licenses
Licenses
1 GNU General Purpose License
Disclaimer: I am not a legal expert
Ashish Bhatia Introduction to Linux
Philosophy Concept of Users File Handling in Linux Process Handling in Linux Licenses
Licenses
1 GNU General Purpose License
2 GNU Lesser General Purpose License
Disclaimer: I am not a legal expert
Ashish Bhatia Introduction to Linux
Philosophy Concept of Users File Handling in Linux Process Handling in Linux Licenses
Licenses
1 GNU General Purpose License
2 GNU Lesser General Purpose License
3 Apache License
Disclaimer: I am not a legal expert
Ashish Bhatia Introduction to Linux
Philosophy Concept of Users File Handling in Linux Process Handling in Linux Licenses
Licenses
1 GNU General Purpose License
2 GNU Lesser General Purpose License
3 Apache License
4 BSD License
Disclaimer: I am not a legal expert
Ashish Bhatia Introduction to Linux
Philosophy Concept of Users File Handling in Linux Process Handling in Linux Licenses
Licenses
1 GNU General Purpose License
2 GNU Lesser General Purpose License
3 Apache License
4 BSD License
5 lot of others
Disclaimer: I am not a legal expert
Ashish Bhatia Introduction to Linux
Philosophy Concept of Users File Handling in Linux Process Handling in Linux Licenses
GNU GPL
1 most popular (and most sophisticated)
Ashish Bhatia Introduction to Linux
Philosophy Concept of Users File Handling in Linux Process Handling in Linux Licenses
GNU GPL
1 most popular (and most sophisticated)
2 a work derived from GPL licensed work must be licensed
under GPL
Ashish Bhatia Introduction to Linux
Philosophy Concept of Users File Handling in Linux Process Handling in Linux Licenses
GNU GPL
1 most popular (and most sophisticated)
2 a work derived from GPL licensed work must be licensed
under GPL
3 linking to GPL code?
Ashish Bhatia Introduction to Linux
Philosophy Concept of Users File Handling in Linux Process Handling in Linux Licenses
GNU LGPL
1 less restrictive than GPL
Ashish Bhatia Introduction to Linux
Philosophy Concept of Users File Handling in Linux Process Handling in Linux Licenses
GNU LGPL
1 less restrictive than GPL
2 LGPL licensed code can be linked by non-(L)GPL code
Ashish Bhatia Introduction to Linux
Philosophy Concept of Users File Handling in Linux Process Handling in Linux Licenses
GNU LGPL
1 less restrictive than GPL
2 LGPL licensed code can be linked by non-(L)GPL code
3 derivative work must still release code for personal use (of
customer)
Ashish Bhatia Introduction to Linux
Philosophy Concept of Users File Handling in Linux Process Handling in Linux Licenses
GNU LGPL
1 less restrictive than GPL
2 LGPL licensed code can be linked by non-(L)GPL code
3 derivative work must still release code for personal use (of
customer)
4 LGPL vs GPL? which one to use?
Ashish Bhatia Introduction to Linux
Philosophy Concept of Users File Handling in Linux Process Handling in Linux Licenses
BSD
1 Very permissive
Ashish Bhatia Introduction to Linux
Philosophy Concept of Users File Handling in Linux Process Handling in Linux Licenses
BSD
1 Very permissive
2 just give credits to the previous contributors
Ashish Bhatia Introduction to Linux
Philosophy Concept of Users File Handling in Linux Process Handling in Linux Licenses
BSD
1 Very permissive
2 just give credits to the previous contributors
3 no need to release source-code
Ashish Bhatia Introduction to Linux
Philosophy Concept of Users File Handling in Linux Process Handling in Linux Licenses
BSD
1 Very permissive
2 just give credits to the previous contributors
3 no need to release source-code
4 “If you want to give your software away for free, use BSD. If
you want to share your software, use the GPL”
(Courtesy:OSnews)
Ashish Bhatia Introduction to Linux
Philosophy Concept of Users File Handling in Linux Process Handling in Linux Licenses
Apache
1 Permissiveness same as BSD but legally more explicit
Ashish Bhatia Introduction to Linux
Philosophy Concept of Users File Handling in Linux Process Handling in Linux Licenses
Apache
1 Permissiveness same as BSD but legally more explicit
2 handles the problem of software patents
Ashish Bhatia Introduction to Linux
Philosophy Concept of Users File Handling in Linux Process Handling in Linux Licenses
Apache
1 Permissiveness same as BSD but legally more explicit
2 handles the problem of software patents
3 author of the code (automatically) gives up the right to any of
(his/her) patent used in the code
Ashish Bhatia Introduction to Linux
Philosophy Concept of Users File Handling in Linux Process Handling in Linux Licenses
Case 1
ACME systems internally uses CRM whose codebase is based
on a GPL based CRM. Can an employee of the company ask
for the source code?
Ashish Bhatia Introduction to Linux
Philosophy Concept of Users File Handling in Linux Process Handling in Linux Licenses
Case 2
Microspecial Inc. supplies embedded systems to the
government, as per the government orders they cannot release
the source code to anyone but their codebase is based on GPL
based code. What if someone asks for the source code? do
they have to give it?
Ashish Bhatia Introduction to Linux
Philosophy Concept of Users File Handling in Linux Process Handling in Linux Licenses
Case 3
Stickpoint Solutions released Office software 1.0 under GPL
and in the next version, they decide to move to BSD license?
can they do it?
Ashish Bhatia Introduction to Linux
Philosophy Concept of Users File Handling in Linux Process Handling in Linux Licenses
Case 4
Tivo used parts of Linux kernel code for its consumer
electronics product, so they had to release the source code
but they put on the hardware check to avoid customised code
from execution. Is this a violation of GPL?
Ashish Bhatia Introduction to Linux
Philosophy Concept of Users File Handling in Linux Process Handling in Linux Licenses
Case 5
Web Ultimates released source code of CMS(web application)
under GPL, Web Peers Inc. used the code to develop their
website, do they have to release the source code of their
website?
Ashish Bhatia Introduction to Linux
Philosophy Concept of Users File Handling in Linux Process Handling in Linux Licenses
References
1 Linux Man Pages
2 The Linux Documentation Project
3 Free Software Foundation (FSF) website
Ashish Bhatia Introduction to Linux