Std: XI CHAPTER-3 LINUX

Save this PDF as:
 WORD  PNG  TXT  JPG

Size: px
Start display at page:

Download "Std: XI CHAPTER-3 LINUX"

Transcription

1 Commands: General format: Command Option Argument Command: ls - Lists the contents of a file. Option: Begins with minus sign (-) ls a Lists including the hidden files. Argument refers to the name of a file-.(dot). Path Name (Identifies the target file) Path for BIN {/bin- The first slash refers to the root directory} {/usr/bin} TWO TYPES OF PATH NAME Absolute path name [complete path] Relative path name Path names for job directory {/home/kumaran/personal/job}-absolute {/personal/job}-relative Identifying the path of working directory: pwd command Path of working directory Present working directory Print working directory ilamathi]$ pwd /home/ilamathi Changing the current directory: Current user ilamathi wants to switch over from home directory to the bin directory. The steps are ilamathi]$ pwd Page 1 of 12

2 /home/ilamathi ilamathi]$ cd/usr/bin ilamathi]$ pwd /usr/bin To change from current directory to parent directory give (cd..) command at the $ prompt. bin]$ cd.. pwd /usr NOTE: The cd command without any path name will always take the user to his /her home Directory The Tilde Sign (~) (Substitute for home directory) 1. Kumaran is currently in the directory /usr/bin wants to go to his personal directory.the easiest way to achieve this is the use of tilde sign and /personal. bin]$ ~/personal /home/kumaran/personal personal]$ cd ~ kumaran]$ pwd /home/kumaran 2. Kumaran is in personal directory and he wants to go to his health directory personal]$ cd.. /health health]$ pwd /home/kumaran/health. Subdirectory- Directory under another directory Creating a Directory(mkdir): health]$ mkdir insurance A new directory named insurance is created Removing a Directory (rmdir): health]$ rmdir insurance A directory named insurance is removed Conditions for removing a directory The directory should be empty Should not be the working directory Page 2 of 12

3 Listing the contents of a directory: Kumaran wants to know the names of files and subdirectories of /home/kumaran kumaran]$ ls /home/kumaran Health cprogramming c++programming personal kumaran]$ ls F. Health/c programming/c++ programming/personal/. F adds slash at the end of the directories and subdirectories. l gives information about the files. Other Commands: The clear command clears the screen The same thing is done by tput clear command also The command tput cup will position the cursor at row 20,column 20 Extracting the Help: Use of man command will lead us to know about the particular command $ man ls {help for ls command} The Echo Command: Displays a message to the user $ echo n Please enter your name.-n places the cursor in same line. File Commands: Cat-displays the contents of a file If the file is too lengthy, more command is used to show one page at a time Press f to move forward and b to move backward The tee command does double the work of cat command. It is just like Tpipe It takes the input from standard input and displays the contents on screen Stores the same in the file specified The LINUX files are arranged in a continuous stream of bytes Input data stream-standard input Output data stream-standard output Input: $ cat file 1 Output: contents of file 1 Input: $ more file 1 Output: contents of file 1 page by page Page 3 of 12

4 Redirection and Piping: 1. $ cat file 1 > file 2: copies the contents of file 1into file 2 where file 2 is empty If file 2 exists then its destroys file 2 and copies the contents of file 1 2. $ cat file 1 > file 1: copies file 1 into file 1 since file 1 exists and the right hand side is executed first, file 1 is destroyed. Then, left hand side is executed. Noclobber: Prevents overwriting an existing file by redirection operation Append (>>): To overcome the difficulty of overwriting the existing file, append operator is used. Example: $ cat file 1 >> file 2: appends the contents of file 1 to file 2 without overwriting. Standard Input: Commands receive data from the standard input. It is either connected to device or to file. By default, it is connected to the device KEYBOARD. The characters typed into the keyboard are taken to the standard input and then directed to the command. $ cat (without any argument): This command expects data from the standard input KEYBOARD. Ctrl + D: End of file work. $ cat > file (standard input redirection operator) Message Ctrl + D $ cat > file 3: The typed in material will be redirected to the cat command through the standard input and this is sent to the file after the > symbol. Input Redirection Operator (<): $ cat < file 3 In order to make the cat command to get data from the file 3 (not from keyboard), the command used is $ cat < file 3. Since there is no > symbol, the message is sent to the screen. If the standard input is to be redirected to receive its data from file 3 and the standard output is to be redirected to place the data in file 4, the command used is, $ cat < file 3 > file 4. Piping ( ): Page 4 of 12

5 Redirection operator works only on files. If you want to send the output of one command to another command, pipe is the only command used. Godown -> Carpenter -> Painter -> Godown Wood -> Chairs -> Painter chairs -> Godown Here, the chairs are taken to the painter through conveyor belts. And then to godowns through lorries. The action of conveyor belt is piping and that of lorry is redirection File is storage medium to store data. Command is a program or set of instructions. You can save data into or retrieve data from a file. A command may read from or save data into a file but command itself cannot store the data. Redirection simply places the output in a file but piping sends the output to another command. 1. $ cat file 3 lpr: The cat command gets the contents of the file 3 and sends it to the standard output. The output is piped to the lpr (line print). The lpr takes the standard output as the input and sends it to the printer. Thus pipes receive data from the command placed before the pipe and send it to the command placed after pipe. 2. $ cat n file 3 lpr: The cat command with n option sends the contents of file 3 to the standard output after numbering each line 3. $ cat file 3 more: Used if the length of the contents is large 4. $ cat file 1 file 2 file 3 more: displays the contents of more than one file with the line numbers. Each file is separated by a space and no comma is used. Sort Command This command sorts each line of the given file alphabetically and sends the sorted version to the standard output $ sort file 3 more $ sort file 3 cat - more $ sort file 3 cat n lpr $ sort file 5 tee file 6 : copies file 5 to file 6 but also displays the contents of file 5 on screen. $ sort file 5 tee s file 5 : sorted contents of file 5 can be copied into another file and displayed on screen. Here, s file 5 is the sorted file of file 5. The sorted file s file 5 is displayed on screen $ sort file 5 tee s file 5 lpr : sort - copy print Copying file: $ cp [options] < source file < destination > Page 5 of 12

