A Brief Introduction To Linux - What Is It? What Can I Use .

Transcription

A Brief Introduction to LinuxWhat is it? What can I use it for?Alexander B. PachecoLTS Research ComputingSeptember 8, 2015

Outline1Introduction to Linux2Linux Components3Live Demo2 / 25

Introduction to Linux

Unix History IUnix was conceived and implemented in 1969 at AT&T Bell labs by Ken Thompson,Dennis Ritchie, Douglas McIlroy, and Joe Ossanna.First released in 1971 and was written in assembler.In 1973, Unix was re-written in the programming language C by Dennis Ritchie (withexceptions to the kernel and I/O).The availability of an operating system written in a high-level language allowed easierportability to di erent computer platforms.The GNU Project, started in 1983 by Richard Stallman, had the goal of creating a“complete Unix-compatible software system” composed entirely of free software.386BSD released in 1992 and written by Berkeley alumni Lynne Jolitz and WilliamJolitz. FreeBSD, NetBSD, OpenBSD and NextStep (Mac OSX) descended from thisAndrew S. Tanenbaum wrote and released MINIX, an inexpensive minimal Unix-likeoperating system, designed for education in computer scienceFrustated with licensing issues with MINIX, Linus Torvalds, a student at University ofHelsinki began working on his own operating system which eventually became the”Linux Kernel”Linus released his kernel for anyone to download and help further development.4 / 25

