Introduction of Unix/Linux Compiled by Anant Vishnoi.

Slides:



Advertisements
Similar presentations
Learning Unix/Linux Bioinformatics Orientation 2008 Eric Bishop.
Advertisements

Unix. Outline Commands Environment Variables Basic Commands CommandMeaning lslist files and directories ls -alist all files and directories mkdirmake.
1 Introduction to UNIX Ke Liu
NETW-240 Shells Last Update Copyright Kenneth M. Chipps Ph.D. 1.
Linux Workshop Session 1 Khadka, Santosh and Panthi, Sanjeeb Computer Science Department Lamar Univers Lamar Univers ity.
©Colin Jamison 2004 Introduction to Linux Colin Jamison.
Cosc 4750 Getting Started in UNIX Don’t be afraid of the prompt, in linux it can be your best friend. In some cases, the only way to do certain things.
ATS Programming Short Course I INTRODUCTORY CONCEPTS Tuesday, Jan. 27 th, 2009 Essential Unix Commands.
Introducing the Command Line CMSC 121 Introduction to UNIX Much of the material in these slides was taken from Dan Hood’s CMSC 121 Lecture Notes.
Working Environment - - Linux - -.
1 Basics of Linux On linux machine: Login at your home directory Open a “shell” or “terminal” or “xterm” workspace (4) On windows machine Intall linux.
Lecture 02CS311 – Operating Systems 1 1 CS311 – Lecture 02 Outline UNIX/Linux features – Redirection – pipes – Terminating a command – Running program.
Very Quick & Basic Unix Steven Newhouse Unix is user-friendly. It's just very selective about who its friends are.
1 SEEM3460 Tutorial Unix Introduction. 2 Introduction What is Unix? An operation system (OS), similar to Windows, MacOS X Why learn Unix? Greatest Software.
Linux Commands LINUX COMMANDS.
L INUX C OMMAND L INE I NTERFACE G UNAANBAN.G
Using Macs and Unix Nancy Griffeth January 6, 2014 Funding for this workshop was provided by the program “Computational Modeling and Analysis of Complex.
Introduction of Unix/Linux Compiled by Neeraj Goel Sonali Chouhan.
Brief introduction to UNIX A. Emerson CINECA, High Performance Systems.
Overview of Linux CS3530 Spring 2014 Dr. José M. Garrido Department of Computer Science.
Help session: Unix basics Keith 9/9/2011. Login in Unix lab  User name: ug0xx Password: ece321 (initial)  The password will not be displayed on the.
Unix Primer. Unix Shell The shell is a command programming language that provides an interface to the UNIX operating system. The shell is a “regular”
Introducing UNIX EMBnet slide 1 Introducing the UNIX Operating System.
1 Intro to Linux - getting around HPC systems Himanshu Chhetri.
Introduction to Unix Bent Thomsen Institut for Datalogi Aalborg Universitet.
Linux environment ● Graphical interface – X-window + window manager ● Text interface – terminal + shell.
Lesson 1. PC vs. Multi-user System  Personal Computer – each user gets his/her own processor (or multicore processor).  Multi-user system – The processor,
Unix Basics Chapter 4.
Cmsc 312 Operating Systems. UNIX? DOS – PC? VAX/VMS - mainframe Unix – PC, workstation, mainframe 1970 bell Lab For computer scientist? Why popular? Free.
CENT 305 Information Systems Security Linux Introduction.
1 N305 C Programming. 2 Objectives for the Lab ä Learn problem solving strategies ä Achieve intermediate knowledge of C Programming Language ä Gain experience.
LINUX Tuesday, 5 July :00 pm. Remote Login l Use Secure Shell (ssh) l Machine name/IP address E.g. ssh hydra.sma.nus.edu.sg Or ssh
Carnegie Mellon Linux Boot Camp Jenna MacCarley, Peter Pearson, Shashank Goyal 9/19/2015.
CS240 Computer Science II Introduction the Unix File System and File Related Utilities Based on “UNIX for Programmers and Users” by G.Class and K. Ables.
Agenda Link of the week Use of Virtual Machine Review week one lab assignment This week’s expected outcomes Review next lab assignments Break Out Problems.
L&T Infotech1 UNIX – Getting Started - Aneesh Ramani.
November 5, 2015CIS 118 Intro to UNIX What’s a Unix? Unix is an Operating System Designed for high-traffic usage Many variants –Linux, BSD: free versions.
Welcome to CS323 Operating System lab 1 TA: Nouf Al-Harbi NoufNaief.net.
Basic Unix Commands CGS 3460, Lecture 6 Jan 23, 2006 Zhen Yang.
1May 16, 2005 Week 2 Lab Agenda Command Line FTP Commands Review More UNIX commands to learn File name expansion - * Introduction of vi.
Introduction to Programming Using C An Introduction to Operating Systems.
Basic of UNIX For fresh members of SPARCS
Linux Commands C151 Multi-User Operating Systems.
CS 245 – Part 1 Using Operating Systems and Networks for Programmers Jiang Guo Dept. of Computer Science California State University Los Angeles.
1 CS3695 – Network Vulnerability Assessment & Risk Mitigation – Introduction to Unix & Linux.
Linux Tutorial Lesson Two *Getting Help in Linux *Data movement and manipulation *Relative and Absolute path *Processes Note: see chapter 1,2,3 from Linux.
Learning Unix/Linux Based on slides from: Eric Bishop.
By Jonathan Rinfret UNIX/LINUX By Jonathan Rinfret
Overview of Linux Fall 2016 Dr. Donghyun Kim
UNIX To do work for the class, you will be using the Unix operating system. Once connected to the system, you will be presented with a login screen. Once.
Tutorial of Unix Command & shell scriptS 5027
Development Environment Basics
Getting started with CentOS Linux
Linux Commands Help HANDS ON TRAINING Author: Muhammad Laique
UNIX The Basics Source:
Andy Wang Object Oriented Programming in C++ COP 3330
C151 Multi-User Operating Systems
Introduction to Linux Dr Karina Kubiak - Ossowska
Tutorial of Unix Command & shell scriptS 5027
Basic UNIX OLC Training.
Introduction to UNIX.
Tutorial of Unix Command & shell scriptS 5027
CS 60 Discussion Review.
Web Programming Essentials:
Tutorial of Unix Command & shell scriptS 5027
Getting started with CentOS Linux
CSE 391 Lecture 3 bash shell continued: processes; multi-user systems; remote login; editors slides created by Marty Stepp, modified by Jessica Miller.
CSE 391 Lecture 3 bash shell continued: processes; multi-user systems; remote login; editors slides created by Marty Stepp, modified by Jessica Miller.
Linux Commands LINUX COMMANDS.
Presentation transcript:

