Lab01: Part I. Introduction to Linux. Professional Training Academy Linux Series

Similar documents
Brief Linux Presentation. July 10th, 2006 Elan Borenstein

Introduction to Linux. Woo-Yeong Jeong Computer Systems Laboratory Sungkyunkwan University

EECS Software Tools. Lab 2 Tutorial: Introduction to UNIX/Linux. Tilemachos Pechlivanoglou

LINUX FUNDAMENTALS (5 Day)

TNM093 Practical Data Visualization and Virtual Reality Laboratory Platform

Introduction to Linux

The student will have the essential skills needed to be proficient at the Unix or Linux command line.

Introduction to Linux

UNIT 9 Introduction to Linux and Ubuntu

Linux Fundamentals (L-120)

Perl and R Scripting for Biologists

1 Installation (briefly)

Overview LEARN. History of Linux Linux Architecture Linux File System Linux Access Linux Commands File Permission Editors Conclusion and Questions

CSE 391 Lecture 1. introduction to Linux/Unix environment

*nix Crash Course. Presented by: Virginia Tech Linux / Unix Users Group VTLUUG

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

UNIX. The Very 10 Short Howto for beginners. Soon-Hyung Yook. March 27, Soon-Hyung Yook UNIX March 27, / 29

Linux Essentials Objectives Topics:

CSE 391 Lecture 1. introduction to Linux/Unix environment

15-122: Principles of Imperative Computation

Introduction to Operating Systems. Note Packet # 1. CSN 115 Operating Systems. Genesee Community College. CSN Lab Overview

Introduction to Linux

CS Fundamentals of Programming II Fall Very Basic UNIX

Introduction to Linux. Fundamentals of Computer Science

Guided Tour (Version 3.3) By Steven Castellucci as Modified by Brandon Haworth

EKT332 COMPUTER NETWORK

Introduction. File System. Note. Achtung!

Introduction: What is Unix?

Projects and Environment Introduction

CSE Linux VM. For Microsoft Windows. Based on opensuse Leap 42.2

Introduction. SSH Secure Shell Client 1

EE516: Embedded Software Project 1. Setting Up Environment for Projects

Linux hep.wisc.edu

Course Wiki. Today s Topics. Web Resources. Amazon EC2. Linux. Apache PHP. Workflow and Tools. Extensible Networking Platform 1

Instructions: Step 1: Respond to the following: IT131 Linux+

CENG 334 Computer Networks. Laboratory I Linux Tutorial

Linux Systems Administration Getting Started with Linux

Free & Open Source Software: The Academic Future

CSE 390a Lecture 1. introduction to Linux/Unix environment

Operating System Interaction via bash

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

Lab Working with Linux Command Line

Lab Week02 - Part I. Shell Commands. Professional Training Academy Linux Series

Index. Symbols * (asterisks), 104? (question mark), 104

Welcome. IT in AOS. Michael Havas Dept. of Atmospheric and Oceanic Sciences McGill University. September 21, 2012

Parallel Programming Pre-Assignment. Setting up the Software Environment

AOS Linux Tutorial. Introduction to Linux. Michael Havas Dept. of Atmospheric and Oceanic Sciences McGill University. September 15, 2011

Hands-on Keyboard: Cyber Experiments for Strategists and Policy Makers

Intro to Linux & Command Line

Mastering Linux. Paul S. Wang. CRC Press. Taylor & Francis Group. Taylor & Francis Croup an informa business. A CHAPMAN St HALL BOOK

The Unix Family. Linux 101. GNU/Linux distributions. Even more. MULTICS MIT/GE/Bell Labs. UNIX AT&T (Bell Labs) Mach, Carnegie Mellon

Full file at Chapter 2: Exploring the Desktop

Lab 3a Using the vi editor

Part I. Introduction to Linux

CS 215 Fundamentals of Programming II Spring 2019 Very Basic UNIX

INTRODUCTION TO LINUX

Chapter 2 Software Components

Introduction to Linux Environment. Yun-Wen Chen

Physics REU Unix Tutorial

Prerequisites: Students should be comfortable with computers. No familiarity with Linux or other Unix operating systems is required.

Setting up my Dev Environment ECS 030

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

Unix Introduction to UNIX

The Command Shell. Fundamentals of Computer Science

CSE 303 Lecture 2. Introduction to bash shell. read Linux Pocket Guide pp , 58-59, 60, 65-70, 71-72, 77-80

INF322 Operating Systems

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

Introduction to Unix and Linux. Workshop 1: Directories and Files

Overview of Unix / Linux operating systems

Helsinki 19 Jan Practical course in genome bioinformatics DAY 0

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

