Outline. Structure of a UNIX command

Size: px
Start display at page:

Download "Outline. Structure of a UNIX command"

Transcription

1 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 management (link) Disk, process and memory System and user files vi commands Structure of a UNIX command $ command [ [ - ] option (s) ] [ option argument (s) ] [ command argument (s) ] Examples: $ ls $ ls -la $ ls -la m* Fall 2013 CS4350 Husain Gholoom Page 1

2 Utility Commands Help on UNIX o Examining System Setups whoami uname -a who hostname o Command Alias alias alias name=string Commands Obtaining Help with the man Command man [options][-s section] command-list Example : $ man printf NAME printf -- formatted output SYNOPSIS printf format [arguments...] Fall 2013 CS4350 Husain Gholoom Page 2

3 DESCRIPTION The printf utility formats and prints its arguments, after the first, under control of the format. The format is a character string which contains three types of objects: plain characters, which are simply copied to standard output, character escape sequences which are converted and copied to the standard output, and format specifications, each of which causes printing of the next successive argument. The arguments after the first are treated as strings if the corresponding format is either c, b or s; otherwise it is evaluated as a C constant, with the following extensions: A leading plus or minus sign is allowed. If the leading character is a single or double quote, the value is the ASCII code of the next character. The format string is reused as often as necessary to satisfy the arguments. Any extra format specifications are evaluated with zero or the null string. If the leading character is a single or double quote, the value is the ASCII code of the next character. Character escape sequences are in backslash notation as defined in the ANSI X (``ANSI C89''), with extensions. The characters and their meanings are as follows: \a Write a <bell> character. \b Write a <backspace> character. \c Ignore remaining characters in this string. \f Write a <form-feed> character. \n Write a <new-line> character. \r Write a <carriage return> character. \t Write a <tab> character. \v Write a <vertical tab> character. \' Write a <single quote> character.. Fall 2013 CS4350 Husain Gholoom Page 3

4 More Help on UNIX Commands whatis, which, whereis, info Google $ whatis login setenv login(1) -sign on setenv (1) -change or add an environment variable $ which mkdir /usr/bin/mkdir $ whereis mkdir mkdir: /usr/bin/mkdir $ info File: dir Node: Top This is the top of the INFO tree This (the Directory node) gives a menu of major topics. Typing "q" exits, "?" lists all Info commands, "d" returns here, "h" gives a primer for first-timers, "memacs<return>" visits the Emacs topic, etc.. Logging On and Logging Off Text mode Local: UNIX terminal Remote: SSH Fall 2013 CS4350 Husain Gholoom Page 4

5 Connecting via UNIX Terminal login: your_username <Enter> password: your_password <Enter> Welcome messages. You have new mail. [yourname ~]$type_command_here Connecting via SSH Fall 2013 CS4350 Husain Gholoom Page 5

6 Fall 2013 CS4350 Husain Gholoom Page 6

7 Where's UNIX Linux Red Hat, SUSE, Debian, etc Windows Cygwin ( Solaris, AIX, HP UX Sun, IBM, HP Mac OS X FreeBSD Fall 2013 CS4350 Husain Gholoom Page 7

8 Files and File Systems Unix uses a tree structure Starts at / Directory Structure Fall 2013 CS4350 Husain Gholoom Page 8

9 Files and File Systems Big, always-on data structure N-ary tree instead of binary tree Unix directories contain: One parent N children (sub-directories) Files and links Navigating Unix So you log in Where am I in the tree? pwd Present Working Directory How do I go up and down the tree? cd Change Directory cd.. Up one directory cd ~ Your home directory cd ~<user> Home directory of <user> cd <path> Go to <path> Paths /home/user3/dir1 Fall 2013 CS4350 Husain Gholoom Page 9

10 Absolute Paths cd /home/user3/dir1 Relative Paths cd../home/user3 Fall 2013 CS4350 Husain Gholoom Page 10

11 Navigating Unix What files are here? ls Lists the names of files in your default directory, in alphabetical order. ls a ls l List ALL files. Including those files that begin with a period (i.e., hidden files). List files AND details. In addition to the file name, the long listing shows protection information, file owner, number of characters in file, and the date and time of the last change to the file. Generally, - enables switches You can combine switches ls la List ALL files AND details Permissions drwxr--r-- directory -rwxr--r-- file -rwxr--r-- link ( hard ) drwxr--r-- rwx - read - write - execute 1st three - Owner (usually creator) 2nd three - Group (your friends) 3rd three Everyone Fall 2013 CS4350 Husain Gholoom Page 11

