linux and java basics. what is linux? operating system by linus torvalds that was a clone of unix...
TRANSCRIPT
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 for its success
• Unix and Linux now both very closely related
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
Supercomputing?
What’s with all this text only non-sense?
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
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
Connecting to Aegis
• ssh – secure shell connection. How you would work with a robot’s operating system using your computer
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.
Anatomy of a Command
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
Your Turn
Now, you try!
ls
cd
rm
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
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
Wildcards
F! YEA JAVA!
Compiling and Running Java Programs