LINUX FUNDAMENTALS. Supported Distributions: Red Hat Enterprise Linux 6 SUSE Linux Enterprise 11 Ubuntu LTS. Recommended Class Length: 5 days

Lecture 1. A. Sahu and S. V. Rao. Indian Institute of Technology Guwahati

Computer Software. c 2016 by David W. Gerbing. School of Business Administration Portland State University

CISC 220 fall 2011, set 1: Linux basics

Introduction to Unix The Windows User perspective. Wes Frisby Kyle Horne Todd Johansen

Introduction to UNIX. Logging in. Basic System Architecture 10/7/10. most systems have graphical login on Linux machines

CSC 112 Lab 1: Introduction to Unix and C++ Fall 2009

Tutorial 1: Unix Basics

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

CS 2400 Laboratory Assignment #1: Exercises in Compilation and the UNIX Programming Environment (100 pts.)

Unit 10. Linux Operating System

Chapter-3. Introduction to Unix: Fundamental Commands

CSCI 161: Introduction to Programming I Lab 1b: Hello, World (Eclipse, Java)

How to Use the System

CSCI 161: Introduction to Programming I Lab 1a: Programming Environment: Linux and Eclipse

Unix/Linux Basics. Cpt S 223, Fall 2007 Copyright: Washington State University

A Brief Introduction to the Linux Shell for Data Science

Module 10: Unix Primer

Guided Tour (Version 3.4) By Steven Castellucci

Practical Computing-II. Programming in the Linux Environment. 0. An Introduction. B.W.Gore. March 20, 2015

LAB #7 Linux Tutorial

Using the Zoo Workstations

Virtual Machine. Linux flavor : Debian. Everything (except slides) preinstalled for you.

Post Ubuntu Install Exercises

AMS 200: Working on Linux/Unix Machines

An introduction to Student Linux Roger Herz-Fischler

Unix File System. Learning command-line navigation of the file system is essential for efficient system usage

Introduction to Linux

Short Read Sequencing Analysis Workshop

Transcription:

Lab01: Part I Introduction to Linux Professional Training Academy Linux Series

What is Linux? Linux is an operating system. Specifically, Linux is the kernel or the core of the system Originally developed by Linus Torvalds at the University of Helsinki, Finland Today, the Linux kernel is more commonly deployed with a set of tools Various distributions of Linux exist which package different sets of tools and environments for the various types of users. For example: Red Hat: for system administrators Ubuntu, Fedora: for desktop users Others include: SuSE, Debian, Knoppix, Slackware, Mandriva, Gentoo, etc.

Linux History Source: http://en.wikipedia.org/wiki/linux