Introduction of Unix/Linux Compiled by Anant Vishnoi

Plan Introduction to Unix/Linux Basic Utilities and Commands Programming in Unix/Linux

Introduction to Unix/Linux as OS Kernel and shell –Kernel is one who all the job and shell is one with whome you interface. Better known as 'Command Line Interface' Multi-user –Each shell is a user for linux –You can open a shell from any other computer also – remote login

Introduction to Unix/Linux as OS Multi-tasking Linux directory structure »\ - Root directory »\home - Home directory »\usr\bin - Most commanly used binaries »\usr\local - Tools those are installed specifically in the machines, »better to have a look to see what is there in machine on which you are sitting Versions of linux –Fedora Core 2.0 – One of the stable linux –Fedora Core 7.0 – One of the latest version –Latest version doesn't means better!

Basic Commands and Utilities File Commands Network logins Backups Internet

File Commands Some other general commands –ls, list the files, –'-a' option means 'list all', will show hidden files as well –all filenames starting with. are hidden file –Other options you can try is '-l', '--color' –mkdir, making new directories mkdir test –rm, removing a file –BEWARE!! There is no recycle bin in Unix –'rm -i' will ask “are you sure that you want to delete” –'rm -r' will do everything recursivily, '-f' force –rmdir, remove directory –'cp', means copy 'mv', means rename or move