12 Examples Files -rw Only owner can read and write -rwxrwxrwx Everyone can read, write and execute -rw-r--r-- Everyone can read, only owner can write Examples Directories drwx Only owner can view, cd into, and delete drwxrwx--- Owner and group can view, write, etc. drwxr-xr-x Everyone can cd into but only owner can modify chmod Change Mode Change mode for who? ugoa user, group, others, or all Grant or deny access? + grant access - deny access Change which mode? rwx same as before Fall 2013 CS4350 Husain Gholoom Page 12

13 Examples : Add read access to "myfile" for group chmod g+r myfile Add write access to "myfile" for group chmod g+w myfile Deny read access for others chmod o-r myfile Add read and write access for user chmod u+rw myfile Give full group read/write access to directory "mydir" chmod g+rwx mydir Permissions Common mistake Directory without x enabled Program without x enabled File without r enabled File without w enabled Security Directory and files with rw enabled for others Fall 2013 CS4350 Husain Gholoom Page 13

14 File Create/Destroy The simple approach to create touch creates a file of size 0. For example touch newfile.txt Creates a file known as "newfile.txt", if the file does not already exist. If the file already exists the accessed and modification time is updated for the file newfile.txt To delete one or multiple files rm <file> deletes the file. You will be asked to confirm that you really want to delete the file. Type y or n as appropriate and press Return. rm file1.* delete all files that starts with with file1 such as file1.txt, file1.html etc To avoid to answer yes for every file: rm f <file> File Viewing Quick cat <file> Short for concatenate, it just displays the file to the screen. more <file> Like cat, this shows the entire contents of a file, but prompts you for more? between each page. Hit the space bar to go to the next page, or use the up and down arrows. Hit q to quit. less <file> This is another pager like more, i.e. it shows one page at a time. Fall 2013 CS4350 Husain Gholoom Page 14

15 Slow emacs vim File Copy and Move Copy source to destination cp <source> <destination> Move source to destination mv <source> <destination> rename a file To recursively copy or move cp/mv R <source> <destination> File Editing vim emacs gedit Kwrite small, hard to learn huge, hard to learn GUI, good Fall 2013 CS4350 Husain Gholoom Page 15

16 Directory Maintenance Creating, Deleting and Managing Directories mkdir, cd, pwd, rm, rmdir, mv, cp $ mkdir mydir $ cd mydir $ pwd Print Working Directory the pwd command displays the name of the current working directory. $ cp r mydir mydir2 $ mv r mydir mydir2 $ rm rf mydir $ rmdir mydir Link a Shortcut to a File Hard link : Creates a link to a file. ln <source> <linkname> Symbolic link ln s <source> <linkname> What will happen if the source is deleted? User and Group Change owner and group chown chown [ R] owner[:group] file. For Example chown Jeff file1 allows jeff to be the owner of the file file1 chgrp chgrp [ R] group file For Example chgrp -R staff proposals change the group ownership of the directory named proposals, and of all the files and subdirectories under it, to staff Fall 2013 CS4350 Husain Gholoom Page 16

17 Process and Signal Show process information ps : Show the Active Process ps A : Show all Processes Kill a process kill <pid> kill s <pid> : signal number like -9 Disk and Memory Disk space information Disk space usage of the system df [-k] Disk space usage of a file or a directory du [-k] <filename> Memory and process information top Important system directories /etc : Network file /bin : Commands and Utilities /dev : Device and their uses /lib : System libraries, Kernel Modules /sbin : Contains fundamental utilities, such as init, usually needed to start, maintain and recover the system. Fall 2013 CS4350 Husain Gholoom Page 17

18 /usr/share : This directory contains 'shareable', architecture-independent files (docs, icons, fonts etc) /usr/man /usr/bin /usr/sbin : It once held the man pages. It has been moved to /usr/share/man. : This directory stores all binary programs distributed with the operating system not residing in /bin, /sbin : Non-essential system binaries /usr/include : Stores the development headers used throughout the system Basic Administration Important user configuration files ( when you log on ( ID- Password ), or already logged on, or history of commands entered ).bash_profile.bashrc.bash_history Important system configuration files passwd : change system password. grub.conf : Allow the user to boot one of multiple operating systems installed on a computer Fall 2013 CS4350 Husain Gholoom Page 18

