ecc linux workshop (intro course). what will be covered 1.unix/linux overview 2.red hat enterprise...

37
ECC LINUX WORKSHOP (INTRO COURSE)

Upload: shavonne-evans

Post on 12-Jan-2016

219 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: 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

ECC LINUX WORKSHOP (INTRO COURSE)

Page 2: 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

WHAT WILL BE COVERED

1. UNIX/Linux Overview

2. Red Hat Enterprise Linux

3. ECC-UNIX accounts

4. How to Login

5. GUI Navigation

6. Applications

7. Command Line

8. Shell Commands and Create Text Files

9. File Permissions

10. Remote Access & File Transfer

11. X Window + PUTTY

12. Security & ECC Policies

13. Help Requests

Page 3: 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

UNIX OVERVIEW

UNIX was developed in 1969 at Bell Labs. Originally used as a workbench for programmers to develop new software for testing.

Main Functions of UNIX:

- High performance Computing (Clustering, job scheduling)

- Resource Sharing (File and sharing)

- Multi-User Access

- Programming and Software Development

Page 4: 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

• Linus Torvalds developed the Linux kernel in 1991.

• Collaborated with the GNU Project in 1992, to create the first free operating system for the public.

• Many distributions of Linux include Debian, Fedora, Mandriva, SUSE, Slackware, and Android

• Most distributions are free for use, some are NOT

Page 5: 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

RED HAT ENTERPRISE LINUX

• Enterprise level operating system

• Trademark and Support are NOT free

• CentOS and Scientific Linux are free “rebuild”versions of Red Hat Enterprise Linux

Page 6: 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

CENTOS 6 AND 7

• http://www.centos.org/

• A free, community supported enterprise OS.

• Exact replica of Red Hat Enterprise Linux 6 and 7

Page 7: 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

ECC-UNIX ACCOUNT

• ALL ENGINEERING STUDENTS, USING LINUX SYSTEMS OR APPLICATIONS WILL NEED A 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 CREATE A ECC-UNIX ACCOUNT

• ANY NON ENGINEERING STUDENTS OR FACULTY MUST OBTAIN SPONSORSHIP TO CREATE AN ACCOUNT

• ECC UNIX ACCOUNTS NOW USE COUGARNET PASSWORD AUTHENTICATION.

Page 8: 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

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.

Page 9: 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

RESET PASSWORD (ONLINE)

GO TO: http://www.uh.edu/infotech/

Click “Password Reset”

Enter security information

On CougarNet

Click “Reset”

Page 10: 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

HOW TO LOGIN

• OPEN X-WIN 32 FROM START MENU

• CONFIGURE X-WIN 32:

• New Connection “Manual”• Choose ‘XDMCP’• ‘General’ tab• Connection Name: tuxedo • XDMCP mode: Query

• HOST: tuxedo.egr.uh.edu• Hit ‘Save’• Hit ‘Launch’

USE ECC UNIX/CougarNet ACCOUNT TO LOGIN

Page 11: 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

XWIN-32 LOGIN USING SSH

• Click “Start” -> “All Programs” -> “X-Win 32 2012”

• CONFIGURE X-WIN 32:

• New Connection “Manual”

• Connection Method ‘SSH’

• ‘General’ tab

• Connection Name: tuxedo or linus

• HOST: tuxedo.egr.uh.edu

• Command: /usr/bin/gnome-session

• Switch to “Advanced” tab

• Start New Instance “Always”

• Window Mode: “Switch to Single”

• Save your configuration

• Highlight the connection name and click “Launch”

• USE ECC UNIX ACCOUNT TO LOGIN

Page 12: 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

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

Page 13: 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

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)

Page 14: 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

CLASS SOFTWARE LOCATION

Location: /usr/local

Software: MATLAB, Abacus, Fluent, Cadence, Comsol, etc…

Page 15: 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

MATLAB• Location of MATLAB Software folder:

• /usr/local/MATLAB

• Current licensed versions:

R2012a and R2013a

• To run application using GUI

• Click “Computer” -> “Filesystem” -> “usr” -> “local” -> “MATLAB” -> “R2013a” -> “bin” -> “matlab”

Easy way! on CLI

Matlab 2012a

Type: $ matlab

Matlab R2013a

Type: $ matlab2013

Page 16: 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

COMSOL• Location of Comsol software executable

$ /usr/local/comsol40a_Wosik/bin/comsol

Create a command path in your home .bashrc file

export PATH=$PATH:/usr/local/comsol40a_Wosik/bin/

Save .bashrc file

Type $ source .bashrc

TO CHECK YOUR CONFIGURATION:

Check you path with $ echo $PATH

Also check the path location of a shell command using which

Ex. $ which comsol

Page 17: 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

CADENCE

Software Location:

/usr/local/Cadence

Please check the ECE webpage for Cadence setup to ECC-UNIX account profiles IE.

http://www.ee.uh.edu/research/cadence-university-program

Click the “Getting started in Cadence” link to open a profile configuration document.

Skip steps 1 – 7 (new configuration next slide)

Page 18: 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

CADENCE (CONTINUED)Using your favorite text editor…

Edit ~/.login

Add lines:

#Cadence Calp path

set path=($path /usr/local/bin /usr/local/calp)

source /usr/local/calp/nlogin

Save file

Edit ~/.cshrc

#Cadence Virtuoso Path

alias virtuoso "/usr/local/Cadence/ic/tools/dfII/bin/virtuoso &"

setenv PATH ${PATH}:/usr/local/Cadence/ic/tools/dfII/bin

setenv PATH ${PATH}:/usr/local/Cadence/tools/bin

