Linux Tutorial #6. -rw-r csce_user csce_user 20 Jan 4 09:15 list1.txt -rw-r csce_user csce_user 26 Jan 4 09:16 list2.

Size: px
Start display at page:

Download "Linux Tutorial #6. -rw-r csce_user csce_user 20 Jan 4 09:15 list1.txt -rw-r csce_user csce_user 26 Jan 4 09:16 list2."

Transcription

1 File system access rights Linux Tutorial #6 Linux provides file system security using a three- level system of access rights. These special codes control who can read/write/execute every file and directory on the system. There are several Linux commands for viewing and modifying access rights. We will start with viewing. In your Linuxstuff directory, type % ls - l The - l flag stands for long listing and will cause the ls command to tell you everything it knows about the files in your directory. For example, you might see something like this -rw-r csce_user csce_user 20 Jan 4 09:15 list1.txt -rw-r csce_user csce_user 26 Jan 4 09:16 list2.txt Each output line describes one file in detail, and is divided into seven parts The file system access rights string (- rw- r ) The user name of the owner of the file (csce_user) The name of the group that owns the file (csce_user) The size of the file in bytes (20) The date the file was created (Jan 4) The time the file was created (09:15) The name of the file (list1.txt) The file system access rights string is 10 characters long, consisting of the symbols d, r, w, x, -, and occasionally, s or S. The first character of this string will either be a d indicating that this is a directory, or a - indicating that this is a file. The next 9 symbols indicate the file permissions, or access rights, and are taken as three groups of 3 characters. The leftmost group gives the permissions for the user that owns the file The middle group gives the permissions for the group that owns the file The rightmost group gives the permissions for all other users on the system. The symbols r, w, x, -, have slightly different meanings depending on whether they refer to a simple file or to a directory.

2 Access rights on files The 3 character access rights string tells the system who can do what to each file. r indicates read permission, that is, permission to read and copy the file w indicates write permission, that is, the permission to change or delete a file x indicates execution permission, that is, the permission to execute a file If any of these fields is a - character, it means that the user does not have permission to perform that action. - read permission, means the user can not read and copy the file - write permission, means the user can not change a file - execution permission, means the user can not execute a file Some examples: -rwxrwxrwx a file that everyone can read, write and execute -rwx a file that only the owner can read and write and execute -rw-r----- a file the owner can read or write, the group can read Access rights on directories The 3 character access rights string tells the system about directory permissions. r means that user may list files in the directory w means that users may delete files from the directory or move files into it x means the right to access files in the directory, and may read files in the directory provided you have read permission on the individual files If any of these fields is a - character, it means that the user does not have permission to perform that action. - read permission, means the user can not list files in the directory - write permission, means the user can not delete files from the directory - execution permission, means the user can not access files in the directory So, in order to read a file, you must have execute permission on the directory containing that file, and hence on any directory containing that directory as a subdirectory, and so on, up the tree. Some examples: drwx a file that only the owner can read and write and execute dr-xr-xr-x a directory that everyone can read and execute

3 chmod (changing a file mode) Only the owner of a file or directory can change its access rights permissions. The Linux command to do this is chmod, which has a lot of command options to change the permissions of a file. The options of chmod are as follows Symbol Meaning u user g group o other a all r read w write (and delete) x execute (and access directory) + add permission - take away permission For example, to remove read write and execute permissions on the file list1.txt for the group and others, type % chmod go- rwx list1.txt This will leave the other permissions unaffected. To give read and write permissions on the file list2.txt to all and see the new file permissions, type % chmod a+rw list2.txt % ls - l You should now see the following -rw jgauch jgauch 20 Jan 4 09:15 list1.txt -rw-rw-rw- 1 jgauch jgauch 26 Jan 4 09:16 list2.txt

4 ps (process status) A process is an executing program identified by a unique PID (process identifier). To see information about your processes, with their associated PID and status, type % ps You should see a short list of commands that are currently executing, including your login shell and the ps command itself. To get more information about your processes, including the start time, run time, percentage cpu and percentage memory you are using, type % ps ux If you are really curious, you can find out information about all of the processes that are running on your computer by typing % ps aux This will produce a very long list of user commands and Linux processes that are currently sharing your computer. At this point, only your system administrator really needs to know what all of theses commands are doing. A process may be in the foreground, in the background, or be suspended. In general the shell does not return the Linux prompt until the current process has finished executing. Backgrounding a process ( & ) Some processes take a long time to run and hold up the terminal. Backgrounding a long process has the effect that the Linux prompt is returned immediately, and other tasks can be carried out while the original process continues executing. To execute a command in the background, type an & at the end of the command line. For example, the command sleep waits a given number of seconds before continuing. To execute sleep, type % sleep 10 This will wait 10 seconds before returning the command prompt %. Until the command prompt is returned, you can do nothing except wait. To run the sleep command in the background, type % sleep 10 &

