mkdir Phys338 s2017 Draw the tree of the directories and files for this step and all the following cd Phys338 s2017

Similar documents
Linux Exercise. pwd answer: We call this directory (into which you get when you log in) your home directory.

CS CS Tutorial 2 2 Winter 2018

Oregon State University School of Electrical Engineering and Computer Science. CS 261 Recitation 1. Spring 2011

Tutorial 1: Unix Basics

CENG 334 Computer Networks. Laboratory I Linux Tutorial

Helpful Tips for Labs. CS140, Spring 2015

Linux/Cygwin Practice Computer Architecture

Getting Started With UNIX Lab Exercises

Lab 3a Using the vi editor

Session 1: Accessing MUGrid and Command Line Basics

Introduction to the Linux Command Line

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

Using the Zoo Workstations

Introduction to Linux for BlueBEAR. January

Lab Working with Linux Command Line

Some Linux (Unix) Commands that might help you in ENSC351

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

CS 215 Fundamentals of Programming II Spring 2019 Very Basic UNIX

Introduction to Linux Workshop 1

CHE3935. Lecture 1. Introduction to Linux

Helsinki 19 Jan Practical course in genome bioinformatics DAY 0

CS Fundamentals of Programming II Fall Very Basic UNIX

CpSc 1111 Lab 1 Introduction to Unix Systems, Editors, and C

Carnegie Mellon. Linux Boot Camp. Jack, Matthew, Nishad, Stanley 6 Sep 2016

Intermediate Programming, Spring Misha Kazhdan

Practical Session 0 Introduction to Linux

Using UNIX. -rwxr--r-- 1 root sys Sep 5 14:15 good_program

CMSC 201 Spring 2018 Lab 01 Hello World

Linux File System and Basic Commands

When talking about how to launch commands and other things that is to be typed into the terminal, the following syntax is used:

CSE115 Lab exercises for week 1 of recitations Spring 2011

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

Refresher workshop in programming for polytechnic graduates General Java Program Compilation Guide

Introduction to Unix - Lab Exercise 0

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

CISC 220 fall 2011, set 1: Linux basics

Exercise sheet 1 To be corrected in tutorials in the week from 23/10/2017 to 27/10/2017

Unix L555. Dept. of Linguistics, Indiana University Fall Unix. Unix. Directories. Files. Useful Commands. Permissions. tar.

Introduction of Linux

Mills HPC Tutorial Series. Linux Basics I

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

Hitchhiker s Guide to VLSI Design with Cadence & Synopsys

Basic Unix Commands. CGS 3460, Lecture 6 Jan 23, 2006 Zhen Yang

AMS 200: Working on Linux/Unix Machines

Linux Shell Script. J. K. Mandal

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

Unix Basics. Systems Programming Concepts

Linux at the Command Line Don Johnson of BU IS&T

Introduction to Linux. Fundamentals of Computer Science

C++ Programming on Linux

Introduction: What is Unix?

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

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

Operating Systems and Using Linux. Topics What is an Operating System? Linux Overview Frequently Used Linux Commands

Intro to Linux. this will open up a new terminal window for you is super convenient on the computers in the lab

MTU Computer Structure

Short Read Sequencing Analysis Workshop

Part I. Introduction to Linux

LAB #5 Intro to Linux and Python on ENGR

Getting Started with UNIX

CMSC 104 Lecture 2 by S Lupoli adapted by C Grasso

Introduction. SSH Secure Shell Client 1

Brief Linux Presentation. July 10th, 2006 Elan Borenstein

Intro to HPC Exercise

Introduction to Linux Part 1. Anita Orendt and Wim Cardoen Center for High Performance Computing 24 May 2017

Laboratory 1 Semester 1 11/12

Introduction to Linux Environment. Yun-Wen Chen

Linux Systems Administration Getting Started with Linux

CSC116: Introduction to Computing - Java

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

Introduction. Overview of 201 Lab and Linux Tutorials. Stef Nychka. September 10, Department of Computing Science University of Alberta

Operating System Interaction via bash

Week 2 Lecture 3. Unix

This lab exercise is to be submitted at the end of the lab session! passwd [That is the command to change your current password to a new one]

15-122: Principles of Imperative Computation

User Guide Version 2.0

Running Sentaurus on the DOE Network

Lab 1 Introduction to UNIX and C

Due: February 26, 2014, 7.30 PM

Introduction to Linux

COSC UNIX. Textbook. Grading Scheme

1. What statistic did the wc -l command show? (do man wc to get the answer) A. The number of bytes B. The number of lines C. The number of words

Getting your department account

Parallel Programming Pre-Assignment. Setting up the Software Environment

Command Line Interface The basics

Development Environment. ICLAB NCTU Institute of Electronics

Lec 1 add-on: Linux Intro

Contents. Note: pay attention to where you are. Note: Plaintext version. Note: pay attention to where you are... 1 Note: Plaintext version...

EKT332 COMPUTER NETWORK

Lab 1: Introduction to Linux Networking