set path=($path /usr/local/bin /usr/local/calp)

source /usr/local/calp/ncshrc

Save file

Run virtuoso: in the shell

Type:

$ tcsh

$ source ~/.login

$ virtuoso &

MUST BE IN A X11 (remote graphical) SESSION TO RUN THIS PROGRAM

Page 19: 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

SILVACO• Location of program is located in /usr/local/SILVACO.x64

• Users can set the path to run the program in there home directory.

• Set your path in your home folder .bashrc file.

• Using (vim,nano) text editor, enter the following line in your profile:

export PATH=$PATH:/usr/local/SILVACO.x64/bin/

Save .bashrc file

Type $ source .bashrc

TO CHECK YOUR CONFIGURATION:

Check you path with $ echo $PATH

Also check the path location of a shell command using which

Ex. $ which deckbuild

Page 20: 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

FLUENT

Location: : /usr/local/ANSYS-15/v150/fluent/bin/fluent

Run Fluent from the CLI (easy way)

In home .bashrc file, add

##Fluent Path

export PATH=$PATH:/usr/local/ANSYS-15/v150/fluent/bin/

Save…

Type: $ fluent

Page 21: 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

ACCESS THE COMMAND LINE PROMPT

Applications System tools Terminal

Fully text based command prompt

Shell prompt

[ username@<hostname> <current working directory>] $

Page 22: 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

SHELL COMMAND SYNTAX

Command syntax and arguements are DIFFERENT for each and every shell command

[user@host ~]$ command [OPTIONS] …[file] [file2]

Example:

[user@host ~]$ ls –al [file]

- Will display all files in the current working directory with a “long listing format”

Page 23: 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

USING SIMPLE SHELL COMMANDS

Navigation:

ls – list directory contents

ls –l - view files and permissions

pwd – print, current working directory

cd – change directory

cd <directory path>

Ex. (to go to user home directory)

[user]$ cd /home/user or cd ~

Copying, Moving, and Deleting

cp – copy files and directories

cp <file source> <file destination>

mv – move or rename file

mv <file source> <file destination>

touch – make basic text files

touch <file name>

mkdir – create a directory

mkdir <directory file path>

rm – delete a file (can be destructive)

rm <file path>

rmdir – delete directory (empty directory)

rmdir <file path>

Page 24: 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

SHELL COMMANDS (CONTINUED)

Search commands:

find – search for files

Find <sourse directory> -name <name of file or directory> -print

Documentation:

man – manual pages

man <command or application>

Change File Permissions:

chown – change file owner and group

chown owner:group <file path>

chgrp <groupname> <file path>

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

Page 25: 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

MORE COMMANDSdu: -estimate file space usage

Ex: $ du –sh [file/directory]

diff or cmp:

Diff: compare files line by line

Ex. $ diff [file1] [file2]

Tar: create archive of files also with compression

Create tar archive file

$ tar –cvf [archive.tar] [files or directory]

Extract tar achive file

$ tar –xvf [tar_file.tar]

You can compress using the –z option and syntax as follows

$ tar –czvf [archive.tar.gz] [files and or directory]

Wget: network downloader

- Extract files from http links directly to your current working directory

- $ wget [options] [URL]

Page 26: 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

CREATE & EDITING TEXT FILES

NANO ( simple cmd text editor)

Nano <file>

VIM (command line text editor)

vim <edit file name or new file create>

EMACS

GUI(Graphical) text editor

Located in Applications -> Accessories -> EMACS

Page 27: 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

FILE PERMISSIONS

drwxrwxrwx

First character:

d = directory (blue)

l = symbolic link (cyan)

‘-’ = a file (white)

rwx permissions:

R = read

W = write

X = execute

First set: owner

Second set: group

Third set: everyone

Page 28: 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

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

Page 29: 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

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: ssh <username>@<hostname>

Page 30: 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

USING X WINDOW IN PUTTY

There are two methods for creating a graphic window display for an application using the PUTTY command line program on Windows, in conjuction with X-Win 32 (license required) or Xming (free).

X-win 32:

Start up x-win32 program, DO NOT login to server using the appliction. Instead,

Start the PUTTY app (start -> all programs -> PUTTY)

In “Connection” tab, click the ‘+’ for SSH, click on “X11”, click box for “Enable X11 forwarding”

In dropdown box “Session”, type the hostname of the server you wish to connect to. Click “open”

Run application of your choice (matlab,comsol,gedit,etc.)

Page 31: 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

XMING

Free X-server application for windows

Website: http://www.straightrunning.com/XmingNotes/

“Public Domain Releases”

Download both “Xming” and “Xming-fonts”, install both apps.

Run Xming, runs in the background. No initial setup is required.

While Xming is running, start PUTTY session in X11 enabled mode ( previous slide)

Page 32: 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

FILE TRANSFER

WinSCP:

• Transfer files from Windows to

Linux and vice versa

• Download WinSCP from

“software download” section on

Access UH

• Login:

• Open WinSCP program• Enter user credentials, click login

Page 34: 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

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 Zain Marvi

Engineering IT Director / Systems Administrator 2 Systems Administrator 1

Information Security Officer Email:[email protected] Email: [email protected]

Email: [email protected]

Page 35: 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

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.

• http://www.uh.edu/af/universityservices/policies/mapp/10mappit.htm

Page 36: 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

HELP REQUEST

For help with your ECC-UNIX account profiles and or any issues related to our engineering Linux servers, please make requests to [email protected]

Undergrad and or Graduate Students -

If a change is needed on a faculty research server or computer. Please send an email 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.

Page 37: 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

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:

http://www.uh.edu/network-test/#0