5 The & runs the job in the background and returns the prompt right away, allowing you do run other programs while waiting for that one to finish. When you background a command, you will see a message similar to the following [1] 6259 This line gives you the job number (1) and PID (6259) for the command. When the background process finishes, the operating system will print a message saying the command is done. bg (background) Backgrounding is useful for jobs which will take a long time to complete. Sometimes we forget to type in the & when we start a program, and after waiting a few minutes we decide we want the program to finish in the background. The bg command will let us do this. At the prompt, type % sleep 100 You can suspend the process running in the foreground by typing ^Z (control z). Then use bg to put it in the background. For example, type ^Z (control z) % bg Now the sleep command will run in the background for 100 seconds, and when it finally finishes you will get a message from the operating system. Note: It is not a good idea to background programs that require user interaction such as an editor. The background job will wait for user input and may never finish. jobs When a process is running, backgrounded or suspended, it will be entered onto a list along with a job number. The jobs command will let you find out what processes are running in the background. To create several background jobs, type % sleep 100 & % sleep 200 & % sleep 300 &

6 Now to see what is happening with these commands, type % jobs You should see output similar to this [1] Running sleep 100 & [2]- Running sleep 200 & [3]+ Running sleep 300 & If you wait 100 seconds, and type jobs again, you will see that the first job is no longer on the list, and the other two jobs are still running in the background. fg (foreground) Sometimes we want to take a program out of the background and run it in the foreground again. For example, if we accidently background a program that requires user input, we need to bring it back to the foreground so we can type input. To do this, we can use the fg command followed by the job number. For example, if we start several background jobs again by typing % sleep 100 & % sleep 200 & % sleep 300 & We can restart job 1 (the sleep 100 command) by typing % fg 1 To put this job back in the background, type ^Z (control z) % bg Typing fg with no job number foregrounds the last suspended process. kill (terminate a process) It is sometimes necessary to kill a process (for example, when an executing program that is in an infinite loop). The easiest way to kill a job running in the foreground is to type ^C (control c). For example, type

7 % sleep 100 ^C (control c) We can use the kill command to terminate a suspended or background process. One way to do this is to specify the job number after a % character. For example, type % sleep 100 & % jobs If the sleep 100 command is job number 4, we can terminate it by typing % kill %4 To check whether this has worked, examine the job list again to see if the process has been removed. Alternatively, processes can be killed by finding their process numbers (PIDs) and using kill followed by the PID number. To see how this works, type % sleep 100 & % ps You should see something like this PID TTY TIME CMD pts/3 00:00:00 bash pts/3 00:00:00 sleep pts/3 00:00:00 ps To kill off the process sleep 100, type % kill You can type ps again to see if it has been removed from the list. Sometimes a process will have something strange going on, and refuse to be killed using just the PID. In this case we need to use the kill - 9 PID option. Note: It is not possible to kill processes that were started by other users (unless you are the system administrator). If you ever see a process running in the background for hundreds of hours, you should the administrator so they can kill it.

8 Summary Command Meaning ls - l list access rights for all files chmod [options] file change access rights for named file ps display process status information command & run command in the background ^Z suspend the job running in the foreground bg background the suspended job jobs list the current jobs fg %1 foreground job number 1 ^C kill the job running in the foreground kill 123 kill the process number 123 Author: M.Stonebank@surrey.ac.uk, 9th October 2000 Edited: jgauch@uark.edu, January 2015

UNIX Tutorial Five

UNIX Tutorial Five UNIX Tutorial Five 5.1 File system security (access rights) In your unixstuff directory, type % ls -l (l for long listing!) You will see that you now get lots of details about the contents of your directory,

More information

File system Security (Access Rights)

File system Security (Access Rights) File system Security (Access Rights) In your home directory, type % ls -l (l for long listing!) You will see that you now get lots of details about the contents of your directory, similar to the example

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

ACS Unix (Winter Term, ) Page 92