6 $ cp file 1 file 6: copies the contents of file 1 to file 6. Option I in the above command is used for getting a warning from the system before over writing so that you can stop copying process. Input: $ cp i file 1 file 2 Output: overwrite file 2? n $ $ cp r alpha alpha 1 Copy a directory recursively using cp command with the r option -s option creates a symbolic link -v explains in detail what is being done. Removing file: $ rm file 1 file 2: file1, file 2 are removed in current directory $ rm r alpha : removes alpha 1 directory along with sub directories. Wild Cards: $ ls : all files $ ls *.c: list on files only with extn.c $ ls doc[12]: list files that start with doc and end with either 1 or 2 $ ls char? :? fixes number of characters. $ doc [1-5] doc [1-g] : specifies ranges. Edit Commands: Edit command line with the help of Left arrow (ctrl + B) Right arrow (ctrl + F) Back space (ctrl + H) Delete (Erase a char) Deletes a line (ctrl + U) Can enter more than one command in a same line but separate them by a semicolon. Moving and renaming files: mv [option] <source> <destination> Move mv command is used to move or rename a file $ mv temp temporary: Renames temp as temporary. Viewing system date and time: Refer page 155, 156. File Systems Mount and Unmount: Page 6 of 12

7 Establishing the connection between file system on a storage device and your main directory tree is calling mounting the device. This is done by Mount command. Here the command line prompt changes from $ to # Mount has two parameters. Storage device and Directory Device is a special device file that connects your system to the hardware device. Syntax: # mount device destination. E.g. for mount: # mount /dev/fd0/destination Device files are located in the /dev directories Fd0: first floppy disk drive Fd1: Second floppy disk drive Hda1: hard disk drive, first partition on the first hard drive. E.g. for Unmount: # unmount/dev/fd0 Unmount floppy disk mounted to the /destination directory Note: You can never unmount file system that you are currently working in. Mounting and formatting floppy disk: Mount: # mount/dev/fd0/mnt/floppy # unmount/dev/fd0 (or) #unmount/mnt/floppy, #mount/mnt/floppy Mkfs: makes formatting, commands (formats a floppy) Mounting- CD ROMs # mount/mnt/cdrom # unmount/mnt/cdrom # mount/dev/hdc/destination Vi Editor: Editors are used for creating, deleting and editing the files. The two types of editors are Ed (line editors) and VI (visual editors). Editors use keyboard for two main purposes. 1. To specify editing commands 2. To receive character input. Page 7 of 12

8 The keys used are the alphabetic character keys, function keys and control keys. Editors in linux use minimum number of keys. They are the alphabetic characters, control characters, ESC key and Enter key. The modes of VI editor are command mode and input mode. Command mode: The key (x) acts as delete key and erases a character where the cursor is on. Input mode: The same key (x) simply adds x to file. ESC keys help to check in which mode we are working. If already in command mode, no beep sound is heard. Beep sound indicates that we are in command mode at present but before in input mode. Creating, editing, saving, and quitting a file in VI: $ vi filename: edit/create a new file with the given filename If the file exists, the contents of file is listed page by page, otherwise empty screen is screen. Press a, I, or o: You will be taken to the input mode. After entering data, press ESC key. It will take you to command mode. Press upper case ZZ which saves your file and then exits vi editor. Press ESC key to change the command mode and press : to go to the line editing mode. Press w. This action saves the file and returns to command mode. The command :w (filename) is equivalent to save as in other word processors. $ vi (Creates a file without name) :w some name will save the file untitled 1. [contents of the buffer are copied into some name file] Clash of file name will not be tolerated. If a file exists already, the name will be rejected. We have to try with another name. Quit vi editor: q [takes to the shell] q! [out of vi editor without saving the saves] Moving keys: h - Left arrow j- Down arrow l- Right arrow k- up arrow Ctrl + F - moves the screen forward Ctrl + B - moves the screen backward Line number G: (Some line number) G: Takes you to the particular line. Simply G moves to the end of a file. Page 8 of 12

9 Word wrap: : set wm=col no.: Sets word wrap margin. Std: XI CHAPTER-3 LINUX Commands for inserting text: The lower case (a) key enters text input mode and appends the text after the cursor. The lower case (i) key enters text input mode and appends the text after the cursor. The lower case (o) key enters text input mode by opening a new line immediately below the current line Commands for Deleting text: x- deletes the current character dd- delete the current line nx- delete n characters from current position ndd- deletes n lines starting from the line where the cursor is on or erased. undo: press n (Undo last modification) Break a line: Press Enter key into the input mofe Press upper case (J) key to join two lines Moving: ndd delete n nos of lines p- insert deleted line (paste) Copying: yy- copies a line nyy- copies n lines fom the cursor into the buffer p- Similar to (xv paste) Searching: /-allows to search the pattern forward?.. allows to search the pattern backward. Changing: cc change entire contents of a line r - replace the current character R allows you to overwrite text cw- allows to change a word dw- allows to delte a word. Page 9 of 12

