linux and java basics. what is linux? operating system by linus torvalds that was a clone of unix...

20
Linux and Java Basics

Upload: gwen-harmon

Post on 14-Jan-2016

218 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Linux and Java Basics. What is Linux? Operating system by Linus Torvalds that was a clone of Unix (thus Linux) Free and open source – this is the reason

Linux and Java Basics

Page 2: Linux and Java Basics. What is Linux? Operating system by Linus Torvalds that was a clone of Unix (thus Linux) Free and open source – this is the reason

What is Linux?

• Operating system by Linus Torvalds that was a clone of Unix (thus Linux)

• Free and open source – this is the reason for its success

• Unix and Linux now both very closely related

Page 3: Linux and Java Basics. What is Linux? Operating system by Linus Torvalds that was a clone of Unix (thus Linux) Free and open source – this is the reason

Where is Linux?

• iOS and OSX (Linux like Unix called BSD)• Android (Linux)• Our server• Deep Blue, Watson, CERN’s LHC• Military tanks, missile systems, satellites,

robots, etc…• ~65-80% all internet servers and security

devices

Page 4: Linux and Java Basics. What is Linux? Operating system by Linus Torvalds that was a clone of Unix (thus Linux) Free and open source – this is the reason

Supercomputing?

Page 5: Linux and Java Basics. What is Linux? Operating system by Linus Torvalds that was a clone of Unix (thus Linux) Free and open source – this is the reason

What’s with all this text only non-sense?

Page 6: Linux and Java Basics. What is Linux? Operating system by Linus Torvalds that was a clone of Unix (thus Linux) Free and open source – this is the reason

Command Line Interface

Every operating system needs to be able to take instructions. The interface for all OSs is done is called the command line.

Other names you might see:• Shell• Command prompt• CLI• Console / Terminal

Page 7: Linux and Java Basics. What is Linux? Operating system by Linus Torvalds that was a clone of Unix (thus Linux) Free and open source – this is the reason

But… why are we learning it?

• The GUI is heavyweight – a robot has limited computing power and using it on running a GUI is a huge waste– Interacting with most of these systems is

command line only

• Understanding this is underneath all the shiny stuff helps you understand computing

• Will allow you to do advanced non-programming things on your computer

Page 8: Linux and Java Basics. What is Linux? Operating system by Linus Torvalds that was a clone of Unix (thus Linux) Free and open source – this is the reason

Connecting to Aegis

• ssh – secure shell connection. How you would work with a robot’s operating system using your computer

Page 9: Linux and Java Basics. What is Linux? Operating system by Linus Torvalds that was a clone of Unix (thus Linux) Free and open source – this is the reason

Basic Linux Commands - Navigation

• ls – list. Shows the files in the current or specified directory

• cd – Change Directory. Switches you to a different directory.

• rm – ReMove. Removes a file(s)• mv – MoVe. Moves a file(s) from one location to

another• cp – CoPy. Copies a file(s) from one location to

another• mkdir – MaKe DIRectory. Makes a new directory.

Page 10: Linux and Java Basics. What is Linux? Operating system by Linus Torvalds that was a clone of Unix (thus Linux) Free and open source – this is the reason

Anatomy of a Command

Page 11: Linux and Java Basics. What is Linux? Operating system by Linus Torvalds that was a clone of Unix (thus Linux) Free and open source – this is the reason

Tab

TAB is your friend!

Pressing tab on an incomplete command or argument• Finishes it for you (if only 1 possibility)• If more than 1 possibility, double tab lists options• Saves so much typing and memorization!• You should press it… (reasonably) a lot

Page 12: Linux and Java Basics. What is Linux? Operating system by Linus Torvalds that was a clone of Unix (thus Linux) Free and open source – this is the reason

Your Turn

Now, you try!

Page 13: Linux and Java Basics. What is Linux? Operating system by Linus Torvalds that was a clone of Unix (thus Linux) Free and open source – this is the reason

ls

Page 14: Linux and Java Basics. What is Linux? Operating system by Linus Torvalds that was a clone of Unix (thus Linux) Free and open source – this is the reason

cd

Page 15: Linux and Java Basics. What is Linux? Operating system by Linus Torvalds that was a clone of Unix (thus Linux) Free and open source – this is the reason

rm

Page 16: Linux and Java Basics. What is Linux? Operating system by Linus Torvalds that was a clone of Unix (thus Linux) Free and open source – this is the reason

More Commands!

• pwd – Present Working Directory. Display the full path of the current directory you are in

• cat – concatenate. Most used for quickly displaying contents of a file, but can be used to add stuff to ends of files.

• clear – puts the last line at the top so you have a fresh screen

• man <program name> - get the manual for a specific program, e.g., man ls

Page 17: Linux and Java Basics. What is Linux? Operating system by Linus Torvalds that was a clone of Unix (thus Linux) Free and open source – this is the reason

Wildcards

Wildcard – a character that can be used as a substitute for some set of other characters

• * - match anything• ? – match exactly 1 character of any kind

Page 18: Linux and Java Basics. What is Linux? Operating system by Linus Torvalds that was a clone of Unix (thus Linux) Free and open source – this is the reason

Wildcards

Page 19: Linux and Java Basics. What is Linux? Operating system by Linus Torvalds that was a clone of Unix (thus Linux) Free and open source – this is the reason

F! YEA JAVA!

Page 20: Linux and Java Basics. What is Linux? Operating system by Linus Torvalds that was a clone of Unix (thus Linux) Free and open source – this is the reason

Compiling and Running Java Programs