ACS Unix (Winter Term, ) Page 92 ACS-294-001 Unix (Winter Term, 2016-2017) Page 92 The Idea of a Link When Unix creates a file, it does two things: 1. Set space on a disk to store data in the file. 2. Create a structure called an inode

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

Linux Tutorial #7. quota. df (disk free) du (disk usage)

Linux Tutorial #7. quota. df (disk free) du (disk usage) Linux Tutorial #7 quota On many computer systems, the system administrator has to restrict the amount of disk space users are allowed to use in order to avoid running out of space on the shared file system.

More information

Exploring UNIX: Session 5 (optional)

Exploring UNIX: Session 5 (optional) Exploring UNIX: Session 5 (optional) Job Control UNIX is a multi- tasking operating system, meaning you can be running many programs simultaneously. In this session we will discuss the UNIX commands for

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

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

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

The Unix Shell & Shell Scripts

The Unix Shell & Shell Scripts The Unix Shell & Shell Scripts You should do steps 1 to 7 before going to the lab. Use the Linux system you installed in the previous lab. In the lab do step 8, the TA may give you additional exercises

More information

Removing files and directories, finding files and directories, controlling programs

Removing files and directories, finding files and directories, controlling programs Removing files and directories, finding files and directories, controlling programs Laboratory of Genomics & Bioinformatics in Parasitology Department of Parasitology, ICB, USP Removing files Files can

More information

Operating Systems Lab 1 (Users, Groups, and Security)

Operating Systems Lab 1 (Users, Groups, and Security) Operating Systems Lab 1 (Users, Groups, and Security) Overview This chapter covers the most common commands related to users, groups, and security. It will also discuss topics like account creation/deletion,

More information

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

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

More information

I/O and Shell Scripting

I/O and Shell Scripting I/O and Shell Scripting File Descriptors Redirecting Standard Error Shell Scripts Making a Shell Script Executable Specifying Which Shell Will Run a Script Comments in Shell Scripts File Descriptors Resources

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

Introduction to UNIX Shell Exercises

Introduction to UNIX Shell Exercises Introduction to UNIX Shell Exercises Determining Your Shell Open a new window or use an existing window for this exercise. Observe your shell prompt - is it a $ or %? What does this tell you? Find out

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

CS 460 Linux Tutorial

CS 460 Linux Tutorial CS 460 Linux Tutorial http://ryanstutorials.net/linuxtutorial/cheatsheet.php # Change directory to your home directory. # Remember, ~ means your home directory cd ~ # Check to see your current working

More information

Getting started with Hugs on Linux

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

More information

Introduction to the Linux Command Line January Presentation Topics

Introduction to the Linux Command Line January Presentation Topics 1/22/13 Introduction to the Linux Command Line January 2013 Presented by Oralee Nudson ARSC User Consultant & Student Supervisor onudson@alaska.edu Presentation Topics Information Assurance and Security

More information

Self-test Linux/UNIX fundamentals

Self-test Linux/UNIX fundamentals Self-test Linux/UNIX fundamentals Document: e0829test.fm 16 January 2018 ABIS Training & Consulting Diestsevest 32 / 4b B-3000 Leuven Belgium TRAINING & CONSULTING INTRODUCTION TO THE SELF-TEST LINUX/UNIX

More information

Chap2: Operating-System Structures

Chap2: Operating-System Structures Chap2: Operating-System Structures Objectives: services OS provides to users, processes, and other systems structuring an operating system how operating systems are designed and customized and how they

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

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

Linux System Administration

Linux System Administration System Processes Objective At the conclusion of this module, the student will be able to: Describe and define a process Identify a process ID, the parent process and the child process Learn the PID for

More information

File system links. Week Overview. Hard and symbolic links Process management

File system links. Week Overview. Hard and symbolic links Process management ULI101 Week 08 File system links Week Overview Hard and symbolic links Process management What is a file system Link? A link is a pointer to a file. This pointer associates a file name with a number called

More information

Sperimentazioni I LINUX commands tutorial - Part II

Sperimentazioni I LINUX commands tutorial - Part II Sperimentazioni I LINUX commands tutorial - Part II A. Garfagnini, M. Mazzocco Università degli studi di Padova 24 Ottobre 2012 Streams and I/O Redirection Pipelines Create, monitor and kill processes

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

CRUK cluster practical sessions (SLURM) Part I processes & scripts

CRUK cluster practical sessions (SLURM) Part I processes & scripts CRUK cluster practical sessions (SLURM) Part I processes & scripts login Log in to the head node, clust1-headnode, using ssh and your usual user name & password. SSH Secure Shell 3.2.9 (Build 283) Copyright

