A Brief Introduction to Unix

Size: px
Start display at page:

Download "A Brief Introduction to Unix"

Transcription

1 A Brief Introduction to Unix Sean Barag Drexel University March 30, 2011 Sean Barag (Drexel University) CS A Brief Introduction to Unix March 30, / 17

2 Outline 1 Directories 2 Commands 3 Editors 4 Using the Unix Shell 5 Permissions 6 Moving Forward Sean Barag (Drexel University) CS A Brief Introduction to Unix March 30, / 17

3 Outline 1 Directories 2 Commands 3 Editors 4 Using the Unix Shell 5 Permissions 6 Moving Forward Sean Barag (Drexel University) CS A Brief Introduction to Unix March 30, / 17

4 Outline 1 Directories 2 Commands 3 Editors 4 Using the Unix Shell 5 Permissions 6 Moving Forward Sean Barag (Drexel University) CS A Brief Introduction to Unix March 30, / 17

5 Outline 1 Directories 2 Commands 3 Editors 4 Using the Unix Shell 5 Permissions 6 Moving Forward Sean Barag (Drexel University) CS A Brief Introduction to Unix March 30, / 17

6 Outline 1 Directories 2 Commands 3 Editors 4 Using the Unix Shell 5 Permissions 6 Moving Forward Sean Barag (Drexel University) CS A Brief Introduction to Unix March 30, / 17

7 Outline 1 Directories 2 Commands 3 Editors 4 Using the Unix Shell 5 Permissions 6 Moving Forward Sean Barag (Drexel University) CS A Brief Introduction to Unix March 30, / 17

8 Basics In Unix, everything is considered a file, even directories! Forward slash (/) instead of backslash (\) Root directory / Home directory ~ Current directory. or./ Parent directory.. or../ Windows Unix C:\Documents and Settings\[user]\Desktop\Presentation.pdf /home/[user]/desktop/presentation.pdf or ~/Desktop/Presentation.pdf Sean Barag (Drexel University) CS A Brief Introduction to Unix March 30, / 17

9 Basics In Unix, everything is considered a file, even directories! Forward slash (/) instead of backslash (\) Root directory / Home directory ~ Current directory. or./ Parent directory.. or../ Windows Unix C:\Documents and Settings\[user]\Desktop\Presentation.pdf /home/[user]/desktop/presentation.pdf or ~/Desktop/Presentation.pdf Sean Barag (Drexel University) CS A Brief Introduction to Unix March 30, / 17

10 Interesting Directories / Root Directory /bin Executable programs /dev Device Files /etc System-level configuration files /lib Essential libraries /opt Packages and software not typically part of the system /tmp Temporary files (Cleaned on restart) /usr User file system /usr/man Manuals /usr/src Source code for utilities and libraries Sean Barag (Drexel University) CS A Brief Introduction to Unix March 30, / 17

11 How to Get Help man an interface to the on-line reference manuals Nearly every command has an entry (if not, try -h or --help) Typically: Synopsis Description Options Defaults Examples References Related Commands Sean Barag (Drexel University) CS A Brief Introduction to Unix March 30, / 17

12 How to Get Help man an interface to the on-line reference manuals Nearly every command has an entry (if not, try -h or --help) Typically: Synopsis Description Options Defaults Examples References Related Commands Sean Barag (Drexel University) CS A Brief Introduction to Unix March 30, / 17

13 Working with Directories Command pwd cd [path] mkdir [path] rmdir [path] Action Prints present working directory (where you are) Change directory Makes directory Removes an empty directory Sean Barag (Drexel University) CS A Brief Introduction to Unix March 30, / 17

14 Working with Files Command ls cp [foo] [bar] mv [foo] [bar] rm [foo] cat [foo] wc [foo] Action List names of all files in the current directory Copy foo to bar, overwrites bar if it exists Moves foo to bar, overwrites bar if it exists Removes named files Prints contents of a file to the command line Counts lines, words, and characters for any named files There is no Recycle Bin, unless you specifically set one up! Sean Barag (Drexel University) CS A Brief Introduction to Unix March 30, / 17

15 Options for ls and Pattern Matching Option Result [none] All the files in the current directory -t Sorts by date modified (most recent first) -u Same as -t, but sorts by time of last use -l Shows results as a detailed list -r Uses reverse order when sorting -a Show all, including hidden files Command Result ls foo Show the file foo ls * Show all the files ls *.pdf Show all files who s filename ends with.pdf ls b[aeiou]n Show any file with name ban, ben, bin, bon, or bun ls?ob Show any file that ends with ob and has one character before that. ls *.mp[345] Show all files that end in.mp3,.mp4, or.mp5 Many others, and you can use any of the above options with these Sean Barag (Drexel University) CS A Brief Introduction to Unix March 30, / 17