19 VI Editor Commands Starting vi To start using vi, at the Unix prompt type vi followed by a file name. If you wish to edit an existing file, type in its name; if you are creating a new file, type in the name you wish to give to the new file. $ vi filename Then hit Return. You will see a screen similar to the one below which shows blank lines with tildes and the name and status of the file. ~ ~ "myfile" [New file] vi's Modes and Moods vi has two modes: the command mode and the insert mode. It is essential that you know which mode you are in at any given point in time. When you are in command mode, letters of the keyboard will be interpreted as commands. When you are in insert mode the same letters of the keyboard will type or edit text. vi always starts out in command mode. When you wish to move between the two modes, keep these things in mind. You can type i to enter the insert mode. If you wish to leave insert mode and return to the command mode, hit the ESC key. If you're not sure where you are, hit ESC a couple of times and that should put you back in command mode. Entering Text To begin entering text in an empty file, you must first change from the command mode to the insert mode. To do this, type the letter i. When you start typing, anything you type will be entered into the file. Type a few short lines and hit Return at the end of each of line Fall 2013 CS4350 Husain Gholoom Page 19

20 Moving One Character at a Time Try using your direction keys to move up, down, left and right in your file. Sometimes, you may find that the direction keys don't work. If that is the case, to move the cursor one character at the time, you may use the h, j, k, and l keys. These keys move you in the following directions: h left one space l right one space j down one space k up one space If you move the cursor as far as you can in any direction, you may see a screen flash or hear a beep. Moving among Words and Lines While these four keys (or your direction keys) can move you just about anywhere you want to go in your file, there are some shortcut keys that you can use to move a little more quickly through a document. To move more quickly among words, you might use the following: w moves the cursor forward one word b moves the cursor backward one word (if in the middle of a word, b will move you to the beginning of the current word). e moves to the end of a word. ( move to beginning of current block ) move to the end of current block Screen Movement To move the cursor to a line within your current screen use the following keys: H moves the cursor to the top line of the screen. M moves the cursor to the middle line of the screen. L moves the cursor to the last line of the screen. To scroll through the file and see other screens use: ctrl-f scrolls down one screen ctrl-b scrolls up one screen ctrl-u scrolls up a half a screen ctrl-d scrolls down a half a screen Two other useful commands for moving quickly from one end to the other of a document are G to move to the end of the file and 1G to move to the beginning of the file. If you precede G with a number, you can move to a specific line in the document (e.g. 15G would move you to line 15). Fall 2013 CS4350 Husain Gholoom Page 20

21 Deleting (or Cutting) Characters, Words, and Lines To delete a character, first place your cursor on that character. Then, you may use any of the following commands: x X dw dd D deletes the character under the cursor. deletes the character to the left of your cursor. deletes from the character selected to the end of the word. deletes all the current line. deletes from the current character to the end of the line. Entering the Insert Mode: i I a A o/o ESC Begin inserting text at current cursor location Begin inserting text at the beginning of the current line Begin appending text, one character to the right of current cursor location Begin appending text at the end of the current line Begin entering text one line below\above current line Exit insertion mode and return to command mode Exiting and Entering VI ZZ save file and exit VI :wq same as above :e! return to last saved version of current file :q quit without save, (Note :q! is required if changes have been made) :w write without exit (:w! to force write) Fancy Stuff: :1,10w file :340,$w >> file :sh ^d :![command] write lines 1 through 10 to file newfile write lines 340 through the end of the file and append to file newfile escape temporarily to a shell return from shell to VI execute UNIX command without leaving VI Fall 2013 CS4350 Husain Gholoom Page 21

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

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

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

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

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

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 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

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

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

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

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

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

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

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

THE HONG KONG POLYTECHNIC UNIVERSITY Department of Electronic and Information Engineering

THE HONG KONG POLYTECHNIC UNIVERSITY Department of Electronic and Information Engineering THE HONG KONG POLYTECHNIC UNIVERSITY Department of Electronic and Information Engineering ENG224 Information Technology Part I: Computers and the Internet Laboratory 2 Linux Shell Commands and vi Editor

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

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

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

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

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

