Embedded Linux Systems. Bin Li Assistant Professor Dept. of Electrical, Computer and Biomedical Engineering University of Rhode Island

Similar documents
Introduction to UNIX command-line

Welcome to getting started with Ubuntu Server. This System Administrator Manual. guide to be simple to follow, with step by step instructions

Linux Systems Administration Getting Started with Linux

ELE409 SPRING2018 LAB0

Linux Command Line Primer. By: Scott Marshall

GNU/Linux 101. Casey McLaughlin. Research Computing Center Spring Workshop Series 2018

Stop all processes and then reboot - same as above startx. Log in as superuser from current login exit

Overview LEARN. History of Linux Linux Architecture Linux File System Linux Access Linux Commands File Permission Editors Conclusion and Questions

Introduction to Linux

Unix Filesystem. January 26 th, 2004 Class Meeting 2

Basic Linux Command Line Interface Guide

Introduction to the UNIX command line

UNIX Quick Reference

CS197U: A Hands on Introduction to Unix

Computer Systems and Architecture

Outline. Structure of a UNIX command

Computer Systems and Architecture

Basic Linux Command Line Interface Guide

*nix Crash Course. Presented by: Virginia Tech Linux / Unix Users Group VTLUUG

THE HONG KONG POLYTECHNIC UNIVERSITY Department of Electronic and Information Engineering

Unix File System. Class Meeting 2. * Notes adapted by Joy Mukherjee from previous work by other members of the CS faculty at Virginia Tech

UNIX. Basic UNIX Command

Chapter-3. Introduction to Unix: Fundamental Commands

Presented by Bill Genske Gary Jackson

Introduction to the Linux Command Line

Chapter Two. Lesson A. Objectives. Exploring the UNIX File System and File Security. Understanding Files and Directories

Unix Introduction to UNIX

Perl and R Scripting for Biologists

LAB #7 Linux Tutorial

Introduction to Linux. Woo-Yeong Jeong Computer Systems Laboratory Sungkyunkwan University

Introduction to UNIX Command Line

Hands-on Keyboard: Cyber Experiments for Strategists and Policy Makers

Linux Essentials Objectives Topics:

Introduction to Linux. Roman Cheplyaka

Introduction of Linux

INTRODUCTION TO LINUX

Lab Working with Linux Command Line

Introduction to Unix: Fundamental Commands

National University of Computer and Emerging Sciences Operating System Lab - 02 Lab Manual

CSCE 212H, Spring 2008, Matthews Lab Assignment 1: Representation of Integers Assigned: January 17 Due: January 22

Getting Started. Running Utilities. Shells. Special Characters. Special Characters. Chapter 2 Unix Utilities for non-programmers

Hand-on Labs for Chapter 1 and Appendix A CSCE 212 Introduction to Computer Architecture, Spring

Basic Linux Commands. Srihari Kalgi M.Tech, CSE (KReSIT), IIT Bombay. May 5, 2009

Some useful UNIX Commands written down by Razor for newbies to get a start in UNIX

Introduction to Linux

Linux Session Part I. Kesavan M

Read the relevant material in Sobell! If you want to follow along with the examples that follow, and you do, open a Linux terminal.

Introduction. File System. Note. Achtung!

Chapter 6. Linux File System

Introduction to Linux (Part I) BUPT/QMUL 2018/03/14

Introduction to Linux

Chap2: Operating-System Structures

Introduction to Unix The Windows User perspective. Wes Frisby Kyle Horne Todd Johansen

CS Fundamentals of Programming II Fall Very Basic UNIX

Introduction to Linux

CHE3935. Lecture 1. Introduction to Linux

Linux Essentials. Programming and Data Structures Lab M Tech CS First Year, First Semester

Manage Directories and Files in Linux. Objectives. Understand the Filesystem Hierarchy Standard (FHS)

Connecting to ICS Server, Shell, Vim CS238P Operating Systems fall 18