16 Options for ls and Pattern Matching Option Result [none] All the files in the current directory -t Sorts by date modified (most recent first) -u Same as -t, but sorts by time of last use -l Shows results as a detailed list -r Uses reverse order when sorting -a Show all, including hidden files Command Result ls foo Show the file foo ls * Show all the files ls *.pdf Show all files who s filename ends with.pdf ls b[aeiou]n Show any file with name ban, ben, bin, bon, or bun ls?ob Show any file that ends with ob and has one character before that. ls *.mp[345] Show all files that end in.mp3,.mp4, or.mp5 Many others, and you can use any of the above options with these Sean Barag (Drexel University) CS A Brief Introduction to Unix March 30, / 17

17 Working with Files (cont d) Command grep [pattern] [foo] grep -v [pattern] [foo] tail [foo] tail -n [foo] tail +n [foo] cmp [foo] [bar] diff [foo] [bar] Result Print lines in foo matching a pattern Print lines in foo that don t match the pattern Print last 10 lines of foo Print last n lines of foo Start printing foo at line n Print location of the first difference Print all of the differences Sean Barag (Drexel University) CS A Brief Introduction to Unix March 30, / 17

18 Editors vi vim emacs nano Very minimal, installed on nearly every Unix/Linux machine by default Vi IMproved. Much easier to use, also installed on nearly every Unix/Linux machine by default. Extensible and very customizable. More feature-packed than vi/vim. Extensible, very customizable, and very powerful. Installed on most Unix/Linux machines by default. Very simple to use, but at the cost of extensibility and features. Sean Barag (Drexel University) CS A Brief Introduction to Unix March 30, / 17

19 Editors vi vim emacs nano Very minimal, installed on nearly every Unix/Linux machine by default Vi IMproved. Much easier to use, also installed on nearly every Unix/Linux machine by default. Extensible and very customizable. More feature-packed than vi/vim. Extensible, very customizable, and very powerful. Installed on most Unix/Linux machines by default. Very simple to use, but at the cost of extensibility and features. Sean Barag (Drexel University) CS A Brief Introduction to Unix March 30, / 17

20 Editors vi vim emacs nano Very minimal, installed on nearly every Unix/Linux machine by default Vi IMproved. Much easier to use, also installed on nearly every Unix/Linux machine by default. Extensible and very customizable. More feature-packed than vi/vim. Extensible, very customizable, and very powerful. Installed on most Unix/Linux machines by default. Very simple to use, but at the cost of extensibility and features. Sean Barag (Drexel University) CS A Brief Introduction to Unix March 30, / 17

21 Editors vi vim emacs nano Very minimal, installed on nearly every Unix/Linux machine by default Vi IMproved. Much easier to use, also installed on nearly every Unix/Linux machine by default. Extensible and very customizable. More feature-packed than vi/vim. Extensible, very customizable, and very powerful. Installed on most Unix/Linux machines by default. Very simple to use, but at the cost of extensibility and features. Sean Barag (Drexel University) CS A Brief Introduction to Unix March 30, / 17

22 Reserved/Special Characters bar > foo bar >> foo bar < foo bar foo bar ; foo bar & foo bar & (foo ; bar) Directs the standard output (stdout) of bar to foo Append stdout of bar to foo Executes bar with foo as the input Executes foo with it s input as the output of bar Runs bar. When it finishes, runs foo Run bar, but don t wait for it to finish to run foo Run bar in the background, freeing the terminal Run foo and bar as a sub-shell, treating their output as one. Sean Barag (Drexel University) CS A Brief Introduction to Unix March 30, / 17

23 Arguments and Macros Consider the command: mkdir alice bob chuck Macro Meaning Value $0 Command name mkdir $1 Argument 1 alice $2 Argument 2 bob $* All arguments alice bob chuck $# Number of arguments 3 # Rest of the line is a comment [none] Sean Barag (Drexel University) CS A Brief Introduction to Unix March 30, / 17

24 Arguments and Macros Consider the command: mkdir alice bob chuck Macro Meaning Value $0 Command name mkdir $1 Argument 1 alice $2 Argument 2 bob $* All arguments alice bob chuck $# Number of arguments 3 # Rest of the line is a comment [none] Sean Barag (Drexel University) CS A Brief Introduction to Unix March 30, / 17

25 Key Combos ˆc Stop the running process, returning to shell (process can prevent this) ˆz Pause the running process, returning to shell (resume with fg ) ˆ\ Kill whatever process is running (process can t stop this) ˆr Reverse command search through your history ˆl Clears the terminal window (same as the clear command)!! Macro for the previously run command!$ Macro for the previous argument Sean Barag (Drexel University) CS A Brief Introduction to Unix March 30, / 17