More information

Unix Processes. What is a Process?

Unix Processes. What is a Process? Unix Processes Process -- program in execution shell spawns a process for each command and terminates it when the command completes Many processes all multiplexed to a single processor (or a small number

More information

Introduction to Linux

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

More information

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

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

Linux Tutorial #4. Redirection. Output redirection ( > )

Linux Tutorial #4. Redirection. Output redirection ( > ) Linux Tutorial #4 Redirection Most processes initiated by Linux commands write to the standard output (that is, they write to the terminal screen), and many take their input from the standard input (that

More information

Chapter 9: Process management. Chapter 9 Process management

Chapter 9: Process management. Chapter 9 Process management Chapter 9: Process management Chapter 9 Process management Last revised: 19/7/2004 Chapter 9 Outline In this chapter we will learn about: Processes and process concepts Examining processes Adjusting process

More information

Study Guide Processes & Job Control

Study Guide Processes & Job Control Study Guide Processes & Job Control Q1 - PID What does PID stand for? Q2 - Shell PID What shell command would I issue to display the PID of the shell I'm using? Q3 - Process vs. executable file Explain,

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

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

The Unix Shell. Job Control

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

More information

CSE II-Sem)

CSE II-Sem) a) Write a shell script that displays a list of all the files in the current directory to which the user has read, write and execute permissions. b) Develop an interactive script that asks for a word and

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

The Unix Shell. Job Control

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

More information

Introduction to Unix May 24, 2008

Introduction to Unix May 24, 2008 Introduction to Unix May 24, 2008 Exercises: Privileges REFERENCE Reference: Shah, Steve, "Linux Administration: A Beginner's Guide", 2nd. ed., Osborne press, New York, NY. If you look at files in a directory

More information

acmteam/unix.pdf How to manage your account (user ID, password, shell); How to compile C, C++, and Java programs;

acmteam/unix.pdf How to manage your account (user ID, password, shell); How to compile C, C++, and Java programs; Note: you can find this file under: http://www.cs.queensu.ca/ acmteam/unix.pdf Introduction to Unix Tutorial In this tutorial, you will learn: How to manage your account (user ID, password, shell); Navigating

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

Traditional Access Permissions

Traditional Access Permissions Traditional Access Permissions There are three types of users: - owner - group - other (aka world) A user may attempt to access an ordinary file in three ways: - read from - write to - execute Use ls l

More information

Permission and Ownership

Permission and Ownership Permission and Ownership 1. Understanding file and directory ownership Every file on your Linux system, including directories, is owned by a specific user and group. Therefore, file permissions are defined

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

CS370 Operating Systems

CS370 Operating Systems CS370 Operating Systems Colorado State University Yashwant K Malaiya Fall 2016 Lecture 5 Slides based on Text by Silberschatz, Galvin, Gagne Various sources 1 1 User Operating System Interface - CLI CLI

More information

INTRODUCTION TO LINUX

INTRODUCTION TO LINUX INTRODUCTION TO LINUX REALLY SHORT HISTORY Before GNU/Linux there were DOS, MAC and UNIX. All systems were proprietary. The GNU project started in the early 80s by Richard Stallman Goal to make a free

More information

Lab 2: Linux/Unix shell

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

More information

Programs. Program: Set of commands stored in a file Stored on disk Starting a program creates a process static Process: Program loaded in RAM dynamic

Programs. Program: Set of commands stored in a file Stored on disk Starting a program creates a process static Process: Program loaded in RAM dynamic Programs Program: Set of commands stored in a file Stored on disk Starting a program creates a process static Process: Program loaded in RAM dynamic Types of Processes 1. User process: Process started

More information

Lab Assignment #1. University of Pittsburgh Department of Electrical and Computer Engineering

Lab Assignment #1. University of Pittsburgh Department of Electrical and Computer Engineering Fall 2017 ECE1192/2192 Lab Assignment #1 University of Pittsburgh Department of Electrical and Computer Engineering 1 Objective The objective of this handout is to help you get familiar with the UNIX/Linux

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

CSC209H Lecture 1. Dan Zingaro. January 7, 2015

CSC209H Lecture 1. Dan Zingaro. January 7, 2015 CSC209H Lecture 1 Dan Zingaro January 7, 2015 Welcome! Welcome to CSC209 Comments or questions during class? Let me know! Topics: shell and Unix, pipes and filters, C programming, processes, system calls,

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

