SlideShare a Scribd company logo
Linux Basics - 1/2
claudio@enealcubo.com
Jul 2013
Saturday, July 27, 13
Linux
Is a Unix-like operating system (OS) created
by Linus Torvalds. He developed Linux
because he wasn't happy with the currently
available options in Unix and felt he could
improve it. So he did what anybody else
would do, and created his own operating
system.
Saturday, July 27, 13
Linux
When Linus finished building a working
version of Linux, he freely distributed the
OS, which helped it gain popularity.Today,
Linux is used by millions of people around
the world. Many computer hobbyists (a.k.a.
nerds) like the operating system because it is
highly customizable. Programmers can even
modify the source code and create their own
unique version of the Linux operating system.
Saturday, July 27, 13
Kernel
In computing, the kernel is a computer program that
manages input/output requests from software, and
translates them into data processing instructions for the
central processing unit and other electronic components
of a computer.The kernel is a fundamental part of a
modern computer's operating system.
Saturday, July 27, 13
Linux Kernel
The Linux kernel is the operating system kernel used by
the Linux family of Unix-like operating systems. It is a
prominent example of free and open source software.
The Linux kernel is released under the GNU General
Public License version 2 (GPLv2)(plus some firmware
images with various non-free licenses), and is developed by
contributors worldwide.
https://www.kernel.org/
3.10.3 stable version
Saturday, July 27, 13
Linux Distros
A Linux distribution (often called distro for
short) is a member of the family of Unix-like
operating systems built on top of the Linux
kernel. Such distributions are operating
systems including a large collection of
software applications such as word
processors, spreadsheets, media players, and
database applications.
Saturday, July 27, 13
Linux Distros
Popular main distros
• Debian
• RedHat
• Suse
• Gentoo
• Slackware*
Saturday, July 27, 13
Linux Distros
Popular child distros
• Ubuntu (Debian based)
• Fedora (RedHat)
• Centos (RedHat)
http://upload.wikimedia.org/wikipedia/commons/1/1b/Linux_Distribution_Timeline.svg
Saturday, July 27, 13
Which Distro?
It depends on
• Software requirements
• Team or staff knowledge
• The one that makes you happy
Saturday, July 27, 13
Uses
• Desktop
• Phones
• Tablets
• TV’s
• Servers
Saturday, July 27, 13
How it works?
1. System startup - BIOS / BootMonitor
2. Stage #1 bootloader (master boot record)
3. Stage #2 bootloader (LILO GRUB)
4. Kernel
5. Init
6. Runlevel
Saturday, July 27, 13
How it works?
1. BIOS
• BIOS stands for Basic Input/Output System
• Performs some system integrity checks
• Searches, loads, and executes the boot loader program.
• It looks for boot loader in floppy, cd-rom, or hard drive.You can
press a key (typically F12 of F2, but it depends on your system)
during the BIOS startup to change the boot sequence.
• Once the boot loader program is detected and loaded into the
memory, BIOS gives the control to it.
• So, in simple terms BIOS loads and executes the MBR boot loader
Saturday, July 27, 13
How it works?
2. MBR
• MBR stands for Master Boot Record.
• It is located in the 1st sector of the bootable disk.Typically /
dev/hda, or /dev/sda
• MBR is less than 512 bytes in size.This has three components
1) primary boot loader info in 1st 446 bytes 2) partition table
info in next 64 bytes 3) mbr validation check in last 2 bytes.
• It contains information about GRUB (or LILO in old systems).
• So, in simple terms MBR loads and executes the GRUB boot
loader.
Saturday, July 27, 13
How it works?
3. GRUB
• GRUB stands for Grand Unified Bootloader.
• If you have multiple kernel images installed on your system, you can choose
which one to be executed.
• GRUB displays a splash screen, waits for few seconds, if you don’t enter
anything, it loads the default kernel image as specified in the grub
configuration file.
• GRUB has the knowledge of the filesystem (the older Linux loader LILO
didn’t understand filesystem).
• Grub configuration file is /boot/grub/grub.conf (/etc/grub.conf is a link to
this).
• So, in simple terms GRUB just loads and executes Kernel and initrd images.
Saturday, July 27, 13
How it works?
4. Kernel
• Mounts the root file system as specified in the “root=” in grub.conf
• Kernel executes the /sbin/init program
• Since init was the 1st program to be executed by Linux Kernel, it
has the process id (PID) of 1. Do a ‘ps -ef | grep init’ and check the
pid.
• initrd stands for Initial RAM Disk.
• initrd is used by kernel as temporary root file system until kernel is
booted and the real root file system is mounted. It also contains
necessary drivers compiled inside, which helps it to access the hard
drive partitions, and other hardware.
Saturday, July 27, 13
How it works?
5. Init
• Looks at the /etc/inittab file to decide the Linux run level.
• Following are the available run levels
• 0 – halt
• 1 – Single user mode
• 2 – Multiuser, without NFS
• 3 – Full multiuser mode
• 4 – unused
• 5 – X11
• 6 – reboot
• Init identifies the default initlevel from /etc/inittab and uses that to load all appropriate
program.
• Execute ‘grep initdefault /etc/inittab’ on your system to identify the default run level
• If you want to get into trouble, you can set the default run level to 0 or 6. Since you know
what 0 and 6 means, probably you might not do that.
• Typically you would set the default run level to either 3 or 5.
Saturday, July 27, 13
How it works?
6. Runlevel
• When the Linux system is booting up, you might see various services
getting started. For example, it might say “starting sendmail …. OK”.Those
are the runlevel programs, executed from the run level directory as
defined by your run level.
• Depending on your default init level setting, the system will execute the
programs from one of the following directories.
• Run level 0 – /etc/rc.d/rc0.d/
• Run level 1 – /etc/rc.d/rc1.d/
• Run level 2 – /etc/rc.d/rc2.d/
• Run level 3 – /etc/rc.d/rc3.d/
• Run level 4 – /etc/rc.d/rc4.d/
• Run level 5 – /etc/rc.d/rc5.d/
• Run level 6 – /etc/rc.d/rc6.d/
Saturday, July 27, 13
How it works?
6. Runlevel
• Please note that there are also symbolic links available for these
directory under /etc directly. So, /etc/rc0.d is linked to /etc/rc.d/
rc0.d.
• Under the /etc/rc.d/rc*.d/ directories, you would see programs that
start with S and K.
• Programs starts with S are used during startup. S for startup.
• Programs starts with K are used during shutdown. K for kill.
• There are numbers right next to S and K in the program names.
Those are the sequence number in which the programs should be
started or killed.
• For example, S12syslog is to start the syslog deamon, which has the
sequence number of 12. S80sendmail is to start the
sendmail daemon, which has the sequence number of 80. So, syslog
program will be started before sendmail.
Saturday, July 27, 13
How it works?
Saturday, July 27, 13
Installation Methods
• CD or DVD
• Normal
• Live
• USB installer
• Network installation
• Virtual installation (iso file)
Saturday, July 27, 13
System Requirements
Desktop
• 700Mhz processor
• 512Mb RAM
• 5Gb hard-drive space
• VGA 1024x768
• CD/DVD or USB port for installer media
• Internet access (not required but helpful)
Saturday, July 27, 13
System Requirements
Server CLI
• 300Mhz processor
• 128Mb RAM
• 1Gb hard-drive space
• VGA 640x480
• CD
Saturday, July 27, 13
Workshop
1. Internet access required.
2. Create a new virtual machine on Oracle
VirtualBox with the following settings.
1. 512Mb RAM
2. 5Gb hard disk
3. Use debian iso image
3. Star the virtual machine
Saturday, July 27, 13
Workshop
4. Choose the installation language
5. Choose the country or territory
6. Choose the locale settings
7. Choose the keymap to use
8. Type the hostname (linux-#x)
9. Type the domain name
Saturday, July 27, 13
Workshop
10.Type the root password (twice)
11.Create a new user
• Name, username and password
12.Choose the timezone
13.Chose the partition method (Guided -
entire disk)
14.Select the hard disk to use
Saturday, July 27, 13
Workshop
15.Select partition scheme (all files in one partition)
16.Finish partitioning
17.Write changes to disk
18.Choose debian mirror (Mexico)
19.Choose archive mirror (ftp.mx.debian.org)
20.Use proxy? No
21.
Saturday, July 27, 13
Installation facts
• Language?
• Locale settings?
• Territory?
• Hostname and domainame?
• Root user?
• Hard disk to use?
• Partition scheme?
• Mirror?
• Packages?
Saturday, July 27, 13
root or superuser
In computing, the superuser is a special user account used for
system administration. Depending on the operating system,
the actual name of this account might be: root, administrator,
admin or supervisor. In some cases the actual name is not
significant, rather an authorization flag in the user's profile
determines if administrative functions can be performed.
In operating systems which have the concept of a superuser, it
is generally recommended that most application work be
done using an ordinary account which does not have the
ability to make system-wide changes.
Saturday, July 27, 13
hostname
A hostname is a label that is assigned to a device
connected to a computer network and that is used
to identify the device in various forms of electronic
communication such as the World Wide Web, e-
mail or Usenet. Hostnames may be simple names
consisting of a single word or phrase.
Saturday, July 27, 13
domainame
A domain name is an identification string that
defines a realm of administrative autonomy,
authority, or control on the Internet. Domain
names are formed by the rules and procedures of
the Domain Name System (DNS).
Saturday, July 27, 13
Hard disk
• Linux identified the hard disk with a OS
resource.Typically this are the resources.
• IDE
• SCCI
Saturday, July 27, 13
Partitions
Partitions are divisions in the formatting of the hard
disk.  It’s a logical – as opposed to a physical –
division, so you can edit and manipulate them for
various purposes.  Think breaking a disk into two
configuration parts.  Partitions are really handy
because they act as a sandbox. f you have a 1 TB hard
drive partitioned into a 250 GB partition and a 750
GB partition, what you have on the latter will not
affect the other, and vice versa. You can share one of
those partitions on the network and never worry
about people accessing information on the other.
Saturday, July 27, 13
Partition Schemes
It depends on the using of the SO and the size
of the hard disk
• Desktop
• All files in one partition
• Server
• Split the data in multiple partitions
Saturday, July 27, 13
Partition Schemes
Server partition scheme
Saturday, July 27, 13
Partition types
• Foreign partitions (other SO)
• Primary partitions
• The number of partitions on an Intel-based system was limited from the very
beginning:The original partition table was installed as part of the boot sector and
held space for only four partition entries.These partitions are now called primary
partitions.
• Logical partitions
• One primary partition of a hard drive may be subpartitioned.These are logical
partitions.This effectively allows us to skirt the historical four partition limitation.
• Swap partitions
• If you have too many processes running on a machine, the kernel will try to free up
RAM by writing pages to disk.This is what swap space is for. It effectively increases
the amount of memory you have available. However, disk I/O is about a hundred
times slower than reading from and writing to RAM. Consider this emergency
memory and not extra memory.
Saturday, July 27, 13
Partition - File Systems
/ - root partition
/var - This fs contains spool directories such as those for mail and printing. In
addition, it contains the error log directory. If your machine is a server and develops
a chronic error, those msgs can fill the partition. Server computers ought to have /var
in a different partition than /.
/usr - This is where most executable binaries go. In addition, the kernel source tree
goes here, and much documentation.
/tmp - Some programs write temporary data files here. Usually, they are quite small.
However, if you run computationally intensive jobs, like science or engineering
applications, hundreds of megabytes could be required for brief periods of time. In
this case, keep /tmp in a different partition than /.
/home - This is where users home directories go. If you do not impose quotas on
your users, this ought to be in its own partition.
/boot - This is where your kernel images go. See discussion above for placement on
old systems.
Saturday, July 27, 13

More Related Content

What's hot

Introduction to Linux basic
Introduction to Linux basicIntroduction to Linux basic
Introduction to Linux basicf114n
 
Introduction to linux
Introduction to linuxIntroduction to linux
Introduction to linuxplarsen67
 
Introduction to Linux for bioinformatics
Introduction to Linux for bioinformaticsIntroduction to Linux for bioinformatics
Introduction to Linux for bioinformaticsBITS
 
Unix operating system basics
Unix operating system basicsUnix operating system basics
Unix operating system basicsSankar Suriya
 
Linux conf-admin
Linux conf-adminLinux conf-admin
Linux conf-adminbadamisri
 
Unix and shell programming | Unix File System | Unix File Permission | Blocks
Unix and shell programming | Unix File System | Unix File Permission | BlocksUnix and shell programming | Unix File System | Unix File Permission | Blocks
Unix and shell programming | Unix File System | Unix File Permission | BlocksLOKESH KUMAR
 
Operating systems unix
Operating systems   unixOperating systems   unix
Operating systems unixAchu dhan
 
Get to know linux - First steps with Ubuntu
Get to know linux - First steps with UbuntuGet to know linux - First steps with Ubuntu
Get to know linux - First steps with UbuntuMaja Kraljič
 
Linux ppt
Linux pptLinux ppt
Linux pptlincy21
 
Linux Presentation
Linux PresentationLinux Presentation
Linux Presentationnishantsri
 
What is Ubuntu - presentation
What is Ubuntu - presentationWhat is Ubuntu - presentation
What is Ubuntu - presentationAhmed Mamdouh
 
Module 3 Using Linux Softwares.
Module 3 Using Linux Softwares.Module 3 Using Linux Softwares.
Module 3 Using Linux Softwares.Tushar B Kute
 

What's hot (19)

Introduction to Ubuntu
Introduction to UbuntuIntroduction to Ubuntu
Introduction to Ubuntu
 
Introduction to Linux basic
Introduction to Linux basicIntroduction to Linux basic
Introduction to Linux basic
 
Linux basics
Linux basics Linux basics
Linux basics
 
Introduction to linux
Introduction to linuxIntroduction to linux
Introduction to linux
 
Linux introduction Class 02
Linux introduction Class 02Linux introduction Class 02
Linux introduction Class 02
 
Linux basics
Linux basics Linux basics
Linux basics
 
Linux
Linux Linux
Linux
 
Introduction to Linux for bioinformatics
Introduction to Linux for bioinformaticsIntroduction to Linux for bioinformatics
Introduction to Linux for bioinformatics
 
Unix operating system basics
Unix operating system basicsUnix operating system basics
Unix operating system basics
 
Linux conf-admin
Linux conf-adminLinux conf-admin
Linux conf-admin
 
Unix and shell programming | Unix File System | Unix File Permission | Blocks
Unix and shell programming | Unix File System | Unix File Permission | BlocksUnix and shell programming | Unix File System | Unix File Permission | Blocks
Unix and shell programming | Unix File System | Unix File Permission | Blocks
 
Operating systems unix
Operating systems   unixOperating systems   unix
Operating systems unix
 
Get to know linux - First steps with Ubuntu
Get to know linux - First steps with UbuntuGet to know linux - First steps with Ubuntu
Get to know linux - First steps with Ubuntu
 
Linux ppt
Linux pptLinux ppt
Linux ppt
 
Ubuntu – Linux Useful Commands
Ubuntu – Linux Useful CommandsUbuntu – Linux Useful Commands
Ubuntu – Linux Useful Commands
 
Introduction to Ubantu
Introduction to UbantuIntroduction to Ubantu
Introduction to Ubantu
 
Linux Presentation
Linux PresentationLinux Presentation
Linux Presentation
 
What is Ubuntu - presentation
What is Ubuntu - presentationWhat is Ubuntu - presentation
What is Ubuntu - presentation
 
Module 3 Using Linux Softwares.
Module 3 Using Linux Softwares.Module 3 Using Linux Softwares.
Module 3 Using Linux Softwares.
 

Viewers also liked

Deepa ppt about lamp technology
Deepa ppt about lamp technologyDeepa ppt about lamp technology
Deepa ppt about lamp technologyDeepa
 
Linux basics
Linux basicsLinux basics
Linux basicsDeepa
 
Code4vn - Linux day - linux boot process
Code4vn - Linux day - linux boot processCode4vn - Linux day - linux boot process
Code4vn - Linux day - linux boot processCường Nguyễn
 
Boot process -test
Boot process -testBoot process -test
Boot process -testHari Shankar
 
Basics of boot-loader
Basics of boot-loaderBasics of boot-loader
Basics of boot-loaderiamumr
 
U-Boot community analysis
U-Boot community analysisU-Boot community analysis
U-Boot community analysisxulioc
 
U Boot Presentation Final
U Boot Presentation FinalU Boot Presentation Final
U Boot Presentation Finalktrefz
 
U Boot or Universal Bootloader
U Boot or Universal BootloaderU Boot or Universal Bootloader
U Boot or Universal BootloaderSatpal Parmar
 
U boot porting guide for SoC
U boot porting guide for SoCU boot porting guide for SoC
U boot porting guide for SoCMacpaul Lin
 
Linux booting procedure
Linux booting procedureLinux booting procedure
Linux booting procedureDhaval Kaneria
 
Linux booting Process
Linux booting ProcessLinux booting Process
Linux booting ProcessGaurav Sharma
 
U-Boot presentation 2013
U-Boot presentation  2013U-Boot presentation  2013
U-Boot presentation 2013Wave Digitech
 
Device tree support on arm linux
Device tree support on arm linuxDevice tree support on arm linux
Device tree support on arm linuxChih-Min Chao
 
Building Embedded Linux Full Tutorial for ARM
Building Embedded Linux Full Tutorial for ARMBuilding Embedded Linux Full Tutorial for ARM
Building Embedded Linux Full Tutorial for ARMSherif Mousa
 
Linux Porting to a Custom Board
Linux Porting to a Custom BoardLinux Porting to a Custom Board
Linux Porting to a Custom BoardPatrick Bellasi
 

Viewers also liked (20)

Linux basics
Linux basicsLinux basics
Linux basics
 
Deepa ppt about lamp technology
Deepa ppt about lamp technologyDeepa ppt about lamp technology
Deepa ppt about lamp technology
 
Linux basics
Linux basicsLinux basics
Linux basics
 
Code4vn - Linux day - linux boot process
Code4vn - Linux day - linux boot processCode4vn - Linux day - linux boot process
Code4vn - Linux day - linux boot process
 
Boot process -test
Boot process -testBoot process -test
Boot process -test
 
Basics of boot-loader
Basics of boot-loaderBasics of boot-loader
Basics of boot-loader
 
BasicGraphsWithR
BasicGraphsWithRBasicGraphsWithR
BasicGraphsWithR
 
U-Boot community analysis
U-Boot community analysisU-Boot community analysis
U-Boot community analysis
 
BasicLinux
BasicLinuxBasicLinux
BasicLinux
 
U Boot Presentation Final
U Boot Presentation FinalU Boot Presentation Final
U Boot Presentation Final
 
U Boot or Universal Bootloader
U Boot or Universal BootloaderU Boot or Universal Bootloader
U Boot or Universal Bootloader
 
Linux booting process
Linux booting processLinux booting process
Linux booting process
 
U boot porting guide for SoC
U boot porting guide for SoCU boot porting guide for SoC
U boot porting guide for SoC
 
Linux booting procedure
Linux booting procedureLinux booting procedure
Linux booting procedure
 
Linux booting Process
Linux booting ProcessLinux booting Process
Linux booting Process
 
Linux Booting Steps
Linux Booting StepsLinux Booting Steps
Linux Booting Steps
 
U-Boot presentation 2013
U-Boot presentation  2013U-Boot presentation  2013
U-Boot presentation 2013
 
Device tree support on arm linux
Device tree support on arm linuxDevice tree support on arm linux
Device tree support on arm linux
 
Building Embedded Linux Full Tutorial for ARM
Building Embedded Linux Full Tutorial for ARMBuilding Embedded Linux Full Tutorial for ARM
Building Embedded Linux Full Tutorial for ARM
 
Linux Porting to a Custom Board
Linux Porting to a Custom BoardLinux Porting to a Custom Board
Linux Porting to a Custom Board
 

Similar to Linux basics 1/2

Linux booting process, Dual booting, Components involved
Linux booting process, Dual booting, Components involvedLinux booting process, Dual booting, Components involved
Linux booting process, Dual booting, Components involveddivyammo
 
Introduction to Operating Systems.pptx
Introduction to Operating Systems.pptxIntroduction to Operating Systems.pptx
Introduction to Operating Systems.pptxMohamedSaied877003
 
Grub and dracut ii
Grub and dracut iiGrub and dracut ii
Grub and dracut iiplarsen67
 
Reformat PPT.pptx
Reformat PPT.pptxReformat PPT.pptx
Reformat PPT.pptxLINDYLGERAL
 
Linux Operating SystemMigration ProposalCMIT 391 - Section .docx
Linux Operating SystemMigration ProposalCMIT 391 -  Section .docxLinux Operating SystemMigration ProposalCMIT 391 -  Section .docx
Linux Operating SystemMigration ProposalCMIT 391 - Section .docxwashingtonrosy
 
Crafting GNU/Linux distributions for Embedded target from Scratch/Source
Crafting GNU/Linux distributions for Embedded target from Scratch/SourceCrafting GNU/Linux distributions for Embedded target from Scratch/Source
Crafting GNU/Linux distributions for Embedded target from Scratch/SourceSourabh Singh Tomar
 
Chapter 1 - Introduction to Operating System.pptx
Chapter 1 - Introduction to Operating System.pptxChapter 1 - Introduction to Operating System.pptx
Chapter 1 - Introduction to Operating System.pptxgowthamiv26
 
unixoperatingsystem-130327073532-phpapp01.pdf
unixoperatingsystem-130327073532-phpapp01.pdfunixoperatingsystem-130327073532-phpapp01.pdf
unixoperatingsystem-130327073532-phpapp01.pdfIxtiyorTeshaboyev
 
Gentoo Linux, or Why in the World You Should Compile Everything
Gentoo Linux, or Why in the World You Should Compile EverythingGentoo Linux, or Why in the World You Should Compile Everything
Gentoo Linux, or Why in the World You Should Compile EverythingDonnie Berkholz
 
How to Audit Linux - Gene Kartavtsev, ISACA MN
How to Audit Linux - Gene Kartavtsev, ISACA MNHow to Audit Linux - Gene Kartavtsev, ISACA MN
How to Audit Linux - Gene Kartavtsev, ISACA MNGene Kartavtsev
 

Similar to Linux basics 1/2 (20)

Linux booting process, Dual booting, Components involved
Linux booting process, Dual booting, Components involvedLinux booting process, Dual booting, Components involved
Linux booting process, Dual booting, Components involved
 
Introduction to Operating Systems.pptx
Introduction to Operating Systems.pptxIntroduction to Operating Systems.pptx
Introduction to Operating Systems.pptx
 
Grub and dracut ii
Grub and dracut iiGrub and dracut ii
Grub and dracut ii
 
Reformat PPT.pptx
Reformat PPT.pptxReformat PPT.pptx
Reformat PPT.pptx
 
Linux
LinuxLinux
Linux
 
Linux Operating SystemMigration ProposalCMIT 391 - Section .docx
Linux Operating SystemMigration ProposalCMIT 391 -  Section .docxLinux Operating SystemMigration ProposalCMIT 391 -  Section .docx
Linux Operating SystemMigration ProposalCMIT 391 - Section .docx
 
Linux
LinuxLinux
Linux
 
Crafting GNU/Linux distributions for Embedded target from Scratch/Source
Crafting GNU/Linux distributions for Embedded target from Scratch/SourceCrafting GNU/Linux distributions for Embedded target from Scratch/Source
Crafting GNU/Linux distributions for Embedded target from Scratch/Source
 
An Introduction To Linux
An Introduction To LinuxAn Introduction To Linux
An Introduction To Linux
 
Linux
Linux Linux
Linux
 
Chapter 1 - Introduction to Operating System.pptx
Chapter 1 - Introduction to Operating System.pptxChapter 1 - Introduction to Operating System.pptx
Chapter 1 - Introduction to Operating System.pptx
 
Ch05 system administration
Ch05 system administration Ch05 system administration
Ch05 system administration
 
Ch05
Ch05Ch05
Ch05
 
Linux kernel booting
Linux kernel bootingLinux kernel booting
Linux kernel booting
 
unixoperatingsystem-130327073532-phpapp01.pdf
unixoperatingsystem-130327073532-phpapp01.pdfunixoperatingsystem-130327073532-phpapp01.pdf
unixoperatingsystem-130327073532-phpapp01.pdf
 
Gentoo Linux, or Why in the World You Should Compile Everything
Gentoo Linux, or Why in the World You Should Compile EverythingGentoo Linux, or Why in the World You Should Compile Everything
Gentoo Linux, or Why in the World You Should Compile Everything
 
Linux Booting Process
Linux Booting ProcessLinux Booting Process
Linux Booting Process
 
Linux Recovery
Linux RecoveryLinux Recovery
Linux Recovery
 
How to Audit Linux - Gene Kartavtsev, ISACA MN
How to Audit Linux - Gene Kartavtsev, ISACA MNHow to Audit Linux - Gene Kartavtsev, ISACA MN
How to Audit Linux - Gene Kartavtsev, ISACA MN
 
Edubooktraining
EdubooktrainingEdubooktraining
Edubooktraining
 

Recently uploaded

Free and Effective: Making Flows Publicly Accessible, Yumi Ibrahimzade
Free and Effective: Making Flows Publicly Accessible, Yumi IbrahimzadeFree and Effective: Making Flows Publicly Accessible, Yumi Ibrahimzade
Free and Effective: Making Flows Publicly Accessible, Yumi IbrahimzadeCzechDreamin
 
Behind the Scenes From the Manager's Chair: Decoding the Secrets of Successfu...
Behind the Scenes From the Manager's Chair: Decoding the Secrets of Successfu...Behind the Scenes From the Manager's Chair: Decoding the Secrets of Successfu...
Behind the Scenes From the Manager's Chair: Decoding the Secrets of Successfu...CzechDreamin
 
AI revolution and Salesforce, Jiří Karpíšek
AI revolution and Salesforce, Jiří KarpíšekAI revolution and Salesforce, Jiří Karpíšek
AI revolution and Salesforce, Jiří KarpíšekCzechDreamin
 
Key Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdfKey Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdfCheryl Hung
 
Speed Wins: From Kafka to APIs in Minutes
Speed Wins: From Kafka to APIs in MinutesSpeed Wins: From Kafka to APIs in Minutes
Speed Wins: From Kafka to APIs in Minutesconfluent
 
Introduction to Open Source RAG and RAG Evaluation
Introduction to Open Source RAG and RAG EvaluationIntroduction to Open Source RAG and RAG Evaluation
Introduction to Open Source RAG and RAG EvaluationZilliz
 
Unpacking Value Delivery - Agile Oxford Meetup - May 2024.pptx
Unpacking Value Delivery - Agile Oxford Meetup - May 2024.pptxUnpacking Value Delivery - Agile Oxford Meetup - May 2024.pptx
Unpacking Value Delivery - Agile Oxford Meetup - May 2024.pptxDavid Michel
 
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptxIOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptxAbida Shariff
 
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...Thierry Lestable
 
Future Visions: Predictions to Guide and Time Tech Innovation, Peter Udo Diehl
Future Visions: Predictions to Guide and Time Tech Innovation, Peter Udo DiehlFuture Visions: Predictions to Guide and Time Tech Innovation, Peter Udo Diehl
Future Visions: Predictions to Guide and Time Tech Innovation, Peter Udo DiehlPeter Udo Diehl
 
Connector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a buttonConnector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a buttonDianaGray10
 
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...Product School
 
How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...Product School
 
SOQL 201 for Admins & Developers: Slice & Dice Your Org’s Data With Aggregate...
SOQL 201 for Admins & Developers: Slice & Dice Your Org’s Data With Aggregate...SOQL 201 for Admins & Developers: Slice & Dice Your Org’s Data With Aggregate...
SOQL 201 for Admins & Developers: Slice & Dice Your Org’s Data With Aggregate...CzechDreamin
 
Salesforce Adoption – Metrics, Methods, and Motivation, Antone Kom
Salesforce Adoption – Metrics, Methods, and Motivation, Antone KomSalesforce Adoption – Metrics, Methods, and Motivation, Antone Kom
Salesforce Adoption – Metrics, Methods, and Motivation, Antone KomCzechDreamin
 
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...Product School
 
UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3DianaGray10
 
Powerful Start- the Key to Project Success, Barbara Laskowska
Powerful Start- the Key to Project Success, Barbara LaskowskaPowerful Start- the Key to Project Success, Barbara Laskowska
Powerful Start- the Key to Project Success, Barbara LaskowskaCzechDreamin
 
10 Differences between Sales Cloud and CPQ, Blanka Doktorová
10 Differences between Sales Cloud and CPQ, Blanka Doktorová10 Differences between Sales Cloud and CPQ, Blanka Doktorová
10 Differences between Sales Cloud and CPQ, Blanka DoktorováCzechDreamin
 
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...Product School
 

Recently uploaded (20)

Free and Effective: Making Flows Publicly Accessible, Yumi Ibrahimzade
Free and Effective: Making Flows Publicly Accessible, Yumi IbrahimzadeFree and Effective: Making Flows Publicly Accessible, Yumi Ibrahimzade
Free and Effective: Making Flows Publicly Accessible, Yumi Ibrahimzade
 
Behind the Scenes From the Manager's Chair: Decoding the Secrets of Successfu...
Behind the Scenes From the Manager's Chair: Decoding the Secrets of Successfu...Behind the Scenes From the Manager's Chair: Decoding the Secrets of Successfu...
Behind the Scenes From the Manager's Chair: Decoding the Secrets of Successfu...
 
AI revolution and Salesforce, Jiří Karpíšek
AI revolution and Salesforce, Jiří KarpíšekAI revolution and Salesforce, Jiří Karpíšek
AI revolution and Salesforce, Jiří Karpíšek
 
Key Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdfKey Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdf
 
Speed Wins: From Kafka to APIs in Minutes
Speed Wins: From Kafka to APIs in MinutesSpeed Wins: From Kafka to APIs in Minutes
Speed Wins: From Kafka to APIs in Minutes
 
Introduction to Open Source RAG and RAG Evaluation
Introduction to Open Source RAG and RAG EvaluationIntroduction to Open Source RAG and RAG Evaluation
Introduction to Open Source RAG and RAG Evaluation
 
Unpacking Value Delivery - Agile Oxford Meetup - May 2024.pptx
Unpacking Value Delivery - Agile Oxford Meetup - May 2024.pptxUnpacking Value Delivery - Agile Oxford Meetup - May 2024.pptx
Unpacking Value Delivery - Agile Oxford Meetup - May 2024.pptx
 
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptxIOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
 
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
 
Future Visions: Predictions to Guide and Time Tech Innovation, Peter Udo Diehl
Future Visions: Predictions to Guide and Time Tech Innovation, Peter Udo DiehlFuture Visions: Predictions to Guide and Time Tech Innovation, Peter Udo Diehl
Future Visions: Predictions to Guide and Time Tech Innovation, Peter Udo Diehl
 
Connector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a buttonConnector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a button
 
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
 
How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...
 
SOQL 201 for Admins & Developers: Slice & Dice Your Org’s Data With Aggregate...
SOQL 201 for Admins & Developers: Slice & Dice Your Org’s Data With Aggregate...SOQL 201 for Admins & Developers: Slice & Dice Your Org’s Data With Aggregate...
SOQL 201 for Admins & Developers: Slice & Dice Your Org’s Data With Aggregate...
 
Salesforce Adoption – Metrics, Methods, and Motivation, Antone Kom
Salesforce Adoption – Metrics, Methods, and Motivation, Antone KomSalesforce Adoption – Metrics, Methods, and Motivation, Antone Kom
Salesforce Adoption – Metrics, Methods, and Motivation, Antone Kom
 
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
 
UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3
 
Powerful Start- the Key to Project Success, Barbara Laskowska
Powerful Start- the Key to Project Success, Barbara LaskowskaPowerful Start- the Key to Project Success, Barbara Laskowska
Powerful Start- the Key to Project Success, Barbara Laskowska
 
10 Differences between Sales Cloud and CPQ, Blanka Doktorová
10 Differences between Sales Cloud and CPQ, Blanka Doktorová10 Differences between Sales Cloud and CPQ, Blanka Doktorová
10 Differences between Sales Cloud and CPQ, Blanka Doktorová
 
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
 

Linux basics 1/2

  • 1. Linux Basics - 1/2 claudio@enealcubo.com Jul 2013 Saturday, July 27, 13
  • 2. Linux Is a Unix-like operating system (OS) created by Linus Torvalds. He developed Linux because he wasn't happy with the currently available options in Unix and felt he could improve it. So he did what anybody else would do, and created his own operating system. Saturday, July 27, 13
  • 3. Linux When Linus finished building a working version of Linux, he freely distributed the OS, which helped it gain popularity.Today, Linux is used by millions of people around the world. Many computer hobbyists (a.k.a. nerds) like the operating system because it is highly customizable. Programmers can even modify the source code and create their own unique version of the Linux operating system. Saturday, July 27, 13
  • 4. Kernel In computing, the kernel is a computer program that manages input/output requests from software, and translates them into data processing instructions for the central processing unit and other electronic components of a computer.The kernel is a fundamental part of a modern computer's operating system. Saturday, July 27, 13
  • 5. Linux Kernel The Linux kernel is the operating system kernel used by the Linux family of Unix-like operating systems. It is a prominent example of free and open source software. The Linux kernel is released under the GNU General Public License version 2 (GPLv2)(plus some firmware images with various non-free licenses), and is developed by contributors worldwide. https://www.kernel.org/ 3.10.3 stable version Saturday, July 27, 13
  • 6. Linux Distros A Linux distribution (often called distro for short) is a member of the family of Unix-like operating systems built on top of the Linux kernel. Such distributions are operating systems including a large collection of software applications such as word processors, spreadsheets, media players, and database applications. Saturday, July 27, 13
  • 7. Linux Distros Popular main distros • Debian • RedHat • Suse • Gentoo • Slackware* Saturday, July 27, 13
  • 8. Linux Distros Popular child distros • Ubuntu (Debian based) • Fedora (RedHat) • Centos (RedHat) http://upload.wikimedia.org/wikipedia/commons/1/1b/Linux_Distribution_Timeline.svg Saturday, July 27, 13
  • 9. Which Distro? It depends on • Software requirements • Team or staff knowledge • The one that makes you happy Saturday, July 27, 13
  • 10. Uses • Desktop • Phones • Tablets • TV’s • Servers Saturday, July 27, 13
  • 11. How it works? 1. System startup - BIOS / BootMonitor 2. Stage #1 bootloader (master boot record) 3. Stage #2 bootloader (LILO GRUB) 4. Kernel 5. Init 6. Runlevel Saturday, July 27, 13
  • 12. How it works? 1. BIOS • BIOS stands for Basic Input/Output System • Performs some system integrity checks • Searches, loads, and executes the boot loader program. • It looks for boot loader in floppy, cd-rom, or hard drive.You can press a key (typically F12 of F2, but it depends on your system) during the BIOS startup to change the boot sequence. • Once the boot loader program is detected and loaded into the memory, BIOS gives the control to it. • So, in simple terms BIOS loads and executes the MBR boot loader Saturday, July 27, 13
  • 13. How it works? 2. MBR • MBR stands for Master Boot Record. • It is located in the 1st sector of the bootable disk.Typically / dev/hda, or /dev/sda • MBR is less than 512 bytes in size.This has three components 1) primary boot loader info in 1st 446 bytes 2) partition table info in next 64 bytes 3) mbr validation check in last 2 bytes. • It contains information about GRUB (or LILO in old systems). • So, in simple terms MBR loads and executes the GRUB boot loader. Saturday, July 27, 13
  • 14. How it works? 3. GRUB • GRUB stands for Grand Unified Bootloader. • If you have multiple kernel images installed on your system, you can choose which one to be executed. • GRUB displays a splash screen, waits for few seconds, if you don’t enter anything, it loads the default kernel image as specified in the grub configuration file. • GRUB has the knowledge of the filesystem (the older Linux loader LILO didn’t understand filesystem). • Grub configuration file is /boot/grub/grub.conf (/etc/grub.conf is a link to this). • So, in simple terms GRUB just loads and executes Kernel and initrd images. Saturday, July 27, 13
  • 15. How it works? 4. Kernel • Mounts the root file system as specified in the “root=” in grub.conf • Kernel executes the /sbin/init program • Since init was the 1st program to be executed by Linux Kernel, it has the process id (PID) of 1. Do a ‘ps -ef | grep init’ and check the pid. • initrd stands for Initial RAM Disk. • initrd is used by kernel as temporary root file system until kernel is booted and the real root file system is mounted. It also contains necessary drivers compiled inside, which helps it to access the hard drive partitions, and other hardware. Saturday, July 27, 13
  • 16. How it works? 5. Init • Looks at the /etc/inittab file to decide the Linux run level. • Following are the available run levels • 0 – halt • 1 – Single user mode • 2 – Multiuser, without NFS • 3 – Full multiuser mode • 4 – unused • 5 – X11 • 6 – reboot • Init identifies the default initlevel from /etc/inittab and uses that to load all appropriate program. • Execute ‘grep initdefault /etc/inittab’ on your system to identify the default run level • If you want to get into trouble, you can set the default run level to 0 or 6. Since you know what 0 and 6 means, probably you might not do that. • Typically you would set the default run level to either 3 or 5. Saturday, July 27, 13
  • 17. How it works? 6. Runlevel • When the Linux system is booting up, you might see various services getting started. For example, it might say “starting sendmail …. OK”.Those are the runlevel programs, executed from the run level directory as defined by your run level. • Depending on your default init level setting, the system will execute the programs from one of the following directories. • Run level 0 – /etc/rc.d/rc0.d/ • Run level 1 – /etc/rc.d/rc1.d/ • Run level 2 – /etc/rc.d/rc2.d/ • Run level 3 – /etc/rc.d/rc3.d/ • Run level 4 – /etc/rc.d/rc4.d/ • Run level 5 – /etc/rc.d/rc5.d/ • Run level 6 – /etc/rc.d/rc6.d/ Saturday, July 27, 13
  • 18. How it works? 6. Runlevel • Please note that there are also symbolic links available for these directory under /etc directly. So, /etc/rc0.d is linked to /etc/rc.d/ rc0.d. • Under the /etc/rc.d/rc*.d/ directories, you would see programs that start with S and K. • Programs starts with S are used during startup. S for startup. • Programs starts with K are used during shutdown. K for kill. • There are numbers right next to S and K in the program names. Those are the sequence number in which the programs should be started or killed. • For example, S12syslog is to start the syslog deamon, which has the sequence number of 12. S80sendmail is to start the sendmail daemon, which has the sequence number of 80. So, syslog program will be started before sendmail. Saturday, July 27, 13
  • 19. How it works? Saturday, July 27, 13
  • 20. Installation Methods • CD or DVD • Normal • Live • USB installer • Network installation • Virtual installation (iso file) Saturday, July 27, 13
  • 21. System Requirements Desktop • 700Mhz processor • 512Mb RAM • 5Gb hard-drive space • VGA 1024x768 • CD/DVD or USB port for installer media • Internet access (not required but helpful) Saturday, July 27, 13
  • 22. System Requirements Server CLI • 300Mhz processor • 128Mb RAM • 1Gb hard-drive space • VGA 640x480 • CD Saturday, July 27, 13
  • 23. Workshop 1. Internet access required. 2. Create a new virtual machine on Oracle VirtualBox with the following settings. 1. 512Mb RAM 2. 5Gb hard disk 3. Use debian iso image 3. Star the virtual machine Saturday, July 27, 13
  • 24. Workshop 4. Choose the installation language 5. Choose the country or territory 6. Choose the locale settings 7. Choose the keymap to use 8. Type the hostname (linux-#x) 9. Type the domain name Saturday, July 27, 13
  • 25. Workshop 10.Type the root password (twice) 11.Create a new user • Name, username and password 12.Choose the timezone 13.Chose the partition method (Guided - entire disk) 14.Select the hard disk to use Saturday, July 27, 13
  • 26. Workshop 15.Select partition scheme (all files in one partition) 16.Finish partitioning 17.Write changes to disk 18.Choose debian mirror (Mexico) 19.Choose archive mirror (ftp.mx.debian.org) 20.Use proxy? No 21. Saturday, July 27, 13
  • 27. Installation facts • Language? • Locale settings? • Territory? • Hostname and domainame? • Root user? • Hard disk to use? • Partition scheme? • Mirror? • Packages? Saturday, July 27, 13
  • 28. root or superuser In computing, the superuser is a special user account used for system administration. Depending on the operating system, the actual name of this account might be: root, administrator, admin or supervisor. In some cases the actual name is not significant, rather an authorization flag in the user's profile determines if administrative functions can be performed. In operating systems which have the concept of a superuser, it is generally recommended that most application work be done using an ordinary account which does not have the ability to make system-wide changes. Saturday, July 27, 13
  • 29. hostname A hostname is a label that is assigned to a device connected to a computer network and that is used to identify the device in various forms of electronic communication such as the World Wide Web, e- mail or Usenet. Hostnames may be simple names consisting of a single word or phrase. Saturday, July 27, 13
  • 30. domainame A domain name is an identification string that defines a realm of administrative autonomy, authority, or control on the Internet. Domain names are formed by the rules and procedures of the Domain Name System (DNS). Saturday, July 27, 13
  • 31. Hard disk • Linux identified the hard disk with a OS resource.Typically this are the resources. • IDE • SCCI Saturday, July 27, 13
  • 32. Partitions Partitions are divisions in the formatting of the hard disk.  It’s a logical – as opposed to a physical – division, so you can edit and manipulate them for various purposes.  Think breaking a disk into two configuration parts.  Partitions are really handy because they act as a sandbox. f you have a 1 TB hard drive partitioned into a 250 GB partition and a 750 GB partition, what you have on the latter will not affect the other, and vice versa. You can share one of those partitions on the network and never worry about people accessing information on the other. Saturday, July 27, 13
  • 33. Partition Schemes It depends on the using of the SO and the size of the hard disk • Desktop • All files in one partition • Server • Split the data in multiple partitions Saturday, July 27, 13
  • 34. Partition Schemes Server partition scheme Saturday, July 27, 13
  • 35. Partition types • Foreign partitions (other SO) • Primary partitions • The number of partitions on an Intel-based system was limited from the very beginning:The original partition table was installed as part of the boot sector and held space for only four partition entries.These partitions are now called primary partitions. • Logical partitions • One primary partition of a hard drive may be subpartitioned.These are logical partitions.This effectively allows us to skirt the historical four partition limitation. • Swap partitions • If you have too many processes running on a machine, the kernel will try to free up RAM by writing pages to disk.This is what swap space is for. It effectively increases the amount of memory you have available. However, disk I/O is about a hundred times slower than reading from and writing to RAM. Consider this emergency memory and not extra memory. Saturday, July 27, 13
  • 36. Partition - File Systems / - root partition /var - This fs contains spool directories such as those for mail and printing. In addition, it contains the error log directory. If your machine is a server and develops a chronic error, those msgs can fill the partition. Server computers ought to have /var in a different partition than /. /usr - This is where most executable binaries go. In addition, the kernel source tree goes here, and much documentation. /tmp - Some programs write temporary data files here. Usually, they are quite small. However, if you run computationally intensive jobs, like science or engineering applications, hundreds of megabytes could be required for brief periods of time. In this case, keep /tmp in a different partition than /. /home - This is where users home directories go. If you do not impose quotas on your users, this ought to be in its own partition. /boot - This is where your kernel images go. See discussion above for placement on old systems. Saturday, July 27, 13