10 Shell Script: It is a text file that contains linux commands. A shell script is handy as you need to enter the command only once. Shell script allows input/output operations and manipulation of variables. Executing shell script when you logon to the linux system, you get a copy of the shell to work with. This shell is known as login shell. Default shell is BASH shell. It has the capabilities of the programming languages. Creating a shell: By giving sh command in the command prompt, a new shell is created. This new shell is known a sub shell or child shell of the current shell, which can be used to execute a shell script. You will have read and write privileges but execute permission is not granted immediately. Execute/Run a shell program: $ sh file name $. file name If you want to run a shell script directly at $ prompt, you can change FAP ( File access permission) by granting execute permission. This is done using chmod command $ chmod u + x edufile $ edufile +x with chmod gives the execute permission to any user u + x : Owner of file gets the execute permission Variables: They are place holders to store values. All linux variables are treated as character strings. Mathematical operations can be done using expr and let commands. Rules for creating variables: refer page 173 Syntax for creating variables: <variable _name> = <value> Name = Ezhil Name = Ezhil Name =Ezhil (The quotes are optional) Referencing Variables: $ symbol is need to refer the contents of a variable Page 10 of 12

11 var1=${var2}, var1, var2 are memory locations ${var2} command extracts the value found in that location Concatenation: If you want to concatenate the contents of one variable with another value, the braces are essential $ son1=$ {father} son, where father =john; add son to john. Store the result in son1. Reading a value into variable: echo Please enter your name -> prints string on screen Expressions: expr, let commands $ expr displays 72 on screen $ let <value1><operator><value2> $% let pr = 5*10 echo The product of $pr Output: The product is 50 Command Substitution: $ date - Access current date of the system. echo Today s date is date + %D, mm/dd/yy Command substitution can also be used to store the output of a command in a variable: cfiles= ls*.c\wc-l cfiles Variables contains the no of files in the current directory where names end with.c Output to be stored in variable using command substitution: $ var1=5 $ var1= expr $var assigns 25 to var1 Page 11 of 12

12 . Page 12 of 12

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

Chapter Two. Lesson A. Objectives. Exploring the UNIX File System and File Security. Understanding Files and Directories Chapter Two Exploring the UNIX File System and File Security Lesson A Understanding Files and Directories 2 Objectives Discuss and explain the UNIX file system Define a UNIX file system partition Use the

More information

Essential Unix (and Linux) for the Oracle DBA. Revision no.: PPT/2K403/02

Essential Unix (and Linux) for the Oracle DBA. Revision no.: PPT/2K403/02 Essential Unix (and Linux) for the Oracle DBA Revision no.: PPT/2K403/02 Architecture of UNIX Systems 2 UNIX System Structure 3 Operating system interacts directly with Hardware Provides common services

More information

Outline. Structure of a UNIX command

Outline. Structure of a UNIX command Outline Structure of Unix Commands Command help (man) Log on (terminal vs. graphical) System information (utility) File and directory structure (path) Permission (owner, group, rwx) File and directory

More information

Getting Started. Running Utilities. Shells. Special Characters. Special Characters. Chapter 2 Unix Utilities for non-programmers

Getting Started. Running Utilities. Shells. Special Characters. Special Characters. Chapter 2 Unix Utilities for non-programmers Chapter 2 Unix Utilities for non-programmers Graham Glass and King Ables, UNIX for Programmers and Users, Third Edition, Pearson Prentice Hall, 2003. Original Notes by Raj Sunderraman Converted to presentation

More information

Introduction to Unix: Fundamental Commands

Introduction to Unix: Fundamental Commands Introduction to Unix: Fundamental Commands Ricky Patterson UVA Library Based on slides from Turgut Yilmaz Istanbul Teknik University 1 What We Will Learn The fundamental commands of the Unix operating

More information

A Brief Introduction to the Linux Shell for Data Science

A Brief Introduction to the Linux Shell for Data Science A Brief Introduction to the Linux Shell for Data Science Aris Anagnostopoulos 1 Introduction Here we will see a brief introduction of the Linux command line or shell as it is called. Linux is a Unix-like

More information

Unix Filesystem. January 26 th, 2004 Class Meeting 2

Unix Filesystem. January 26 th, 2004 Class Meeting 2 Unix Filesystem January 26 th, 2004 Class Meeting 2 * Notes adapted by Christian Allgood from previous work by other members of the CS faculty at Virginia Tech Unix Filesystem! The filesystem is your interface

More information

Linux Command Line Primer. By: Scott Marshall

Linux Command Line Primer. By: Scott Marshall Linux Command Line Primer By: Scott Marshall Draft: 10/21/2007 Table of Contents Topic Page(s) Preface 1 General Filesystem Background Information 2 General Filesystem Commands 2 Working with Files and

More information

CS246 Spring14 Programming Paradigm Notes on Linux

CS246 Spring14 Programming Paradigm Notes on Linux 1 Unix History 1965: Researchers from Bell Labs and other organizations begin work on Multics, a state-of-the-art interactive, multi-user operating system. 1969: Bell Labs researchers, losing hope for

More information

CHE3935. Lecture 1. Introduction to Linux

CHE3935. Lecture 1. Introduction to Linux CHE3935 Lecture 1 Introduction to Linux 1 Logging In PuTTY is a free telnet/ssh client that can be run without installing it within Windows. It will only give you a terminal interface, but used with a

More information

Lab 2: Linux/Unix shell

Lab 2: Linux/Unix shell Lab 2: Linux/Unix shell Comp Sci 1585 Data Structures Lab: Tools for Computer Scientists Outline 1 2 3 4 5 6 7 What is a shell? What is a shell? login is a program that logs users in to a computer. When

More information

Perl and R Scripting for Biologists

Perl and R Scripting for Biologists Perl and R Scripting for Biologists Lukas Mueller PLBR 4092 Course overview Linux basics (today) Linux advanced (Aure, next week) Why Linux? Free open source operating system based on UNIX specifications

More information