Linux History By the early 1990s, PCs became powerful enough to start running UNIX Linus started to develop a freely available academic version of UNIX for PC machines (UNIX was developed at AT&T's Bell Laboratories in the early 1970s) Minix (by Andrew Tanenbaum at the Vrije Universiteit, Amsterdam) existed at the time and was a smaller academic version of UNIX for teaching, but new features were not allowed to be added Consequently, Linus started his own project

Linux Popularity In late 1991, first version of Linux was released Two years after beginning, Linus had 12000 users Today, Linux is well known for its stability and reliability Linux powers the majority of web servers in the world (Apache) The Linux counter project roughly estimates that there are 29 million Linux users (Source: http://counter.li.org/estimates.php)

Some Common Terms X-Windows: (X11 or X) a toolkit and protocol for developing desktop window environments (modern desktops are built using X) KDE: a free desktop environment, originally developed by Matthias Ettrich in 1996 Gnome: another free desktop environment, originally developed by Miguel de Icaza and Federico Mena in 1997 in response to KDE Directory: is another term for a folder

Some Common Terms Login account: Every Linux user has their own login name and password. When you login, all your files will be stored in your personal home directory Shell: also called the terminal, the command line, the console, or the prompt. This is the program where you type in your commands. It looks like DOS Bash: is a type of shell and stands for the Bourne Again Shell Binary: an executable program. Similar to an.exe file on Windows

Some Common Terms GUI: is the Graphical User Interface, which is your Desktop with all its windows and icons Kernel: is the main part of the operating system. It looks after the hardware, memory, and sharing of resources, etc. Root: is the most powerful user on the system, and is similar to the Windows administrator. Linux users do not user their root account all the time, only when installing new software, hardware, or configuring Script: a series of shell commands stored in a file which can be run like a program in order to automate a task Widget: a component belonging to the graphical environment, e.g. a scrollbar, button, etc.

Linux Philosophy Linux exists due to an open and accepting philosophy for learning and exploring This philosophy encompasses new users as well as experienced users Every user and developer is welcome The more users the better, so your problems and experiences are valued Make use of the helpful online forums, mailing lists, irc channels Chances are that somebody else had a similar problem to you and it is already documented A great resource is The Linux Documentation Project at http://www.tldp.org

Lab01: Part II Transferable Skills & Common Tasks Professional Training Academy Linux Series

Demonstration: Logging In/Out You should always log in with your normal login account and not the root account e.g. ict Each account on a Linux computer has its own home directory The root account is equivalent to the administrator account on windows. This is a privileged account which can install hardware and software for all other accounts Using the root account when not installing hardware/software can cause security risks as this account has privileges over all other accounts Always remember to shutdown your Linux computer correctly. Turning off the power directly can damage your filesystem

Demonstration: Web Browsers Firefox is one of the most popular browsers on all platforms (Mozilla) The Konqueror web browser is also available on the KDE desktop Other browsers include: Opera, Chromium On the command line, you can also use lynx, which is a text based web browser

Demonstration: Email Thunderbird is an email client which you can download with Firefox (Mozilla) Kmail is also available for the KDE desktop Other popular email clients include: Evolution If you are looking for text based email clients on the command line, try: pine or mutt

Demonstration: Microsoft Office Documents To create, open, and edit Microsoft Office documents you can use LibreOffice LibreOffice supports Word, Excel, PowerPoint, and access files When creating documents in Linux which you wish to open in Windows, make sure that you save as.doc,.ppt. etc.

Demonstration: File Manager The equivalent of My Computer on Windows is: Nautilus for the Gnome desktop Konqueror for the KDE desktop You can access your file manager on Gnome from the Applications menu as follows: Applications->System->File Browser

Demonstration: Opening Common Files.doc,.ppt Microsoft Office files libreoffice filemane.doc.pdf Adobe Acrobat files okular filename.pdf

Demonstration: Opening Files from USB, CD, and DVD Plug and play is now default in most Linux distributions When you insert a USB key, CD, or DVD, you can read, copy, and write files to/from these devices by accessing the following location in your filesystem: /media/* e.g. /media/cdrom, /media/dvd If your Linux does not automatically mount the device to /media/ you can use the mount command, e.g. mount /dev/sda1 /media/usbkey

Demonstration: Searching for Files To search for file names on the command line, use: find./ -name filename print To search for words within files use: grep search pattern filename

Demonstration: Printing Files If using OpenOffice and your printer setting are installing you can use: File->Print On the command use, you can use the lpr (line printer) command, for example: lpr P printername filename.pdf

Demonstration: File Sharing To share a drive or folder in Linux in the same manner as Windows, you can use the samba program For example, to map a network drive: smbmount /network/drive /local/mountpoint o username=remoteusername A graphical program called LinNeighborhood exists for reading and writing to network drives; this is not installed on the lab machines, however

Demonstration: Desktop Power Virtual Desktops allow you to open multiple windows and start a new desktop for a different task without closing down windows Creating an icon for an application on the desktop requires that you know the location of the command you wish to run

Demonstration: Graphics Graphics Package: The Gimp Diagram Package: xfig, inkscape e.g. create postscript/pdf graphics Inkscape allows you to create svg (scalable vector graphics)

Demonstration: Running Programs Java Programs: javac filename (compile) java filename (run) Perl Programs: perl filename.pl (run) C Programs gcc filename o filename.c (compile)./filename.c (run)

Demonstration: IDEs Eclipse and Netbeans are among the most popular www.eclipse.org www.netbeans.org

Exercises 1) Log onto your Linux system with the course username and password; how far do you get? :-) 2) Use Firefox to find one pdf file in google and save it to your home directory 3) Use OpenOffice to create a word document and save it in your home directory. Spend some time examining the other types of documents which you can create with OpenOffice, e.g. Impress will create PowerPoint presentations 4) From your desktop, use your system file manager to create a directory called project1 with a file called report.txt inside it. Edit report.txt and add a couple of lines of text. Copy report.txt to your home directory 5) Using the pdf that you downloaded in ex. 2, use the pdf reader (okular) to open it.

Exercises 6) On the command line, use the grep command to search your report.txt for the word the or any other word which is in your file 1) On the command line, use the find command from your home directory to find the location of the report.txt file 2) Use your virtual desktops to open a web browser on desktop 1 and openoffice on desktop 2 3) Use the gimp to create a.jpg graphic 4) Use xfig to create graphic; export it as a.pdf file

Lab01: Part III Shell Commands Professional Training Academy Linux Series

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

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

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

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

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

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

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

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

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

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

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

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