Unix Workshop Aug 2014

UNIX Commands. Ex: $ pwd $/tmp $cd/home/sales, this will change the directory from /tmp to /home/sales.

CS197U: A Hands on Introduction to Unix

A Brief Introduction to Unix

Linux Nuts and Bolts

Introduction to UNIX command-line II

Linux Reference Card - Command Summary

Topics. Installation Basics of Using GNU/ Linux Administration Tools

Unix System Architecture, File System, and Shell Commands

CS4350 Unix Programming. Outline

Filesystem Hierarchy and Permissions

PiCloud. Building owncloud on a Raspberry PI

Std: XI CHAPTER-3 LINUX

Mills HPC Tutorial Series. Linux Basics I

Linux Training. for New Users of Cluster. Georgia Advanced Computing Resource Center University of Georgia Suchitra Pakala

Set 1 MCQ Which command is used to sort the lines of data in a file in reverse order A) sort B) sh C) st D) sort -r

acmteam/unix.pdf How to manage your account (user ID, password, shell); How to compile C, C++, and Java programs;

Short Read Sequencing Analysis Workshop

Getting your department account

Commands are in black

Linux Shell Script. J. K. Mandal

Unix Handouts. Shantanu N Kulkarni

Course 144 Supplementary Materials. UNIX Fundamentals

Essential Unix (and Linux) for the Oracle DBA. Revision no.: PPT/2K403/02

Operating Systems. Copyleft 2005, Binnur Kurt

Operating Systems 3. Operating Systems. Content. What is an Operating System? What is an Operating System? Resource Abstraction and Sharing

Unix L555. Dept. of Linguistics, Indiana University Fall Unix. Unix. Directories. Files. Useful Commands. Permissions. tar.

The Command Line. Matthew Bender. September 10, CMSC Command Line Workshop. Matthew Bender (2015) The Command Line September 10, / 25

Filesystem Hierarchy and Permissions

M.C.A. (Sem.-lll) (CBCS) Examination November CCA-3003 Operating System and LinuxlUnix programming

Linux Kung Fu. Stephen James UBNetDef, Spring 2017

Unix/Linux Operating System. Introduction to Computational Statistics STAT 598G, Fall 2011

Virtual Machine. Linux flavor : Debian. Everything (except slides) preinstalled for you.

Introduction p. 1 Who Should Read This Book? p. 1 What You Need to Know Before Reading This Book p. 2 How This Book Is Organized p.

Linux/Cygwin Practice Computer Architecture

First of all, these notes will cover only a small subset of the available commands and utilities, and will cover most of those in a shallow fashion.

Unix Basics. Benjamin S. Skrainka University College London. July 17, 2010

EE516: Embedded Software Project 1. Setting Up Environment for Projects

Filesystem Hierarchy Operating systems I800 Edmund Laugasson

List of Linux Commands in an IPm

commands exercises Linux System Administration and IP Services AfNOG 2015 Linux Commands # Notes

Transcription:

Embedded Linux Systems Bin Li Assistant Professor Dept. of Electrical, Computer and Biomedical Engineering University of Rhode Island

Generic Embedded Systems Structure User Sensors ADC microcontroller Application Actuators DAC IP FPGA Operating System Hardware

Embedded Processors

ARM ARM founded in November 1990 Advanced RISC (Reduced instruction set computing) Machines Company headquarters in Cambridge, UK Processor design centers in Cambridge, Austin, and Sophia Antipolis Sales, support, and engineering offices all over the world Best known for its range of RISC processor cores designs Other products fabric IP, software tools, models, cell libraries - to help partners develop and ship ARM-based SoCs ARM does not manufacture silicon

Application Processors

Embedded Operating Systems It has basic components of an operating system Process management Memory management File management I/O management Network management Main characteristics Configurable Real-time

Embedded Operating Systems