Unix tutorial. Thanks to Michael Wood-Vasey (UPitt) and Beth Willman (Haverford) for providing Unix tutorials on which this is based.

Unix tutorial. Thanks to Michael Wood-Vasey (UPitt) and Beth Willman (Haverford) for providing Unix tutorials on which this is based. Unix tutorial Thanks to Michael Wood-Vasey (UPitt) and Beth Willman (Haverford) for providing Unix tutorials on which this is based. Terminal windows You will use terminal windows to enter and execute

More information

Introduction to Unix and Linux. Workshop 1: Directories and Files

Introduction to Unix and Linux. Workshop 1: Directories and Files Introduction to Unix and Linux Workshop 1: Directories and Files Genomics Core Lab TEXAS A&M UNIVERSITY CORPUS CHRISTI Anvesh Paidipala, Evan Krell, Kelly Pennoyer, Chris Bird Genomics Core Lab Informatics

More information

Lab Working with Linux Command Line

Lab Working with Linux Command Line Introduction In this lab, you will use the Linux command line to manage files and folders and perform some basic administrative tasks. Recommended Equipment A computer with a Linux OS, either installed

More information

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

GNU/Linux 101. Casey McLaughlin. Research Computing Center Spring Workshop Series 2018 GNU/Linux 101 Casey McLaughlin Research Computing Center Spring Workshop Series 2018 rccworkshop IC;3df4mu bash-2.1~# man workshop Linux101 RCC Workshop L101 OBJECTIVES - Operating system concepts - Linux

More information

Introduction to Linux Workshop 1

Introduction to Linux Workshop 1 Introduction to Linux Workshop 1 The George Washington University SEAS Computing Facility Created by Jason Hurlburt, Hadi Mohammadi, Marco Suarez hurlburj@gwu.edu Logging In The lab computers will authenticate

More information

Oxford University Computing Services. Getting Started with Unix

Oxford University Computing Services. Getting Started with Unix Oxford University Computing Services Getting Started with Unix Unix c3.1/2 Typographical Conventions Listed below are the typographical conventions used in this guide. Names of keys on the keyboard are

More information

Introduction to the UNIX command line

Introduction to the UNIX command line Introduction to the UNIX command line Steven Abreu Introduction to Computer Science (ICS) Tutorial Jacobs University s.abreu@jacobs-university.de September 19, 2017 Overview What is UNIX? UNIX Shell Commands

More information

Useful Unix Commands Cheat Sheet

Useful Unix Commands Cheat Sheet Useful Unix Commands Cheat Sheet The Chinese University of Hong Kong SIGSC Training (Fall 2016) FILE AND DIRECTORY pwd Return path to current directory. ls List directories and files here. ls dir List

More information

EECS2301. Lab 1 Winter 2016

EECS2301. Lab 1 Winter 2016 EECS2301 Lab 1 Winter 2016 Lab Objectives In this lab, you will be introduced to the Linux operating system. The basic commands will be presented in this lab. By the end of you alb, you will be asked to

More information

Using the Zoo Workstations

Using the Zoo Workstations Using the Zoo Workstations Version 1.86: January 16, 2014 If you ve used Linux before, you can probably skip many of these instructions, but skim just in case. Please direct corrections and suggestions

More information

The Unix Shell. Pipes and Filters

The Unix Shell. Pipes and Filters The Unix Shell Copyright Software Carpentry 2010 This work is licensed under the Creative Commons Attribution License See http://software-carpentry.org/license.html for more information. shell shell pwd

More information

Unix Introduction to UNIX

Unix Introduction to UNIX Unix Introduction to UNIX Get Started Introduction The UNIX operating system Set of programs that act as a link between the computer and the user. Developed in 1969 by a group of AT&T employees Various

More information

Introduction. File System. Note. Achtung!

Introduction. File System. Note. Achtung! 3 Unix Shell 1: Introduction Lab Objective: Explore the basics of the Unix Shell. Understand how to navigate and manipulate file directories. Introduce the Vim text editor for easy writing and editing

More information

Crash Course in Unix. For more info check out the Unix man pages -orhttp://www.cs.rpi.edu/~hollingd/unix. -or- Unix in a Nutshell (an O Reilly book).

Crash Course in Unix. For more info check out the Unix man pages -orhttp://www.cs.rpi.edu/~hollingd/unix. -or- Unix in a Nutshell (an O Reilly book). Crash Course in Unix For more info check out the Unix man pages -orhttp://www.cs.rpi.edu/~hollingd/unix -or- Unix in a Nutshell (an O Reilly book). 1 Unix Accounts To access a Unix system you need to have

More information

Chapter 6. Linux File System

Chapter 6. Linux File System Chapter 6 Linux File System 1 File System File System management how to store informations on storage devices The Hierarchical Structure Types of file Common File system Tasks 2 The Hierarchical Structure

More information

DATA 301 Introduction to Data Analytics Command Line. Dr. Ramon Lawrence University of British Columbia Okanagan

DATA 301 Introduction to Data Analytics Command Line. Dr. Ramon Lawrence University of British Columbia Okanagan DATA 301 Introduction to Data Analytics Command Line Dr. Ramon Lawrence University of British Columbia Okanagan ramon.lawrence@ubc.ca Why learn the Command Line? The command line is the text interface

More information

Basic Survival UNIX.

Basic Survival UNIX. Basic Survival UNIX Many Unix based operating systems make available a Graphical User Interface for the sake of providing an easy way for less experienced users to work with the system. Some examples are

More information

Linux & Shell Programming 2014

Linux & Shell Programming 2014 Unit -1: Introduction to UNIX/LINUX Operating System Practical Practice Questions: Find errors (if any) otherwise write output or interpretation of following commands. (Consider default shell is bash shell.)

More information