Introduction to Linux

Introduction to Linux Introduction to Linux Phil Mercurio The Scripps Research Institute mercurio@scripps.edu 1 Session Overview What is Linux Shells & Windows The Linux File System Assorted Commands 2 What Is Linux? Linux

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

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

Connecting to ICS Server, Shell, Vim CS238P Operating Systems fall 18

Connecting to ICS Server, Shell, Vim CS238P Operating Systems fall 18 Connecting to ICS Server, Shell, Vim CS238P Operating Systems fall 18 By Aftab Hussain (Adapted from Claudio A. Parra s Slides for Fall 18 CS-143A) October 5 2018 University of California, Irvine Andromeda

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

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

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

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

History. Terminology. Opening a Terminal. Introduction to the Unix command line GNOME Introduction to the Unix command line History Many contemporary computer operating systems, like Microsoft Windows and Mac OS X, offer primarily (but not exclusively) graphical user interfaces. The user

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

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

This lab exercise is to be submitted at the end of the lab session! passwd [That is the command to change your current password to a new one]

This lab exercise is to be submitted at the end of the lab session! passwd [That is the command to change your current password to a new one] Data and Computer Security (CMPD414) Lab II Topics: secure login, moving into HOME-directory, navigation on Unix, basic commands for vi, Message Digest This lab exercise is to be submitted at the end of

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

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

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

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

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

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

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

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

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

A Brief Introduction to Unix

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

More information

Linux/Cygwin Practice Computer Architecture

Linux/Cygwin Practice Computer Architecture Linux/Cygwin Practice 2010 Computer Architecture Linux Login Use ssh client applications to connect (Port : 22) SSH Clients zterm ( http://www.brainz.co.kr/products/products4_2.php ) Putty ( http://kldp.net/frs/download.php/3411/hangulputty-0.58.h2.exe

More information

Introduction To Linux

Introduction To Linux Introduction To Linux Using The Command Line David To Biomedical Research Centre for Mental Health 2nd December 2010 1 What Is Linux? UNIX-like operating system using the Linux Kernel: http://kernel.org/

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

Getting Started with UNIX

Getting Started with UNIX Getting Started with UNIX What is UNIX? Boston University Information Services & Technology Course Number: 4000 Course Instructor: Kenny Burns Operating System Interface between a user and the computer

More information

Exploring UNIX: Session 3

Exploring UNIX: Session 3 Exploring UNIX: Session 3 UNIX file system permissions UNIX is a multi user operating system. This means several users can be logged in simultaneously. For obvious reasons UNIX makes sure users cannot

More information

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

Linux at the Command Line Don Johnson of BU IS&T Linux at the Command Line Don Johnson of BU IS&T We ll start with a sign in sheet. We ll end with a class evaluation. We ll cover as much as we can in the time allowed; if we don t cover everything, you

More information

Std: XI CHAPTER-3 LINUX

Std: XI CHAPTER-3 LINUX 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

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

Unix Tutorial. Beginner. CS Help Desk: Marc Jarvis (in spirit), Monica Ung, Corey Antoniuk 2015

Unix Tutorial. Beginner. CS Help Desk: Marc Jarvis (in spirit), Monica Ung, Corey Antoniuk 2015 Unix Tutorial Beginner CS Help Desk: Marc Jarvis (in spirit), Monica Ung, Corey Antoniuk 2015 Helpful info SOCS wiki cs.mcgill.ca/docs Help desk - McConnell 209N help@cs.mcgill.ca CSUS help desk - 3rd

More information

Using LINUX a BCMB/CHEM 8190 Tutorial Updated (1/17/12)

Using LINUX a BCMB/CHEM 8190 Tutorial Updated (1/17/12) Using LINUX a BCMB/CHEM 8190 Tutorial Updated (1/17/12) Objective: Learn some basic aspects of the UNIX operating system and how to use it. What is UNIX? UNIX is the operating system used by most computers

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

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

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

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

Overview of the UNIX File System

Overview of the UNIX File System Overview of the UNIX File System Navigating and Viewing Directories Adapted from Practical Unix and Programming Hunter College Copyright 2006 Stewart Weiss The UNIX file system The most distinguishing

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

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

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

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

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

Embedded Linux Systems. Bin Li Assistant Professor Dept. of Electrical, Computer and Biomedical Engineering University of Rhode Island

Embedded Linux Systems. Bin Li Assistant Professor Dept. of Electrical, Computer and Biomedical Engineering University of Rhode Island Embedded Linux Systems Bin Li Assistant Professor Dept. of Electrical, Computer and Biomedical Engineering University of Rhode Island Generic Embedded Systems Structure User Sensors ADC microcontroller

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

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

Exercise Sheet 2. (Classifications of Operating Systems)

Exercise Sheet 2. (Classifications of Operating Systems) Exercise Sheet 2 Exercise 1 (Classifications of Operating Systems) 1. At any given moment, only a single program can be executed. What is the technical term for this operation mode? 2. What are half multi-user

More information

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

Operating Systems. Engr. Abdul-Rahman Mahmood MS, PMP, MCP, QMR(ISO9001:2000) alphapeeler.sf.net/pubkeys/pkey.htm Operating Systems Engr. Abdul-Rahman Mahmood MS, PMP, MCP, QMR(ISO9001:2000) armahmood786@yahoo.com alphasecure@gmail.com alphapeeler.sf.net/pubkeys/pkey.htm http://alphapeeler.sourceforge.net pk.linkedin.com/in/armahmood

More information

INSE Lab 1 Introduction to UNIX Fall 2017

INSE Lab 1 Introduction to UNIX Fall 2017 INSE 6130 - Lab 1 Introduction to UNIX Fall 2017 Updated by: Paria Shirani Overview In this lab session, students will learn the basics of UNIX /Linux commands. They will be able to perform the basic operations:

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

An Introduction to Unix

An Introduction to Unix An Introduction to Unix Sylvia Plöckinger March 3, 2011 Sylvia Plöckinger () An Introduction to Unix March 3, 2011 1 / 29 General Information Find this file on: http://homepage.univie.ac.at/nigel.mitchell/numprac/

More information

2) clear :- It clears the terminal screen. Syntax :- clear