Linux Operating Systems A free Unix-type operating system originally created by Linus Torvalds with the assistance of developers around the world. The source code for Linux is freely available to everyone. GUI operating system, including many of the tools that Windows users are familiar with such as, A file manager A Window manager A help system A configuration. Requiring less system resources. A Linux based system can operate smoothly on a 386 or 486.

Access to Department Linux Systems If you are using Windows, download and install PuTTy.exe In HostName (or IP address), input mermaid.ele.uri.edu Connection type: SSH Login using your ELE user name and password

SSH Widely used utilities to login through a network in Unix environment are telnet and rlogin Problem - user's login name and password transmitted as clear text Data transmission after login - also in clear text! SSH, the Secure Shell is a powerful, software-based approach to network security that provides a secure channel for data transmission through a network

Transmit files from Windows to Linux Download and install WinSCP.exe In HostName (or IP address), input mermaid.ele.uri.edu Input your ELE user name and password

Basic Linux Commands File Handling Text Processing System Administration Process Management Archival Network File Systems Advanced Commands

Sources to Learn Commands Primary man (manual) pages man <command> - shows all information about the command <command> --help shows the available options for that command Secondary Books and Internet

File Handling Commands mkdir make directories Usage: mkdir [OPTION] DIRECTORY eg. mkdir test ls list directory contents Usage: ls [OPTION] [FILE] Eg. ls, ls l, ls test cd changes directories Usage: cd [DIRECTORY] Eg. cd test

File Handling (Cont ) pwd print name of current working directory Usage: pwd vim vi Improved, a programmers text editor Usage: vim [OPTION] [file] Eg., vim file1.txt

File Handling (Cont ) cp copy files and directories Usage: cp [OPTION] SOURCE DEST e.g., cp sample.txt sample_copy.txt cp sample_copy.txt targe_dir cp r sample_dir targe_dir mv move (rename) files Usage: mv [OPTION] SOURCE DEST e.g., mv source.txt target_dir mv old.txt new.txt

File Handling (Cont ) rm remove files or directories Usage: rm [OPTION] FILE Eg. rm file1.txt rm r some_dir find search for files in a directory hierarchy Usage: find [OPTION] [path] [pattern] Eg. find name file1.txt history prints recently used commands Usage: history

Pattern A pattern is an expression that describes a set of strings which is used to give a concise description of a set, without having to list all elements e.g., ab*cd matches anything that starts with ab and ends with cd etc. ls *.txt prints all text files

Text Processing cat concatenate files and print on the standard output Usage: cat [OPTION] [FILE] E.g., cat file1.txt file2.txt cat n file1.txt echo display a line of text Usage: echo [OPTION] [string] E.g., echo I like playing Ping Pong echo $HOME

Text Processing (Cont ) grep print lines matching a pattern Usage: grep [OPTION] PATTERN [FILE] E.g., grep apple sample.txt ifconfig grep inet addr: wc print the number of newlines, words, and bytes in files Usage: wc [OPTION] [FILE] eg., wc file1.txt

Text Processing (Cont ) sort sort lines of text files Usage: sort [OPTION] [FILE] E.g., sort file1.txt sort r file1.txt

Linux File Permissions Each file has an associated permission level This allows the user to prevent others from reading/writing/executing their files or directories Use ls l filename to find the permission level of that file

Permission Levels r means read only permission w means write permission x means execute permission

Linux File Permissions e.g., rwx-rw-r means owner has all three permissions, group has read and write, others have only read permission Read permission -4, write-2, execute -1 e.g., rwx-rw-r-- = 764 673 = rw-rwx-wx

System Administration chmod change file access permissions Usage: chmod [OPTION] [MODE] [FILE] Eg., chmod 744 calculate.sh chmod +x calculate.sh

System Administration (Cont ) passwd update a user s authentication tokens Usage: passwd [OPTION] Eg., passwd who show who is logged on Usage: who [OPTION] E.g., who, who b, who q su change user ID or become super-user Usage: su [OPTION] [LOGIN] E.g., su remo, su

