Introduction To Linux Architecture
Introduction To Linux Architecture
Introduction To Linux Architecture
System Architecture
Applied Computer Programming I (GEC 215)
By
Prof. Emmanuel Adetiba
Engr. Abayomi-Alli Olusola
Engr. Abidemi M. Orimogunje
Contents
• Introduction
• Linux and Unix
• Features of Linux
• Comparison of Linux and Windows
• Linux organization
• Linux kernel
• Networking on Linux
Contents
• Features supported by Linux
• Types of Files on Linux
• Installing Linux OS
• Basic command on Linux
• Basic command used in Ubuntu Desktop
• Print-screen display from Virtual box
Introduction
• Linux is an open source UNIX type of operating system software. It was
created in 1991 by Linus Torvalds at the University of Helsinki in Finland.
• UNIX is a multitasking operating system and have different versions such as
Solaris, AIX, XENIX, HP-UX, SINIX and Linux.
Hardwa
Appli
User
cation
Oper
atin
war
re
Soft
g
e
Softw
are
Introduction Cont’d
• Linux OS could be installed on Personal computers, servers, mainframes,
mobile devices and embedded devices.
• The various types of Linux software are called distribution or distro and they
are: fedora, debian, open SUSE, Red hat, Turbo Linux, Ubuntu Linux
2.6/3.x 4.x, Mandriva, Arch linux, the popular Android and so on
Linux and Unix
• Unix is compatible with Linux at the system call level, meaning most programs
written for either Unix or Linux can be recompiled to run on the other system with
a minimum of work. But Linux will run faster than Unix on the same hardware.
• Unix was created by group of AT & T employee in 1969 and it is not open source
like Linux
• From a user experience perspective, there is a very little difference between Linux
and Unix. Much of the attraction of Linux was the operating system's availability
across many hardware architectures (including the modern PC) and ability to use
tools familiar to Unix system administrators and users.
Features of Linux
• Excellent networking facilities
• Ideal environment to run servers such as a web server, or an ftp server.
• A wide variety of commercial software is available if not satisfied by the free software
• Easily upgradeable.
• Supports multiple processors.
• True multi-tasking, multi-user OS i.e. it could perform different tasks at the same time without freezing
• An excellent window system called X, the equivalent of Windows but much more flexible.
• Full source code is provided and free i.e. it is Open source which makes it flexible and debuggable.
*Debugging is part of software development lifecycle which involves locating and correcting error in computer
program
Features of Linux Cont’d
• The two ways of interacting with the Linux OS are Graphical user interface
(GUI) and Command Line user interface (CLI).
• The category of people that use Linux are majorly the computer scientist
and professionals in terms of technicality and they prefer to use the LUI
• Linux is very good for server purpose e.g. web server, database server, file
server etc. As long as you install your Linux and configure it properly, it does
not crash, it just run and run for days.
Comparison of Linux and Windows
1. Linux provide users access to the programming code while Windows does not
2. In Windows the users are limited by the number of licenses purchased according to the
Microsoft license policy but in Linux GPL-licensed OS, users are free to modify that software,
use it and even republish or sell it
3. In Linux users will not find "My Documents" on Ubuntu, nor will you find "Program Files" on
Fedora. There are no C: or D: drives. But, there is only one single file tree and all drives are
mounted on the tree while Windows provides a greater facility for its users by providing various
drives like C:, D:,E: and so on. In addition, the drives are not mounted on a single tree
4. In Linux OS, there exists “package manager” which acts as a center for browsing, installing, and
removing program packages while in Windows the users have an “installation package” and can
install a program only after running the .exe file related to it
Comparison of Linux and Windows Cont’d
8. In Windows, after detecting a threat, Microsoft releases a patch that will fix
the problem and it will take more than 2 to 3 months while in Linux, threat
detection and solution is better, as it is community driven and when any user
posts any type of problem, many developers of Linux will start working on it.
Linux OS organization
• Note that the UNIX and Linux OS are organized in the three categories
Linux Kernel
• The kernel is the central nervous system of Linux, include OS code which
runs the whole computer. It provides resources to all other programs that
you run under Linux, and manages all other programs as they run.
• The kernel includes the code that performs certain specialized tasks,
including TCP/IP networking.
• The kernel design is modular, so that the actual OS code is very small to be
able to load when it needs, and then free the memory afterwards, thus the
kernel remains small and fast and highly extensible.
Networking on Linux
• Networking comes naturally to Linux. In a real sense, Linux is a product of
the Internet or World Wide Web (www).
• Linux is made for networking. Probably all networking protocols being use
on the Internet are native to Unix and/or Linux. A large part of the Web is
running on Linux boxes, e.g. : AOL
Networking on Linux cont’d
• The Linux kernel supports several networking protocols:
• TCP/IP - Transport Control Protocol/Internet Protocol
• IP is the primary network protocol supported by Linux
• IPX - Internetwork Packet Exchange
• Applettalk DDP
• Amateur Radio AX.25 Level 2
Features supported by Linux
• Forwarding
• Firewall operations
• Proxy and Masquerading
• Accounting
• Tunneling and Intranets
• Aliasing
Types of Files on Linux
• Linux has an hierarchical, unified file system
• Supports 256-character filenames.
• All command line entries are case sensitive.
• It make use of the forward slash(/) rather than the backslash(\).
Types of files on Linux Cont’d
• Ordinary files
• text files
• data files
• command text files
• executable files
• directories
• links
• rather than having multiple copies of a file, Linux uses linking to one file to save disk space.
• special device files
Installing Linux OS
• Get Ubuntu by downloading Ubuntu from http://www.ubuntu.com/download.It is either
you download 32-bit or 64-bit, depending on your computer processor bit.
• Burn the downloaded software into a disc or copy it into a flash and make it bootable.
• Put the cd or flash into the computer and boot from cd or flash, these type of installation
will not affect your system everything will done on the cd or flash
• You can partition your hard disk into two, one for linux and the other other for windows or
any other operating system you want to use with linux, hence you will have a dual – boot. A
dual-boot allows you, at boot time, to decide which operating system you want to use.
Installing Linux OS Cont’d
• Ubuntu can be installed using virtualbox, virtual box allows for the creation of virtual machine. Download
Virtual box first on your computer, then create a virtual machine and install the Ubuntu following the
necessary steps diligently. Installing Ubuntu on a virtual machine inside of Windows has a lot advantages
over a dual-boot (but also a few disadvantages).
For the purpose of these lecture, ubuntu desktop will be installed using the virtual box
Advantages of virtual installation
• The size of the installation doesn't have to be predetermined. It can be a dynamically resized virtual hard
drive
• You do not need to reboot in order to switch between Ubuntu and Windows.
• The virtual machine will use your Windows internet connection, so you don't have to worry about Ubuntu
not detecting your wireless card, if you have one.
Installing Linux OS Cont’d
• The virtual machine will set up its own video configuration, so you don't have to
worry about installing proprietary graphics drivers to get a reasonable screen
resolution.
• You always have Windows to fall back on in case there are any problems. All you
have to do is press the right Control key instead of rebooting your entire computer.
• For troubleshooting purposes, you can easily take screenshots of any part of
Ubuntu (including the boot menu or the login screen).
• If you later decide you don't like Ubuntu, all you have to do is delete the virtual
hard drive and uninstall VirtualBox.
Installing Linux OS Cont’d
Disadvantages of virtual installation
• In order to get any kind of decent performance, you need at least 512 MB of
RAM, because you are running an entire operating system (Ubuntu) inside
another entire operating system (Windows). The more memory, the better. I
would recommend at least 1 GB of RAM.
• Every time you want to use Ubuntu, you have to wait for two boot times (the
time it takes to boot Windows, and then the time it takes to boot Ubuntu
within Windows).
Basic Commands used in Unbuntu Desktop
• Terminal
The terminal is Ubuntu’s CLI. It is a method of controlling some aspects of
Ubuntu using only commands that you type on the keyboard.
Why the use of the terminal?
For troubleshooting
Faster way to accomplish a task
Basic Commands used in Ubuntu Desktop
• Opening the terminal
You can open the terminal by clicking Dash then searching for word “term”.
You will see an application named terminal. Click on this application to open a
terminal. Alternatively, you can open the terminal by hitting Ctrl+Alt+T
simultaneously.
When the terminal window opens, it will be largely blank with the exception of
some text at the top left of the screen, followed by a blinking block, known as a
cursor the window that opens is the bash.
Basic Commands used in Ubuntu Desktop
• Sudo :super user do, use this command when you require root permission
• Cd : To change your current directory : cd /home
• pwd : prints the absolute path to current working directory.
• Cal : Displays the calendar of the current month.
• passwd :to change users password in case the user forgot.
• ls : used to to see anything in the directory : /home ls
Basic Commands used in Ubuntu Desktop
• Mkdir : used to create a new directory : mkdir folderName
• Cp : used to copy and paste file, firstly determine the file you want to copy
and the destination :cp src des
• grep :You need to find a file but you don't remember its exact location or the
path, using correct keyword; grep user /etc/passwd
• cat: It will show you the text inside your file. cat CMakeLists.txt
Basic Commands used in Ubuntu Desktop
• Poweroff: Sometimes you need to poweroff directly from your terminal.
This command will do the task. Don't forget to add sudo at the beginning of
the command since it needs root permission to execute poweroff. sudo
poweroff.
• Date :The date command can display the date, time, time zone and more
Virtual Machine
• A virtual machine (VM) is an operating system (OS) or application environment that
is installed on software, which imitates dedicated hardware. The end user has the
same experience on a virtual machine as they would have on dedicated hardware.
• Host operating system (host OS). This is the operating system of the physical
computer on which VirtualBox was installed. There are versions of VirtualBox for
Windows, Mac OS X, Linux and Solaris hosts.
• Guest operating system (guest OS). This is the operating system that is running
inside the virtual machine.
Virtual Box
• VirtualBox is a cross-platform virtualization application. It extends the
capabilities of your existing computer so that it can run multiple operating
systems (inside multiple virtual machines) at the same time.
• For example, you can run Windows and Linux on your Mac, run Windows
Server 2008 on your Linux server, run Linux on your Windows PC, and so
on, all alongside your existing applications.
• You can install and run as many virtual machines as you like – the only
practical limits are disk space and memory.
Print-screen display from Virtual box
Print-screen display from Virtual box
Print-screen display from Virtual box
Print-screen display from Virtual box
Print-screen display from Virtual box
Print-screen display from Virtual box
Print-screen display from Virtual box
Print-screen display from Virtual box
Bibliography
• Comparison of Windows and Linux Operating Systems in Advanced Features P.
Abhilash*, Abhinay sri vasthav. P. Abhilash Int. Journal of Engineering Research
and Applications www.ijera.com ISSN : 2248-9622, Vol. 5, Issue 2( Part 3), February
2015, pp.81-83
• The operating system Linux and programming languages: An introduction by
Joachim Puls and Michael Wegner
• GEC 225, 2016/2017 Lecture slides
• Oracle VM VirtualBox R User Manual Version 5.2.16 2004-2018 Oracle
Corporation http://www.virtualbox.org
Bibliography
• Introduction to Linux and basic Linux command for beginners (video clip)
• Introduction to Linux by Don Johnson of BU IS&T
• An Introduction to Linux Operating System by Zihui Han