Basic Survival UNIX.

Size: px
Start display at page:

Download "Basic Survival UNIX."

Transcription

1 Basic Survival UNIX Many Unix based operating systems make available a Graphical User Interface for the sake of providing an easy way for less experienced users to work with the system. Some examples are Mac OS X, Gnome and KDE for Linux, and CDE for Solaris. (There are many other window managers available for Linux and Solaris.) However, the real power and flexibility of Unix comes from the command shell and the many programs that operate from it. This document describes the Unix file system and a set of useful commands that will get you started with Unix. Finding out about Unix commands For more information about Unix commands, see section 1 of the Unix man pages. ( Man is short for manual. ) There are two ways to view this information. The sure-fire way, accessible under any circumstances where you have access to a Unix command prompt, is to type man command-name at the prompt, where command-name is the name of the command you are interested in. A good starting point in your education on Unix commands is typing man man to find out how the man command works. If you just have a general idea of the job you want to do, type apropos keyword at the prompt. This will give you a list of command names relevant to the keyword and the section of the manual where they are described. (Admittedly, this list is often quite long.) You can also see a general discussion of user commands, along with a brief synopsis of all the available commands, by typing man -s 1 Intro at the prompt. (The capital I is significant here.) There is a web interface to the Unix man pages available locally, which includes a search function that is a bit more useful than apropos. You can access this version of the man pages at URL As before, section 1 of the manual contains the information about application programs and user utilities. UNIX Files UNIX uses the familiar tree-like organization for its file system. There is a directory called / at the base of the tree, known as the root directory. It contains a number of special files. A directory is considered a file. In the root directory, /, one finds the special directories bin, etc, dev, and usr. Their full path names are /bin, /etc, /dev, and /usr respectively. /bin contains many of the files that are executed when a command is typed. /etc contains a number of database or table files for use by the system. /dev contains the device independent interface files used for I/O. /usr contains the portion of the tree that has the directories of utilities and library files. In the directory /usr one finds the directory lib whose full path name is /usr/lib. Basic Survival UNIX 1

2 Suppose a user with login id csu2t has a home directory /home/mcs-stu/csu2t. Logging in to a Unix system will result in this home directory being the current working directory, which is the starting place for commands that work with files or directories. If the user csu2t then creates a file unix.doc, the file s full name will be /home/ MCS-Stu/csu2t/unix.doc. The next section will discuss a number of commands that allow you to create new directories and navigate among directories that belong to you. At the, Mathematics and Computer Science student users home directories will be found in a directory with a name like /home/mcs-stu2. The system administrator is responsible for determining the location of home directories. UNIX has file names that are case sensitive: data and DATA and Data are different names. File names can be arbitrarily long and include letters, digits, and characters like underscore, hyphen, period. More recent versions of the Unix file system have allowed spaces in file names, but note that there are some circumstances where this poses difficulties for some commands that operate on lists of file names. It is safest to substitute an underscore or dash where you would normally put a space in a Unix file name. Please note that when a user transfers UNIX files to MSDOS diskettes, long filenames can be truncated. So this_is_a_long.name will become this~1.nam (or something similar.) In the Unix file system, every directory contains two special files with unusual names:. and.. (often pronounced dot and dot dot ). The file. is an alias for the current directory, so referring to./foo.txt is the same thing as referring to foo.txt. The file.. is an alias for the parent of the current directory, and can be used to refer to files in directories above the current one in the tree structure. So,../foo.txt refers to a file one level above the current directory. UNIX Commands All computer systems allow the user to name, print, and view files. In multi-user systems like UNIX, files are assigned permissions. The owner typically has all permissions by default, but other users may be allows to read the file or execute it. One of the commands described below is used to alter permissions on files you own. The commands below can be given in a terminal window in the graphical user interface or used when the user connects to the system remotely using ssh or telnet and needs to perform basic tasks. When connecting remotely to one of the computers, no graphical interface is provided. Many commands take some number of flags that alter their behavior in various ways. These flags are usually preceded by a - and appear after the command name. You will often see commands referred to with a few characters in parentheses after the command name. This indicates the section of the Unix manual where the man page for the command or file in question will be found. Many files operate on a file or list of files. In these cases, you can save a lot of typing by taking advantage of file name completion. Type the first few characters of the filename (enough to distinguish the file you want from similarly named files) then type the Esc key twice. The shell will fill in the rest of the filename (or as much of the name as it can unambiguously figure out) for you. Other shells, such as the bash shell commonly found on Basic Survival UNIX 2