File Commands Unix directory structure revisited –'cd ~' change directory to your home –'cd test' change directory to test directory –'cd..' change directory to upper directory –'cd / ' change directory to root –Use tabs to complete the file name (write partial file name and then use tab)‏

File Commands Permissions – important for sharing your files and restricting access on your work –'chmod 755' => rwx rwx rwx (user group all)‏ ‘file’ utility tells type of file like text, word or pdf Helpful when extension is not given Important filters- (Best way to learn is use commands)‏ –'grep word path/filename', grep find a word in a file –pipes ' | ' : redirect output of one command to other command –'more' or 'less' shows files pagewise ‘find’ and ‘locate’ utility help to find a file by filename –‘find –r path –name filename’ will find the location of file in given path. Useful command as we can use wild card pattern

Using Network Unix to Unix- ssh, telnet ‘ssh’ is a secure shall, X-settings are default “ssh ‘su username’ switch user command used for switching user on same machine Using ftp and ncftp ‘ftp machine’ then use ‘get’ or ‘put’ to get the file from machine or put the file one machine ‘ncftp –u user machine’ more interactive

Backups Zip and Tar, gzip, gunzip Various extentions – Z, bz2, zip, gzip, tgz, tar.gz Tar oprtions c,x,z,v,f ‘c’ for compress, ‘x’ for expend, ‘z’ for zip, ‘v’ for verbose, ‘f’ force For compression ‘tar –czvf file.tar.gz./dirname For Decompression ‘tar –xzvf file.tar.gz’

Internet Browser –Mozilla/firefox (linux)‏ –Internet Explorer (Windows)‏

Miscellaneous Unix process – ps, fg, bg, kill, & ‘ps’ gives the list of processes ‘kill’ can kill a process, you have to write pid given by ps Writing ‘&’ in and of a command will force process to run in background ‘ctrl z’ for suspending a process, ‘ctrl c’ to kill a process ‘bg’ running a process in background ‘fg’ bringing a process in foreground

Miscellaneous Use man and man –k Help for using any command Change password- ‘passwd’, ‘yppasswd’, ‘kpasswd’ Printing- lp, lpr ‘lpq’ for checking request queue on printer ‘ruptime’ gives list of all the machines and their load and number of users on each Help you in selecting machine on which you should login

Important Utilities ooffice: OpenOffice, for word, presentation, spreadsheets xfig, for drawing figures. Can be exported to eps, jpeg, gif or any format gimp - Viewing and editing images eog – (Eye of Gnome) for viewing images acroread – Acrobat reader for PDF files gnumeric - Spreadsheet viewer and editor in Linux Editors: vi, emacs, pico, gedit

Vi Editor Why vi, fast and easy Basic modes- edit and command, ‘esc’ for command mode ‘i, a’ for edit mode (insert or append mode) Other commands using colon- :q,:w,:q!,:e :q for quit, :w for write, :q! quit without save :e open another file for editing, :wq write and quit Searching using ‘/’ In command mode use ‘/’ then write the word you want to search ‘n’ for forward search, ‘N’ for backward search Search and replace :s/ram/mohan - will search string “ram” and replace with “mohan” Advanced vi – vim(vi improve) and gvim(gnu vim)‏

Programming in Unix Unix made by programmer for programming Gcc compiler – for ‘c’, g++ for ‘c++’ Various options, -O,-c,-g,-I ‘-O’ sets optimization level ‘-c’ only compile not link ‘-g’ for debug ‘-I’ for pre-processing only Linking with –l All the files are previously compiled and then linked by giving library information Debugger- gdb Use ‘gdb a.out’ for debugging

Conclusion Self help is the best help! –The UNIX man pages “Manual sections” –Using man, whatis etc. –Experiment. You can never kill the system. Links – for GNU tools and manuals Books –The UNIX programming environment, Kernighan & Pike