Unix powerpoint2

431 views
352 views

Published on

Published in: Education
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
431
On SlideShare
0
From Embeds
0
Number of Embeds
2
Actions
Shares
0
Downloads
0
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Unix powerpoint2

  1. 1. Introduction to UNIX <ul><ul><li>Presented By </li></ul></ul><ul><ul><li>Andrew Borja </li></ul></ul>
  2. 2. What is UNIX? <ul><ul><li>Unix stands for UNiplexed Information and Computing System </li></ul></ul><ul><ul><li>UNICS->UNIX </li></ul></ul>
  3. 3. Learn Unix Together as a Team <ul><ul><li>2 people to a computer </li></ul></ul><ul><ul><li>Engineers often work in teams </li></ul></ul><ul><ul><li>A suggestion is to switch the person typing, so both people can type and the other can observe as well. </li></ul></ul>
  4. 4. Who Developed Unix and Why <ul><li>AT&T programmers Ken Thompson, Dennis Ritchie, Rudd Canaday, and Doug McIlroy </li></ul><ul><li>To develop a universal system in which computer code could be produced and is portable. </li></ul><ul><li>It is a system in which many people can access all at the same time. </li></ul>Ken Thompson (left) with Dennis Ritchie
  5. 5. Where can I access UNIX? <ul><ul><li>1) BE 105, a 24 hour unstaffed lab facility </li></ul></ul><ul><ul><li>2) Crown Labs </li></ul></ul><ul><ul><li>3) Your very own computer. </li></ul></ul>
  6. 6. How Do I Access UNIX? <ul><ul><li>1) BE 105 or Crown - your username and password will get you in </li></ul></ul><ul><ul><li>2) At Home - Use the Remote Desktop Connection </li></ul></ul><ul><ul><li>3) Secure Shell Client (SSH) - available on its.ucsc.edu </li></ul></ul>
  7. 7. Utilizing Secure Shell Client <ul><ul><li>Open Secure Shell Client </li></ul></ul>Click connect to remote host and type the following Use your ucsc email name. Ex: “aborja” not “aborja@ucsc.edu” The Password is the same one you use for Cruzmail
  8. 8. Welcome to UNIX! <ul><ul><li>Begin by typing </li></ul></ul><ul><ul><li>“ pwd ” </li></ul></ul><ul><ul><li>Print working Directory </li></ul></ul><ul><ul><li>Write down your working directory </li></ul></ul><ul><ul><li>starting after users/ </li></ul></ul><ul><ul><li>Example: </li></ul></ul><ul><ul><li>....users/s/aborja </li></ul></ul><ul><ul><li>(You need this for later) </li></ul></ul>pwd -Print Working Directory: displays where you are currently located <ul><ul><li>An exciting new unfamiliar world is opened to you. </li></ul></ul><ul><ul><li>What can we do? </li></ul></ul>
  9. 9. Getting Started <ul><li>Type: </li></ul><ul><li>“ ls ” </li></ul>ls – Lists the contents of the current folder you are in. These include files and directories mkdir - makes a directory. These are folders in which you can store data files in. Now we want to make a directory. A folder to store contents in. Type : “ mkdir Sumbridge” “ mkdir Programs”
  10. 10. Copying Contents Type “ cd sumBridge” <ul><li>Copying files from other folders must be very precise. The location of the file must typed in correctly for the specific folder and file or else it will not work. </li></ul>
  11. 11. Type: <ul><ul><li>Type : </li></ul></ul>Copying Contents cont. cp – copies contents of files and puts them in your folder
  12. 12. What's Inside Your New Files <ul><ul><li>cat -concatenates a file and displays </li></ul></ul><ul><ul><li>the contents of the file </li></ul></ul>A README file is always made to explain a program. It gives anybody who reads your code an understanding of what its purpose is. A java file is an editable source file (with .java extension) that can be compiled into bytecode (a .class file).
  13. 13. Moving files <ul><ul><li>Type: </li></ul></ul>Moving files keeps you organized This also teaches you how to move files without the use of a GUI(Graphic User interface) mv – Moves files from one folder to another.
  14. 14. Text Editors A text editor in programming is software used to prepare program source code. Labs, and code editing are produced in here. Other text editors include: pico, vi, Xemacs
  15. 15. Say Hello to the World! <ul><ul><li>Type : </li></ul></ul><ul><ul><li>“ emacs helloWorld.java” </li></ul></ul><ul><ul><li>Scroll to code that says: </li></ul></ul><ul><ul><li>System.out.println (“Hello World!”); </li></ul></ul><ul><ul><li>Change to : </li></ul></ul><ul><ul><li>System.out.println(“Hello YourName”); </li></ul></ul>Hold CTRL-X-C to exit. Emacs will ask to save file. Press “y” to indicate yes that you want to save the file.
  16. 16. Compile Code! <ul><li>Type </li></ul><ul><li>“ javac helloWorld.java” </li></ul><ul><li>Type </li></ul><ul><li>“ ls” </li></ul><ul><li>A new file should appear </li></ul><ul><li>helloWorld.class </li></ul><ul><li>If any problems come up, ask me or a peer mentor </li></ul><ul><li>Compile Code - The process of changing a program written in a source language (for example, JAVA) into a machine language routine that the computer can understand. The compiled routine is then ready to be loaded into storage and run. (HP DOCS). </li></ul>javac – the command that compiles the java file into a class file and making it executable.
  17. 17. Say Hello to Yourself! <ul><ul><li>Type </li></ul></ul><ul><ul><li>“ java helloWorld” </li></ul></ul><ul><ul><li>The display should be </li></ul></ul><ul><ul><li>Hello YourNAME! </li></ul></ul>java – The java command only works when a program has been compiled. This runs the executable file.
  18. 18. Removing Files <ul><li>You cannot delete a directory without the contents inside the directory being empty. </li></ul><ul><li>Beware of * . This removes everything in the current folder. </li></ul>rm filename – The command removes the filename. rmdir dirname – Removes the directory. NOTE: Must be an empty directory. rm * - Removes everything in the folder.
  19. 19. Questions?

×