3 Linux systems, use different key combinations, mainly using the tab key to request completion. If a command (or a program you have written) is taking longer than you think it should, you can terminate the program s execution by typing control-c. Some useful commands To view a text file named dumb.file one page at a time (Note - don t try this on a binary file!) more dumb.file To dump the complete contents of a file without pausing on each page cat dumb.file Cat is an abbreviation of concatenate, the idea being that this command concatenates the characters from the file onto the end of standard output. To print a text file named project1.java (Once again, be sure not to try this on a binary file!) genscript project1.java If you don t find genscript, try enscript instead. To print the file above but save paper by having two pages per sheet genscript -2r project1.java Rename the file dumb to the file old_dumb ( mv is an abbreviation for move ) mv dumb old_dumb Copy the file dumb to dumb.bak cp dumb dumb.bak Make a new subdirectory stuff mkdir stuff Change to the subdirectory stuff cd stuff Move up to the parent directory cd.. Move to your home directory cd Basic Survival UNIX 3

4 Print the path of the current working directory pwd As you attempt more complex programming tasks, you should get into the habit of creating a new directory for each project you work on. This way, all the files related to a project such as program specifications, makefiles (described elsewhere) or documentation are stored in the folder with the program source files they refer to. List the files and their permissions and sizes in the current directory ls -l (That is an ell, not a one. Without -l only the names of the files are listed.) Permissions and their meaning: A typical set of permissions for a non-executable file are -rw-r--r-- which means the file is an ordinary file (leftmost symbol is -), not a directory or special file. The next three symbols from the left (rw-) indicate that the owner can read (r), write (w), but not execute(-) the file. Only program files are executable! The next three characters and the rightmost three are both r--, indicating that others can read the file but not make any changes to it. To check the size of a file joe.gif ls -l joe.gif You will get something like -rw-r--r-- 1 kent other Dec joe.gif where the says the file takes up 21,093 bytes or about 21 kilobytes. (Note that this doesn t work for directories.) An alternative is to type du -a joe.gif which returns the number of disk blocks used. How much disk space a disk block takes up depends on the operating system. At this writing, our version of Solaris has a disk block size of 1024 bytes, so du reports the size in kilobytes. To check the space used by an entire directory and subdirectory, du -s directory_name This returns the number of disk block used, each of which is.5 kilobytes in size. To delete a file dumb rm dumb Basic Survival UNIX 4

5 To delete a file without a confirmation (be careful) /bin/rm dumb To delete all files in the current directory with confirmation rm * Be extremely careful using this command, otherwise, you can end up deleting many files that you didn t really mean to. To delete a directory stuff and all its files and subdirectories without confirmation (-r means recursive ) /bin/rm -r stuff This can also be extremely dangerous, so be sure that you really want to delete everything below the specified directory in your directory tree before issuing this command. Permissions: The following are examples of changing the permissions or access rights to your files and directories using the chmod command. By default, your top level directory is readable by all users, but any files and directories you create there are not accessible to anyone but you. You will need to use chmod if you ever want to allow other users access to your files. To make a directory public_html readable by others but not changeable chmod 755 public_html To make a file home.html readable and writable by the owner, but only readable by others chmod 644 home.html To make all files that end in.html readable, chmod 644 *.html To make a file local.html unreadable by anyone except the owner chmod 600 local.html Permissions are a bit tricky, but they are also important. There are symbolic ways of altering permissions with chmod that you may find a bit more intuitive than the octal bitflags we have demonstrated here. You can, of course, find the details on the chmod(1) man page. Find strings within files grep string [file-list] Basic Survival UNIX 5

