Linux Programming 18.01.2015. Schedule Lection Meet and greet Introduction to course Introduction to Linux Virtual machines Terminal Makefiles Lab Setup.

Slides:



Advertisements
Similar presentations
Operating System.
Advertisements

CSCI 1411 FUNDAMENTALS OF COMPUTING LAB Lab Introduction 1 Shane Transue MSCS.
1 CSE 390a Lecture 1 introduction to Linux/Unix environment slides created by Marty Stepp, modified by Josh Goodwin
Run a Virtual Machine. Virtualization Have you ever imitated someone else? That's because your mind is thinking/ imagining as that person Same to a Computer:
1 Web Server Administration Chapter 3 Installing the Server.
CS 497C – Introduction to UNIX Lecture 3: Inside UNIX Chin-Chih Chang
IERG4180 Tutorial 4 Jim.
Offering your Windows Server Class Online. Tony Basilico Community College of Rhode Island
Cambodia-India Entrepreneurship Development Centre - : :.... :-:-
Installing software on personal computer
Linux Operating system
1 Virtualization and Virtual Machines Sarah Diesburg 1/10/2013 COP 5641.
To run the program: To run the program: You need the OS: You need the OS:
Linux Basics. What is an Operating System (OS)? An Operating System (OS) is an interface between hardware and user which is responsible for the management.
1 Introduction to Tool chains. 2 Tool chain for the Sitara Family (but it is true for other ARM based devices as well) A tool chain is a collection of.
Linux Basics CS 302. Outline  What is Unix?  What is Linux?  Virtual Machine.
Section 6.1 Explain the development of operating systems Differentiate between operating systems Section 6.2 Demonstrate knowledge of basic GUI components.
1 Web Server Administration Chapter 3 Installing the Server.
Chapter 10 – UNIX. History In late 1960s, two employees of Bell Labs (Ken Thompson & Dennis Ritchie) designed a new operating system to overcome the constraints.
Herb Brown Appalachian State University. State of Networking Instruction  Many programs are adding networking instruction  Networking instruction is.
POS/420 Introduction to Unix Philip Robbins – March 12, 2013 (Week 1)
Hands-On Virtual Computing
Homework There will be 4 homework assignments There will be 4 homework assignments They will each be graded (There will be bonus) They will each.
CIS 191 – Lesson 2 System Administration. CIS 191 – Lesson 2 System Architecture Component Architecture –The OS provides the simple components from which.
1 Web Server Administration Chapter 3 Installing the Server.
EMT 2390L Lecture 1 Dr. José M. Reyes Álamo. Outline About Linux Install Linux in a Virtual Machine.
1 SEEM3460 Tutorial Unix Introduction. 2 Introduction Unix-like system is everywhere Linux Android for smartphones Google Chrome OS for Chromebook Web.
Operating System - Linux Ph. D. Course Work : PHYS 601 Statistics and Computer Applications Presented By: Sanjay Godara Dept. of Physics & Astrophysics.
1 Introduce Linux Speaker: Yi-Ji Jheng Date:
Introduction to Linux ( I ) Sidney Fong 4 th Feb 2006.
Installation Overview Lab#2 1Hanin Abdulrahman. Installing Ubuntu Linux is the process of copying operating system files from a CD, DVD, or USB flash.
CS 444 Introduction to Operating Systems
Agenda Link of the week Use of Virtual Machine Review week one lab assignment This week’s expected outcomes Review next lab assignments Break Out Problems.
Operating System What is an Operating System? A program that acts as an intermediary between a user of a computer and the computer hardware. An operating.
CS2204: Introduction to Unix January 19 th, 2004 Class Meeting 1 * Notes adapted by Christian Allgood from previous work by other members of the CS faculty.
Unix/Linux for beginners:
1 CSE 390a Lecture 1 introduction to Linux/Unix environment slides created by Marty Stepp, modified by Jessica Miller & Ruth Anderson
1 CSE 390a Lecture 1 introduction to Linux/Unix environment slides created by Marty Stepp, modified by Jessica Miller & Ruth Anderson
Chapter 9: Networking with Unix and Linux. Objectives: Describe the origins and history of the UNIX operating system Identify similarities and differences.
THE WINDOWS OPERATING SYSTEM Computer Basics 1.2.
Gorman, Stubbs, & CEP Inc. 1 Introduction to Operating Systems Lesson 8 Linux.
Computer Operating Systems And Software applications.
Active-HDL Server Farm Course 11. All materials updated on: September 30, 2004 Outline 1.Introduction 2.Advantages 3.Requirements 4.Installation 5.Architecture.
Course 03 Basic Concepts assist. eng. Jánó Rajmond, PhD
 Prepared by: Eng. Maryam Adel Abdel-Hady
 Prepared by: Eng. Maryam Adel Abdel-Hady
This slide deck is for LPI Academy instructors to use for lectures for LPI Academy courses. ©Copyright Network Development Group Module 01 Introduction.
 CSC 215 : Procedural Programming with C C Compilers.
Using Virtualization in the Classroom
By Jonathan Rinfret UNIX/LINUX By Jonathan Rinfret
bitcurator-access-webtools Quick Start Guide
Class Projects and Environment
DIT314 ~ Client Operating System & Administration
EE516: Embedded Software Project 1
Implementation of Embedded OS
CSC227: Operating Systems
Computer System Laboratory
Java programming lecture one
Operating System Review
CSE 390a Lecture 1 introduction to Linux/Unix environment
Computer Systems Programming
OPS235: Week 1 Installing Linux ( Lab1: Investigations 1-4)
CSE 390a Lecture 1 introduction to Linux/Unix environment
OPS235: Week 1 Installing Linux ( Lab1: Investigations 1-4)
Linux Operations and Administration
bitcurator-access-webtools Quick Start Guide
introduction to Linux/Unix environment
Welcome to Linux Chap#1.
Presentation transcript:

Linux Programming

Schedule Lection Meet and greet Introduction to course Introduction to Linux Virtual machines Terminal Makefiles Lab Setup Linux VM Try basic commands in terminal Write C code in Linux Prepare makefile Compile und Run

About the lecture Martin Kuvandzhiev Age 21 Born in Burgas High school of mechanics and electronics Technical University of Sofia Working for TAO-Wellness Creator of Project Valkyrie

Introduction to corse What we gonna do ?

Requirements C and Cpp programming basics Laptop/Mac Virtual Machine Client (VMware, VirtualBox etc.) Imagination

What you are going to learn What is Linux and how to use it Work with Makefiles Work with VM Work with Terminal Work withThreads Work with Kernel Filesystems Git/SVN

Evaluation 20 % Homework 30 % Exam theory 50 % Exam practical tasks

Homework Evaluation 50% is based on the solution of the homework Homework must be submitted before the deadline Homework are evaluated by people who has sent their own homework 50% is based on evaluating other people’s homework There will be a deadline for the evaluation After evaluation of the homework a feedback

Exam theory 100% Test No open answers Single and multiple choice

Exam practical task Setup a new virtual machine on PC One kernal task One C task Makefiles for compilation Commit to Git

Introduction to Linux What the **** is Linux

Timeline 1983 GNU Project, free software concept by Richard Stallman development of gcc, gdb, glibc and other important tools 1991 Linux kernel project, a Unix-like os kernel by Linus Torvalds Open - source 1995 Linux is more and more popular on server systems 2000 Linux is more and more popular on embedded systems 2008 Linux is more and more popular on mobile devices 2010 Linux is more and more popular on phones

Examples of embedded Linux devices

Devices suitable for embedded development and prototyping Raspberry Pi Banana Pi Olimex devices Beagle bone PCDuino Other

Linux vs Windows CriteriaLinuxWindows ManufacturerLinux kernel – open source, crow developed Microsoft DevelopmentOpen source, crowd developed, distributed by various vendors UsageMobile phones, game consoles to mainframe supercomputers Desktop computers, laptops, servers, mobile phones, tablets File System supportExt2, Ext3, Ext4, Jfs, Xfs, FAT, FAT32, NTFS, HFS+ FAT, FAT32, NTFS, exFAT SoftwarePackagesInstallation archives

Linux Shell

Куешчънс??? VAPROSI ??

Virtual Machine How to work with VM

Virtual Machine Clients VMware VirtualBox Parallel desktop Google Cloud Platform

Purpose of VM Try different OS Development of OS modules QA software on different OS Not to risk you data if you make a mistake

How does it work Resource allocation Easy to change hardware configuration Performance problems

How to setup Install a VM client Download.img (.iso) of the OS you want to install For Linux (minimum requirements) 5 GB space 1(2) cores 1 GB RAM

Questions ?

Setup a VM Linux Machine Task 1 – 30 min

First steps in Linux (Debian) Welcome to the world of infinite learning

Linux users Standard user Can read, write personal folders Can read, write personal files Can use user files installed on the systems Administrators (sudoers) Can do anything that a standard user can do Install new packages Set the system Register, edit users

Linux users Root user God of the OS

Basic commands in Linux cd – change directory (cd.. to return to previous level) ls – list files mkdir – make directory rmdir – remove direcotry nano – text redactor (like notepad)

Questions ?

Task 2 – 5 min Start the VM Linux Machine Login Open directory “/” What do you see there ? Then open /home/your_user_name/ Create directory “test_directory” Delete the directory “test_directory” Create directory “hello_softuni” Enter “hello_softuni”

How to use nano $nano filename.extention will open (or create) a file with this name $nano path/to/file/filename.extention will open(or create) a file with this name on the path/to/file directory Use ^X to exit the file. You might be asked to save it after you press ctrl(^) + X.

Questions ?

Task 3 – 10 min Make a new file called “main.c” in hello_softuni folder Inside the file write a “hello softuni” program. Save and Exit the file

Compiling a simple.c file How to do it without a button

What is to compile a code Translate a code from.c (or other language) to object code (which is understandable by machine) and an executable file. In linux is recommended to recompile the code for new machines You are using GCC (GNU Compiler Collection) to compile on Linux. It is supporting all of cpp like languages

How to compile and run on Linux $gcc path/to/file/inputFile.c –o path/to/file/outputFile $./path/to/file/outputFile

Questions ?

Task 4 – 5 min Compile hello_softuni.c Run hello_softuni

Makefiles

Makefile In order to compile easily multiple files, or to follow a specific pattern of compiling there are makefile file on Linux With using the simple command “$make” linux understands that it should start the makefile script

Makefile composition target: dependencies [tab] system command

Makefile example

Questions ?

Task 5 – 10 min Compile hello_softuni with a makefile Execute make command Execute output file

Daily Final Task – 30 min Write a C program that calculates Speed by given Acceleration and time after the start of the acceleration (Easy) Distance by given Acceleration and time after the start of the acceleration (Medium) Time to stop if the car has deceleration equal to Acceleration divided by 2, by given time and Distance (Hard) Create a makefile Compile and run

Data for the task For 1 and 2 Acceleration = 10 meters per second Time = 2 minutes For 3 Distance is m Time is 110 s