Unix History IILinus’s message to comp.os.minix on Aug 26, 1991Hello everybody out there using minix I’m doing a (free) operating system (just a hobby, won’t be big and professional like gnu) for386(486) AT clones. This has been brewing since april, and is starting to get ready. I’d like anyfeedback on things people like/dislike in minix, as my OS resembles it somewhat (same physicallayout of the file-system (due to practical reasons) among other things).I’ve currently ported bash(1.08) and gcc(1.40), and things seem to work. This implies that I’ll getsomething practical within a few months, and I’d like to know what features most people wouldwant. Any suggestions are welcome, but I won’t promise I’ll implement them :-)Linus (email address)PS. Yes - it’s free of any minix code, and it has a multi-threaded fs. It is NOT protable (uses 386task switching etc), and it probably never will support anything other than AT-harddisks, asthat’s all I have :-(.https://groups.google.com/forum/?fromgroups #!msg/comp.os.minix/dlNtH7RRrGA/SwRavCzVE7gJLinux is only the kernel, an Operating System also requires applications that users canuse.combined with free software available from the GNU project gave birth to a newOperating System known as ”GNU/Linux”GNU/Linux or simply Linux is released under the GNU Public License: Free to use,modify and distribute provided you distribute under the GNU Public License.http://en.wikipedia.org/wiki/Linux5 / 25

6 / 25

What is Linux?Linux is an operating system that evolved from a kernel created by Linus Torvaldswhen he was a student at the University of Helsinki.It’s meant to be used as an alternative to other operating systems, Windows, Mac OS,MS-DOS, Solaris and others.Linux is the most popular OS used in a SupercomputerOS FamilyCountShare %LinuxUnixMixedWindows488101197.620.20.2If you are using a Supercomputer/High Performance Computer for your research, itwill be based on a *nix OS.It is required/neccessary/mandatory to learn Linux Programming (commands, shellscripting) if your research involves use of High Performance Computing orSupercomputing ne 2015 List7 / 25

What is a Linux OS, Distro, Desktop Environment?Many software vendors release their own packaged Linux OS (kernel, applications)known as distributionLinux distribution Linux kernel GNU system utilities and libraries Installationscripts Management utilities etc.1234Debian, Ubuntu, MintRed Hat, Fedora, CentOSSlackware, openSUSE, SLES, SLEDGentooApplication packages on Linux can be installed from source or from customizedpackages12deb: Debian based distros e.g. Debian, Ubuntu, Mintrpm: Red Hat based distros, Slackware based distros.Linux distributions o er a variety of desktop environment.1234567K Desktop Environment (KDE)GNOMEXfceLightweight X11 Desktop Environment (LXDE)CinnamonMATEDynamic Window Manager8 / 25

Where is Linux used?Linux distributions are tailored to di erent requirements such as123456ServerDesktopWorkstationRoutersEmbedded devicesMobile devices (Android is a Linux-based OS)Almost any software that you use on windows has a roughly equivalent software onLinux, most often multiple equivalent softwaree.g. Microsoft Office equivalents are OpenOffice.org, LibreOffice, KOfficeFor complete list, visit http://wiki.linuxquestions.org/wiki/Linux software equivalent to Windows softwareLinux o ers you freedom, to choose your desktop environment, software.9 / 25

Popularity of Linux DistributionsDistroWatch provides news,popularity rankings, and othergeneral information about:RankDistributionHitsvarious Linux distributions,free software/open sourceUnix-like operating systemssuch as OpenSolaris, MINIXand tch is NOT an indicationof market-share or quality nor is itan indication of how many usersbut it is clearly an indication ofwhat users are looking 970H8Manjaro943–9LXLE788N10Arch759–1210 / 25

Linux Components

Linux ComponentsShellApplications/Programser SoftwareOthS h ellKernelrdwareHaKernel12 / 25

Linux Componentser SoftwareOthS h ellKernelrdwareThe kernel is the main component ofmost computer operating systemsIt is a bridge between applications andthe actual data processing done at thehardware level.The kernel’s responsibilities includemanaging the system’s resources (thecommunication between hardware andsoftware components).provides the lowest-level abstractionlayer for the resources (especiallyprocessors and I/O devices) thatapplication software must control toperform its function.It typically makes these facilitiesavailable to application processesthrough inter-process communicationmechanisms and system calls.HaKernel12 / 25

Linux Componentser SoftwareOthS h ellKernelrdwareThe command line interface is theprimary interface to Linux/Unixoperating systems.Shells are how command-line interfacesare implemented in Linux/Unix.Each shell has varying capabilities andfeatures and the user should choose theshell that best suits their needs.The shell is simply an applicationrunning on top of the kernel andprovides a powerful interface to thesystem.HaShell12 / 25

Linux Componentser SoftwareOthS h ellKernelrdwareLinux provides a vast collection ofapplication software, both free (openand closed source) and commercial, forresearch, teaching and every day leisureactivities.Almost any software that you use onwindows has a roughly equivalentsoftware on Linux, most often multipleequivalent softwareMost, if not all (open source) software,that you need will be available from thedistribution repositories.RedHat Family: yum install packagenameopenSuSE Family: zypper install packagenameUbuntu Family: apt-get install packagenameUsers can also install by downloadingand installing from source.Usually involves three steps: configure,make, and make installHaApplications/Programs12 / 25

Files and ProcessesEverything in Linux/UNIX is either a file or a processA File is a collection of data, created by users using text editors, running compilers,etc.Examples of Files:1234document such as collection of ascii text as in report, essay, etc.program written in some high level programming languageinstructions comprehensible to machine but not a casual user such as executable,binary filedirectory containing information about its contents such as subdirectories orother filesA process is an executing program identified by a unique process identifier or PID.13 / 25

File System Hierarchymatlabgccroot directory petcdevproclib64 & libbinshareusrlib64 & ashrcbin···DocumentspackagesAll files are arranged in a hierarchial structure, like an inverted tree.The top of the hierarchy is traditionally called root (written as a slash / )14 / 25

File System Hierarchymatlabgccroot directory petcdevproclib64 & libbinshareusrlib64 & ashrcbin···Documentspackagescontains files that are essential for system operation, available for use by all users.14 / 25

File System Hierarchymatlabgccroot directory petcdevproclib64 & libbinshareusrlib64 & ashrcbin···Documentspackagescontains bootable kernel and bootloader14 / 25

File System Hierarchymatlabgccroot directory petcdevproclib64 & libbinshareusrlib64 & ashrcbin···Documentspackagescontains various devices such as hard disk, CD-ROM drive etc14 / 25

File System Hierarchymatlabgccroot directory petcdevproclib64 & libbinshareusrlib64 & ashrcbin···Documentspackagescontains various system configurations14 / 25

File System Hierarchymatlabgccroot directory petcdevproclib64 & libbinshareusrlib64 & ashrcbin···Documentspackagescontains home directories of all users. This is the directory where you are at when youlogin to a Linux/UNIX system.14 / 25

File System Hierarchymatlabgccroot directory petcdevproclib64 & libbinshareusrlib64 & ashrcbin···Documentspackagescontains libraries that are essential for system operation, available for use by all users.14 / 25

File System Hierarchymatlabgccroot directory petcdevproclib64 & libbinshareusrlib64 & ashrcbin···Documentspackagesdirectories where disk drives are mounted14 / 25

File System Hierarchymatlabgccroot directory petcdevproclib64 & libbinshareusrlib64 & ashrcbin···Documentspackagesprocess information pseudo-file system containing runtime system information (e.g.system memory, devices mounted, hardware configuration, etc).can be regarded as a control and information centre for the kernel.14 / 25

File System Hierarchymatlabgccroot directory petcdevproclib64 & libbinshareusrlib64 & ashrcbin···Documentspackagessame as bin but only accessible by root14 / 25

File System Hierarchymatlabgccroot directory petcdevproclib64 & libbinshareusrlib64 & ashrcbin···Documentspackagestemporary file storage14 / 25

File System Hierarchymatlabgccroot directory petcdevproclib64 & libbinshareusrlib64 & ashrcbin···Documentspackagescontains user documentations, binaries, libraries etc14 / 25

File System Hierarchymatlabgccroot directory petcdevproclib64 & libbinshareusrlib64 & ashrcbin···Documentspackagesused to store files which change frequently (system level not user level)14 / 25

File System Hierarchymatlabgccroot directory petcdevproclib64 & libbinshareusrlib64 & ashrcbin···Documentspackageswhere we install applications common to all HPC systems14 / 25

File System Hierarchymatlabgccroot directory petcdevproclib64 & libbinshareusrlib64 & ashrcbin···DocumentspackagesInstalling your own OS: /bin,/lib{64},/etc,/dev and /sbin must be on the samepartition.14 / 25

File System Hierarchymatlabgccroot directory petcdevproclib64 & libbinshareusrlib64 & ashrcbin···DocumentspackagesUNIX like OS’s are designed for multi user environments i.e. multiple users can existon the system.Special user called root is the administrator and has access to all files in the system.14 / 25

Live Demo

openSUSE KDE Desktop16 / 25

openSUSE Awesome Dynamic Window Manager17 / 25

openSUSE GNOME18 / 25

CentOS GNOME Desktop19 / 25

Ubuntu Unity Desktop20 / 25

Linux Mint Debian Edition MATE Desktop21 / 25

Linux Mint Cinnamon Desktop22 / 25

Lubuntu LXDE Desktop23 / 25

Xubuntu Xfce Desktop24 / 25

FreeBSD (Unix not Linux) Awesome DWM25 / 25

Linux Components Shell The command line interface is the primary interface to Linux/Unix operating systems. Shells are how command-line interfaces are implemented in Linux/Unix. Each shell has varying capabilities and features and the user should choose the shell that best suits their needs.