6 The command name grep stands for something like grab regular expression. The purpose is to search the contents of a list of files for strings that match a pattern given by string and to print the line containing the string for each time the string is found. For example, imagine you have a large Java project and you want to know which of your classes makes use of the StringBuffer class. You would type grep StringBuffer *.java Remember that grep works only on files in the current directory, and it works only on plain text files. Also, if no file list is provided, grep processes input on standard input, so it can be used as part of a pipeline as described below. Find files with certain attributes As your directory structure grows, things can become lost. Suppose you are working on a new program that needs a hash table, and you know you ve written hash.java at some point, but you don t remember where the file is. The find command can help. The general syntax is find pathname expression where expression is composed of various operations and logical connectives. The format of these expressions is given on the man page for find(1). To get back to our example, in your home directory, type find. -name hash.java -print The. says to start looking in the current directory. Find operates recursively on subdirectories, so this will search your entire account if you are in your home directory when you start. The expression -name hash.java will be true when a file with the name hash.java is found, and -print says to print out the pathname of the file when found. The find command is very powerful and useful. Other attributes that you can search on include modification time, file size, file type, permissions, ownership, etc. You can also cause arbitrary commands to be executed when the expression is matched as well. The find(1) man page gives several examples of these capabilities. I/O Redirection and Pipelines One of the design strategies of the unix user commands is to isolate useful behaviors in commands that do one small job, and then provide ways to link the commands together to tackle more complex situations. To this end, all jobs run from the command line will take input from something called standard input and will produce output to something called standard output. In the case of one command run by itself from the command line, any required input will be expected from the keyboard and output will go to the terminal window where the command was run. The shell also provides ways to redirect the input and Basic Survival UNIX 6

7 output for commands to other sources or destinations. For example, suppose you had a directory containing over a thousand files, and you wanted to create a new file that had a list of all the existing files. The ls command, discussed earlier produces the list you want, and to get the list into a file, you can redirect standard output like so: ls > files.txt When this command completes, the output of the ls command will be in the newly created file called files.txt. (If you want to append the output of a program to an existing file, use >> instead of > for the redirection.) On the other hand, suppose you re writing an interactive program that has fairly complex user input. During testing, you will wind up typing in various input sequences over and over again to test various aspects of the program. This gets tedious, so it makes sense to put the input sequence for each test case into a file and then somehow get the program to take its input from these files rather than the keyboard. Suppose your program is called grumble and your first input data file is called test1.dat. Typing grumble < test1.dat does exactly what we described. Back to our first example. Suppose instead that you just wanted to look at the list of files, but with so many, they zip past on the screen before you can get a look at them. Here, our old friend the more command can help. Remember that more files.txt will display the contents of files.txt on the screen one page at a time. You hit the space bar to advance to the next page. In addition to accepting a filename as a command line argument as we have shown here, more is written to behave as a filter, reading from standard input and sending its output to standard output. In this case, we can substitute the output of one command for the input from the file as follows: ls more ( is the vertical bar character, usually found on the key with the \ character.) Now, instead of appearing directly on the screen, the output of the ls command is piped into the more command, and more does its job of showing one page at a time on this input stream rather than on the contents of the file. Output redirection can be used as a quick and dirty way to type some text into a file. To do this, type the command cat > quick.txt then just type whatever text you want in the file (you ll notice that you don t get the Unix prompt back after this command). When you re done, type control-d, and your text is in quck.txt. How does that work? Recall that most commands take input from the keyboard (standard input) if no filename argument is supplied on the command line. Further, recall that cat s job is to take its input and pump it to standard output, which in this case has been redirected to the file quick.txt. So, you re just putting whatever you type on the keyboard straight into the file. The control-d is how you type an end-of-file mark on the keyboard. Basic Survival UNIX 7