26 Permissions What can t you do? Permissions described two ways: letter combo or octal string for each type of user Owner Other users in the owner s group Users not in the owner s group Letter combo: rwx (Read, Write, Execute) Read (r) - can read the file Write (w) - can make changes or remove the file Execute (x) - Can execute the program contained in the file or execute the script rwxr-xr-x = Owner can do all, everyone else can read and execute Sean Barag (Drexel University) CS A Brief Introduction to Unix March 30, / 17

27 Permissions What can t you do? Permissions described two ways: letter combo or octal string for each type of user Owner Other users in the owner s group Users not in the owner s group Letter combo: rwx (Read, Write, Execute) Read (r) - can read the file Write (w) - can make changes or remove the file Execute (x) - Can execute the program contained in the file or execute the script rwxr-xr-x = Owner can do all, everyone else can read and execute Sean Barag (Drexel University) CS A Brief Introduction to Unix March 30, / 17

28 Permissions What can t you do? Permissions described two ways: letter combo or octal string for each type of user Owner Other users in the owner s group Users not in the owner s group Letter combo: rwx (Read, Write, Execute) Read (r) - can read the file Write (w) - can make changes or remove the file Execute (x) - Can execute the program contained in the file or execute the script rwxr-xr-x = Owner can do all, everyone else can read and execute Sean Barag (Drexel University) CS A Brief Introduction to Unix March 30, / 17

29 Permissions What can t you do? (cont d) Octal string: rwx represented in binary Value r w x Permission No permissions (Most restrictive) Only execute permissions Only write permissions Write and execute permissions Read-only permissions All permissions (Most permissive) One octal value for each group. 755 = Owner can do all, everyone else can read and execute Sean Barag (Drexel University) CS A Brief Introduction to Unix March 30, / 17

30 Permissions What can t you do? (cont d) Octal string: rwx represented in binary Value r w x Permission No permissions (Most restrictive) Only execute permissions Only write permissions Write and execute permissions Read-only permissions All permissions (Most permissive) One octal value for each group. 755 = Owner can do all, everyone else can read and execute Sean Barag (Drexel University) CS A Brief Introduction to Unix March 30, / 17

31 Changing Permissions chmod change the file mode bits Simplest method is octal string: chmod 755 foo.pdf Must be the file s owner to do this, unless you are the root user (su). Still restrictions with su. Sean Barag (Drexel University) CS A Brief Introduction to Unix March 30, / 17

32 Changing Permissions chmod change the file mode bits Simplest method is octal string: chmod 755 foo.pdf Must be the file s owner to do this, unless you are the root user (su). Still restrictions with su. Sean Barag (Drexel University) CS A Brief Introduction to Unix March 30, / 17

33 Changing Permissions chmod change the file mode bits Simplest method is octal string: chmod 755 foo.pdf Must be the file s owner to do this, unless you are the root user (su). Still restrictions with su. Sean Barag (Drexel University) CS A Brief Introduction to Unix March 30, / 17

34 Customization ~/.bashrc (launch of terminal) and ~/.bash_profile (login) Aliasing Settings Colors Anything you find useful Sean Barag (Drexel University) CS A Brief Introduction to Unix March 30, / 17

Unix/Linux Basics. Cpt S 223, Fall 2007 Copyright: Washington State University

Unix/Linux Basics. Cpt S 223, Fall 2007 Copyright: Washington State University Unix/Linux Basics 1 Some basics to remember Everything is case sensitive Eg., you can have two different files of the same name but different case in the same folder Console-driven (same as terminal )

More information

Mills HPC Tutorial Series. Linux Basics I

Mills HPC Tutorial Series. Linux Basics I Mills HPC Tutorial Series Linux Basics I Objectives Command Line Window Anatomy Command Structure Command Examples Help Files and Directories Permissions Wildcards and Home (~) Redirection and Pipe Create

More information

commandname flags arguments

commandname flags arguments Unix Review, additional Unix commands CS101, Mock Introduction This handout/lecture reviews some basic UNIX commands that you should know how to use. A more detailed description of this and other commands

More information

Chapter-3. Introduction to Unix: Fundamental Commands

Chapter-3. Introduction to Unix: Fundamental Commands Chapter-3 Introduction to Unix: Fundamental Commands What You Will Learn The fundamental commands of the Unix operating system. Everything told for Unix here is applicable to the Linux operating system

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 Essentials. Programming and Data Structures Lab M Tech CS First Year, First Semester

Linux Essentials. Programming and Data Structures Lab M Tech CS First Year, First Semester Linux Essentials Programming and Data Structures Lab M Tech CS First Year, First Semester Adapted from PDS Lab 2014 and 2015 Login, Logout, Password $ ssh mtc16xx@192.168.---.--- $ ssh X mtc16xx@192.168.---.---

More information

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

Unix File System. Class Meeting 2. * Notes adapted by Joy Mukherjee from previous work by other members of the CS faculty at Virginia Tech