2) clear :- It clears the terminal screen. Syntax :- clear 1) cal :- Displays a calendar Syntax:- cal [options] [ month ] [year] cal displays a simple calendar. If arguments are not specified, the current month is displayed. In addition to cal, the ncal command

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

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

Introduction to Linux (Part I) BUPT/QMUL 2018/03/14 Introduction to Linux (Part I) BUPT/QMUL 2018/03/14 Contents 1. Background on Linux 2. Starting / Finishing 3. Typing Linux Commands 4. Commands to Use Right Away 5. Linux help continued 2 Contents 6.

More information

Scripting. Shell Scripts, I/O Redirection, Ownership and Permission Concepts, and Binary Numbers

Scripting. Shell Scripts, I/O Redirection, Ownership and Permission Concepts, and Binary Numbers Scripting Shell Scripts, I/O Redirection, Ownership and Permission Concepts, and Binary Numbers Adapted from Practical Unix and Programming Hunter College Copyright 2006 2009 Stewart Weiss What a shell

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

A Big Step. Shell Scripts, I/O Redirection, Ownership and Permission Concepts, and Binary Numbers

A Big Step. Shell Scripts, I/O Redirection, Ownership and Permission Concepts, and Binary Numbers A Big Step Shell Scripts, I/O Redirection, Ownership and Permission Concepts, and Binary Numbers Copyright 2006 2009 Stewart Weiss What a shell really does Here is the scoop on shells. A shell is a program

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

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 July 2013 CS 135 Lab Manual Content Page Introduction 3 CS Computer Accounts. 3 TBE B361 Computer Basics. 3 Choosing an

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

Lezione 8. Shell command language Introduction. Sommario. Bioinformatica. Mauro Ceccanti e Alberto Paoluzzi

Lezione 8. Shell command language Introduction. Sommario. Bioinformatica. Mauro Ceccanti e Alberto Paoluzzi Lezione 8 Bioinformatica Mauro Ceccanti e Alberto Paoluzzi Dip. Informatica e Automazione Università Roma Tre Dip. Medicina Clinica Università La Sapienza Sommario Shell command language Introduction A

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

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

Table of contents. Our goal. Notes. Notes. Notes. Summer June 29, Our goal is to see how we can use Unix as a tool for developing programs Summer 2010 Department of Computer Science and Engineering York University Toronto June 29, 2010 1 / 36 Table of contents 1 2 3 4 2 / 36 Our goal Our goal is to see how we can use Unix as a tool for developing