Please note that CNE 216 is a brand new course that has never been taught on the George campus; it will be taught for the first time in the fall of

Please note that CNE 216 is a brand new course that has never been taught on the George campus; it will be taught for the first time in the fall of Please note that CNE 216 is a brand new course that has never been taught on the George campus; it will be taught for the first time in the fall of 2015. The materials for this course are still being developed.

More information

More Raspian. An editor Configuration files Shell scripts Shell variables System admin

More Raspian. An editor Configuration files Shell scripts Shell variables System admin More Raspian An editor Configuration files Shell scripts Shell variables System admin Nano, a simple editor Nano does not require the mouse. You must use your keyboard to move around the file and make

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

Processes. System tasks Campus-Booster ID : **XXXXX. Copyright SUPINFO. All rights reserved

Processes. System tasks Campus-Booster ID : **XXXXX.  Copyright SUPINFO. All rights reserved Processes System tasks Campus-Booster ID : **XXXXX www.supinfo.com Copyright SUPINFO. All rights reserved Processes Your trainer Presenter s Name Title: **Enter title or job role. Accomplishments: **What

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

Lecture 5: Jobs and Processes

Lecture 5: Jobs and Processes Lecture 5: and CS2042 - UNIX Tools October 8, 2008 and Lecture Outline 1 2 Manipulating and Intro to Definition: A process is an instance of a running program. More specific than a program because it s

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

07 - Processes and Jobs

07 - Processes and Jobs 07 - Processes and Jobs CS 2043: Unix Tools and Scripting, Spring 2016 [1] Stephen McDowell February 10th, 2016 Cornell University Table of contents 1. Processes Overview 2. Modifying Processes 3. Jobs

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

Multitasking. In this chapter: Running a Command in the Backg round Checking on a Process Cancelling a Process

Multitasking. In this chapter: Running a Command in the Backg round Checking on a Process Cancelling a Process 7 Multitasking In this chapter: Running a Command in the Backg round Checking on a Process Cancelling a Process Unix can do many jobs at once, dividing the processor s time between the tasks so quickly

More information

Mills HPC Tutorial Series. Linux Basics II

Mills HPC Tutorial Series. Linux Basics II Mills HPC Tutorial Series Linux Basics II Objectives Bash Shell Script Basics Script Project This project is based on using the Gnuplot program which reads a command file, a data file and writes an image

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

bash, part 3 Chris GauthierDickey

bash, part 3 Chris GauthierDickey bash, part 3 Chris GauthierDickey More redirection As you know, by default we have 3 standard streams: input, output, error How do we redirect more than one stream? This requires an introduction to file

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

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

Unix Basics. Systems Programming Concepts

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

More information

Unix basics exercise MBV-INFX410

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

More information

UNIX Quick Reference

UNIX Quick Reference UNIX Quick Reference This card represents a brief summary of some of the more frequently used UNIX commands that all users should be at least somewhat familiar with. Some commands listed have much more

More information

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

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

More information

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

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

More information

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

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

More information

Part 1: Basic Commands/U3li3es

Part 1: Basic Commands/U3li3es Final Exam Part 1: Basic Commands/U3li3es May 17 th 3:00~4:00pm S-3-143 Same types of questions as in mid-term 1 2 ls, cat, echo ls -l e.g., regular file or directory, permissions, file size ls -a cat

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

CSN08101 Digital Forensics. Module Leader: Dr Gordon Russell Lecturers: Robert Ludwiniak

CSN08101 Digital Forensics. Module Leader: Dr Gordon Russell Lecturers: Robert Ludwiniak CSN08101 Digital Forensics Lecture 2: Essential Linux for Forensics Module Leader: Dr Gordon Russell Lecturers: Robert Ludwiniak Essential Linux for Forensics You will learn in this lecture: Essential

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

Unix Internal Assessment-2 solution. Ans:There are two ways of starting a job in the background with the shell s & operator and the nohup command.

Unix Internal Assessment-2 solution. Ans:There are two ways of starting a job in the background with the shell s & operator and the nohup command. Unix Internal Assessment-2 solution 1 a.explain the mechanism of process creation. Ans: There are three distinct phases in the creation of a process and uses three important system calls viz., fork, exec,

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

5/8/2012. Controlling User Processes Chapter 10

5/8/2012. Controlling User Processes Chapter 10 Controlling User Processes Chapter 10 To describe the concept of a process, and execution of multiple processes on a computer system with a single CPU To explain how a shell executes commands To discuss

