Introduction. Let s start with the first set of slides

Similar documents
GNU/Linux Course Lesson 1. Puria Nafisi

Perl and R Scripting for Biologists

Linux for Beginners. Windows users should download putty or bitvise:

Introduction to Linux. Woo-Yeong Jeong Computer Systems Laboratory Sungkyunkwan University

Introduction to Linux

Chapter 1 - Introduction. September 8, 2016

Introduction to Linux

Introduction to Linux

CISC 220 fall 2011, set 1: Linux basics

Operating Systems. Copyleft 2005, Binnur Kurt

Operating Systems 3. Operating Systems. Content. What is an Operating System? What is an Operating System? Resource Abstraction and Sharing

EECS Software Tools. Lab 2 Tutorial: Introduction to UNIX/Linux. Tilemachos Pechlivanoglou

Chap2: Operating-System Structures

Lec 1 add-on: Linux Intro

An Introduction to Unix Power Tools

EECS 470 Lab 5. Linux Shell Scripting. Friday, 1 st February, 2018

Table of contents. Our goal. Notes. Notes. Notes. Summer June 29, Our goal is to see how we can use Unix as a tool for developing programs

UNIX. The Very 10 Short Howto for beginners. Soon-Hyung Yook. March 27, Soon-Hyung Yook UNIX March 27, / 29

Unix System Architecture, File System, and Shell Commands

Linux & Shell Programming 2014

CS246 Spring14 Programming Paradigm Notes on Linux

Prof. Navrati Saxena TA: R. Sachan

Command-line interpreters

Operating Systems. Engr. Abdul-Rahman Mahmood MS, PMP, MCP, QMR(ISO9001:2000) alphapeeler.sf.net/pubkeys/pkey.htm

Welcome to Linux. Lecture 1.1

Unix/Linux: History and Philosophy

5/8/2012. Specifying Instructions to the Shell Chapter 8

Overview LEARN. History of Linux Linux Architecture Linux File System Linux Access Linux Commands File Permission Editors Conclusion and Questions

UNIX Kernel. UNIX History

Shells. A shell is a command line interpreter that is the interface between the user and the OS. The shell:

Contents. Note: pay attention to where you are. Note: Plaintext version. Note: pay attention to where you are... 1 Note: Plaintext version...

INTRODUCTION TO LINUX

CSE 390a Lecture 1. introduction to Linux/Unix environment

Introduction: What is Unix?

CSC209H Lecture 1. Dan Zingaro. January 7, 2015

PROGRAMMAZIONE I A.A. 2015/2016

CSE 303 Lecture 4. users/groups; permissions; intro to shell scripting. read Linux Pocket Guide pp , 25-27, 61-65, , 176

Introduction to Linux

GNU/Linux 101. Casey McLaughlin. Research Computing Center Spring Workshop Series 2018

*nix Crash Course. Presented by: Virginia Tech Linux / Unix Users Group VTLUUG

Introduction to Supercomputing

Introduction to Unix The Windows User perspective. Wes Frisby Kyle Horne Todd Johansen

Lecture 3. Unix. Question? b. The world s best restaurant. c. Being in the top three happiest countries in the world.

INF322 Operating Systems

CSE 391 Lecture 1. introduction to Linux/Unix environment

The Online Unix Manual

System Programming. Unix Shells

3/8/2017. Unix/Linux Introduction. In this part, we introduce. What does an OS do? Examples

Practical Computing-II. Programming in the Linux Environment. 0. An Introduction. B.W.Gore. March 20, 2015

Virtual Machine. Linux flavor : Debian. Everything (except slides) preinstalled for you.

Introduction to the Shell

client X11 Linux workstation

Introduction to Unix: Fundamental Commands

Today. Operating System Evolution. CSCI 4061 Introduction to Operating Systems. Gen 1: Mono-programming ( ) OS Evolution Unix Overview

CSE 391 Lecture 1. introduction to Linux/Unix environment

Linux Operating System Environment Computadors Grau en Ciència i Enginyeria de Dades Q2