8 Command aliases You may find that you use certain combinations of command flags quite often, and would like a way of reducing the amount of typing you do in those cases. For example, using the ls -l version of the ls command to do the detailed listing of file information is very handy. If you type alias ll= ls -l then for the remainder of the session, the shell will check each command you type and substitute ls -l whenever it finds ll at the beginning of a command line. The rest of the line will be unaffected. While this is useful, you don t want to have to type in your aliases every time you start a new shell. Fortunately, you don t have to. The shell (in our case, ksh, otherwise know as the Korn shell) always executes the commands from a startup file before it gives you the first prompt. One of the things this startup file can do is set up aliases. Have a look at the file.kshrc in your home directory to see the set of aliases we have set up initially for you. You can add your own aliases to this file and have access to them in any shell session you start up. If you are used to some other command line environment, such as the Windows command prompt, you can use this facility to make yourself feel more at home. The alias command is not really a command, but instead is a shell built-in. The difference is that a command is really a separate program with its own executable, while shell bulletins are essentially functions that are built in to the shell program you are running. As an upshot of this, you won t find a man page for alias. Instead, you ll find the description of alias (and many other shell built-ins) in the ksh(1) man page. Summary of Commands alias cat cd chmod cp du find genscript grep ksh ls mkdir more mv (p. 8) create a command alias (p. 3) view the entire contents of a text file (p. 3) change directory - make another directory the working directory (p. 5) change mode - change the protection mode of a file or set of files (p. 3) copy - make a copy of a file (p. 4) disk usage - display the disk space used by a file or set of files (p. 6) find a file with specified characteristics (p. 3) print a text file (p. 5) get regular expression - find instances of a string in text files (p. 8) The Korn shell command processor (p. 4) display a list of the files in a directory (p. 3) create a new directory (p. 3) view a text file one page at a time (p. 3) move - rename a file Basic Survival UNIX 8

9 pwd (p. 4) print working directory - show the path of the current working directory rm (p. 4) remove - delete a file or set of files from the file system > (p. 7) redirect standard output to a file, replacing any existing file with the specified name >> (p. 7) redirect standard output to a file, appending to existing contents < (p. 7) redirect standard input from a file (p. 7) pipe the output from one command to the input of another Basic Survival UNIX 9

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

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

Introduction to Linux

Introduction to Linux Introduction to Linux The command-line interface A command-line interface (CLI) is a type of interface, that is, a way to interact with a computer. Window systems, punched cards or a bunch of dials, buttons

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

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

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

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

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

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

CSC209. Software Tools and Systems Programming. https://mcs.utm.utoronto.ca/~209

CSC209. Software Tools and Systems Programming. https://mcs.utm.utoronto.ca/~209 CSC209 Software Tools and Systems Programming https://mcs.utm.utoronto.ca/~209 What is this Course About? Software Tools Using them Building them Systems Programming Quirks of C The file system 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

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

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

When talking about how to launch commands and other things that is to be typed into the terminal, the following syntax is used:

When talking about how to launch commands and other things that is to be typed into the terminal, the following syntax is used: Linux Tutorial How to read the examples When talking about how to launch commands and other things that is to be typed into the terminal, the following syntax is used: $ application file.txt

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

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

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

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

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

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

Intro to Linux. this will open up a new terminal window for you is super convenient on the computers in the lab Basic Terminal Intro to Linux ssh short for s ecure sh ell usage: ssh [host]@[computer].[otheripstuff] for lab computers: ssh [CSID]@[comp].cs.utexas.edu can get a list of active computers from the UTCS

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

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

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

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

Oxford University Computing Services. Getting Started with Unix

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

More information

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

Using the Zoo Workstations

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

More information

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

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

Unix background. COMP9021, Session 2, Using the Terminal application, open an x-term window. You type your commands in an x-term window.

Unix background. COMP9021, Session 2, Using the Terminal application, open an x-term window. You type your commands in an x-term window. Unix background COMP9021, Session 2, 2016 1 Introduction Using the Terminal application, open an x-term window. You type your commands in an x-term window. Many commands take one or more arguments. Many

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. SSH Secure Shell Client 1

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

More information

Linux File System and Basic Commands

Linux File System and Basic Commands Linux File System and Basic Commands 0.1 Files, directories, and pwd The GNU/Linux operating system is much different from your typical Microsoft Windows PC, and probably looks different from Apple OS

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

Hitchhiker s Guide to VLSI Design with Cadence & Synopsys

Hitchhiker s Guide to VLSI Design with Cadence & Synopsys Hitchhiker s Guide to VLSI Design with Cadence & Synopsys David Money Harris 17 January 2009 The VLSI design tools at Harvey Mudd College are hosted on a Linux server named chips. This document introduces

More information

Scripting Languages Course 1. Diana Trandabăț

Scripting Languages Course 1. Diana Trandabăț Scripting Languages Course 1 Diana Trandabăț Master in Computational Linguistics - 1 st year 2017-2018 Today s lecture Introduction to scripting languages What is a script? What is a scripting language

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

