Linux for everyone

75
Linux for Lab By Pradeep Shankhwar

description

A small linux presentation which may help beginner to develop interest towards linux usage in daily life.

Transcript of Linux for everyone

Page 1: Linux for everyone

Linux for Lab

By Pradeep Shankhwar

Page 2: Linux for everyone

Presentation layout

• History• Why Linux• Role of Linux • Linux internal • Adoption and popularity • Day to day Usage • Conclusion

Page 3: Linux for everyone

Before LinuxBefore Linux• In 80’s, Microsoft’s DOS was the dominated OS for

PC• Apple MAC was better, but expensive• UNIX was much better, very expensive. Only for

minicomputer for commercial applications• Reliable, multiuser & multi-programming env.

• People were looking for a UNIX based system, which should be cheaper and can run on PC

• Both DOS, MAC and UNIX were proprietary, i.e., the source code of their kernel is protected

• No modification is possible without paying high license fees

Page 4: Linux for everyone

History

Page 5: Linux for everyone

• Developed in 1991 by a University of Finland student Linus Torvalds.• Basically a kernel, it was combined with the various software and

compilers from GNU Project to form an OS, called GNU/Linux• Linux is a full-fledged OS available in the form of various Linux

Distributions• RedHat, Fedora, SuSE, Ubuntu, Debian are examples of Linux distros• Linux is supported by big names as IBM, Google, Sun, Novell, Oracle, HP,

Dell, and many more

What is Linux?

Page 6: Linux for everyone

History

Wrote the GNU manifesto in 1985 outlining philosophy Software that is free means more than free of charge

"It means that much wasteful duplication of system programming effort will be avoided. This effort can go instead into advancing the state of the art."

By early 1990s many of the GNU OS utilities were completeMeanwhile....

•A famous professor Andrew Tanenbaum developed Minix, a simplified version of UNIX that runs on PC•Minix is for class teaching only. No intention for commercial use•Linus Torvalds started work on the Linux Kernel

First version released in 1991 Changes Linux to GPL licence in 1992 Combined with GNU to make an OS

Page 7: Linux for everyone

GNU projectGNU project

– Established in 1984 by Richard Stallman, who believes that software should be free from restrictions against copying or modification in order to make better and efficient computer programs

GNU is a recursive acronym for “GNU's Not Unix” Aim at developing a complete Unix-like operating system which is free for copying and modificationCompanies make their money by maintaining and distributing the software, e.g. optimally packaging the software with different tools (Redhat, Slackware, Mandrake, SuSE, etc)Stallman built the first free GNU C Compiler in 1991. But still, an OS was yet to be developed

Page 8: Linux for everyone

Why Linux

Page 9: Linux for everyone

Free, Libre, Open Source Software (FLOSS)

• What can you do?– Freedom to use– Freedom to examine– Freedom to redistribute– Freedom to modify

• What can't you do?– Deny these freedoms to anyone else

Page 10: Linux for everyone

• Linux is free and always will be as compared to the very costly Windows and Mac OSX

• Using pirated Windows is a bad thing

Linux is Free

Page 11: Linux for everyone

• Security has always been the number one priority with Linux

• Linux has a robust security system• Least affected platform,

– Malware developer are negligible compared to problem fixture.

Forget about viruses.

Page 12: Linux for everyone

• Have you ever lost your precious work because Windows crashed? Have you ever gotten the "blue screen of death" or error messages telling you that the computer needs to be shut down for obscure reasons?

• Crashes or freezes are not prevalent in Linux

Is your system unstable ?

Page 13: Linux for everyone

• When the system has installed, why would you still need to install stuff ?• Common software such as music player, web browser, video player, image

editor, PDF reader, chat messenger, office apps

Linux comes with software built-in

Page 14: Linux for everyone

• Just like Windows’ Update tool, Linux has a more better alternative to it to update all your system in a few clicks

Updating in a single click

Page 15: Linux for everyone

• As Linux is impervious to viruses, trojans, spywares, which are the main reasons to slow down the PC, systems based on it do not get slower

• Linux consumes lesser system resources

Linux does not get slow

Page 16: Linux for everyone

• If you already know what fragmentation is, and are already used to defragmenting your disk every month or so, here is the short version : Linux doesn't need defragmenting.