Unix File System. Class Meeting 2. * Notes adapted by Joy Mukherjee from previous work by other members of the CS faculty at Virginia Tech Unix File System Class Meeting 2 * Notes adapted by Joy Mukherjee from previous work by other members of the CS faculty at Virginia Tech Unix File System The file system is your interface to: physical

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

You will automatically be in your user (home) directory when you login.

You will automatically be in your user (home) directory when you login. Directory structure / (root) bin dev etc lib users users2 tmp These directories typically contain system libraries, executable binary files, device handlers and drivers, etc. The user home directories

More information

Introduction of Linux

Introduction of Linux Introduction of Linux 阳 oslab2018_class1@163.com 寅 oslab2018_class2@163.com PART I Brief Introduction Basic Conceptions & Environment Install & Configure a Virtual Machine Basic Commands PART II Shell

More information

Introduction: What is Unix?

Introduction: What is Unix? Introduction Introduction: What is Unix? An operating system Developed at AT&T Bell Labs in the 1960 s Command Line Interpreter GUIs (Window systems) are now available Introduction: Unix vs. Linux Unix

More information

Week 2 Lecture 3. Unix

Week 2 Lecture 3. Unix Lecture 3 Unix Terminal and Shell 2 Terminal Prompt Command Argument Result 3 Shell Intro A system program that allows a user to execute: shell functions (e.g., ls -la) other programs (e.g., eclipse) shell

More information

Introduction to the Linux Command Line

Introduction to the Linux Command Line Introduction to the Linux Command Line May, 2015 How to Connect (securely) ssh sftp scp Basic Unix or Linux Commands Files & directories Environment variables Not necessarily in this order.? Getting Connected

More information

CSCI 2132 Software Development. Lecture 4: Files and Directories

CSCI 2132 Software Development. Lecture 4: Files and Directories CSCI 2132 Software Development Lecture 4: Files and Directories Instructor: Vlado Keselj Faculty of Computer Science Dalhousie University 12-Sep-2018 (4) CSCI 2132 1 Previous Lecture Some hardware concepts

More information

Introduction to Linux

Introduction to Linux Introduction to Linux M Tech CS I 2015-16 Arijit Bishnu Debapriyo Majumdar Sourav Sengupta Mandar Mitra Login, Logout, Change password $ ssh, ssh X secure shell $ ssh www.isical.ac.in $ ssh 192.168 $ logout,

More information

CHAPTER 1 UNIX FOR NONPROGRAMMERS

CHAPTER 1 UNIX FOR NONPROGRAMMERS CHAPTER 1 UNIX FOR NONPROGRAMMERS The man command is used to display the manual entry associated with word entered as argument. The -k option is used displays a list of manual entries that contain entered

More information

Getting your department account

Getting your department account 02/11/2013 11:35 AM Getting your department account The instructions are at Creating a CS account 02/11/2013 11:36 AM Getting help Vijay Adusumalli will be in the CS majors lab in the basement of the Love

More information

Unix Basics. Systems Programming Concepts

Unix Basics. Systems Programming Concepts Concepts Unix directories Important Unix file commands man, pwd, ls, mkdir, cd, cp, mv File and directory access rights through permission settings Using chmod to change permissions Other important Unix

More information

Getting started with Hugs on Linux

Getting started with Hugs on Linux Getting started with Hugs on Linux COM1022 Functional Programming Techniques Dr Hans Georg Schaathun University of Surrey Autumn 2009 Week 7 Dr Hans Georg Schaathun Getting started with Hugs on Linux Autumn

More information

CS Fundamentals of Programming II Fall Very Basic UNIX

CS Fundamentals of Programming II Fall Very Basic UNIX CS 215 - Fundamentals of Programming II Fall 2012 - Very Basic UNIX This handout very briefly describes how to use Unix and how to use the Linux server and client machines in the CS (Project) Lab (KC-265)

More information

Files

Files http://www.cs.fsu.edu/~langley/cop3353-2013-1/reveal.js-2013-02-11/02.html?print-pdf 02/11/2013 10:55 AM Files A normal "flat" file is a collection of information. It's usually stored somewhere reasonably

More information

5/20/2007. Touring Essential Programs

5/20/2007. Touring Essential Programs Touring Essential Programs Employing fundamental utilities. Managing input and output. Using special characters in the command-line. Managing user environment. Surveying elements of a functioning system.

More information

Unix File System. Learning command-line navigation of the file system is essential for efficient system usage

Unix File System. Learning command-line navigation of the file system is essential for efficient system usage ULI101 Week 02 Week Overview Unix file system File types and file naming Basic file system commands: pwd,cd,ls,mkdir,rmdir,mv,cp,rm man pages Text editing Common file utilities: cat,more,less,touch,file,find

More information

Getting started with Hugs on Linux