CSC209. Software Tools and Systems Programming. https://mcs.utm.utoronto.ca/~209

CSC209. Software Tools and Systems Programming. https://mcs.utm.utoronto.ca/~209 CSC209 Software Tools and Systems Programming https://mcs.utm.utoronto.ca/~209 What is this Course About? Software Tools Using them Building them Systems Programming Quirks of C The file system System

More information

Unix/Linux Primer. Taras V. Pogorelov and Mike Hallock School of Chemical Sciences, University of Illinois

Unix/Linux Primer. Taras V. Pogorelov and Mike Hallock School of Chemical Sciences, University of Illinois Unix/Linux Primer Taras V. Pogorelov and Mike Hallock School of Chemical Sciences, University of Illinois August 25, 2017 This primer is designed to introduce basic UNIX/Linux concepts and commands. No

More information

Common UNIX Commands. Unix. User Interfaces. Unix Commands Winter COMP 1270 Computer Usage II 9-1. Using UNIX. Unix has a command line interface

Common UNIX Commands. Unix. User Interfaces. Unix Commands Winter COMP 1270 Computer Usage II 9-1. Using UNIX. Unix has a command line interface Common UNIX Commands Using UNIX Unix Unix has a command line interface Unix commands must be typed Similar to the DOS operating system for PC s Compare to the Graphical User Interface (GUI) used by Windows,

More information

The Directory Structure

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

More information

ENCM 339 Fall 2017: Editing and Running Programs in the Lab

ENCM 339 Fall 2017: Editing and Running Programs in the Lab page 1 of 8 ENCM 339 Fall 2017: Editing and Running Programs in the Lab Steve Norman Department of Electrical & Computer Engineering University of Calgary September 2017 Introduction This document is a

More information

Table Of Contents. 1. Zoo Information a. Logging in b. Transferring files 2. Unix Basics 3. Homework Commands

Table Of Contents. 1. Zoo Information a. Logging in b. Transferring files 2. Unix Basics 3. Homework Commands Table Of Contents 1. Zoo Information a. Logging in b. Transferring files 2. Unix Basics 3. Homework Commands Getting onto the Zoo Type ssh @node.zoo.cs.yale.edu, and enter your netid pass when prompted.

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

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

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

More information

First of all, these notes will cover only a small subset of the available commands and utilities, and will cover most of those in a shallow fashion.

First of all, these notes will cover only a small subset of the available commands and utilities, and will cover most of those in a shallow fashion. Warnings 1 First of all, these notes will cover only a small subset of the available commands and utilities, and will cover most of those in a shallow fashion. Read the relevant material in Sobell! If

More information

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

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

Principles of Bioinformatics. BIO540/STA569/CSI660 Fall 2010

Principles of Bioinformatics. BIO540/STA569/CSI660 Fall 2010 Principles of Bioinformatics BIO540/STA569/CSI660 Fall 2010 Lecture Five Practical Computing Skills Emphasis This time it s concrete, not abstract. Fall 2010 BIO540/STA569/CSI660 3 Administrivia Monday

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

Chapter 4. Unix Tutorial. Unix Shell

Chapter 4. Unix Tutorial. Unix Shell Chapter 4 Unix Tutorial Users and applications interact with hardware through an operating system (OS). Unix is a very basic operating system in that it has just the essentials. Many operating systems,

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

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

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

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

Lab Working with Linux Command Line

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

More information

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

CS246 Spring14 Programming Paradigm Notes on Linux

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

More information

CHE3935. Lecture 1. Introduction to Linux

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

More information

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

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

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

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

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

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

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

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

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

Essential Unix and Linux! Perl for Bioinformatics, ! F. Pineda

Essential Unix and Linux! Perl for Bioinformatics, ! F. Pineda Essential Unix and Linux! Perl for Bioinformatics, 140.636! F. Pineda Generic computer architecture Memory Storage Fig. 1.2 From Designing Embedded Hardware, 2 nd Ed. by John Catsoulis OS concepts Shell

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

Operating System Interaction via bash

