Linux Workshop Session 2 By Amol and Prem. Overview of Presentation Brief Review Useful tools Remote Access Troubleshooting.

Slides:



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

Linux Workshop Session 1 Khadka, Santosh and Panthi, Sanjeeb Computer Science Department Lamar Univers Lamar Univers ity.
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.
It's a binary file kept under specific directory.
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.
Lesson 22 – Introduction to Linux Systems Administration.
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.
Very Quick & Basic Unix Steven Newhouse Unix is user-friendly. It's just very selective about who its friends are.
Linux Commands LINUX COMMANDS.
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.
1 Intro to Linux - getting around HPC systems Himanshu Chhetri.
Linux environment ● Graphical interface – X-window + window manager ● Text interface – terminal + shell.
Essential Unix at ACEnet Joey Bernard, Computational Research Consultant.
Unix Basics Chapter 4.
Introduction to Computer Organization & Systems Topics: Intro to UNIX COMP John Barr.
File Permissions. What are the three categories of users that apply to file permissions? Owner (or user) Group All others (public, world, others)
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 Programming Using C An Introduction to Operating Systems.
CSC414 “Introduction to UNIX/ Linux” Lecture 5. Schedule 1. Introduction to Unix/ Linux 2. Kernel Structure and Device Drivers. 3. System and Storage.
Week Two Agenda Announcements Link of the week Use of Virtual Machine Review week one lab assignment This week’s expected outcomes Next lab assignments.
Linux Commands C151 Multi-User Operating Systems.
EGEE-III INFSO-RI Enabling Grids for E-sciencE Apr. 25, Grid Computing Hands On Training for Users Faculty of Sciences, University.
Unix Servers Used in This Class  Two Unix servers set up in CS department will be used for some programming projects  Machine name: eustis.eecs.ucf.edu.
A Brief Overview of Unix Brandon Bohrer. Topics What is Unix? – Quick introduction Documentation – Where to get it, how to use it Text Editors – Know.
 Last lesson, the Windows Operating System was discussed along with the Windows command shell  Unix is a computer operating system, that similarly manages.
INTRODUCTION TO SHELL SCRIPTING By Byamukama Frank
Using Linux Kaya Oğuz Room: 310.
Introduction to the Linux Command Line Interface Research Computing Systems Bob Torgerson July 19, 2016.
Overview of Linux Fall 2016 Dr. Donghyun Kim
ENEE150 Discussion 01 Section 0101 Adam Wang.
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
Getting started with CentOS Linux
Chapter 11 Command-Line Master Class
Web Programming Essentials:
Prepared by: Eng. Maryam Adel Abdel-Hady
Linux Commands Help HANDS ON TRAINING Author: Muhammad Laique
Andy Wang Object Oriented Programming in C++ COP 3330
Some Linux Commands.
Introduction to Linux Dr Karina Kubiak - Ossowska
Basic knowledge about Linux
Part 3 – Remote Connection, File Transfer, Remote Environments
Shell Script Assignment 1.
Linux Basic Commands Visit to more Learning Resources.
Tutorial of Unix Command & shell scriptS 5027
Introduction to UNIX.
Tutorial of Unix Commands
Tutorial of Unix Command & shell scriptS 5027
CS 60 Discussion Review.
CSE 390a Lecture 3 bash shell continued: processes; multi-user systems; remote login; editors slides created by Marty Stepp, modified by Jessica Miller.
Web Programming Essentials:
Tutorial of Unix Command & shell scriptS 5027
Introduction to Computer Organization & Systems
Getting started with CentOS Linux
Tutorial Unix Command & Makefile CIS 5027
Working with Mac OS and Linux
CSE 390a Lecture 3 bash shell continued: processes; multi-user systems; remote login; editors slides created by Marty Stepp, modified by Jessica Miller.
slides created by Marty Stepp, modified by Jessica Miller
Command line.
CSE 303 Concepts and Tools for Software Development
CSE 390a Lecture 3 bash shell continued: processes; multi-user systems; remote login; editors slides created by Marty Stepp, modified by Jessica Miller.
CSE 390a Lecture 3 bash shell continued: processes; multi-user systems; remote login; editors slides created by Marty Stepp, modified by Jessica Miller.
CSE 390a 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.
1.3 Given a scenario, apply appropriate Microsoft command line tools
Be comfortable with Linux
Presentation transcript:

Linux Workshop Session 2 By Amol and Prem