More information

Introduction to Unix. University of Massachusetts Medical School. October, 2014

Introduction to Unix. University of Massachusetts Medical School. October, 2014 .. Introduction to Unix University of Massachusetts Medical School October, 2014 . DISCLAIMER For the sake of clarity, the concepts mentioned in these slides have been simplified significantly. Most of

More information

Lecture-4. Introduction to Unix: More Commands, Boot-up Actions and X Window

Lecture-4. Introduction to Unix: More Commands, Boot-up Actions and X Window Lecture-4 Introduction to Unix: More Commands, Boot-up Actions and X Window What You Will Learn We continue to give more information about the fundamental commands of the Unix operating system. We also

More information

File Properties and Permissions

File Properties and Permissions File Properties and Permissions Managing File Access in Linux Peter Perry July 2009 What is it about? Open a shell (terminal) and type ls -l You get quite a bit of information about each file. Tonight,

More information

bash startup files Linux/Unix files stty Todd Kelley CST8207 Todd Kelley 1

bash startup files Linux/Unix files stty Todd Kelley CST8207 Todd Kelley 1 bash startup files Linux/Unix files stty Todd Kelley kelleyt@algonquincollege.com CST8207 Todd Kelley 1 midterms (Feb 27 and April 10) bash startup files More Linux Files review stty 2 We customize our

More information

Goals for This Lecture:

Goals for This Lecture: Goals for This Lecture: Understand how to log in remotely with SSH Understand how to transfer files with SCP Learn how to log in from SINC site windows PC s with XWIN32 Understand the long form listings

More information

2 Lab 4. Unix Shell 2

2 Lab 4. Unix Shell 2 4 Unix Shell 2 Lab Objective: Introduce system management, calling Unix Shell commands within Python, and other advanced topics. As in the last lab, the majority of learning will not be had in finishing

More information

Introduction to Lab Practicals (Lab Intro 3) Access Control, Synchronisation and Remote Access

Introduction to Lab Practicals (Lab Intro 3) Access Control, Synchronisation and Remote Access Introduction to Lab Practicals (Lab Intro 3) Access Control, Synchronisation and Remote Access 1 Introduction This practical is intended to familiarise you with the file access control mechanisms of Linux

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

File permission u owner of file/directory (user) g group of the file/directory o other a all

File permission u owner of file/directory (user) g group of the file/directory o other a all File permission u owner of file/directory (user) g group of the file/directory o other a all Permission Types: permission octal value Meaning Read (r) 4 The file can is read only, for directory it's contain

More information

OPERATING SYSTEMS LINUX

OPERATING SYSTEMS LINUX OPERATING SYSTEMS LINUX Božo Krstajić, PhD, University of Montenegro Podgorica bozok@cg.ac.yu Process management Linux operating systems work with processes. Basically a process consists of program code

More information

CSE 390a Lecture 3. bash shell continued: processes; multi-user systems; remote login; editors

CSE 390a Lecture 3. bash shell continued: processes; multi-user systems; remote login; editors CSE 390a Lecture 3 bash shell continued: processes; multi-user systems; remote login; editors slides created by Marty Stepp, modified by Jessica Miller and Ruth Anderson http://www.cs.washington.edu/390a/

More information

Bamuengine.com. Chapter 7. The Process

Bamuengine.com. Chapter 7. The Process Chapter 7. The Process Introduction A process is an OS abstraction that enables us to look at files and programs as their time image. This chapter discusses processes, the mechanism of creating a process,

More information

Unix as a Platform Exercises. Course Code: OS-01-UNXPLAT

Unix as a Platform Exercises. Course Code: OS-01-UNXPLAT Unix as a Platform Exercises Course Code: OS-01-UNXPLAT Working with Unix 1. Use the on-line manual page to determine the option for cat, which causes nonprintable characters to be displayed. Run the command

More information

Linux & Shell Programming 2014

Linux & Shell Programming 2014 Practical No : 1 Enrollment No: Group : A Practical Problem Write a date command to display date in following format: (Consider current date as 4 th January 2014) 1. dd/mm/yy hh:mm:ss 2. Today's date is:

More information

Operating Systems, Unix Files and Commands SEEM

Operating Systems, Unix Files and Commands SEEM Operating Systems, Unix Files and Commands SEEM 3460 1 Major Components of Operating Systems (OS) Process management Resource management CPU Memory Device File system Bootstrapping SEEM 3460 2 Programs

More information