linux - introduction
DESCRIPTION
A basic introduction to the philosophy behind and internals of linux based operating system distributions, meant to be presented by someone who knows this stuff rather that as a DIY thing. Sadly, I seem to have lost the sources for this after my hard drive crashed.TRANSCRIPT
![Page 2: Linux - Introduction](https://reader033.vdocument.in/reader033/viewer/2022050919/54521083af7959ed518b6e94/html5/thumbnails/2.jpg)
Chintalagiri Shashank <[email protected]>
This work is licensed under the Creative Commons
Attribution-Noncommercial-Share Alike 2.5 India License.
To view a copy of this license, visit
http://creativecommons.org/licenses/by-nc-sa/2.5/in/ or
send a letter to Creative Commons, 171 Second Street,
Suite 300, San Francisco, California, 94105, USA.
![Page 3: Linux - Introduction](https://reader033.vdocument.in/reader033/viewer/2022050919/54521083af7959ed518b6e94/html5/thumbnails/3.jpg)
Chintalagiri Shashank <[email protected]>
Series Agenda
Philosophy and Architecture
Free Software and Software Freedoms
Free Software Licenses
Anatomy of the Linux Operating System
Kernel-space
Files and Filesystems
User-space Applications
Application / package management
Linux system administration (or, installing and using linux)
More about linux
![Page 4: Linux - Introduction](https://reader033.vdocument.in/reader033/viewer/2022050919/54521083af7959ed518b6e94/html5/thumbnails/4.jpg)
Chintalagiri Shashank <[email protected]>
Free Software and Software Freedom
What Freedom?
Why Freedom?
_Whose_ Freedom?
![Page 5: Linux - Introduction](https://reader033.vdocument.in/reader033/viewer/2022050919/54521083af7959ed518b6e94/html5/thumbnails/5.jpg)
Chintalagiri Shashank <[email protected]>
Software Freedom & licenses
(a very brief) History of Software licenses
‘Ownership’ of Software
Richard Stallman and the GNU GPL
Copyleft
Open Source
Show me the code.
Give me the code.
Let me do what I want with the code.
![Page 6: Linux - Introduction](https://reader033.vdocument.in/reader033/viewer/2022050919/54521083af7959ed518b6e94/html5/thumbnails/6.jpg)
Chintalagiri Shashank <[email protected]>
Anatomy of the linux operating system
Kernel-space vs User-space.
What is the ‘Operating System’?
What is ‘Linux’?
GNU/Linux
As an aside,
GNU Herd
BSDs
UNIXes and POSIX compliance
Windows
![Page 7: Linux - Introduction](https://reader033.vdocument.in/reader033/viewer/2022050919/54521083af7959ed518b6e94/html5/thumbnails/7.jpg)
Chintalagiri Shashank <[email protected]>
Kernel Space
What is the kernel
Designed capabilities of the kernel - What it does and
what it doesn’t
Hardware drivers
System calls
FUSE
‘Binary blobs’, protection of freedom, and why linux
graphics drivers suck.
Modularity
Linus’ Branch
![Page 8: Linux - Introduction](https://reader033.vdocument.in/reader033/viewer/2022050919/54521083af7959ed518b6e94/html5/thumbnails/8.jpg)
Chintalagiri Shashank <[email protected]>
Files and filesystems
Everything is a file
Hierarchical filesystems
/
/boot
/bin
/etc
/usr
/var
/tmp
/home
![Page 9: Linux - Introduction](https://reader033.vdocument.in/reader033/viewer/2022050919/54521083af7959ed518b6e94/html5/thumbnails/9.jpg)
Chintalagiri Shashank <[email protected]>
Files and Filesystems
Mounting stuff
/mnt
multiple filesystem support
Ext2, ext3, ext4, reiserfs, xfs, jfs, ntfs, fat, cdfs, ….
FUSE – filesystems in userspace
Network resources. Smbfs, curlftpfs, …
Loop mounting
![Page 10: Linux - Introduction](https://reader033.vdocument.in/reader033/viewer/2022050919/54521083af7959ed518b6e94/html5/thumbnails/10.jpg)
Chintalagiri Shashank <[email protected]>
User-space Applications
Command line centric – Graphical applications build on
command line functionality
The X Window System
Window Managers – Metacity, Kwin, twm, etc
Desktop Environments – GNOME, KDE, XFCE, etc.
![Page 11: Linux - Introduction](https://reader033.vdocument.in/reader033/viewer/2022050919/54521083af7959ed518b6e94/html5/thumbnails/11.jpg)
Chintalagiri Shashank <[email protected]>
User-space Applications
Scriptability
Human readable configuration files
Human editable configuration files
Do you _need_ to ever see the command line?
Eye candy and visual effects – Compiz fusion and Kwin
Libraries & toolkits – GTK, Qt (widget toolkits)
Niche software and the supply-demand problem
Standards. Standards compliance.
Some applications are compilant.
Some are not.
![Page 12: Linux - Introduction](https://reader033.vdocument.in/reader033/viewer/2022050919/54521083af7959ed518b6e94/html5/thumbnails/12.jpg)
Chintalagiri Shashank <[email protected]>
Installing programs
/usr/bin
/usr/share/doc
/etc
~/.<program>
Dependencies
Packages - .deb, .rpm, ebuilds, …
Compiling from source
./configure; make; make install
Development headers - *-dev, *-devel
Static linking, dynamic linking, lib versions
![Page 13: Linux - Introduction](https://reader033.vdocument.in/reader033/viewer/2022050919/54521083af7959ed518b6e94/html5/thumbnails/13.jpg)
Chintalagiri Shashank <[email protected]>
Package Management
Aptitude, Yum, Yast
Synaptic, Adept
User permissions, privileges.
Root, sudo, and su.
Repositories
(Debian based) - Main, universe, multiverse, security
Backports
Third-party repositories
Dependency hell
![Page 14: Linux - Introduction](https://reader033.vdocument.in/reader033/viewer/2022050919/54521083af7959ed518b6e94/html5/thumbnails/14.jpg)
Chintalagiri Shashank <[email protected]>
Installing Linux
Things you might need to know
Partition tables and file systems
Ext3 vs reiserfs vs …
Root user
GRUB
Useful separate partitions
/home – take your preferences and data with you
/boot – keep your bootloader separate from the OS, ~50-100 MB
/var or /srv – on servers
/tmp
Swap, swapfs, sharing swap.
![Page 15: Linux - Introduction](https://reader033.vdocument.in/reader033/viewer/2022050919/54521083af7959ed518b6e94/html5/thumbnails/15.jpg)
Chintalagiri Shashank <[email protected]>
Distributions
Repositories
Distribution modifications
Packages availability
Stability and simplicity
Management tools
Update frequency
Bleeding edge vs Stable
Debian stable, unstable, experimental
![Page 16: Linux - Introduction](https://reader033.vdocument.in/reader033/viewer/2022050919/54521083af7959ed518b6e94/html5/thumbnails/16.jpg)
Chintalagiri Shashank <[email protected]>
Installing Linux - Decisions
Which Distribution?
Partition Table
GRUB, LILO, GRUB2
GDM, KDM, XDM
Desktop environments – KDE vs GNOME vs other
![Page 17: Linux - Introduction](https://reader033.vdocument.in/reader033/viewer/2022050919/54521083af7959ed518b6e94/html5/thumbnails/17.jpg)
Chintalagiri Shashank <[email protected]>
Meet the terminal
Shells – bash, ksh, …
Virtual terminals, virtual desktops
Terminal emulators – konsole, gnome-terminal, xterm,
aterm …
Tab completion
Pipes, redirections
Scripts
Exit status
![Page 18: Linux - Introduction](https://reader033.vdocument.in/reader033/viewer/2022050919/54521083af7959ed518b6e94/html5/thumbnails/18.jpg)
Chintalagiri Shashank <[email protected]>
Command Structure
<command name> [options] <files>
Options and switches – behavior modification
-h, --help – prints out usage instructions
Use man to get more details
ls, mv, cp, man
cat, grep, sed, awk
![Page 19: Linux - Introduction](https://reader033.vdocument.in/reader033/viewer/2022050919/54521083af7959ed518b6e94/html5/thumbnails/19.jpg)
Chintalagiri Shashank <[email protected]>
Mounting Filesystems
/dev
mount –t [type] <device> <mountpoint>
Mount permissions
/etc/fstab
/etc/mtab
mount –o loop, loop mounting
fuse mounting
curlftpfs -o allow_other <ftp-address> <mountpoint>
![Page 20: Linux - Introduction](https://reader033.vdocument.in/reader033/viewer/2022050919/54521083af7959ed518b6e94/html5/thumbnails/20.jpg)
Chintalagiri Shashank <[email protected]>
Network (debian and derivatives)
Useful files :
/etc/hostname
/etc/network/interfaces
/etc/resolv.conf
/etc/hosts
Useful commands :
ifconfig, route, nslookup, ping, nmap
ifup, ifdown
/etc/init.d/networking
![Page 21: Linux - Introduction](https://reader033.vdocument.in/reader033/viewer/2022050919/54521083af7959ed518b6e94/html5/thumbnails/21.jpg)
Chintalagiri Shashank <[email protected]>
X
/etc/X11/xorg.conf – mostly obsolete
xrandr
(debian and derivatives) dpkg –reconfigure xserver-xorg
Modelines, monitor resolutions
glxinfo, glxgears
![Page 22: Linux - Introduction](https://reader033.vdocument.in/reader033/viewer/2022050919/54521083af7959ed518b6e94/html5/thumbnails/22.jpg)
Chintalagiri Shashank <[email protected]>
Administration
File permissions
Owner, group, all
Read, write, execute
Chmod and chown
Ports
<1000 reserved for root
80 : http, 81: https, 20: ftp, 22: ssh …
Iptables and firestarter
Daemons
/etc/init.d/
Users
/etc/passwd