Operating System Interaction via bash Operating System Interaction via bash bash, or the Bourne-Again Shell, is a popular operating system shell that is used by many platforms bash uses the command line interaction style generally accepted

More information

1 Installation (briefly)

1 Installation (briefly) Jumpstart Linux Bo Waggoner Updated: 2014-09-15 Abstract A basic, rapid tutorial on Linux and its command line for the absolute beginner. Prerequisites: a computer on which to install, a DVD and/or USB

More information

Computer Architecture Lab 1 (Starting with Linux)

Computer Architecture Lab 1 (Starting with Linux) Computer Architecture Lab 1 (Starting with Linux) Linux is a computer operating system. An operating system consists of the software that manages your computer and lets you run applications on it. The

More information

Filesystem and common commands

Filesystem and common commands Filesystem and common commands Unix computing basics Campus-Booster ID : **XXXXX www.supinfo.com Copyright SUPINFO. All rights reserved Filesystem and common commands Your trainer Presenter s Name Title:

More information

Linux Command Line Interface. December 27, 2017

Linux Command Line Interface. December 27, 2017 Linux Command Line Interface December 27, 2017 Foreword It is supposed to be a refresher (?!) If you are familiar with UNIX/Linux/MacOS X CLI, this is going to be boring... I will not talk about editors

More information

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

Linux Operating System Environment Computadors Grau en Ciència i Enginyeria de Dades Q2 Linux Operating System Environment Computadors Grau en Ciència i Enginyeria de Dades 2017-2018 Q2 Facultat d Informàtica de Barcelona This first lab session is focused on getting experience in working

More information

Practical 4. Linux Commands: Working with Directories

Practical 4. Linux Commands: Working with Directories Practical 4 Linux Commands: Working with Directories 1. pwd: pwd stands for Print Working Directory. As the name states, command pwd prints the current working directory or simply the directory user is,

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

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

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

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

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

GNU/Linux Course Lesson 1. Puria Nafisi

GNU/Linux Course Lesson 1. Puria Nafisi GNU/Linux Course Lesson 1 Puria Nafisi Azizi @pna http://netstudent.polito.it Netstudent is an students volunteer association within the Politecnico di Torino. Is build of different people and students

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

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

Introduction. File System. Note. Achtung!

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

More information

UTA Tech Orientation Spring 2019

UTA Tech Orientation Spring 2019 UTA Tech Orientation Spring 2019 Overview Why is Tech Stuff Important? The Filesystem Shell Commands File Permissions Miscellaneous Why is Tech Stuff Important? Why is TA Tech Stuff Important? Different

More information

Introduction to Unix - Lab Exercise 0

Introduction to Unix - Lab Exercise 0 Introduction to Unix - Lab Exercise 0 Along with this document you should also receive a printout entitled First Year Survival Guide which is a (very) basic introduction to Unix and your life in the CSE

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

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

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

More information

Basic UNIX commands. HORT Lab 2 Instructor: Kranthi Varala

Basic UNIX commands. HORT Lab 2 Instructor: Kranthi Varala Basic UNIX commands HORT 59000 Lab 2 Instructor: Kranthi Varala Client/Server architecture User1 User2 User3 Server (UNIX/ Web/ Database etc..) User4 High Performance Compute (HPC) cluster User1 Compute

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

UNIX Essentials Featuring Solaris 10 Op System

UNIX Essentials Featuring Solaris 10 Op System A Active Window... 7:11 Application Development Tools... 7:7 Application Manager... 7:4 Architectures - Supported - UNIX... 1:13 Arithmetic Expansion... 9:10 B Background Processing... 3:14 Background

More information

CS CS Tutorial 2 2 Winter 2018

CS CS Tutorial 2 2 Winter 2018 CS CS 230 - Tutorial 2 2 Winter 2018 Sections 1. Unix Basics and connecting to CS environment 2. MIPS Introduction & CS230 Interface 3. Connecting Remotely If you haven t set up a CS environment password,

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

Some Linux (Unix) Commands that might help you in ENSC351

Some Linux (Unix) Commands that might help you in ENSC351 Some Linux (Unix) Commands that might help you in ENSC351 First, like Windows, Linux and Unix (for our purposes, they are the basically the same) use a hierarchical directory structure. What would be called

More information