Process Management top view the CPU usage of all processes ps report a snapshot of the current processes Usage: ps [OPTION] E.g., ps, ps el kill to kill a process (using signal mechanism) Usage: kill [OPTION] pid E.g., kill -9 2275

Archival tar to archive a file Usage: tar [OPTION] DEST SOURCE E.g., Compress a file: tar cvf /home/archive.tar /home/original Decompress : tar xvf /home/archive.tar zip package and compress (archive) files Usage: zip [OPTION] DEST SOURCE E.g., zip original.zip original unzip list, text and extract compressed files in a ZIP archive Usage: unzip filename E.g., unzip original.zip

Network Ifconfig set/check configuration values for network interfaces Check network configuration: ifconfig Assign an address: ifconfig eth0 192.168.0.1 Turn off the network interface: ifconfig eth0 down Turn on the network interface: ifconfig eth0 up netstat check network status

Network (Cont ) ssh SSH client (remote login program) Ssh is a program for logging into a remote machine and for executing commands on a remote machine Usage: ssh [OPTION] [USER]@hostname E.g., ssh X guest@10.105.11.20 scp secure copy (remote file copy program) Scp copies files between hosts on a network Usage: scp [OPTIONs] [[user]@host1:file1] [[user]@host2:file2] E.g., scp file1.txt guest@10.105.11.20:~/desktop/

File Systems fdisk partition manipulator E.g., sudo fdisk l mount mount a file system Usage: mount t type device dir E.g., mount /dev/sda5 /media/target umount unmount file systems Usage: umount [OPTIONS] dir device E.g., umount /media/target

File Systems (Cont ) du estimate file space usage Usage: du [OPTION] [FILE] e.g., du df report filesystem disk space usage Usage: df [OPTION] [FILE] e.g., df quota display disk usage and limits Usage: quota [OPTION] e.g., quota -v

Advanced Commands reboot reboot the system Usage: reboot [OPTION] E.g., reboot poweroff power off the system Usage: poweroff [OPTION] E.g., poweroff apt-get -- Install/remove programs/softwares Usage: apt-get install packagename apt-get remove packagename apt-get update

Vi 2 modes Input mode ESC to back to cmd mode Command mode Cursor movement h (left), j (down), k (up), l (right) ^f (page down) ^b (page up) ^ (first char.) $ (last char.) G (bottom page) :1 (goto first line) Swtch to input mode a (append) i (insert) o (insert line after O (insert line before) Delete dd (delete a line) d10d (delete 10 lines) d$ (delete till end of line) dg (delete till end of file) x (current char.) Paste p (paste after) P (paste before) Undo u Search / Save/Quit :w (write) :q (quit) :wq (write and quit) :q! (give up changes)

/bin This directory contains executable files necessary to manage and run the Linux system, including shells (such as bash) and file system management utilities such as cp and rm.

/boot This directory contains your bootloader files, which are required to boot your system

/dev This directory contains special files that are used to represent the various hardware devices installed in the system E.g., screen /dev/ttyusb0 115200

/home This directory contains subdirectories that serve as home directories for each user account on your Linux system.

/lib This directory contains code libraries used by programs in /bin and /sbin. Your kernel modules are also stored in the modules subdirectory of /lib.

/etc This directory contains text-based configuration files used by the system as well as services running on the system. You can edit these files with a text editor to customize how Linux behaves e.g., vi /etc/network/interfaces cd /etc/lighttpd >> cd /etc/apt >> cp sources.list sources.list.bak >> vi sources.list

/var This directory contains a variety of variable data, including your system log files e.g., /var/www/

/media This directory is used by some Linux distributions (such as SUSE Linux) to mount external devices, including CD drives, DVD drives, and floppy drives.

/root This directory is the root user s home directory. Notice that it is located separately from the home directories for other users in /home.

/usr This directory contains application files. In fact, most of the application files used on your system are saved in a subdirectory of /usr