190 likes | 207 Views
Class Projects and Environment. Networking CS 3470, Section 1 Sarah Diesburg. A lot to go over today…. Why interface with Linux? Programming environment Programming languages Useful Tools. Why Use Linux?. Linux is open source We actually have access to the kernel code and can change it
E N D
Class Projects and Environment Networking CS 3470, Section 1 Sarah Diesburg
A lot to go over today… • Why interface with Linux? • Programming environment • Programming languages • Useful Tools
Why Use Linux? • Linux is open source • We actually have access to the kernel code and can change it • Make our own drivers! • Change the OS behavior • Much of the Internet runs on UNIX/Linux! • Wonderful time to get some experience
Unix/Linux Share • Desktop/laptop – Linux 1.73% • Mobile Devices – Android 79.0% • Servers – Unix-like/Linux 66.8% • Supercomputers – Linux 96.4-98% Source: http://en.wikipedia.org/wiki/Usage_share_of_operating_systems#Servers
Five Projects Projects will include • Network programming on a Linux server and clients • Chat program • Network game • Network cables and the physical medium • Investigating network protocols • Analyzing packets
Programming Project • Start projects when they're assigned. • They're often trickier than they look. • Ask questions early. • If you're asking questions, be it to yourself or to others, you're thinking about the project. This will make it easier to complete them correctly and on time. • Write small programs to test your program or language features you don't understand.
Accessing the Remote Servers • Linux server located at student.cs.uni.edu • Use CatID and password to access • If you are unfamiliar accessing remote Linux servers, please watch this video posted on today’s webpage
Logging In • Use SSH to connect to “student.cs.uni.edu” • Secure SHell • If in Linux or OSX • Open up a command-line terminal • $> ssh <username>@student.cs.uni.edu • If in Windows • You will need a terminal emulator • Bash for Windows • PuTTY (download from link on resources page)
Bash for Windows • Setup: https://itsfoss.com/install-bash-on-windows/ • Demo
PuTTY • Get PuTTY if you are on Windows and can’t use bash for Windows: http://www.chiark.greenend.org.uk/~sgtatham/putty/
Next Steps • Get familiar with Linux shell commands inside of student.cs.uni.edu • Go to the Resources web link: (Video #2) • Use the Linux commands cheat sheet • Snapshot from the resources page:
Transferring Files • In Linux/OSX • scp command (harder) • FileZilla • In Windows • File transfer client like WinSCP or FileZilla • Look on the resources page for links
Programming and Editing Source Files • I want to edit a programming file before I run it. How/where do I do this? • Two ways • Create and edit files on your own computer, then transfer to Linux server • Create and edit files directly on Linux server • This saves you time and mistakes!!!
Terminal Editors -- Vim • The vi editor was created by Bill Joy, the founder of Sun Microsystems when he was a graduate student • The vim editor, vi improved, is the Linux version of the vi editor • multiple windows, highlighting text, and command history • http://www.vim.org/
Terminal Editors -- Emacs • GNU Emacs is an extensible, customizable text editor • Content-sensitive editing modes, including syntax coloring, for a variety of file types including plain text, source code, and HTML • http://www.gnu.org/software/emacs/
Terminal Editors -- Others • Nano and/or pico are also available on most Linux systems • If you have never worked in Linux before, this is your editor! • Extremely basic • $>nano <file name>
Programming Language • I will be giving examples in the Python3 programming language • Some of you may come from different backgrounds or want more experience in another languages • I will have starter code for Python3, Java, and C • See Video 3 for running Python3, Java, and C in the Linux environment
Homework 1 (Due next Wed) • Find this linked on the website • Short program to look up a couple of networking functions/methods in your language of choice • Fill out homework assessment on eLearning • Run and upload your program