• Whereas Windows-based system get fragmented frequently and need attention in this regard.

Linux does not need defragmentation

Page 17: Linux for everyone

• Linux runs perfectly well on older hardware, on which Windows XP would probably even refuse to install, or let you wait 20 seconds after each click

• Windows requires more and more hardware power as its version number increases (95, 98, 2000, Me, XP, etc.). So if you want to keep running Windows, you need to constantly buy new hardware

Linux can run on older hardware

Page 18: Linux for everyone

• With Linux, everything is much simpler. Linux has what is called a "package manager": each piece of software is contained in its own "package". If you need some new software, just open the package manager, type a few keywords, choose which software you want to install and press "Apply" or "OK". Or you can just browse existing software (that's a lot of choice!) in categories.

Add new software in a few clicks

Page 19: Linux for everyone

• Due to the various options available in Linux, like a lot of DEs, themes, Window Managers, and the modular nature of DEs, Linux is very customizable

• The extent of customizability is clearly implied by the fact that some people have gone as far as to customize their Linux OS to make them look and feel like Mac OSX and Windows

Linux is extremely customizable

Page 20: Linux for everyone

No threat of viruses Linux systems are extremely stable Linux is Free Linux comes with most of the required software pre-installed Update all your software with minimum fuss Linux never gets slow Linux does not need defragmentation Linux can even run on oldest hardware Adding more software is a matter of a few clicks Most Windows-only apps have either their native version or

alternatives for Linux With Linux, you get the highest degree of possible customizability

Why Linux: Summary

Page 21: Linux for everyone

21

Roles of Linux

• Desktop• Server• Linux for application developer & embedded

system developer

Page 22: Linux for everyone

• Can be controlled through command-line (CLI) or Graphical User Interface (GUI)

• GUI run through Desktop Environments (DE)• KDE, GNOME, Xfce, E17 are popular DEs• The GUI interface is easy-to-use and much like that of Windows and Mac

OSX• The CLI is similar to that of UNIX/BSD

Linux User InterfaceLinux User Interface

Page 23: Linux for everyone

23

Linux on the Desktop

• First, there has been a historical lack of desktop productivity applications available for Linux.

• The second issue is that the average user tends to find Linux somewhat intimidating.

Page 24: Linux for everyone

Generic use of Linux• Document preparation

– Presentation– Word document– Excel worksheet

• PDF document preparation– Latex (complete report preparation tool)

• Inbuilt PDF viewing tools kpdf, gpdf etc• Diagram preparation and storing them in multiple formats (fig, dia

tools)• Text file preparing and editing• Printing (network/standalone)• Web browsing• There is single interface to call & exit any tools---- i.e. terminal

Page 25: Linux for everyone

• It is possible to install/run Windows software on Linux• Wine helps run a wide range of Windows applications• Cedega helps run huge number of Windows games flawlessly• Cygwin helps to run linux applications in windows

Running Windows software on Linux and vice versa

Page 26: Linux for everyone

• Many native games are available, both 3D and 2D• Wine and Cedega help run Windows-only games• Popular games for Linux are: Quake, Unreal Tournament, Counter Strike,

Doom, Cube, CodeRED, Wesnoth, OpenArena, SuperTux, Frozen Bubble, Medal of Honor, and many more.

Gaming on Linux

Page 27: Linux for everyone

27

Linux as a Server..

■ Web Server Linux is also widely deployed as a Web server. The most popular Web service currently used on Linux is the Apache Web server. ■ E-Mail Server There are a variety of different e-mail services available for Linux that can turn your system into an enterprise-class e-mail server.

Page 28: Linux for everyone

Professional use of Linux

• Embedded system development– Texas instrument platform– All ARM based microcontroller– Intel based platform– PowerPC, ARM etc

• Desktop applications (equivalent to windows)• Possible available Linux Kernels

– RT Linux– Montavista Linux– ucLinux etc.

• VLSI tools

Page 29: Linux for everyone

• Modern languages are cross-platform, like Python, Ruby, Perl, Java• Most Linux distros support these languages and have their runtimes pre-

installed• GTK+ and Qt are widely used to design applications for Linux• IDEs like NetBeans, Anjuta, KDevelop, MonoDevelop, Eclipse are available

for Linux too

Programming in Linux

Page 30: Linux for everyone

How to learn commands

• Primary – man(manual) pages. • man <command> shows all information about the command • <command> help shows the available options for that command • Secondary – Books and Internet

Page 31: Linux for everyone

Important commands

• File handling – mkdir, ls, dir, cd, pwd, cp, rm, mv, – find [OPTION] [path] [pattern], history, locate

• Text processing– Cat file1.txt file2.txt– Grep –I apple sample.txt– Wc –L xyz.txt for number of new lines, words, bytes– Sort lines of text file

• File permission & ownership– Chmod, chown, su, passwd, who etc.

Page 32: Linux for everyone

Important commands…

• Process management– Ps, kill, top

• Archival – tar -cvf /home/archive.tar /home/original– zip [OPTION] DEST SOURCE– unzip original.zip

• Network related– ssh X [email protected]– scp [options] [[user]@host1:file1] [[user]@host2:file2]

Page 33: Linux for everyone

Important commands…

• File system– mount /dev/sda5 /media/target– umount /media/target – du – estimate file space usage– df – report filesystem disk space usage – quota – display disk usage and limits– reboot – reboot the system– Shutdown –h now

Page 34: Linux for everyone

Linux ShellLinux Shell

Shell interprets the command and request service from kernel

Similar to DOS but DOS has only one set of interface while Linux can select different shell

– Bourne Again shell (Bash), TC shell (Tcsh), Z shell (Zsh)

Kernel

Bash, Tcsh, Zsh

ls pwdwhoami

Different shell has similar but different functionality Bash is the default for Linux Graphical user interface of Linux is in fact an application

program work on the shell

Page 35: Linux for everyone

Directory TreeDirectory Tree(root)

When you log on the the Linux OS using your username you are automatically located in your home directory.

Page 36: Linux for everyone

• /bin Essential user command binaries that need to be available also in single user mode.

• /sbin Essential system binaries (e.g. init, insmod, ifup)• /lib Libraries for the binaries in /bin and /sbin• /usr/bin Non-essential user command binaries that are not needed in single

user mode• /usr/sbin Non-essential system binaries (e.g. daemons for network-

services)• /usr/lib Libraries for the binaries in /usr/bin and /usr/sbin• /etc Host-specific system-wide configuration files• /dev Device files• /home User home directories (optional)• /proc Virtual file system documenting kernel and process status as text files

36

Page 37: Linux for everyone

Desktop applications

• Word processing (OpenOffice, Koffice)• Programming (C, C++, Perl, Python, Java, PHP)• Image editing tool (GIMP)• Web browsers (Mozilla, Konquerer)• Email (thunderbird, Evolution, Mozilla, KMail)• Audio/ video tools (vlc, mplayer, ffmpeg)• K3b- cd/dvd burning tool• Kooka- scanning tool• Games- numerous

Page 38: Linux for everyone

Desktop applications…

• Text editor(vi, vim, gedit, nedit, kedit etc)• GUI based application development using QT

or Java• Works as Embedded System development

Host• Removable media handling as easy as in

windows

Page 39: Linux for everyone

Terminal

Page 40: Linux for everyone

File/folder explorer

Page 41: Linux for everyone

Example doc writer

Page 42: Linux for everyone

Example excel sheet

Page 43: Linux for everyone

Example ppt

Page 44: Linux for everyone

Example dia

Page 45: Linux for everyone

gedit – text editor

Page 46: Linux for everyone

Example gimp

Page 47: Linux for everyone

How to use man page

Page 48: Linux for everyone

Xpdf viewer

Page 49: Linux for everyone

Adoption

Page 50: Linux for everyone

• Linux is the most used OS on servers• 5 out of 10 reliable web hosting companies use Linux• Linux is the cornerstone of the LAMP server-software combination (Linux,

Apache, MySQL, Perl/PHP/Python) which has achieved popularity among developers

• Out of top 500 supercomputers, Linux is deployed on 426 of them

Linux on Servers and Supercomputers

Page 51: Linux for everyone

• 16.7% of smartphones worldwide use Linux as OS• Linux poses a major competition to the most popular OS is this segment –

Symbian• Nokia, Openmoko supply Linux on their select smartphones

Linux on Embedded Systems

Page 52: Linux for everyone

Linux is everywhere

Page 53: Linux for everyone

1983 (September): GNU project was announced publicly 1991 (September): first version of the Linux kernel was released to the Internet 2001 (second quarter): Linux server unit shipments at 15% annual growth rate 2004: Linux shipped on approximately 50% of the worldwide server blade units,

and 20% of all rack-optimized servers 2005: Microsoft representatives accuse Brazilian college using Famelix of pirating

Microsoft Windows 2007: Dell announces it will ship select models with Ubuntu Linux pre-installed 2007: Lenovo announces it will ship select models with SUSE Linux Enterprise

Desktop 10 pre-installed 2007: HP announces that it will begin shipping computers preinstalled with Red

Hat Linux in Australia 2007: ASUS launches the linux-based ASUS Eee PC 2008: Dell announces it will begin shipping Ubuntu based computers to Canada

and Latin America 2008: Dell is shipping systems with Ubuntu pre-installed in China 2008: Acer launches the linux-based Acer Aspire One

Adoption of Linux

Page 54: Linux for everyone

• Governments of many countries around the world are shifting to Linux from Windows due to the many benefits it offers

• Countries like India, France, Pakistan, Czech Republic, Brazil, Germany, USA, Austria, Spain, China, and Peru already use Linux

Adoption by Governments

Page 55: Linux for everyone

• The widely popular OLPC (One Laptop Per Child) Project’s XO Laptop runs on Linux

• Universities in countries, like USA, Germany, Netherlands, Philippines, Brazil, Russia, Switzerland, India use Linux on their workstations and servers

Linux in Education

Page 56: Linux for everyone

56

Linux Distributions• Today there are hundreds of different distributions

available popular Linux distributions include

■ SUSE Linux TurboLinux■ ■ Fedora Linux Mandrake Linux■ ■ Red Hat Enterprise Linux Lycoris Linux■ ■ Debian Linux ■ CentOS Linspire■ ■ ALT Linux ■ Gentoo Linux Ubuntu■

■Slackware Linux

Page 57: Linux for everyone

Demonstration • USB handling• File browsing, copying, deletion, searching• Office document preparation• Text file preparation and editing• Usage of photo editor• Usage of multimedia players• Diagram/figure preparation• Network browsing • Usage for software developer

– C/C++/Java/QT usage

Page 58: Linux for everyone

Concluding Remarks

• Grown-up and matured OS – Still numerous development is on

• Capturing mobile market & Embedded platforms• Gaining popularity in every domain among all

types of users• More secure and GUIs comparable to Mac &

Windows (Ease of use for layman too)• Supports Open Source Movement• Customizable – Freedom to Developer & User

Page 59: Linux for everyone

Thank you

Page 60: Linux for everyone

What is Linux?

Linux is a free Unix-type operating system originally created by Linus Torvalds developed under the GNU General Public License and the source code of which is freely available to every one.

Page 61: Linux for everyone

• Inspired by the UNIX OS, the Linux kernel was developed as a clone of UNIX

• GNU was started in 1984 with a mission to develop a free UNIX-like OS• Linux was the best fit as the kernel for the GNU Project• Linux kernel was passed onto many interested developers throughout the

Internet• Linux today is a result of efforts of thousands of individuals, apart from

Torvalds

History of Linux

Page 62: Linux for everyone

Why Linux• Use of open source Linux mean zero penny for license• At any point of time, Linux community is available to help• Reliable operation of computer• Multi programming and multi user environment• Very less prone to virus/malware and cyber attack [Antivirus may

not be needed for desktop]• Recompile/ reconfigure Linux tools as per your need [./configure,

make & make install]• Same Linux box can be used for server as well Desktop applications• Very secure file system so data can not be seen by another user • Online help of any command you may wish to use

Page 63: Linux for everyone

The most important subdirectories The most important subdirectories inside the root directory are: inside the root directory are:

• /bin : Important Linux commands available to the average user. • /boot : The files necessary for the system to boot. Not all Linux

distributions use this one. Fedora does. • /dev : All device drivers. Device drivers are the files that your Linux

system uses to talk to your hardware. For example, there's a file in the /dev directory for your particular make and model of monitor, and all of your Linux computer's communications with the monitor go through that file.

• /etc : System configuration files. • /home : Every user except root gets her own folder here, named for her

login account. So, the user who logs in with xyz, has the directory /home/xyz, where all of her personal files are kept.

• /lib : System libraries. Libraries are just bunches of programming code that the programs on your system use to get things done.

Page 64: Linux for everyone

The most important subdirectories The most important subdirectories inside the root directory are:inside the root directory are:

• /mnt : Mount points. When you temporarily load the contents of a CD-ROM or USB drive, you typically use a special name under /mnt. For example, many distributions (including Fedora) come, by default, with the directory /mnt/cdrom, which is where your CD-ROM drive's contents are made accessible.

• /root : The root user's home directory. • /sbin : Essential commands that are only for the system administrator. • /tmp : Temporary files and storage space. Don't put anything here that

you want to keep. Most Linux distributions (including Fedora) are set up to delete any file that's been in this directory longer than three days.

• /usr : Programs and data that can be shared across many systems and don't need to be changed.

• /var : Data that changes constantly (log files that contain information about what's happening on your system, data on its way to the printer, and so on).

Page 65: Linux for everyone

• Linux is desktop computer ready• Large number of distros targeted at Desktop users are available• Linux desktop distros come with many commonly used pre-installed

softwares• The modern Linux interface is user-friendly and makes the interaction

with computer easy

Linux on the Desktop

Page 66: Linux for everyone

Linux TodayLinux Today– Linux has been used for many computing

platforms– PC, PDA, mobiles to Supercomputer,…

– Not only character user interface but graphical user interface is available

– Commercial vendors moved in Linux itself to provide freely distributed code. They make their money by compiling up various software and gathering them in a distributable format

– Red Hat, Slackware, etc

Page 67: Linux for everyone

• Linux can be used on a wide range of electronic devices, like PC, PDAs, Smartphones, iPods, MP3 Players, PlayStation 2 & 3, mission critical servers and so on…

Linux on other devices

Page 68: Linux for everyone

68

Commonly Used CLI Commands and Utilities

/ : denote root directory./ : denote current directoryPATH :

■ halt This command shuts down the operating system, but can only be run by the root user. ■ reboot This command shuts down and restarts the operating system. It also can only be run by root.

Page 69: Linux for everyone

69

Commonly Used CLI Commands

■ init 0 This command also shuts down the operating system, and can only be run by your root user. ■ init 6 This command also shuts down and restarts the operating system. It also can only be run by root. ■ man: is help command. Ex: man ls

Page 70: Linux for everyone

70

Commands…

■ su (super user) This command switches the current user to a new user account. This command is most frequently used to switch to the superuser root account. In fact, if you don’t supply a username, this utility assumes that you want to change to the root account. If you enter su -, then you will switch to the root user account and have all of root’s environment variables applied.

Page 71: Linux for everyone

71

Commands…

■ env This command displays the environment variables for the currently logged-in user. ■ echo This command is used to echo a line of text on the screen. It’s frequently

used to display environment variables. Ex: echo $PATH

Page 72: Linux for everyone

72

Commands…

■ top This command is a very useful command that displays a list of all applications and processes currently running on the system.

■ which This command is used to display the full path to a shell command or utility.

Ex: which lsIt display: /bin/ls

Page 73: Linux for everyone

73

Commands…

■ whoami This command displays the username of the currently logged-in user. ■ netstat This command displays the status of the network, including current connections, routing tables, etc. ■ route This command is used to view or manipulate the system’s routing table. ■ ifconfig This command is used to manage network boards installed in the system. It can be used to display or modify your network board configuration parameters.

Page 74: Linux for everyone

Important commands

• File browsing (inbuilt file system browser)• File/folder copying (cp, cp -r)• File/folder moving(mv)• Seeing file/folder attributes (ls, dir)• Internet browser(mozilla firefox)• File searching (find, locate)

Page 75: Linux for everyone

Why linux …

• 43% of all web sites use Linux servers running the Apache Web server

• Kernel can be customized to user’s needs• Android uses Linux Kernel• Apple also uses UNIX as a basis