Embedded System Design

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

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

Lecture 2: The file system

Chapter 6. Linux File System

Full file at

Filesystem Hierarchy and Permissions

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

Filesystem Hierarchy and Permissions

Filesystem Hierarchy Operating systems I800 Edmund Laugasson

File System Hierarchy Standard (FHS)

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

Unix Filesystem. January 26 th, 2004 Class Meeting 2

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

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

Operating Systems. Engr. Abdul-Rahman Mahmood MS, PMP, MCP, QMR(ISO9001:2000) alphapeeler.sf.net/pubkeys/pkey.htm

INTRODUCTION TO LINUX

INF322 Operating Systems

Topics. Installation Basics of Using GNU/ Linux Administration Tools

Linux Files and the File System

How to Restrict a Login Shell Using Linux Namespaces

Linux Systems Administration Getting Started with Linux

Linux Kung-Fu. James Droste UBNetDef Fall 2016

Introduction to Linux

Introduction to Linux

Course 55187B Linux System Administration

TestOut Linux Pro - English 4.0.x OBJECTIVE MAPPING: CompTIA Linux+ LX0-103

CST Algonquin College 2

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

Linux Kung Fu. Stephen James UBNetDef, Spring 2017

Linux Essentials Objectives Topics:

Unix System Architecture, File System, and Shell Commands

Introduction. What is Linux? What is the difference between a client and a server?

The landscape. File hierarchy overview. A tree structure of directories The directory tree is standardized. But varies slightly among distributions

CS197U: A Hands on Introduction to Unix

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

LPIC-1 System Administrator

"Charting the Course... MOC B: Linux System Administration. Course Summary

Exam LFCS/Course 55187B Linux System Administration

Getting Started with Linux

Commands are in black

Introduction to Linux. Roman Cheplyaka

File systems and Filesystem quota

Perl and R Scripting for Biologists

At course completion. Overview. Audience profile. Course Outline. : 55187B: Linux System Administration. Course Outline :: 55187B::

CSE 265: System and Network Administration

Linux Interview Questions and Answers

This is Worksheet and Assignment 12. Disks, Partitions, and File Systems

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

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

Linux System Administration, level 1. Lecture 4: Partitioning and Filesystems Part II: Tools & Methods

LiLo Crash Recovery. 1.0 Preparation Tips. 2.0 Quick Steps to recovery

Introduction to Linux

Introduction and Overview Getting Started

1 The Linux MTD, YAFFS Howto

Essential Unix and Linux! Perl for Bioinformatics, ! F. Pineda

CS/CIS 249 SP18 - Intro to Information Security

Actual4Test. Actual4test - actual test exam dumps-pass for IT exams

UNIX Concepts COMPSCI 386

MA 511: Computer Programming Lecture 23 Partha Sarathi Mandal

Overview of the UNIX File System

Presented by Bill Genske Gary Jackson

Lec 1 add-on: Linux Intro

Computer System Management - Unix/Linux

ECE 471 Embedded Systems Lecture 10

Chapter 5: User Management. Chapter 5 User Management

Systems Programming/ C and UNIX

Computer Systems and Architecture

Introduction of Linux

UNIX System Programming Lecture 3: BASH Programming

Introduction to Linux

Sharing may be done through a protection scheme. Network File System (NFS) is a common distributed file-sharing method

F 4. Both the directory structure and the files reside on disk Backups of these two structures are kept on tapes

CST8207: GNU/Linux Operating Systems I Lab Nine Disks, Partitions, and File Systems Part 2. Disks, Partitions, and File Systems - Part 2 of 2

Chapter-3. Introduction to Unix: Fundamental Commands

RedHat. Rh202. Redhat Certified Technician on Redhat Enterprise Linux 4 (Labs)

The Linux IPL Procedure

Lab Working with Linux Command Line

Introduction to Linux Part I: The Filesystem Luca Heltai

Welcome to Linux. Lecture 1.1

Exam Linux-Praxis - 1 ( From )

Introduction to Unix: Fundamental Commands

EECS Software Tools. Lab 2 Tutorial: Introduction to UNIX/Linux. Tilemachos Pechlivanoglou

Defensie Exercises preparing for the exam.

Chapter 4 File system management. Chapter 4 File system management

User Guide Linux for AT91CAP9-STK Version 1.1. User Guide LINUX FOR AT91CAP9-STK VERSION: 1.1 1/11

Zephyr Kernel Installation & Setup Manual

File System. yihshih

CS370 Operating Systems

Thousands of Linux Installations (and only one administrator)

CompTIA Linux Course Overview. Prerequisites/Audience. Course Outline. Exam Code: XK0-002 Course Length: 5 Days

Please choose the best answer. More than one answer might be true, but choose the one that is best.

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

CS Unix Tools. Lecture 2 Fall Hussam Abu-Libdeh based on slides by David Slater. September 10, 2010

Unix Handouts. Shantanu N Kulkarni

RocketRAID 231x/230x SATA Controller Debian Linux Installation Guide

ScazLab. Linux Scripting. Core Skills That Every Roboticist Must Have. Alex Litoiu Thursday, November 14, 13

ECE 598 Advanced Operating Systems Lecture 14

CIT 470: Advanced Network and System Administration. Topics. Filesystems and Namespaces. Filesystems

CS370 Operating Systems

Project 3: An Introduction to File Systems. COP4610 Florida State University

Transcription:

Embedded System Design Lecture 10 Jaeyong Chung Systems-on-Chips (SoC) Laboratory Incheon National University

Environment Variables Environment variables are a set of dynamic named values that can affect the way running processes will behave on a computer They are part of the operating environment in which a process runs Examples of environment variables include: PATH a list of directory paths. When the user types a command without providing the full path, this list is checked to see whether it contains a path that leads to the command HOME indicate where a user s home directory PWD this variable points to the current directory LD_LIBRARY_PATH

