ECC LINUX WORKSHOP (INTERMEDIATE COURSE). WHAT WILL BE COVERED 1.Input, Output and Pipes 2.Processes 3.Compiling Unix Software Packages 4.Symbolic and.

Slides:



Advertisements
Similar presentations
Linux, it's not Windows A short introduction to the sub-department's computer systems Gareth Thomas.
Advertisements

Learning Unix/Linux Bioinformatics Orientation 2008 Eric Bishop.
ECC LINUX WORKSHOP (INTRO COURSE). WHAT WILL BE COVERED 1.UNIX/Linux Overview 2.Red Hat Enterprise Linux 3.ECC-UNIX accounts 4.How to Login 5.GUI Navigation.
NETW-240 Shells Last Update Copyright Kenneth M. Chipps Ph.D. 1.
CSCI 1411 FUNDAMENTALS OF COMPUTING LAB Lab Introduction 1 Shane Transue MSCS.
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.
Lesson 22 – Introduction to Linux Systems Administration.
Linux+ Guide to Linux Certification, Second Edition
UNIX Chapter 00 A “ Quick Start ” into UNIX Operating System Mr. Mohammad Smirat.
CS1020: Intro Workshop. Topics CS1020Intro Workshop Login to UNIX operating system 2. …………………………………… 3. …………………………………… 4. …………………………………… 5. ……………………………………
CMPE 151: Network Administration Spring Class Description Focus: system and network administration. Sequence of exercises. E.g., installing/configuring.
1 Some basic Unix commands u Understand the concept of loggin into and out of a Unix shell u Interact with the system in a basic way through keyboard and.
ENGINEERING COMPUTING CENTER LINUX workshop
A crash course in njit’s Afs
CS 141 Labs are mandatory. Attendance will be taken in each lab. Make account on moodle. Projects will be submitted via moodle.
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 to Linux Workshop February Introduction Rob Lane & The HPC Support Team Research Computing Services CUIT.
GETTING STARTED USING LINUX UBUNTU FOR A MULTI-USER SYSTEM Team 4 Lab Coordinator Manager Presentation Prep Webmaster Document Prep Faculty Facilitator.
Overview of Linux CS3530 Spring 2014 Dr. José M. Garrido Department of Computer Science.
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”
Lesson 7-Creating and Changing Directories. Overview Using directories to create order. Managing files in directories. Using pathnames to manage files.
Linux environment ● Graphical interface – X-window + window manager ● Text interface – terminal + shell.
Unix Basics Chapter 4.
CENT 305 Information Systems Security Linux Introduction.
ECC LINUX WORKSHOP (INTRO COURSE). WHAT WILL BE COVERED 1.UNIX/Linux Overview 2.Red Hat Enterprise Linux 3.ECC-UNIX accounts 4.How to Login 5.GUI Navigation.
Linux+ Guide to Linux Certification, Second Edition
PROGRAMMING PROJECT POLICIES AND UNIX INTRO Sal LaMarca CSCI 1302, Fall 2009.
Session 2 Wharton Summer Tech Camp Basic Unix. Agenda Cover basic UNIX commands and useful functions.
INTRODUCTION TO LINUX Jacob Chan. GNU/Linux Consists of Linux kernel, GNU utilities, and open source and commercial applications Works like Unix –Multi-user.
BIF703 Hard & Symbolic Links. What is a file system Link? A link is a pointer to a file. This pointer associates a file name with a number called an i-node.
Linux+ Guide to Linux Certification, Third Edition
Introduction to Programming Using C An Introduction to Operating Systems.
Manage Directories and Files in Linux Part 2. 2 Identify File Types in the Linux System The file types in Linux referred to as normal files and directories.
More Unix Naomi Altman. Directories Directory = folder mkdir - makes a new directory rmdir - removes an empty directory cd mydirectory - moves you into.
AN INTRO TO UNIX/LINUX COMMANDS BY: JIAYANG WANG.
Lecture 02 File and File system. Topics Describe the layout of a Linux file system Display and set paths Describe the most important files, including.
1 Introduction to Unix. 2 What is UNIX?  UNIX is an Operating System (OS).  An operating system is a control program that helps the user communicate.
The Kernel At a high level, the kernel in an operating system serves as the bridge between applications and the actual data processing of the hardware.
 Last lesson, the Windows Operating System was discussed along with the Windows command shell  Unix is a computer operating system, that similarly manages.