Introduction to Linux. Fundamentals of Computer Science

Introduction to Linux. Fundamentals of Computer Science Introduction to Linux Fundamentals of Computer Science Outline Operating Systems Linux History Linux Architecture Logging in to Linux Command Format Linux Filesystem Directory and File Commands Wildcard

More information

Lezione 8. Shell command language Introduction. Sommario. Bioinformatica. Esercitazione Introduzione al linguaggio di shell

Lezione 8. Shell command language Introduction. Sommario. Bioinformatica. Esercitazione Introduzione al linguaggio di shell Lezione 8 Bioinformatica Mauro Ceccanti e Alberto Paoluzzi Esercitazione Introduzione al linguaggio di shell Dip. Informatica e Automazione Università Roma Tre Dip. Medicina Clinica Università La Sapienza

More information

Basic Linux (Bash) Commands

Basic Linux (Bash) Commands Basic Linux (Bash) Commands Hint: Run commands in the emacs shell (emacs -nw, then M-x shell) instead of the terminal. It eases searching for and revising commands and navigating and copying-and-pasting

More information

The Directory Structure

The Directory Structure The Directory Structure All the files are grouped together in the directory structure. The file-system is arranged in a hierarchical structure, like an inverted tree. The top of the hierarchy is traditionally

More information

CS101 Linux Shell Handout

CS101 Linux Shell Handout CS101 Linux Shell Handout Introduction This handout is meant to be used as a quick reference to get a beginner level hands on experience to using Linux based systems. We prepared this handout assuming

More information

Introduction to Linux

Introduction to Linux p. 1/40 Introduction to Linux Xiaoxu Guan High Performance Computing, LSU January 31, 2018 p. 2/40 Outline What is an OS or Linux OS? Basic commands for files/directories Basic commands for text processing

More information

11/10/2011. Directory Structures (continued)

11/10/2011. Directory Structures (continued) 1 2 3 4 Guide to Parallel Operating Systems with Chapter 6 Directory Commands Objectives Describe directory structures Display directory structures Navigate directory structures Work with directories Work

More information

RH033 Red Hat Linux Essentials

RH033 Red Hat Linux Essentials RH033 Red Hat Linux Essentials Version 3.5 QUESTION NO: 1 You work as a Network Administrator for McNeil Inc. The company has a Linux-based network. A printer is configured on the network. You want to

More information

Processes. Shell Commands. a Command Line Interface accepts typed (textual) inputs and provides textual outputs. Synonyms:

Processes. Shell Commands. a Command Line Interface accepts typed (textual) inputs and provides textual outputs. Synonyms: Processes The Operating System, Shells, and Python Shell Commands a Command Line Interface accepts typed (textual) inputs and provides textual outputs. Synonyms: - Command prompt - Shell - CLI Shell commands

More information

Read the relevant material in Sobell! If you want to follow along with the examples that follow, and you do, open a Linux terminal.

Read the relevant material in Sobell! If you want to follow along with the examples that follow, and you do, open a Linux terminal. Warnings 1 First of all, these notes will cover only a small subset of the available commands and utilities, and will cover most of those in a shallow fashion. Read the relevant material in Sobell! If

More information

Basic File Attributes

Basic File Attributes Basic File Attributes The UNIX file system allows the user to access other files not belonging to them and without infringing on security. A file has a number of attributes (properties) that are stored

More information

BIOINFORMATICS POST-DIPLOMA PROGRAM SUBJECT OUTLINE Subject Title: OPERATING SYSTEMS AND PROJECT MANAGEMENT Subject Code: BIF713 Subject Description:

BIOINFORMATICS POST-DIPLOMA PROGRAM SUBJECT OUTLINE Subject Title: OPERATING SYSTEMS AND PROJECT MANAGEMENT Subject Code: BIF713 Subject Description: BIOINFORMATICS POST-DIPLOMA PROGRAM SUBJECT OUTLINE Subject Title: OPERATING SYSTEMS AND PROJECT MANAGEMENT Subject Code: BIF713 Subject Description: This course provides Bioinformatics students with the

More information

Introduction to Linux Part 1. Anita Orendt and Wim Cardoen Center for High Performance Computing 24 May 2017

Introduction to Linux Part 1. Anita Orendt and Wim Cardoen Center for High Performance Computing 24 May 2017 Introduction to Linux Part 1 Anita Orendt and Wim Cardoen Center for High Performance Computing 24 May 2017 ssh Login or Interactive Node kingspeak.chpc.utah.edu Batch queue system kp001 kp002. kpxxx FastX

More information

Basic Unix Command. It is used to see the manual of the various command. It helps in selecting the correct options

Basic Unix Command. It is used to see the manual of the various command. It helps in selecting the correct options Basic Unix Command The Unix command has the following common pattern command_name options argument(s) Here we are trying to give some of the basic unix command in Unix Information Related man It is used

More information

Unix Guide. Meher Krishna Patel. Created on : Octorber, 2017 Last updated : December, More documents are freely available at PythonDSP

Unix Guide. Meher Krishna Patel. Created on : Octorber, 2017 Last updated : December, More documents are freely available at PythonDSP Unix Guide Meher Krishna Patel Created on : Octorber, 2017 Last updated : December, 2017 More documents are freely available at PythonDSP Table of contents Table of contents i 1 Unix commands 1 1.1 Unix

More information

Helpful Tips for Labs. CS140, Spring 2015

Helpful Tips for Labs. CS140, Spring 2015 Helpful Tips for Labs CS140, Spring 2015 Linux/Unix Commands Creating, Entering, Changing Directories to Create a Directory (a Folder) on the command line type mkdir folder_name to Enter that Folder cd

More information

Welcome to getting started with Ubuntu Server. This System Administrator Manual. guide to be simple to follow, with step by step instructions