Getting started with Hugs on Linux Getting started with Hugs on Linux CS190 Functional Programming Techniques Dr Hans Georg Schaathun University of Surrey Autumn 2008 Week 1 Dr Hans Georg Schaathun Getting started with Hugs on Linux Autumn

More information

Introduction to remote command line Linux. Research Computing Team University of Birmingham

Introduction to remote command line Linux. Research Computing Team University of Birmingham Introduction to remote command line Linux Research Computing Team University of Birmingham Linux/UNIX/BSD/OSX/what? v All different v UNIX is the oldest, mostly now commercial only in large environments

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

Introduction to Linux

Introduction to Linux Introduction to Linux January 2011 Don Bahls User Consultant (Group Leader) bahls@arsc.edu (907) 450-8674 Overview The shell Common Commands File System Organization Permissions Environment Variables I/O

More information

CSE 303 Lecture 2. Introduction to bash shell. read Linux Pocket Guide pp , 58-59, 60, 65-70, 71-72, 77-80

CSE 303 Lecture 2. Introduction to bash shell. read Linux Pocket Guide pp , 58-59, 60, 65-70, 71-72, 77-80 CSE 303 Lecture 2 Introduction to bash shell read Linux Pocket Guide pp. 37-46, 58-59, 60, 65-70, 71-72, 77-80 slides created by Marty Stepp http://www.cs.washington.edu/303/ 1 Unix file system structure

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

Linux Shell Script. J. K. Mandal

Linux Shell Script. J. K. Mandal Linux Shell Script J. K. Mandal Professor, Department of Computer Science & Engineering, Faculty of Engineering, Technology & Management University of Kalyani Kalyani, Nadia, West Bengal E-mail: jkmandal@klyuniv.ac.in,

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

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

Week Overview. Unix file system File types and file naming Basic file system commands: pwd,cd,ls,mkdir,rmdir,mv,cp,rm man pages

Week Overview. Unix file system File types and file naming Basic file system commands: pwd,cd,ls,mkdir,rmdir,mv,cp,rm man pages ULI101 Week 02 Week Overview Unix file system File types and file naming Basic file system commands: pwd,cd,ls,mkdir,rmdir,mv,cp,rm man pages Text editing Common file utilities: cat,more,less,touch,file,find

More information

Using UNIX. -rwxr--r-- 1 root sys Sep 5 14:15 good_program

Using UNIX. -rwxr--r-- 1 root sys Sep 5 14:15 good_program Using UNIX. UNIX is mainly a command line interface. This means that you write the commands you want executed. In the beginning that will seem inferior to windows point-and-click, but in the long run the

More information

UNIX File Hierarchy: Structure and Commands

UNIX File Hierarchy: Structure and Commands UNIX File Hierarchy: Structure and Commands The UNIX operating system organizes files into a tree structure with a root named by the character /. An example of the directory tree is shown below. / bin

More information

Introduction p. 1 Who Should Read This Book? p. 1 What You Need to Know Before Reading This Book p. 2 How This Book Is Organized p.

Introduction p. 1 Who Should Read This Book? p. 1 What You Need to Know Before Reading This Book p. 2 How This Book Is Organized p. Introduction p. 1 Who Should Read This Book? p. 1 What You Need to Know Before Reading This Book p. 2 How This Book Is Organized p. 2 Conventions Used in This Book p. 2 Introduction to UNIX p. 5 An Overview

More information

Introduction to Linux

Introduction to Linux Introduction to Linux Prof. Jin-Soo Kim( jinsookim@skku.edu) TA - Kisik Jeong (kisik@csl.skku.edu) Computer Systems Laboratory Sungkyunkwan University http://csl.skku.edu What is Linux? A Unix-like operating

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

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

Files and Directories

Files and Directories CSCI 2132: Software Development Files and Directories Norbert Zeh Faculty of Computer Science Dalhousie University Winter 2019 Files and Directories Much of the operation of Unix and programs running on

More information

CS 215 Fundamentals of Programming II Spring 2019 Very Basic UNIX

CS 215 Fundamentals of Programming II Spring 2019 Very Basic UNIX CS 215 Fundamentals of Programming II Spring 2019 Very Basic UNIX This handout very briefly describes how to use Unix and how to use the Linux server and client machines in the EECS labs that dual boot

More information

SECTION -C. Getting Started with UNIX

SECTION -C. Getting Started with UNIX Lecture 15 SECTION -C Getting Started with UNIX Introduction Changing permission modes Absolute & Relative Permissions Changing file permissions : chmod A file or directory is created with a default set

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

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

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

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

Commands are in black

Commands are in black Starting From the Shell Prompt (Terminal) Commands are in black / +--------+---------+-------+---------+---------+------ +------ +------ +------ +------ +------ +-- Bin boot dev etc home media sbin bin

More information

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

