PTA Linux Series Copyright Professional Training Academy, CSIS, University of Limerick, 2006 © Workshop III - Part A Shell Commands Professional Training.

Slides:



Advertisements
Similar presentations
A Guide to Unix Using Linux Fourth Edition
Advertisements

Learning Unix/Linux Bioinformatics Orientation 2008 Eric Bishop.
PacNOG 6: Nadi, Fiji Using Commands in Linux Hervey Allen Network Startup Resource Center.
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.
Dayu Zhang 9/8/2014 Lab02. Example of Commands pwd --- show your current directory This is home of venus, not your home directory Tilde: means you are.
Vi Editor TA for ITIS3100: Xu Fei
Linux+ Guide to Linux Certification, Second Edition
1 Using Editors Editors let you create and edit ASCII files UNIX normally includes two editors: vi and Emacs Vi and Emacs are screen editors: they display.
CS1020: Intro Workshop. Topics CS1020Intro Workshop Login to UNIX operating system 2. …………………………………… 3. …………………………………… 4. …………………………………… 5. ……………………………………
CS465 - UNIX The vi Editor. Creating Files Most human-readable files on Unix are created with a text editor Unix has many, many different editors ed a.
Very Quick & Basic Unix Steven Newhouse Unix is user-friendly. It's just very selective about who its friends are.
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.
Using Linux Text Editors. Use Non-Graphical Linux Text Editors Graphical Text Editor.
Using the “CLI” Unix / Linux Preparation Course May 25 Djibouti.
EMT 2390L Lecture 2 Dr. Reyes. Outline What is the Shell Basic commands Linux Filesystem System commands.
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.
Chapter 9 Part II Linux Command Line Access to Linux Authenticated login using a Linux account is required to access a Linux system. The Linux prompt will.
Linux environment ● Graphical interface – X-window + window manager ● Text interface – terminal + shell.
Chapter 3 Mastering Editors
PTA Linux Series Copyright Professional Training Academy, CSIS, University of Limerick, 2006 © Workshop II Transferable Skills & Common Tasks Professional.
Chapter Three The UNIX Editors. 2 Lesson A The vi Editor.
AN INTRO TO UNIX/LINUX COMMANDS BY: JIAYANG WANG.
Linux+ Guide to Linux Certification Chapter Four Exploring Linux Filesystems.
Linux+ Guide to Linux Certification, Third Edition
Intro. To Unix commands For those who’ve never used Unix before Quick tutorial to let you move around your Unix Accounts No discussion of inner workings.
Week 3 Exploring Linux Filesystems. Objectives  Understand and navigate the Linux directory structure using relative and absolute pathnames  Describe.
1 Operating Systems and Using Linux Topics What is an Operating System? Linux Overview Frequently Used Linux Commands Some content in this lecture added.
Using Commands Unix / Linux Preparation Course May 6, 2012 Serrekunda, The Gambia.
Introduction to UNIX Geraint Vaughan. What is UNIX? Command-line operating system (not point- and click) Designed for ‘experts’ Lots of different variants.
Unix Editors. u Editors in Unix come in two general flavours: –modal editors have "modes" v generally input mode and command mode –input mode allows entry.
Tony Kombol.  Why text edit?  Many programs and features require configuration ▪ Configuration is kept in files ▪ Usually in the /etc directory  Changes.
Unix and Samba By: IC Labs (Raj Kidambi). What is Unix?  Unix stands for UNiplexed Information and Computing System. (It was originally spelled "Unics.")
1 of 47 Chapter 4: The vi Editor – First Look Copyright ©2008 by Pearson Education, Inc. Upper Saddle River, New Jersey All rights reserved.
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 Unix (CA263) File Editing By Tariq Ibn Aziz.
Lesson 4-Mastering the Visual Editor. Overview Introducing the visual editor. Working in an existing file with vi. Understanding the visual editor. Navigating.
Chapter Three The UNIX Editors.
Isecur1ty training center Presented by : Eng. Mohammad Khreesha.
Introduction to Programming Using C An Introduction to Operating Systems.
Lesson 3-Touring Utilities and System Features. Overview Employing fundamental utilities. Linux terminal sessions. Managing input and output. Using special.
Using the “CLI” Unix / Linux Preparation Course June 9, 2013 Lusaka, Zambia.
Linux Commands C151 Multi-User Operating Systems.
PTA Linux Series Copyright Professional Training Academy, CSIS, University of Limerick, 2006 © Workshop V Files and the File System Part B – File System.
Isecur1ty training center Presented by : Eng. Mohammad Khreesha.
PTA Linux Series Copyright Professional Training Academy, CSIS, University of Limerick, 2006 © Workshop III - Part B Shell Commands Professional Training.
AN INTRO TO UNIX/LINUX COMMANDS BY: JIAYANG WANG.
PTA Linux Series Copyright Professional Training Academy, CSIS, University of Limerick, 2006 © Workshop VI Scheduling & Process Management Professional.
Linux+ Guide to Linux Certification, Second Edition Chapter 4 Exploring Linux Filesystems.
A Mini UNIX Tutorial. What’s UNIX?  An operating system run on many servers/workstations  Invented by AT&T Bell Labs in late 60’s  There are many different.
Learning basic Unix command It 325 operating system.
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.
 Prepared by: Eng. Maryam Adel Abdel-Hady