Lab 2: Linux/Unix shell

Linux Systems Administration Getting Started with Linux

CS370 Operating Systems

Computer Architecture Lab 1 (Starting with Linux)

TECH 4272 Operating Systems

EECS2301. Lab 1 Winter 2016

Today. Operating System Evolution. CSCI 4061 Introduction to Operating Systems. Gen 1: Mono-programming ( ) OS Evolution Unix Overview

The kernel is the low-level software that manages hardware, multitasks programs, etc.

UNIX System Programming Lecture 3: BASH Programming

Getting to grips with Unix and the Linux family

Hands-on Keyboard: Cyber Experiments for Strategists and Policy Makers

UNIX, GNU/Linux and simple tools for data manipulation

Intro to Linux & Command Line

EECS 2031E. Software Tools Prof. Mokhtar Aboelaze

Assume that username is cse. The user s home directory will be /home/cse. You may remember what the relative pathname for users home directory is: ~

UNIX COMMANDS AND SHELLS. UNIX Programming 2015 Fall by Euiseong Seo

Introduction to Linux

Introduction to Linux Basics

Shell Programming Systems Skills in C and Unix

Introduction to Linux

Basic Survival UNIX.

UNIT 9 Introduction to Linux and Ubuntu

Unix. Examples: OS X and Ubuntu

Introduction to Linux (Part I) BUPT/QMUL 2018/03/14

Unix/Linux Operating System. Introduction to Computational Statistics STAT 598G, Fall 2011

History. Terminology. Opening a Terminal. Introduction to the Unix command line GNOME

Chapter-3. Introduction to Unix: Fundamental Commands

Introduction to Linux

Assignment clarifications

Crash Course in Unix. For more info check out the Unix man pages -orhttp:// -or- Unix in a Nutshell (an O Reilly book).

Mills HPC Tutorial Series. Linux Basics I

Linux at the Command Line Don Johnson of BU IS&T

Prerequisites: General computing knowledge and experience. No prior knowledge with Linux is required. Supported Distributions:

Computer Systems and Architecture

Chapter Two. Lesson A. Objectives. Exploring the UNIX File System and File Security. Understanding Files and Directories

UNIX Basics. UNIX Basics CIS 218 Oakton Community College

LINUX FUNDAMENTALS. Supported Distributions: Red Hat Enterprise Linux 6 SUSE Linux Enterprise 11 Ubuntu LTS. Recommended Class Length: 5 days

Introduction to UNIX. Logging in. Basic System Architecture 10/7/10. most systems have graphical login on Linux machines

Shells and Shell Programming

Overview of Unix / Linux operating systems

Answers to AWK problems. Shell-Programming. Future: Using loops to automate tasks. Download and Install: Python (Windows only.) R

Intro to Linux. this will open up a new terminal window for you is super convenient on the computers in the lab

Introduction of Linux

Exercise 1: Basic Tools

Transcription:

Tux Wars Class - 1

Table of Contents 1) Introduction to Linux and its history 2) Booting process of a linux system 3) Linux Kernel 4) What is a shell 5) Bash Shell 6) Anatomy of command 7) Let s make our own command 8) WildCards in Bash 9) Man 10) General directory structure in UNIX 11) Mounting a device 12) > IO Redirection >> 13) Permissions, Users & groups 14) Super User 2

1. Introduction Let s start with the first set of slides 3

4

History Of linux 1991. Just a hobby, won t be big and professional like GNU - Linus Torvalds 1992. Linux became open source 1996. Tux becomes the logo of linux 1997. GNOME project is born 2000. Steve jobs made an offer to Linus Torvalds to work on OS X. 2004. Ubuntu is released 2005. Linus torvalds created git 2008. Android v1.0 released And today All 500 of the world's fastest supercomputers are running Linux. 5

Flavors of Linux Let s see which linux flavor to use. 6

7

8

https://distrowatch.com/dwres.php?resource=popularity 9

2. Linux Kernel

11

3. Shells

