Presentation is loading. Please wait.

Presentation is loading. Please wait.

Lab 00 Discussion Linux Basics

Similar presentations


Presentation on theme: "Lab 00 Discussion Linux Basics"— Presentation transcript:

1 Lab 00 Discussion Linux Basics
CSCE 212 Computer Architecture Lab 00 Discussion Linux Basics Topics Login in SWGN 1D39, a Linux Lab (3D22 is another) Code-all.tgz (all the code from the book) Basic Unix Commands January 16, 2018

2 Overview Last Time New – Next Time:
Lec00 – C primer slides (we did not go over these in class) New – Login Filesystem “tree” Basic Commands Saving attachment from “code-all.tgz” Unpacking Compiling showbytes Running Next Time:

3 Login to Unix/Linux Boxes in 1D39
Your Login name is the root_name of your USC address Your password is your password To logout you … (I’ll check on this. On my Linux box it is done differently and I’ll have to go down to 1D39 to remember how you do it there.

4 Unix file system / At every point in Unix you are “in” the current working directory At login your “current directory” initially will be your home-dir You specify files and directories with paths A full path (starts with slash) /acct/matthews/212 A relative path does not start with ‘/’ and starts from the current directory acct bin dev etc proc matthews cp ls device drivers 212

5 Basic Commands ls – list the contents of this directory
cd – change directory pwd – print working (current) directory mkdir – make a directory cp – copy file mv – move a file (= rename) rm – remove a file pico (maybe nano) – a simple editor gcc (Gnu C Compiler) – man cmd – print the manual page on cmd

6 30 Useful Unix Commands From Univ. of Manchester 1997

7 More Unix references 50 Most Frequently Used UNIX / Linux Commands (With Examples) 2010 Ramesh Natarajan More experienced selection of commands 100 Useful Unix Commands & Unix Intro. 2014 by Oliver

8 Saving and unpacking code-all.tgz
mkdir 212 Student webmail Save attachment cd // go home cd Downloads cp code-all.tgz ~/212 cd ~/212 ls tar xvfz code-all.tgz

9 Compiling showbytes Cd code Cd data
gcc show_bytes.c // this produces a.out ./a.out // run the executable gcc show_bytes.c –o prog // names the executable prog ./prog // run the executable Note show_bytes.c might be show-bytes.c

10


Download ppt "Lab 00 Discussion Linux Basics"

Similar presentations


Ads by Google