Environment Variables (cont.) Use and display Echo $HOME Echo $PATH Assignment export VARIABLE=value // for bash and related shells setenv VARIABLE value // for csh and related shells

Environment Variables #include <stdio.h> #include <stdlib.h> int main () { printf("path : %s\n", getenv("path")); printf("home : %s\n", getenv("home")); printf("root : %s\n", getenv("root")); } return(0);

Users and Groups Linux is a multi-user system Each user (account) has a numeric ID (UID) This is defined in /etc/passwd Most users has their home directory Root user -> /root Non-root users -> /home/username ~ in path means the home directory $ cd ~ $ cd ~/Downloads A group is a collection of users Each group has a numeric ID (GID) This is defined in /etc/group

Ownership Each file belongs to a user Each file belongs to a group By default, all files are "owned" by the user who creates them and by that user's default group To change the ownership of a file, use the chown command in the "chown user:group /path/to/file" format. To change the group ownership, use the chgrp command In the following example, the ownership of the "list.html" file will be changed to the "cjones" user in the "marketing" group chown cjones:marketing list.html

Permission Permissions are the "rights" to act on a file or directory. The basic rights are read, write, and execute. Read - A readable permission allows the contents of the file to be viewed. A read permission on a directory allows you to list the contents of a directory. Write - A write permission on a file allows you to modify the contents of that file. For a directory, the write permission allows you to edit the contents of a directory (e.g. add/delete files). Execute - For a file the executable permission allows you to run the file and execute a program or script. For a directory, the execute permission allows you to change to a different directory and make it your current working directory. Users usually have a default group, but they may belong to several additional groups.

Mode A mode is a set of permissions for the owner, the group owner, and the others To change the mode Use the chmod command

Mode

File System a file system (or filesystem) is used to control how data is stored and retrieved. Without a file system, information placed in a storage area would be one large body of data with no way to tell where one piece of information stops and the next begins By separating the data into individual pieces, and giving each piece a name, the information is easily separated and identified Taking its name from the way paper-based information systems are named, each piece of data is called a "file". The structure and logic rules used to manage the groups of information and their names is called a "file system

Types of File systems File system types can be classified into disk/tape file systems, network file systems and special-purpose file systems Disk file systems FAT (FAT12, FAT16, FAT32), exfat, NTFS, HFS and HFS+, HPFS, UFS, ext2, ext3, ext4, XFS, btrfs, ISO 9660, Files-11, Veritas File System, VMFS, ZFS, ReiserFS and UDF Flash file systems JFSS, JFSS2, YAFFS, YAFFS2 Network file systems NFS, AFS, SMB Device file systems A device file system represents I/O devices and pseudo-devices as files, called device files

Virtual File System Provides an abstraction layer between the application program and the filesystem implementations Provides support for many different kinds and types of filesystems Disk-based, network, and special filesystems

Directory structures in the root file system Filesystem Hierarchy Standard (FHS) Started by Dennis Ritchie, 1993 Defines the main directories and their contents in most Linuxbased systems Current Version: 2.3, 29 Jan 2004.

The / The primary hierarchy in FHS The root of tree of file system All paths start form here There is only one / in file system / boot bin dev etc lib proc root sbin tmp usr var

/boot Linux kernel Boot loader configuration If you lost boot You cannot boot your OS boot vmlinuz-2.6.12 config-2.6.12 grub grub.conf

/bin Essential programs Need for system startup Basic commands for Navigating in filesystem File management bin bash bzip2 cat... gzip ls mv rm

/dev Everything is file Hardware components (devices) are file Hard disk Key board All device files are here Direct interaction with device driver Open the device file Read & Write dev hda fda sda... tty random null

/etc System configuration directory What is done by the registry in Windows All configuration file are text files You can view and edit it manually etc bashrc fstab inittab passwd shadow init.d X11 network named httpd X11.conf

/home Home directory of user Each user has a directory /home/bahador /home/hamed All files of user are stored here

/lib Programs need libraries Dynamically linked libraries Programmers need libraries All essential libraries are here Needed for system startup lib libc libm libcrypt libpthread modules

/proc Kernel s interface Kernel pseudo-directory Special directory It is NOT a directory on hard disk Kernel Configuration Kernel State monitoring proc cpuinfo meminfo devices interrupts net sys 1 129 tcp udp net kernel

/sbin System configuration programs Format hard disk Manage hardware Only root can run the programs sbin fsck mkfs mount... adduser poweroff

/tmp Temporary directory All temp files are created by programs Your temp files It is emptied regularly

/usr Secondary hierarchy Very useful programs We usually use them compiler, tools Are not essential for system startup usr bin doc include lib local sbin src Linux-2.6.14

/var The variable directory All dynamic files User cannot change the files var cache lib lock log www named message boot.log

Drives in Windows A physical device maps to one or more drives A hard disk can be partitioned into two logical drives USB disk, CD rom disk etc becomes a new drive There is no drive in linux Each drive has its own root : c:\,d:\

Multiple filesystems in Linux ext2 CDFS / / bin home mnt photos cdrom photos1 photos2

Mount Add a filesystem to another / bin home mnt The root file system cdrom photos Mount point photos1 photos2

Mount How? mount <options> <device> <mount point> mount -t vfat /dev/sdb1 /mnt/flash Don t forget the umount umount <mount point> umount /mnt/flash

Network setup (Manual) $ sudo -i $ ifconfig eth0 10.80.94.xx nemask 255.255.255.0 $ route add default gw 10.80.94.254 $ vi /etc/resolve.conf