COL100 Lab 2. I semester Week 2, Open the web-browser and visit the page and visit the COL100 course page.

CSC111 Computer Science II

CMSC 201 Spring 2017 Lab 01 Hello World

CS/CIS 249 SP18 - Intro to Information Security

Computers and Computation. The Modern Computer. The Operating System. The Operating System

Linux Tutorial. Ken-ichi Nomura. 3 rd Magics Materials Software Workshop. Gaithersburg Marriott Washingtonian Center November 11-13, 2018

CS 307: UNIX PROGRAMMING ENVIRONMENT KATAS FOR EXAM 1

Introduction to the UNIX command line

The Unix Shell & Shell Scripts

You will automatically be in your user (home) directory when you login.

Transcription:

Linux Exercise The following steps will guide you through the most common Linux commands. If you are using windows (Library and any Windows lab on campus), then start with step 1. If you are using a linux machine (Olin 170, Dana 213, Brki 164), then start with step 3. (For access to Linux on your own computer, please note the links on my capstone webpage for windows and Mac OS X.) 1. Log into Windows with: Ctrl-Alt-Del type in your username and your password 2. Left mouse click on the Windows Symbol on the bottom left All Apps Xmanager Enterprise 5 Sessions Linuxremote1 Graphical. 3. Log into a linux workstation. To do so type after login: your username and hit Enter and after password: your password. Use the same username and password as for your windows account at Bucknell. In case you get a message window Unlock Login Keyring click on the downright arrow on the top to minimize the window. 4. With the cursor on the background click on the right mouse button and choose Open Terminal. This should open a window in which you can write commands. 5. Check in which folder (a folder which contains other folders and/or files is called directory ) you are by typing in this new window pwd and hit Enter. For all following commands hit Enter after each command. Take notes for this command and following command on what each command is doing. So pwd means print working directory. 6. To start with a different directory, which is at the top of all your linuxspace print the command and then repeat pwd. We call this directory your home directory. For simplicity you should always whenever you have logged into a linuxmachine, start with the command. 7. Create a directory of the name Phys338 s2017 by typing in this new window

mkdir Phys338 s2017 Draw the tree of the directories and files for this step and all the following steps. 8. Check the contents of your current directory (list) with 9. Change the current directory. Get into Phys338 s2017 ls and redo 5. Phys338 s2017 10. Create a file with filename linux logfile by typing gedit linux logfile & A new window will open up. gedit is an editor, that means that you can edit files with it (so like Word on windows). In case you are used to vim or any other editor, feel free to use it instead. Write into the linux logfile: Linux commands: =============== mkdir pwd ls create directory print current directory list contents of current directory Save the contents of the file with Save (or shorter Ctrl+S) and quit the editor with Quit which is located in the main menue button to the right of Save. You might want to use this file in the future as a reference for linux commands. Add to it new commands whenever you learn them.

11. In this course we will often want to share each others programs (files). Since usually all your files are protected from being read by anyone else but you, you will need to change this permission whenever you would like other people (your classmates and me) to be able to read your file (see also 22. of this Intro). You do this in this example with: chmod a+r linux logfile a means all and +r means add read permission. With ls -l you can check the permissions of any file and directory. The first three digits specify your permissions, the last three digits specify the permissions of everybody else. In each case the digits are for executable,reading and writing. Change the reading and writing permissions of the linux logfile and check after each change with ls -l linux logfile 12. Check again the contents of the current directory. answer: 13. Create another file called tryfile with content and redo 8. hello good bye 14. Look at the contents of the tryfile with 15. Do the same with the logfile. cat tryfile 16. Next remove (delete) the tryfile with rm -i tryfile You will be asked if you like to remove tryfile. Type y for yes. Check again the contents of your current directory. rm is a dangerous command. It has together with the wild card * the power of removing all your files in a single command! Think always twice before you remove a file!

17. Create a directory with name trydir and get into it with mkdir trydir trydir 18. Get back out of trydir (one step higher in the tree of directories) with Check in which directory you are. 19. Remove trydir with.. rmdir trydir 20. Get back to your home directory either with or with or with ~ ~yourusername (e.g. for me ~kvollmay). This gets you to anyone s home directory.

21. Look at the contents of your linux logfile with cat ~/Phys338 s2017/linux logfile We used here the full path of the linux logfile, so it would work from any directory. 22. The following guides you through the steps you will need to hand in any program assignment in the course. (A program, more precise source code, is a file like the linux logfile.) The following three commands you need to do only once mkdir share.dir chmod 755 share.dir Check with ls -l what the last command did. Then go to the directory where your assigned program is, e.g. ~/Phys338 s2017/ Then copy the file you want to have accessible, e.g. cp linux logfile ~/share.dir/ chmod a+r ~/share.dir/* The asterik means that you changed the permission of all files and directories in /share.dir/. 23. For logging out of your linux session: Click on System which is located at the menue bar on the top of your screen and choose Log out.... 24. And here a useful link to get access to your linux space, i.e. to all your linux directories and files, when you are working on a windows machine http://ask.bucknell.edu/?p=267