Welcome to getting started with Ubuntu Server. This System Administrator Manual. guide to be simple to follow, with step by step instructions Welcome to getting started with Ubuntu 12.04 Server. This System Administrator Manual guide to be simple to follow, with step by step instructions with screenshots INDEX 1.Installation of Ubuntu 12.04

More information

FILE MAINTENANCE COMMANDS

FILE MAINTENANCE COMMANDS Birla Institute of Technology & Science, Pilani Computer Programming (CS F111) Lab-2 ----------------------------------------------------------------------------------------------------------------------

More information

Working with Basic Linux. Daniel Balagué

Working with Basic Linux. Daniel Balagué Working with Basic Linux Daniel Balagué How Linux Works? Everything in Linux is either a file or a process. A process is an executing program identified with a PID number. It runs in short or long duration

More information

CSE Linux VM. For Microsoft Windows. Based on opensuse Leap 42.2

CSE Linux VM. For Microsoft Windows. Based on opensuse Leap 42.2 CSE Linux VM For Microsoft Windows Based on opensuse Leap 42.2 Dr. K. M. Flurchick February 2, 2017 Contents 1 Introduction 1 2 Requirements 1 3 Procedure 1 4 Usage 3 4.1 Start/Stop.................................................

More information

Mid Term from Feb-2005 to Nov 2012 CS604- Operating System