What is a Shell? The shell is the command interpreter in an operating system such as Unix or GNU/Linux. It is a program that executes other programs. It provides user an interface to the Unix/GNU-Linux system so that the user can run different commands. 13

Types of Linux Shells The Bourne Shell ( $ ) Bourne Shell ( sh ) Korn Shell ( ksh ) Bourne Again Shell ( bash ) POSIX Shell ( sh ) The C Shell ( % ) C shell ( csh ) TENEX/TOPS C shell ( tsch ) 14

4. Bash

Interacting with Bash 1. Bash Built-ins cd echo alias exit 2. Bash Commands (executables/binaries) ls mkdir cp chmod And lot more.. https://courses.cs.washington.edu/courses/cse390a/14au/bash.html 16

5. Anatomy of a Command

utility [args]... Also called options, switches or flags 18

6. Let s make our own command

7. WildCards

WildCards in Bash What are wildcards? - A wildcard is a character that can be used as a substitute for any of a class of characters in a search, thereby greatly increasing the flexibility and efficiency of searches. Example please?? - ls *.txt 21

Okay, what other wildcards are available? Standard Wildcards ( globbing patterns )? (question mark) { } (curly brackets) touch file{1.. 10} cp { *.txt,*.pdf } ~ [ ] (square brackets) ls file[1-3] * (asterisk) rm file* 22

8. Sir, य सब त ठ क.. य द क स ह ग????

Take the chill pill!! Linux got your back : man help Info apropos (similar to man -f) 24

7. Everything is a file(descriptor)

Everything is a File "Everything is a file" - a wide range of input/output resources such as Documents Directories Hard-drives Modems Keyboards, printers and even some inter-process and network communications are simple streams of bytes exposed through the filesystem name space. 26

Different types of files in linux 1. Regular Readable Binary So on.. 2. Directories 3. Special Files Block Character Symbolic Link files Named Pipe socket 27

Why file Descriptor? - When a file is opened, a file descriptor is created. - File descriptors are also created for things like pipes and network sockets via different methods. 28

FileSystem Hierarchy Standard (FHS) 29

30

To read about FHS 3.0 refer : https://refspecs.linuxfoundation.org/fhs_3.0/fhs-3.0.pdf https://www.tecmint.com/linux-directory-structure-and-importan t-files-paths-explained/ 31

10. Mounting

Mounting a device All accessible storage/devices must have an associated location in the directory tree defined by FHS. This is unlike Windows where (in the most common syntax for file paths) there is one directory tree per storage component (drive). Mounting is the act of associating a storage device to a particular location in the directory tree. For example, when the system boots, a particular storage device. 33

Device name mount /dev/cdrom /media/movies Mount point (location where the device will be mounted) 34

11. IO Redirection, Pipes

Redirecting output to a file./a.out > output.txt : redirects output of a.out to output.txt./a.out >> output.txt : appends output of a.out to output.txt 36

PIPES ls /etc/ sort less : lists /etc directory sorts it and passes it to less pager. 37

12. User And Groups

Users in Linux A user or account of a system is uniquely identified by a numerical number called the UID (unique identification number). There are two types of users: Normal user - limited access to files Root / Superuser - can access all the files. 39

Groups in Linux Linux group is a mechanism to organise a collection of users. Like the user ID, each group is also associated with a unique ID called the GID (group ID). There are two types of groups: Primary group Supplementary group Each user is a member of exactly one primary group and zero or more supplementary groups. 40

chmod permission in octal 41

13. SUDO

43

44

SUDO Root is the super user and has the ability to do anything on a system. Therefore, in order to have protection against potential damage sudo is used in place of root. Sudo allows users and groups access to commands they normally would not be able to use. Sudo will allow a user to have administrative privileges without logging in as root. 45

Before using sudo, it may need to be installed if it is not part of your distro 46

SU vs. SU - SU : will land in the current directory SU - : will land in the root s home directory (/root) 47

thanks! Any questions? *The content in the slides was designed by Dipunj Gupta 48