More information

Unix Tutorial Haverford Astronomy 2014/2015

Unix Tutorial Haverford Astronomy 2014/2015 Unix Tutorial Haverford Astronomy 2014/2015 Overview of Haverford astronomy computing resources This tutorial is intended for use on computers running the Linux operating system, including those in the

More information

Introduction to the basics of UNIX

Introduction to the basics of UNIX Introduction to the basics of UNIX Joachim Hein Centre for Mathematical Sciences Lund University Outline 1 Operating system UNIX 2 Interacting with UNIX Manipulating files and directories Editing files:

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

CST8207: GNU/Linux Operating Systems I Lab Six Linux File System Permissions. Linux File System Permissions (modes) - Part 1

CST8207: GNU/Linux Operating Systems I Lab Six Linux File System Permissions. Linux File System Permissions (modes) - Part 1 Student Name: Lab Section: Linux File System Permissions (modes) - Part 1 Due Date - Upload to Blackboard by 8:30am Monday March 12, 2012 Submit the completed lab to Blackboard following the Rules for

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

Short Read Sequencing Analysis Workshop

Short Read Sequencing Analysis Workshop Short Read Sequencing Analysis Workshop Day 2 Learning the Linux Compute Environment In-class Slides Matt Hynes-Grace Manager of IT Operations, BioFrontiers Institute Review of Day 2 Videos Video 1 Introduction

More information

Introduction to Linux

Introduction to Linux Introduction to Linux Prof. Jin-Soo Kim( jinsookim@skku.edu) TA Sanghoon Han(sanghoon.han@csl.skku.edu) Computer Systems Laboratory Sungkyunkwan University http://csl.skku.edu Announcement (1) Please come

More information

(a) About Unix. History

(a) About Unix. History Part 1: The Unix Operating System (a) About Unix History First roots in the Bell Laboratories, early 60s Kernel rewrite in C by Ritchie / Thompson in the early 70s Source code licenses for Universities

More information

h/w m/c Kernel shell Application s/w user

h/w m/c Kernel shell Application s/w user Structure of Unix h/w m/c Kernel shell Application s/w. user While working with unix, several layers of interaction occur b/w the computer h/w & the user. 1. Kernel : It is the first layer which runs on

More information

Overview of the UNIX File System. Navigating and Viewing Directories

Overview of the UNIX File System. Navigating and Viewing Directories Overview of the UNIX File System Navigating and Viewing Directories Copyright 2006 Stewart Weiss The UNIX file system The most distinguishing characteristic of the UNIX file system is the nature of its

More information

Session 1: Accessing MUGrid and Command Line Basics

Session 1: Accessing MUGrid and Command Line Basics Session 1: Accessing MUGrid and Command Line Basics Craig A. Struble, Ph.D. July 14, 2010 1 Introduction The Marquette University Grid (MUGrid) is a collection of dedicated and opportunistic resources

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

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

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

FREEENGINEER.ORG. 1 of 6 11/5/15 8:31 PM. Learn UNIX in 10 minutes. Version 1.3. Preface

FREEENGINEER.ORG. 1 of 6 11/5/15 8:31 PM. Learn UNIX in 10 minutes. Version 1.3. Preface FREEENGINEER.ORG Learn UNIX in 10 minutes. Version 1.3 Preface This is something that I had given out to students (CAD user training) in years past. The purpose was to have on one page the basics commands

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

Linux Kung-Fu. James Droste UBNetDef Fall 2016

Linux Kung-Fu. James Droste UBNetDef Fall 2016 Linux Kung-Fu James Droste UBNetDef Fall 2016 $ init 1 GO TO https://apps.ubnetdef.org GO TO https://apps.ubnetdef.org GO TO https://apps.ubnetdef.org GO TO https://apps.ubnetdef.org GO TO https://apps.ubnetdef.org

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

CS/CIS 249 SP18 - Intro to Information Security

CS/CIS 249 SP18 - Intro to Information Security Lab assignment CS/CIS 249 SP18 - Intro to Information Security Lab #2 - UNIX/Linux Access Controls, version 1.2 A typed document is required for this assignment. You must type the questions and your responses

More information