Overview LEARN. History of Linux Linux Architecture Linux File System Linux Access Linux Commands File Permission Editors Conclusion and Questions Lanka Education and Research Network Linux Architecture, Linux File System, Linux Basic Commands 28 th November 2016 Dilum Samarasinhe () Overview History of Linux Linux Architecture Linux File System

More information

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

Introduction to Linux. Woo-Yeong Jeong Computer Systems Laboratory Sungkyunkwan University Introduction to Linux Woo-Yeong Jeong (wooyeong@csl.skku.edu) Computer Systems Laboratory Sungkyunkwan University http://csl.skku.edu What is Linux? A Unix-like operating system of a computer What is an

More information

CS Unix Tools. Lecture 2 Fall Hussam Abu-Libdeh based on slides by David Slater. September 10, 2010

CS Unix Tools. Lecture 2 Fall Hussam Abu-Libdeh based on slides by David Slater. September 10, 2010 Lecture 2 Fall 2010 Hussam Abu-Libdeh based on slides by David Slater September 10, 2010 Last Time We had a brief discussion On The Origin of Species *nix systems Today We roll our sleeves and get our

More information

Unix Workshop Aug 2014

Unix Workshop Aug 2014 Unix Workshop 2014 5 Aug 2014 What is Unix Multitasking, multiuser operating system Often the OS of choice for large servers, large clusters Unix Around You You re probably familiar with these: Linux Solaris

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

Operating Systems. Copyleft 2005, Binnur Kurt

Operating Systems. Copyleft 2005, Binnur Kurt 3 Operating Systems Copyleft 2005, Binnur Kurt Content The concept of an operating system. The internal architecture of an operating system. The architecture of the Linux operating system in more detail.

More information

CENG 334 Computer Networks. Laboratory I Linux Tutorial

CENG 334 Computer Networks. Laboratory I Linux Tutorial CENG 334 Computer Networks Laboratory I Linux Tutorial Contents 1. Logging In and Starting Session 2. Using Commands 1. Basic Commands 2. Working With Files and Directories 3. Permission Bits 3. Introduction

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

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

CSE 303 Lecture 4. users/groups; permissions; intro to shell scripting. read Linux Pocket Guide pp , 25-27, 61-65, , 176 CSE 303 Lecture 4 users/groups; permissions; intro to shell scripting read Linux Pocket Guide pp. 19-20, 25-27, 61-65, 118-119, 176 slides created by Marty Stepp http://www.cs.washington.edu/303/ 1 Lecture

More information

CISC 220 fall 2011, set 1: Linux basics