Introduction to Unix for FreeSurfer Users
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.
CS1010: Intro Workshop.
Introducing the UNIX Operating System.
SUSE Linux Enterprise Desktop Administration
Getting started with CentOS Linux
Prepared by: Eng. Maryam Adel Abdel-Hady
Guide To UNIX Using Linux Third Edition
Vi Introduction Tony Kombol.
Ubuntu Working in Terminal
Emacs CSC 135.
Introduction Paul Flynn
Run Java file with Window cmd
Getting started with CentOS Linux
Linux Operations and Administration
Presentation transcript:

PTA Linux Series Copyright Professional Training Academy, CSIS, University of Limerick, 2006 © Workshop III - Part A Shell Commands Professional Training Academy Linux Series

PTA Linux Series Copyright Professional Training Academy, CSIS, University of Limerick, 2006 © Why Use the Shell? The command prompt on Windows is also called the shell, the terminal, or the console on Linux It is also worth noting that you can use Linux without using the shell However, all tasks can be completed using the shell Q. Why should you use consider using the command prompt? A. You can perform your tasks quicker, access more powerful programs with more options, and have an ability to automate your tasks

PTA Linux Series Copyright Professional Training Academy, CSIS, University of Limerick, 2006 © Some Notes Everything in Linux is treated as a file by the operating system, e.g. processes, executables, text files, etc. If you are logged in as a normal user, you should see a dollar sign in your shell $ or a right arrow > If you are logging in as the super user or the root user, you should see a hash sign in your shell # On Windows you may have been used to using the term folder, on Linux folders are more commonly called directories

PTA Linux Series Copyright Professional Training Academy, CSIS, University of Limerick, 2006 © Some Notes To make your life easier in the shell, you should avoid creating files and directories with spaces in them Instead Linux users usually use a dash, underscore, or capitalise first letters of words. For example: project_results, project-results, projectResults Finally, always keep your files and directories organised. In particular, give your files meaningful names

PTA Linux Series Copyright Professional Training Academy, CSIS, University of Limerick, 2006 © Commands: Navigation pwd: print working directory – To find out where you are in the filesystem, type: pwd ls: list files – e.g. to list the files in a directory type: ls – To list extra information about files (long listing), type: ls -l

PTA Linux Series Copyright Professional Training Academy, CSIS, University of Limerick, 2006 © Commands: Navigation cd: change directory – e.g. to change into the projects directory, type: cd projects – If you ever get lost in the filesystem, you can type cd on its own: cd – To go back a level you can use: cd..

PTA Linux Series Copyright Professional Training Academy, CSIS, University of Limerick, 2006 © Commands: Navigation – Note: The location of the current directory is represented by a single dot. – Note: The location of the previous directory is represented by 2 dots.. – Note: The location of your home directory is represented by a tilde sign ~ and this allows you to use the shortcut cd ~/myprojects instead of cd /home/ict/myprojects

PTA Linux Series Copyright Professional Training Academy, CSIS, University of Limerick, 2006 © Commands: Viewing cat – concatenate file contents all at once – e.g. to output the contents of poetry.txt type: cat poetry.txt more – view file contents by screen less – view file contents by screen For example, if your poetry file is very large, you can use more or less to output the contents one screen-full at a time They are more or less the same! Except that less allows you to go backwards

PTA Linux Series Copyright Professional Training Academy, CSIS, University of Limerick, 2006 © Commands: Creation touch: create an empty file – e.g. to create an empty file named project_results, type: touch project_results mkdir: make a directory – e.g. to create an empty directory named course_work, type: mkdir course_work

PTA Linux Series Copyright Professional Training Academy, CSIS, University of Limerick, 2006 © Commands: Editing vi – text editor basics: The vi editor is available on all Linux and Unix systems. For this reason it is worth learning You must choose a mode to enter, for example, insert mode to insert new text To exit a mode use the Esc key, e.g. Press i to enter insert mode – Usage: vi filename – Search forward: /searchword – Search backward: ?searchword – Undo: u – Save and exit: :wq – Exit without saving: :q

PTA Linux Series Copyright Professional Training Academy, CSIS, University of Limerick, 2006 © Commands: Editing emacs – text editor basics: While emacs is available on the majority of Linux and Unix machines, it is not guaranteed like vi – Usage: emacs filename – Save: Ctrl-x Ctrl-s – Search forward: Ctrl-s – Search backward: Ctrl-r – Undo: Ctrl-shift-underscore – Help: Ctrl-h – Exit: Ctrl-x Ctrl-c

PTA Linux Series Copyright Professional Training Academy, CSIS, University of Limerick, 2006 © Commands: Editing gedit – text editor gedit is an editor available on the Gnome desktop similar to WordPad on Windows The equivalent of gedit on the KDE desktop is kwrite Both these editors support syntax highlighting and other useful intuitive features

PTA Linux Series Copyright Professional Training Academy, CSIS, University of Limerick, 2006 © Command Line Exercises 1)Using the command line, list the contents of your home directory 2)Check that you are in your home directory using a command 3)Create a directory called projects and change into it 4)Use emacs to create a file called poetry.txt inside the projects directory and save a few lines from a poem 5)Exit emacs and check the contents of poetry.txt in the terminal 6)To finish, return to your home directory using the least amount of keystrokes possible