Overview of Presentation Brief Review Useful tools Remote Access Troubleshooting

Brief Review

Basic Command ls, cd, mv, cp, rm, cat, clear, tar, more, less, tail, head, mkdir …. chmod, grep, ps, kill, pkill, quota, du,df … Most important : man & --help option

Useful Tools find Used to search files in a directory hierarchy. find –iname e.g. find /etc/ -iname passwd chown, chgrp Used to change the ownership of the file chown/chgrp new_owner/new_group file_name

Useful Tools contd.. chmod Used to change the permission of the file Normally used to make file executable or define proper permission like Read, Write permissions r = 4, w = 2, x = 1 file permissions to owner, group, and other Example: to give owner full r, w and x and rest only r  4+2+1(owner) 4+0+0(group) 4+0+0(other) = 744  chmod 744 file_name or chmod u=+rwx,g=r-x-w,o=r-x-w file_name  To give execute permission to group chmod g+x filename

Useful Tools contd.. env Shows the current environment variables and also run a program in a modified environment Very useful to troubleshoot many command not found errors env (prints all environmental variables ) env PATH=/sbin/ test_program ( runs test_program with new value of PATH ) To display particular variable echo $variable_name E.g. echo $PATH, echo $SHELL

Useful Tools contd.. grep To find particular text in a text stream text stream can be a file or can be output of any other command Examples:  grep some_text./* (to find some_text in any file located in current directory, -r can be used to search recursively)  ps –ef | grep httpd ( to find if httpd process is running )

Useful Tools contd.. mount Used to mount new file system to local m/c Syntax: mount options source_fs dest_fol Example: mount –t vfat /dev/sdb1 /media/usb

Useful Tools contd.. ifconfig ( or /sbin/ifconfig ) Used to configure network intefaces. You can use this to find the IP address of the current machine Syntax: ifconfig interface options Example: ifconfig eth0 ifconfig eth netmask broadcast

Useful Tools contd.. Pipes and Redirector Very useful for manipulating program output Pipes chains programs, redirector redirects output normally from output console to some file Syntax : Pipe : |, Redirector: > or >> Example: ls –la | grep owner >output.txt >> will append the existing file

Remote Access

About Accounts There is one account for each student Galaxy Account Can be used to access all the Linux machines in the lab, both locally and remotely Local Accounts Some courses like Computer Networks, AOS, NSA etc. might requires you to have local accounts in certain machines. Remotely accessing these machines using your local account is same as accessing using your main account.

Tools Required ssh client Linux : ssh Windows : Putty

scp or sftp client for your platform Linux : scp sftp Windows : Winscp Optional : remote sftp compatible editor Windows : jEdit for platform that supports java and X

Connecting to Labs Servers Only galaxy is accessible from network outside lamar To access other machines, first login to galaxy. Then ssh to other machines Example: connect to post from outside network ssh galaxy –l galaxy_username ssh mercury –l post_username

Upload and Download Files Locally Networked file system Remotely use your sftp client to upload or download files from galaxy for machines with local account Move files from your machines to gateway servers and then access the files from gateway server. Example: getting testfile from post via galaxy  ssh  In ssh session: sftp  In sftp session: get testfile./.  use your sftp client to access the files in galaxy

Remotely Editing Files Can use remote editor like jEdit to edit files directly residing on remote servers Very useful for debugging you c, c++ code Other machines remote editing is not possible currently

Troubleshooting

Common Problems GCC, G++, javac, java not found Fix: This is most likely due to path problem If this occurs set the path variable Example: export PATH=$PATH:PATH_TO_GCC Easy way: Type: source /etc/bashrc

Common Problems contd.. Class Not Found Error in Java Fix: use –cp option during compilation and execution Example: javac –cp ~/folder;~/folder/package test.java java –cp ~/folder;~/folder/package test Easy way: make jar files To make jar files in netbeans: Clean and Build project. jar file along with all the required classes will be created in your project_name/dist folder To run jar files  java –jar your_jar_file

Common Problems contd.. File Sync Error Fix: This is most likely due to lack of free space in your home directory verify using du –h command Remove.mozilla files from your home directory using rm –rf ~/.mozilla Remove other files if you still need more space Easy way: Append “rm –rf ~/.mozilla” line to the.chrc file located in your home directory. This will clean your cache each time you login

In the End These are only basics of Linux, next step can be knowing how to write scripts. Linux can be shaped to any form you like. The more you work with Linux, the more you will know how computers, devices and networks works. Thanks!