1 CS3695 – Network Vulnerability Assessment & Risk Mitigation – Introduction to Unix & Linux.
Lecture 1: Introduction, Basic UNIX Advanced Programming Techniques.
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.
INTRODUCTION TO SHELL SCRIPTING By Byamukama Frank
Windows Server 2003 { First Steps and Administration} Benedikt Riedel MCSE + Messaging
Assignprelim.1 Assignment Preliminaries © 2012 B. Wilkinson/Clayton Ferner. Modification date: Jan 16a, 2014.
Using Linux Kaya Oğuz Room: 310.
ULI101 Week 05. Week Overview ● File system links ● Hard and symbolic links ● Process management ● Storage quota information (quota) ● Printing.
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
CS1010: Intro Workshop.
BIF703 Hard & Symbolic Links.
ECC Linux workshop (intro course)
Chapter 11 Command-Line Master Class
Linux Commands Help HANDS ON TRAINING Author: Muhammad Laique
Andy Wang Object Oriented Programming in C++ COP 3330
Some Linux Commands.
A Guide to Unix Using Linux Fourth Edition
The Linux Operating System
Assignment Preliminaries
Tutorial of Unix Command & shell scriptS 5027
Introduction to UNIX.
Tutorial of Unix Command & shell scriptS 5027
Intro to UNIX System and Homework 1
Tutorial of Unix Command & shell scriptS 5027
Andy Wang Object Oriented Programming in C++ COP 3330
Linux Shell Script Programming
1.3 Given a scenario, apply appropriate Microsoft command line tools
Presentation transcript:

ECC LINUX WORKSHOP (INTERMEDIATE COURSE)

WHAT WILL BE COVERED 1.Input, Output and Pipes 2.Processes 3.Compiling Unix Software Packages 4.Symbolic and Hard Links 5.Environment Variables 6.Security & ECC Policies

ECC-UNIX ACCOUNT ALL ENGINEERING STUDENTS, USING LINUX SYSTEMS OR APPLICATIONS WILL NEED AN ECC-UNIX ACCOUNT NEW USERS WILL NEED TO APPLY FOR ECC-UNIX ACCOUNTS AT THE ECC LAB FRONT DESK COUGAR ID CARD MUST BE PRESENT WHEN APPLYING FOR AN ECC-UNIX ACCOUNT ONLY ENGINEERING AFFILIATED STUDENTS AND FACULTY ARE ALLOWED TO OPEN AN ECC-UNIX ACCOUNT ANY NON ENGINEERING STUDENTS OR FACULTY MUST BE SPONSORED TO OBTAIN AN ECC-UNIX ACCOUNT ECC UNIX ACCOUNTS WILL NOW BE USING COUGARNET PASSWORD AUTHENTICATION.

SWITCH TO COUGARNET AUTHENTICATION Starting Fall 2014 COUGARNET ACCOUNT PASSWORDS WILL BE USED TO LOGIN TO ALL ENGINEERING LINUX SYSTEMS NEW USERS WILL STILL NEED TO CREATE A ECC-UNIX ACCOUNT USERNAME ALL ACCOUNT PASSWORDS WILL HAVE TO BE RESET BY UofH CENTRAL IT.

HOW TO LOGIN Open Remote Desktop Connection from the Windows Start menu and enter the hostname – HOSTS: tuxedo.egr.uh.edu, linus.egr.uh.edu  USE ECC UNIX/CougarNet ACCOUNT TO LOGIN

RDP LOGIN

RESET PASSWORD ( ONLINE ) GO TO: Click “Password Reset” Enter security information On CougarNet Click “Reset”

NAGIVATE THE GUI (GRAPHICAL USER INTERFACE) Applications Accessories word processing System tools Command line (terminal) Places Home folder Subdirectories Search for files System Preferences Administration Utilities System Documentation

APPLICATIONS Firefox Web Browser LibreOffice Open source version of Microsoft Word, Excel, and PowerPoint Terminal Command line shell prompt Faster than GUI Text Editors EMACS Gedit VI/ VIM/ NANO (command line)

CLASS SOFTWARE LOCATION Location: /usr/local Software: MATLAB, Abacus, Fluent, Cadence, Comsol, etc…

ACCESS THE COMMAND LINE PROMPT Applications  System tools  Terminal Fully text based command prompt Shell prompt [ ] $