Mid Term from Feb-2005 to Nov 2012 CS604- Operating System Mid Term from Feb-2005 to Nov 2012 CS604- Operating System Latest Solved from Mid term Papers Resource Person Hina 1-The problem with priority scheduling algorithm is. Deadlock Starvation (Page# 84) Aging

More information

Basic Linux Command Line Interface Guide

Basic Linux Command Line Interface Guide This basic Linux Command-Line Interface (CLI) Guide provides a general explanation of commonly used Bash shell commands for the Barracuda NG Firewall. You can access the command-line interface by connecting

More information

Physics REU Unix Tutorial

Physics REU Unix Tutorial Physics REU Unix Tutorial What is unix? Unix is an operating system. In simple terms, its the set of programs that makes a computer work. It can be broken down into three parts. (1) kernel: The component

More information

Command Line Interface The basics

Command Line Interface The basics Command Line Interface The basics Marco Berghoff, SCC, KIT Steinbuch Centre for Computing (SCC) Funding: www.bwhpc-c5.de Motivation In the Beginning was the Command Line by Neal Stephenson In contrast

More information

Introduction to UNIX Command Line

Introduction to UNIX Command Line Introduction to UNIX Command Line Files and directories Some useful commands (echo, cat, grep, find, diff, tar) Redirection Pipes Variables Background processes Remote connections (e.g. ssh, curl) Scripts

More information

M2PGER FORTRAN programming. General introduction. Virginie DURAND and Jean VIRIEUX 10/13/2013 M2PGER - ALGORITHME SCIENTIFIQUE

M2PGER FORTRAN programming. General introduction. Virginie DURAND and Jean VIRIEUX 10/13/2013 M2PGER - ALGORITHME SCIENTIFIQUE M2PGER 2013-2014 FORTRAN programming General introduction Virginie DURAND and Jean VIRIEUX 1 Why learning programming??? 2 Why learning programming??? ACQUISITION numerical Recording on magnetic supports

More information

12/7/10 ATSC 212 UNIX ATSC 212 ATSC 212 UNIX

12/7/10 ATSC 212 UNIX ATSC 212 ATSC 212 UNIX ATSC 212 1 An operating system (OS) is a resource manager. It's task is to schedule resources and make available resources to system processes or programs. There have been hundreds of operating systems

More information

Presented by Bill Genske Gary Jackson

Presented by Bill Genske Gary Jackson Quintessential School Systems Session C Linux Presented by Bill Genske Gary Jackson Copyright Quintessential School Systems, 2009 All Rights Reserved 867 American Street --- Second Floor --- San Carlos,

More information

Getting Started With UNIX Lab Exercises

Getting Started With UNIX Lab Exercises Getting Started With UNIX Lab Exercises This is the lab exercise handout for the Getting Started with UNIX tutorial. The exercises provide hands-on experience with the topics discussed in the tutorial.

More information

Command-line interpreters

Command-line interpreters Command-line interpreters shell Wiki: A command-line interface (CLI) is a means of interaction with a computer program where the user (or client) issues commands to the program in the form of successive

More information

Introduction to UNIX Part II

Introduction to UNIX Part II T H E U N I V E R S I T Y of T E X A S H E A L T H S C I E N C E C E N T E R A T H O U S T O N S C H O O L of H E A L T H I N F O R M A T I O N S C I E N C E S Introduction to UNIX Part II For students

More information

Introduction to Supercomputing

Introduction to Supercomputing Introduction to Supercomputing TMA4280 Introduction to UNIX environment and tools 0.1 Getting started with the environment and the bash shell interpreter Desktop computers are usually operated from a graphical

More information

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

Operating Systems 3. Operating Systems. Content. What is an Operating System? What is an Operating System? Resource Abstraction and Sharing Content 3 Operating Systems The concept of an operating system. The internal architecture of an operating system. The architecture of the Linux operating system in more detail. How to log into (and out

More information

Using Linux as a Virtual Machine

Using Linux as a Virtual Machine Intro to UNIX Using Linux as a Virtual Machine We will use the VMware Player to run a Virtual Machine which is a way of having more than one Operating System (OS) running at once. Your Virtual OS (Linux)

More information

Shell Programming Overview

Shell Programming Overview Overview Shell programming is a way of taking several command line instructions that you would use in a Unix command prompt and incorporating them into one program. There are many versions of Unix. Some

More information

AN INTRODUCTION TO UNIX

AN INTRODUCTION TO UNIX AN INTRODUCTION TO UNIX Paul Johnson School of Mathematics September 18, 2011 OUTLINE 1 INTRODUTION Unix Common Tasks 2 THE UNIX FILESYSTEM Moving around Copying, deleting File Permissions 3 SUMMARY OUTLINE

More information

Parts of this tutorial has been adapted from M. Stonebank s UNIX Tutorial for Beginners (http://www.ee.surrey.ac.uk/teaching/unix/).

Parts of this tutorial has been adapted from M. Stonebank s UNIX Tutorial for Beginners (http://www.ee.surrey.ac.uk/teaching/unix/). Ubuntu tutorial Parts of this tutorial has been adapted from M. Stonebank s UNIX Tutorial for Beginners (http://www.ee.surrey.ac.uk/teaching/unix/). 1 Installing Ubuntu About Ubuntu For our lab sessions

More information

Introduction to Linux

Introduction to Linux Introduction to Linux Mukesh Pund Principal Scientist, NISCAIR, New Delhi, India History In 1969, a team of developers developed a new operating system called Unix which was written using C Linus Torvalds,

More information

Common File System Commands

Common File System Commands Common File System Commands ls! List names of all files in current directory ls filenames! List only the named files ls -t! List in time order, most recent first ls -l! Long listing, more information.

More information

Course 144 Supplementary Materials. UNIX Fundamentals

Course 144 Supplementary Materials. UNIX Fundamentals Course 144 Supplementary Materials UNIX Fundamentals 1 Background to UNIX Command Fundamentals This appendix provides a overview of critical commands and concepts Prerequisite knowledge attendees should

More information

PROGRAMMAZIONE I A.A. 2015/2016

PROGRAMMAZIONE I A.A. 2015/2016 PROGRAMMAZIONE I A.A. 2015/2016 SHELL SHELL SHELL A program that interprets commands Allows a user to execute commands by typing them manually at a terminal, or automatically in programs called shell scripts.

More information

vi filename edit filename starting at line 1

vi filename edit filename starting at line 1 Basic Vi Command 1. What is vi? The default editor that comes with the Linux operating system is called vi (visual editor). [Alternate editors for Linux environments include pico and emacs, a product of

More information

Quotes for the day: Software stands between the user and the machine - Harlan D. Mills

Quotes for the day: Software stands between the user and the machine - Harlan D. Mills Quotes for the day: Software stands between the user and the machine - Harlan D. Mills Software can help the user in their daily endeavors or stand in the way. the UNIX operating system, a unique computer

More information

INF322 Operating Systems

INF322 Operating Systems Galatasaray University Computer Engineering Department INF322 Operating Systems TP01: Introduction to Linux Ozan Çağlayan ocaglayan@gsu.edu.tr ozancaglayan.com Fundamental Concepts Definition of Operating

More information

UNIX, GNU/Linux and simple tools for data manipulation

UNIX, GNU/Linux and simple tools for data manipulation UNIX, GNU/Linux and simple tools for data manipulation Dr Jean-Baka DOMELEVO ENTFELLNER BecA-ILRI Hub Basic Bioinformatics Training Workshop @ILRI Addis Ababa Wednesday December 13 th 2017 Dr Jean-Baka

More information

Introduction to Linux Basics

Introduction to Linux Basics Introduction to Linux Basics Part-I Georgia Advanced Computing Resource Center University of Georgia Zhuofei Hou, HPC Trainer zhuofei@uga.edu Outline What is GACRC? What is Linux? Linux Command, Shell

More information

COMS 6100 Class Notes 3

COMS 6100 Class Notes 3 COMS 6100 Class Notes 3 Daniel Solus September 1, 2016 1 General Remarks The class was split into two main sections. We finished our introduction to Linux commands by reviewing Linux commands I and II

More information

Introduction to UNIX command-line II

Introduction to UNIX command-line II Introduction to UNIX command-line II Boyce Thompson Institute 2017 Prashant Hosmani Class Content Terminal file system navigation Wildcards, shortcuts and special characters File permissions Compression

More information

Introduction to the Shell

Introduction to the Shell [Software Development] Introduction to the Shell Davide Balzarotti Eurecom Sophia Antipolis, France What a Linux Desktop Installation looks like What you need Few Words about the Graphic Interface Unlike

More information

The Linux Command Line & Shell Scripting

The Linux Command Line & Shell Scripting The Linux Command Line & Shell Scripting [web] [email] portal.biohpc.swmed.edu biohpc-help@utsouthwestern.edu 1 Updated for 2017-11-18 Study Resources : A Free Book 500+ pages * Some of the materials covered

More information

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

EECS Software Tools. Lab 2 Tutorial: Introduction to UNIX/Linux. Tilemachos Pechlivanoglou EECS 2031 - Software Tools Lab 2 Tutorial: Introduction to UNIX/Linux Tilemachos Pechlivanoglou (tipech@eecs.yorku.ca) Sep 22 & 25, 2017 Material marked with will be in your exams Sep 22 & 25, 2017 Introduction

More information

Advanced Linux Commands & Shell Scripting

Advanced Linux Commands & Shell Scripting Advanced Linux Commands & Shell Scripting Advanced Genomics & Bioinformatics Workshop James Oguya Nairobi, Kenya August, 2016 Man pages Most Linux commands are shipped with their reference manuals To view

More information

The UNIX Operating System. HORT Lecture 2 Instructor: Kranthi Varala

The UNIX Operating System. HORT Lecture 2 Instructor: Kranthi Varala The UNIX Operating System HORT 59000 Lecture 2 Instructor: Kranthi Varala Operating Systems Image By Golftheman - Own work, CC BY-SA 3.0, https://commons.wikimedia.org/w/index.php?curid=4558519 Operating

More information

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

Hands-on Keyboard: Cyber Experiments for Strategists and Policy Makers Hands-on Keyboard: Cyber Experiments for Strategists and Policy Makers Review of the Linux File System and Linux Commands 1. Introduction Becoming adept at using the Linux OS requires gaining familiarity

More information

Standard. Shells. tcsh. A shell script is a file that contains shell commands that perform a useful function. It is also known as shell program.

Standard. Shells. tcsh. A shell script is a file that contains shell commands that perform a useful function. It is also known as shell program. SHELLS: The shell is the part of the UNIX that is most visible to the user. It receives and interprets the commands entered by the user. In many respects, this makes it the most important component of

More information

Basic vi Commands. What is vi? To Get Into and Out Of vi

Basic vi Commands. What is vi? To Get Into and Out Of vi Page 1 of 5 Basic vi Commands What is vi? The default editor that comes with the UNIX operating system is called vi (visual editor). [Alternate editors for UNIX environments include pico and emacs, a product

More information

Linux Nuts and Bolts

Linux Nuts and Bolts Linux Nuts and Bolts David Morgan At the command line Cursor control type to insert del/ctrl-d to delete home/end for endpoints Filename completion tab after initial characters Command repetition uparrow

More information

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

Unix/Linux Operating System. Introduction to Computational Statistics STAT 598G, Fall 2011 Unix/Linux Operating System Introduction to Computational Statistics STAT 598G, Fall 2011 Sergey Kirshner Department of Statistics, Purdue University September 7, 2011 Sergey Kirshner (Purdue University)

More information

System Administration

System Administration Süsteemihaldus MTAT.08.021 System Administration UNIX shell basics Name service DNS 1/69 Command Line Read detailed manual for specific command using UNIX online documentation or so called manual (man)

More information

Introduction to Bash Programming. Dr. Xiaolan Zhang Spring 2013 Dept. of Computer & Information Sciences Fordham University

Introduction to Bash Programming. Dr. Xiaolan Zhang Spring 2013 Dept. of Computer & Information Sciences Fordham University Introduction to Bash Programming Dr. Xiaolan Zhang Spring 2013 Dept. of Computer & Information Sciences Fordham University 1 Outline Shell command line syntax Shell builtin commands Shell variables, arguments

More information

Tiny Instruction Manual for the Undergraduate Mathematics Unix Laboratory

Tiny Instruction Manual for the Undergraduate Mathematics Unix Laboratory Tiny Instruction Manual for the Undergraduate Mathematics Unix Laboratory 1 Logging In When you sit down at a terminal and jiggle the mouse to turn off the screen saver, you will be confronted with a window

More information

Introduction in Unix. Linus Torvalds Ken Thompson & Dennis Ritchie

Introduction in Unix. Linus Torvalds Ken Thompson & Dennis Ritchie Introduction in Unix Linus Torvalds Ken Thompson & Dennis Ritchie My name: John Donners John.Donners@surfsara.nl Consultant at SURFsara And Cedric Nugteren Cedric.Nugteren@surfsara.nl Consultant at SURFsara

More information

CST Algonquin College 2

CST Algonquin College 2 The Shell Kernel (briefly) Shell What happens when you hit [ENTER]? Output redirection and pipes Noclobber (not a typo) Shell prompts Aliases Filespecs History Displaying file contents CST8207 - Algonquin

More information

Introduction. SSH Secure Shell Client 1

Introduction. SSH Secure Shell Client 1 SSH Secure Shell Client 1 Introduction An SSH Secure Shell Client is a piece of software that allows a user to do a number of functions. Some of these functions are: file transferring, setting permissions,

More information

Basics. I think that the later is better.

Basics.  I think that the later is better. Basics Before we take up shell scripting, let s review some of the basic features and syntax of the shell, specifically the major shells in the sh lineage. Command Editing If you like vi, put your shell

More information

UNLV Computer Science Department CS 135 Lab Manual

UNLV Computer Science Department CS 135 Lab Manual UNLV Computer Science Department CS 135 Lab Manual prepared by Lee Misch revised January 2018 CS 135 Lab Manual Content Page Introduction 3 CS Computer Accounts. 3 TBE B361 Computer Basics. 4 Logging In

More information

Introduction to Linux for QSS/OASIS System Administrators and System Operators

Introduction to Linux for QSS/OASIS System Administrators and System Operators Introduction to Linux for QSS/OASIS System Administrators and System Operators A QSS Webinar September 25, 2012 10:00 AM 12:00 PM Logging on Type user and press enter after logon as: Type password and

More information

Part III. Shell Config. Tobias Neckel: Scripting with Bash and Python Compact Max-Planck, February 16-26,

Part III. Shell Config. Tobias Neckel: Scripting with Bash and Python Compact Max-Planck, February 16-26, Part III Shell Config Compact Course @ Max-Planck, February 16-26, 2015 33 Special Directories. current directory.. parent directory ~ own home directory ~user home directory of user ~- previous directory

More information

Beyond this course. Machine code. Readings: CP:AMA 2.1, 15.4

Beyond this course. Machine code. Readings: CP:AMA 2.1, 15.4 Beyond this course Readings: CP:AMA 2.1, 15.4 CS 136 Spring 2018 13: Beyond 1 Machine code In Section 04 we briefly discussed compiling: converting source code into machine code so it can be run or executed.

More information

System Programming. Unix Shells

System Programming. Unix Shells Content : Unix shells by Dr. A. Habed School of Computer Science University of Windsor adlane@cs.uwindsor.ca http://cs.uwindsor.ca/ adlane/60-256 Content Content 1 Introduction 2 Interactive and non-interactive

More information