CISC 220 fall 2011, set 1: Linux basics CISC 220: System-Level Programming instructor: Margaret Lamb e-mail: malamb@cs.queensu.ca office: Goodwin 554 office phone: 533-6059 (internal extension 36059) office hours: Tues/Wed/Thurs 2-3 (this week

More information

Introduction to Linux

Introduction to Linux Introduction to Linux Prof. Jin-Soo Kim( jinsookim@skku.edu) TA - Dong-Yun Lee (dylee@csl.skku.edu) Computer Systems Laboratory Sungkyunkwan University http://csl.skku.edu What is Linux? A Unix-like operating

More information

CSE 390a Lecture 2. Exploring Shell Commands, Streams, Redirection, and Processes

CSE 390a Lecture 2. Exploring Shell Commands, Streams, Redirection, and Processes CSE 390a Lecture 2 Exploring Shell Commands, Streams, Redirection, and Processes slides created by Marty Stepp, modified by Jessica Miller & Ruth Anderson http://www.cs.washington.edu/390a/ 1 2 Lecture

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

CS197U: A Hands on Introduction to Unix

CS197U: A Hands on Introduction to Unix CS197U: A Hands on Introduction to Unix Lecture 3: UNIX Operating System Organization Tian Guo CICS, Umass Amherst 1 Reminders Assignment 2 is due THURSDAY 09/24 at 3:45 pm Directions are on the website

More information

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

Introduction to UNIX. Logging in. Basic System Architecture 10/7/10. most systems have graphical login on Linux machines Introduction to UNIX Logging in Basic system architecture Getting help Intro to shell (tcsh) Basic UNIX File Maintenance Intro to emacs I/O Redirection Shell scripts Logging in most systems have graphical

More information

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

*nix Crash Course. Presented by: Virginia Tech Linux / Unix Users Group VTLUUG *nix Crash Course Presented by: Virginia Tech Linux / Unix Users Group VTLUUG Ubuntu LiveCD No information on your hard-drive will be modified. Gives you a working Linux system without having to install

More information

CS4350 Unix Programming. Outline

CS4350 Unix Programming. Outline Outline Unix Management Files and file systems Structure of Unix Commands Command help (man) Log on (terminal vs. graphical) System information (utility) File and directory structure (path) Permission

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

Practical Session 0 Introduction to Linux

Practical Session 0 Introduction to Linux School of Computer Science and Software Engineering Clayton Campus, Monash University CSE2303 and CSE2304 Semester I, 2001 Practical Session 0 Introduction to Linux Novell accounts. Every Monash student

More information

Linux Training. for New Users of Cluster. Georgia Advanced Computing Resource Center University of Georgia Suchitra Pakala

Linux Training. for New Users of Cluster. Georgia Advanced Computing Resource Center University of Georgia Suchitra Pakala Linux Training for New Users of Cluster Georgia Advanced Computing Resource Center University of Georgia Suchitra Pakala pakala@uga.edu 1 Overview GACRC Linux Operating System Shell, Filesystem, and Common

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

LAB 8 (Aug 4/5) Unix Utilities

LAB 8 (Aug 4/5) Unix Utilities Aug 4/5 Due: Aug 11 in class Name: CSE number: LAB 8 (Aug 4/5) Unix Utilities The purpose of this lab exercise is for you to get some hands-on experience on using some fundamental Unix utilities (commands).

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

Open up a terminal, make sure you are in your home directory, and run the command.

Open up a terminal, make sure you are in your home directory, and run the command. More Linux Commands 0.1 wc The Linux command for acquiring size statistics on a file is wc. This command can provide information from line count, to bytes in a file. Open up a terminal, make sure you are

More information

CS 3410 Intro to Unix, shell commands, etc... (slides from Hussam Abu-Libdeh and David Slater)

CS 3410 Intro to Unix, shell commands, etc... (slides from Hussam Abu-Libdeh and David Slater) CS 3410 Intro to Unix, shell commands, etc... (slides from Hussam Abu-Libdeh and David Slater) 28 January 2013 Jason Yosinski Original slides available under Creative Commons Attribution-ShareAlike 3.0

More information

1. What statistic did the wc -l command show? (do man wc to get the answer) A. The number of bytes B. The number of lines C. The number of words

1. What statistic did the wc -l command show? (do man wc to get the answer) A. The number of bytes B. The number of lines C. The number of words More Linux Commands 1 wc The Linux command for acquiring size statistics on a file is wc. This command provides the line count, word count and number of bytes in a file. Open up a terminal, make sure you

More information

Introduction to UNIX. Introduction EECS l UNIX is an operating system (OS). l Our goals:

Introduction to UNIX. Introduction EECS l UNIX is an operating system (OS). l Our goals: Introduction to UNIX EECS 2031 13 November 2017 Introduction l UNIX is an operating system (OS). l Our goals: Learn how to use UNIX OS. Use UNIX tools for developing programs/ software, specifically shell

More information

Set 1 MCQ Which command is used to sort the lines of data in a file in reverse order A) sort B) sh C) st D) sort -r

Set 1 MCQ Which command is used to sort the lines of data in a file in reverse order A) sort B) sh C) st D) sort -r 1. Which symbol will be used with grep command to match the pattern pat at the beginning of a line? A) ^pat B) $pat C) pat$ D) pat^ 2. Which command is used to sort the lines of data in a file in reverse

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

Computer Systems and Architecture

Computer Systems and Architecture Computer Systems and Architecture Stephen Pauwels Computer Systems Academic Year 2018-2019 Overview of the Semester UNIX Introductie Regular Expressions Scripting Data Representation Integers, Fixed point,

More information

: the User (owner) for this file (your cruzid, when you do it) Position: directory flag. read Group.

: the User (owner) for this file (your cruzid, when you do it) Position: directory flag. read Group. CMPS 12L Introduction to Programming Lab Assignment 2 We have three goals in this assignment: to learn about file permissions in Unix, to get a basic introduction to the Andrew File System and it s directory

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

Introduction to UNIX. Introduction. Processes. ps command. The File System. Directory Structure. UNIX is an operating system (OS).

Introduction to UNIX. Introduction. Processes. ps command. The File System. Directory Structure. UNIX is an operating system (OS). Introduction Introduction to UNIX CSE 2031 Fall 2012 UNIX is an operating system (OS). Our goals: Learn how to use UNIX OS. Use UNIX tools for developing programs/ software, specifically shell programming.

More information

Introduction to UNIX. CSE 2031 Fall November 5, 2012

Introduction to UNIX. CSE 2031 Fall November 5, 2012 Introduction to UNIX CSE 2031 Fall 2012 November 5, 2012 Introduction UNIX is an operating system (OS). Our goals: Learn how to use UNIX OS. Use UNIX tools for developing programs/ software, specifically

More information

CSE 390a Lecture 2. Exploring Shell Commands, Streams, and Redirection

CSE 390a Lecture 2. Exploring Shell Commands, Streams, and Redirection 1 CSE 390a Lecture 2 Exploring Shell Commands, Streams, and Redirection slides created by Marty Stepp, modified by Jessica Miller & Ruth Anderson http://www.cs.washington.edu/390a/ 2 Lecture summary Unix

More information

Lec 1 add-on: Linux Intro

Lec 1 add-on: Linux Intro Lec 1 add-on: Linux Intro Readings: - Unix Power Tools, Powers et al., O Reilly - Linux in a Nutshell, Siever et al., O Reilly Summary: - Linux File System - Users and Groups - Shell - Text Editors - Misc

More information

Introduction to Linux. Roman Cheplyaka

Introduction to Linux. Roman Cheplyaka Introduction to Linux Roman Cheplyaka Generic commands, files, directories What am I running? ngsuser@ubuntu:~$ cat /etc/lsb-release DISTRIB_ID=Ubuntu DISTRIB_RELEASE=16.04 DISTRIB_CODENAME=xenial DISTRIB_DESCRIPTION="Ubuntu

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

Quick Start Guide. by Burak Himmetoglu. Supercomputing Consultant. Enterprise Technology Services & Center for Scientific Computing

Quick Start Guide. by Burak Himmetoglu. Supercomputing Consultant. Enterprise Technology Services & Center for Scientific Computing Quick Start Guide by Burak Himmetoglu Supercomputing Consultant Enterprise Technology Services & Center for Scientific Computing E-mail: bhimmetoglu@ucsb.edu Linux/Unix basic commands Basic command structure:

More information

Introduction to UNIX command-line

Introduction to UNIX command-line Introduction to UNIX command-line Boyce Thompson Institute March 17, 2015 Lukas Mueller & Noe Fernandez Class Content Terminal file system navigation Wildcards, shortcuts and special characters File permissions

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

Essential Linux Shell Commands

Essential Linux Shell Commands Essential Linux Shell Commands Special Characters Quoting and Escaping Change Directory Show Current Directory List Directory Contents Working with Files Working with Directories Special Characters There

More information

UNIX Quick Reference

UNIX Quick Reference UNIX Quick Reference Charles Duan FAS Computer Services August 26, 2002 1 Command Reference Many of these commands have many more options than the ones displayed here. Most also take the option h or help,

More information

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

Contents. Note: pay attention to where you are. Note: Plaintext version. Note: pay attention to where you are... 1 Note: Plaintext version... Contents Note: pay attention to where you are........................................... 1 Note: Plaintext version................................................... 1 Hello World of the Bash shell 2 Accessing

More information

Multiple Choice - 58 Questions - 10 of 15%

Multiple Choice - 58 Questions - 10 of 15% CST 8129 Ian Allen Fall 2005-1- 110 minutes Evaluation: Part I - 58 M/C Questions Name: Important Instructions 1. Read all the instructions and both sides (back and front) of all pages. 2. Manage your

More information

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

Introduction to Unix The Windows User perspective. Wes Frisby Kyle Horne Todd Johansen Introduction to Unix The Windows User perspective Wes Frisby Kyle Horne Todd Johansen What is Unix? Portable, multi-tasking, and multi-user operating system Software development environment Hardware independent

More information

Unix basics exercise MBV-INFX410

Unix basics exercise MBV-INFX410 Unix basics exercise MBV-INFX410 In order to start this exercise, you need to be logged in on a UNIX computer with a terminal window open on your computer. It is best if you are logged in on freebee.abel.uio.no.

More information

M.C.A. (Sem.-lll) (CBCS) Examination November CCA-3003 Operating System and LinuxlUnix programming

M.C.A. (Sem.-lll) (CBCS) Examination November CCA-3003 Operating System and LinuxlUnix programming IIMII 003-007303 M.C.A. (Sem.-lll) (CBCS) Examination November-20 13 CCA-3003 Operating System and LinuxlUnix programming Faculty Code: 003 Subject Code: 007303 Time: 2'/' Hoursl ITotal Marks: 70 I. Attempt

More information

LOG ON TO LINUX AND LOG OFF

LOG ON TO LINUX AND LOG OFF EXPNO:1A LOG ON TO LINUX AND LOG OFF AIM: To know how to logon to Linux and logoff. PROCEDURE: Logon: To logon to the Linux system, we have to enter the correct username and password details, when asked,

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

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

3/8/2017. Unix/Linux Introduction. In this part, we introduce. What does an OS do? Examples EECS2301 Title Unix/Linux Introduction These slides are based on slides by Prof. Wolfgang Stuerzlinger at York University Warning: These notes are not complete, it is a Skelton that will be modified/add-to

More information

Computer Systems and Architecture

Computer Systems and Architecture Computer Systems and Architecture Introduction to UNIX Stephen Pauwels University of Antwerp October 2, 2015 Outline What is Unix? Getting started Streams Exercises UNIX Operating system Servers, desktops,

More information