USING SIMPLE SHELL COMMANDS Navigation: ls – list directory contents ls –l - view files and permissions pwd – print, current working directory cd – change directory cd Ex. (to go to user home directory) [user]$ cd /home/user or cd ~ Copying, Moving, and Deleting cp – copy files and directories cp mv – move or rename file mv touch – make basic text files touch mkdir – create a directory mkdir rm – delete a file (can be destructive) rm rmdir – delete directory (empty directory) rmdir

SHELL COMMANDS (CONTINUED) Search commands: find – search for files Find -name -print Documentation: man – manual pages man Change File Permissions: chown – change file owner and group chown owner:group chgrp System commands: top – show current processes that are running df –h: show the file system disk space usage w : show users currently logged on to the system uptime : show date, load average, and # of users uname –a : show current OS version and computer hostname Network Statistics Ifconfig : show IP address information netstat –rn : show IP routing information

REMOTE ACCESS SSH – Secure Shell client A program used for “shell” access to a remote system. Login using UNIX/Linux terminal (shell), or through “PUTTY” Use ECC UNIX account info to login PUTTY (for Windows Users) Free application Allows shell logins from a windows desktop

REMOTE ACCESS (CONT) SSH from PUTTY: Open PUTTY app from Windows Type the hostname or IP of destination Port is always 22 Enter ECC-UNIX user ID, and password If successful, user command prompt will be shown SSH from another terminal (shell): Type command:

INPUT/OUTPUT REDIRECTION (PIPING) Programs can output to other programs called “piping” “program_a | program_b” program_a’s output becomes program_b’s input “program_a > file.txt” program_a’s output is written to a file called “file.txt” “program_a < input.txt” program_a gets its input from a file called “input.txt”

PROCESSES A process is an executing program identified by a unique PID. In Linux, every process has a unique process identifier (ID) associated to it. A process ID (PID) is a number which is uniquely assigned as soon as the process is created. A process may be in the foreground or in the background. Backgrounding a long process has the effect that the UNIX prompt is returned immediately.

PROCESS STATE There are 5 states a process can be in Task_Running Task_Interruptible Sleeping until some condition is true Task_uninterruptible device driver probing for a certain hardware state Signals to this process leaves it unchanged Task_Stopped Task_Zombie

COMMAND: KILL To terminate a process use “kill”

COMMAND : GREP To search files in a directory for a specific string use “grep”

SOFTWARE INSTALLATION Software for Linux can consist of: Binary files precompiled to run on certain hardware architectures Source code, which must be compiled before use Typically distributed in tarball format Package manager: system that defines standard package format Used to install, query, and remove packages Red Hat Package Manager (RPM): most common package manager used by Linux systems today

COMPILING SOFTWARE PACKAGES FROM TAR FILE Uncompress the tar file $ tar -zxf file.tar.gz Change directory $ ls $ cd path-to-software/ Build and install software $./configure $ make $ make install

COMPILING SOFTWARE PACKAGES CONT’D./configure will configure the software to ensure that system has necessary functionality and libraries to successfully compile the package. Make will compile all source files into executable binaries. Finally, make install will install the binaries and supporting files into appropriate locations

FILESYSTEM LINK A link is a pointer to a file. This pointer associates a file name with a number called an i-node number An i-node is the control structure for a file (on a UNIX/Linux file system) If two file names have the same i-node number, they are links to the same file

FILESYSTEM LINK CONT’D There are two kinds of links: 1.Hard Links 2.Soft or Symbolic Links

HARD LINKS Hard link is a reference to the physical data on a file system More than one name can be associated with the same physical data Hard links can only refer to data that exists on the same file system You can not create hard link to a directory

DISPLAY HARD LINKS INFO Create a new file called “myfile” Run the command “ls -il” to display the i-node number and link counter rw-rw-r-- 1 uli uli 29 Oct 29 08:47 myfile ^ ^ |-- inode # |-- link counter (one link)

DISPLAY HARD LINKS INFO Create a 2 nd link to the same data: ln myfile mylink Run the command “ls -il”: rw-rw-r-- 2 uli uli 29 Oct 29 08:47 myfile rw-rw-r-- 2 uli uli 29 Oct 29 08:47 mylink ^ ^ |-- inode # |--link counter (2 links)

REMOVING A HARD LINK When a file has more than one link, you can remove any one link and still be able to access the file through the remaining links. Hard links are a good way to backup files without having to use the copy command!

SYMBOLIC LINKS Also Known As (a.k.a.): Soft links or Symlinks A Symbolic Link is an indirect pointer to a file – a pointer to the hard link to the file You can create a symbolic link to a directory A symbolic link can point to a file on a different file system A symbolic link can point to a non-existent file (referred to as a “broken link”)

SYMBOLIC LINKS To create a symboic link to the file “myfile”, use ln -s myfile symlink or ln --symbolic myfile symlink courses] ls -li myfile rw-rw-r-- 1 uli uli 49 Oct 29 14:33 myfile courses] ln -s myfile symlink courses] ls -li myfile symlink rw-rw-r-- 1 uli uli 49 Oct 29 14:33 myfile lrwxrwxrwx 1 uli uli 6 Oct 29 14:33 symlink -> myfile Different i-node File type: (symbolic link) Link counter: (1 link)

PROPERTIES OF SYMBOLIC LINKS The i-node number is different from the pointer to file The link counter of the new symbolic link file is “1” Symbolic link file does not affect the link counter of the pointed to file The type field of symblic file contains the letter “l” The symbolic link file and the pointed to file have different status information (e.g. file size, last modification time etc.)

CREATING SYMBOLIC LINK DIRECTORY The syntax is the same as linking to a file ln -s target_directory link_directory ln --symbolic target_directory link_directory week8]$ ls -li drwxrwxr-x 7 uli uli 168 Oct 29 13:32 courses week8]$ ln courses mydir ln: `courses': hard link not allowed for directory week8]$ ln -s courses mydir week8]$ ls -li drwxrwxr-x 7 uli uli 168 Oct 29 13:32 courses lrwxrwxrwx 1 uli uli 7 Oct 29 15:41 mydir -> courses

DIRECTORY LISTING To display the contents in a directory, we normally use the command “ls -l directory_name” Compare the following week8]$ ls -l mydir lrwxrwxrwx 1 uli uli 7 Oct 29 15:41 mydir -> courses week8]$ ls -l courses drwxrwxr-x 2 uli uli 72 Oct 29 11:15 ica101 drwxrwxr-x 2 uli uli 72 Oct 29 11:16 ios110 drwxrwxr-x 2 uli uli 120 Oct 29 11:20 to_do drwxrwxr-x 2 uli uli 72 Oct 29 11:14 uli101

DELETE LINK TO A DIRECTORY  To delete a link to a directory, simply use the “rm” command: week8]$ ls -l drwxrwxr-x 7 uli uli 168 Oct 29 13:32 courses lrwxrwxrwx 1 uli uli 7 Oct 29 15:41 mydir -> courses week8]$ rm mydir week8]$ ls -l drwxrwxr-x 7 uli uli 168 Oct 29 13:32 courses

ENVIRONMENT VARIABLES set command: Lists environment variables and current values echo command: View contents a specified variable echo $SHELL echo $HOSTNAME

ENVIRONMENT VARIABLES (CONT’D)

ENVIRONMENT FILES Common BASH shell environment files (in order they are executed): /etc/profile ~/.bash_profile ~/.bash_login ~/.profile Hidden environment files allow users to set customized variables

SECURTIY & ECC POLICIES ECC website computing-center-policies ECC Usage Policy du/files/files/cce_policy_computing.pdf

SECURITY DO NOT, give anyone your password DO NOT, let anyone use your ECC-UNIX account Always properly logout of once you are finished with a session Remember, all activity on our Linux servers is being tracked and logged, including command history. Report any suspicious activity the following ECC IT administration below. Kiet Luong Manjunatha Shenoy Engineering IT Director / Systems Administrator 2 Information Security Officer

SECURITY/PIRACY DO NOT bring personal routers or switches and plug them into campus network wall ports. If a faculty member wants to connect routers or switches into network, notify the ECC IT administration BEFORE plugging anything onto our network. DO NOT bring personal desktops and plug into the campus network. Only laptops and tablets are allowed, which should only be using the UH wireless network. Desktops with wireless PCI or USB adapters are NOT permitted. DO NOT download and install any pirated or unlicensed software and or multimedia contents onto UH owned computers. This is against UH policy DO NOT use the UH network to conduct any illegal activity and or piracy.

HELP REQUEST For help with your ECC-UNIX account profiles and or any issues related to our engineering Linux servers, please make requests to Undergrad and or Graduate Students - If a change is needed on a faculty research server or computer. Please send an to your faculty advisor/professor for approval. Always ask the faculty advisor to make technical request instead of going directly to the IT administration. Please follow this procedure so that your change request may be processed without delay.

WIFI TROUBLESHOOTING If there are WIFI problems with your laptop or other devices, please run the UH network test from your own devices connected to UH wireless network by going to: