Review Please hand in any homework and practicals Vim Scripting Inter-device communication.

Slides:



Advertisements
Similar presentations
POS/420 Philip Robbins – March 19, 2013 (Week 2) University of Phoenix Mililani Campus Introduction to Unix.
Advertisements

Basic Unix system administration
Linux can be generally divided into four major components: 1. KERNEL – OS, ultimate boss The kernel is the core program that runs programs and manages.
CS 497C – Introduction to UNIX Lecture 11: - The File System Chin-Chih Chang
5 Basic utilities When a user logs in to the Linux operating system the directory that they will start in is their home directory. Most users will have.
Introduction to Unix (CA263) File System
Exploring the UNIX File System and File Security
Introducing the Command Line CMSC 121 Introduction to UNIX Much of the material in these slides was taken from Dan Hood’s CMSC 121 Lecture Notes.
GNU/Linux Filesystem 1 st AUT GNU/Linux Festival Computer Engineering & IT Department Bahador Bakhshi.
The UNIX File System.
Guide To UNIX Using Linux Third Edition
L INUX C OMMAND L INE I NTERFACE G UNAANBAN.G
1. This presentation covers :  User Interface Administration  Files System and Services Management 2.
Introduction to Linux Workshop February Introduction Rob Lane & The HPC Support Team Research Computing Services CUIT.
File System and Directory Structure in Linux. What is File System In a computer, a file system is the way in which files are named and where they are.
Website Tutorial. Administration  Log on by clicking Login on the footer of almost any page  Your Username is.
Using the “CLI” Unix / Linux Preparation Course May 25 Djibouti.
One to One instructions Installing and configuring samba on Ubuntu Linux to enable Linux to share files and documents with Windows XP.
Guide To UNIX Using Linux Fourth Edition
Introduction to Linux Installing Linux User accounts and management Linux’s file system.
The file structure and related utilities CS240 Computer Science II.
Manage Directories and Files in Linux
Chapter 9 Part II Linux Command Line Access to Linux Authenticated login using a Linux account is required to access a Linux system. The Linux prompt will.
5 Chapter Five Web Servers. 5 Chapter Objectives Learn about the Microsoft Personal Web Server Software Learn how to improve Web site performance Learn.
Unix Basics Chapter 4.
Grades Please hand in your homework Quizzes coming back today Current grade on back with missing assignments Anything missing can be turned in late There.
Linux Operations and Administration
Samba Advanced System Administration Course James Lwali University computing Centre Ltd, University of Dar es salaam,
Database-Driven Web Sites, Second Edition1 Chapter 5 WEB SERVERS.
Linux+ Guide to Linux Certification, Third Edition
Chapter Two Exploring the UNIX File System and File Security.
INTRODUCTION TO LINUX Jacob Chan. GNU/Linux Consists of Linux kernel, GNU utilities, and open source and commercial applications Works like Unix –Multi-user.
Linux Administration. Pre-Install Different distributions –Redhat, Caldera, mandrake, SuSE, FreeBSD Redhat Server Install –Check HCL –Significant issues.
Quiz 15 minutes Open note, open book, open computer Finding the answer – working to get it – is what helps you learn I don’t care how you find the answer,
USING YOUR INSTALLED LINUX SYSTEM.  Common Linux Tasks  Installing Custom Packages  Common GUI Applications  Command Line Shell  Directory Structure/Navigation.
UNIX (Linux) Introduction Module-1. OS Kernel In computing, the kernel is the central component of OS. It is a bridge between applications and the actual.
Linux file system "On a UNIX system, everything is a file; if something is not a file, it is a process." Sorts of files (on a Linux system) Directories:
Manage Directories and Files in Linux. 2 Objectives Understand the Filesystem Hierarchy Standard (FHS) Identify File Types in the Linux System Change.
Chapter Two Exploring the UNIX File System and File Security.
EMT 2390L Lecture 5 Dr. Reyes Reference: The Linux Command Line, W.E. Shotts.
Chapter 3 & 6 Root Status and users File Ownership Every file has a owner and group –These give read,write, and execute priv’s to the owner, group, and.
Homework & Review Questions? Everything after this is for accuracy – “All your permanent teeth are in, okay? You’re playing for keeps now!” -Psych Review:
Homework & Practical Let’s go through it Does anyone not have access to the wiki? Questions?
Linux Commands C151 Multi-User Operating Systems.
PTA Linux Series Copyright Professional Training Academy, CSIS, University of Limerick, 2006 © Workshop V Files and the File System Part B – File System.
Review Please turn in any homework/practicals you may have Folders Paths Services Processes.
CS 245 – Part 1 Using Operating Systems and Networks for Programmers Jiang Guo Dept. of Computer Science California State University Los Angeles.
17 Establishing Dial-up Connection to the Internet Using Windows 9x 1.Install and configure the modem 2.Configure Dial-Up Adapter 3.Configure Dial-Up Networking.
SUSE Linux Enterprise Desktop Administration Chapter 7 Manage Directories and Files.
Lab 8 Overview Apache Web Server. SCRIPTS Linux Tricks.
Lecture 02 File and File system. Topics Describe the layout of a Linux file system Display and set paths Describe the most important files, including.
Basic UNIX system administration CS 2204 Class meeting 14 *Notes by Doug Bowman and other members of the CS faculty at Virginia Tech. Copyright
Linux Tutorial Lesson Two *Getting Help in Linux *Data movement and manipulation *Relative and Absolute path *Processes Note: see chapter 1,2,3 from Linux.
LINUX Zhengli Zhu, School of Life Sciences. Outline 1. ABC of Linux 2. Basic orers of Linux 3. Bash Programming.
2Operating Systems  Program that runs on a computer  Manages hardware resources  Allows for execution of programs  Acts as an intermediary between.
Linux Administration – Finding You Way on the Command Line The Linux File Directory or Tree.
Using Linux Kaya Oğuz Room: 310.
Getting started with CentOS Linux
Linux 101 Training Module Linux Basics.
UBUNTU INSTALLATION
Linux file system "On a UNIX system, everything is a file;
3.4 User Interfaces This tutorial will give you a first-hand experience of: Navigating the directory structure in a CLI and an unfamiliar GUI Running the.
Basic Commands ls cp ls –l (in detail format) echo ls –a
C151 Multi-User Operating Systems
Shell Script Assignment 1.
9 Linux on the Desktop.
Exploring the UNIX File System and File Security
Unix : Introduction and Commands
Chapter 7 File and file System structure
Getting started with CentOS Linux
Presentation transcript:

Review Please hand in any homework and practicals Vim Scripting Inter-device communication

Today Folders review Paths review Services Processes BE SAFE TOMORROW May Day, May 1 st Check your schedules, no class after 5pm

Directory Structure Linux is a ‘tree’ or ‘hierarchical’ directory structure (so is Windows) cture.png

Paths Again The relative path has to reflect our new position Where We AreRelative Path /home/tom/documentstext /home/tom (~)documents/text /hometom/documents/text Does ‘Where We Are’ look familiar? It’s the Absolute path Why?

Full Linux Directory Structure

Directories This is why paths are important (abs vs relative) You need to know where you are and where you need to go to /bin, /sbin, /usr/bin, /usr/sbin All contain commands (programs/executables) /dev Short for ‘devices’ – hard drives, usb, cd/dvd, etc… /etc Config files for the system – we’ve already seen sudo & passwd files, also has web browser, groups, logging, program config files, etc…

Directories, pt 2 /home Holds user files (akin to the folder that holds ‘My Documents,’ ‘My Music,’ ‘My Pictures,’ etc… in Windows) /tmp Temp directory, used to store temporary files Always the first directory to get deleted – don’t store files here and expect them to stay /var Directory that holds ‘variable’ files that change during the normal running of a system Log files in /var/log/messages (logs get added, etc…); (/var/spool/mail); webserver/ftp

Misc Directories Those are the directories you should get to know first Others are for more advanced topics/functions: /boot – holds the ‘live’ kernel /lib – library files for kernel, updates, programming, etc… /root – root user’s home dir /opt – folder for 3 rd party applications /usr – files shared between users And more

Paths And Access Useful administration tasks Checking /tmp Viewing configuration files/settings Creating and running scripts Moving around Looking through processes

Scenario 1 We want to look for failures on a device Login Check log (permissions locked) Escalate privileges Check log again

For Those Viewing Later Login: student Password: ~]# cat /var/log/messages Error: permission denied ~]# su ndillon Password: ~]# sudo cat /var/log/messages | grep error Password:

Scenario 2 Setting/changing a static IP Google Log in Escalate Vi …and the new thing for today… Restart the ‘service’

For Those Viewing Later Google ‘linux set static ip’ /etc/sysconfig/network-scripts/ifcfg-eth0 Login: student Password: ~]# su ndillon Password: ~]# cp /etc/sysconfig/network- scripts/ifcfg-eth0 backups/ ~]# sudo vi /etc/sysconfig/network- scripts/ifcfg-eth0 Inside vi, set IPADDR, BOOTPROTO, MASK, GATEWAY, and save and quit ~]# sudo /etc/init.d network restart ~]# ip eth0

Summary 1) Know what you’re doing Modifying a config file? Checking system resources? 2) Know what resources you’re working with And where they are IP address? Files? /tmp? HDD (SAS/SATA or IDE)? 3) Have a good tutorial Different tutorials will explain it different ways Figure out which ways work best for you (graphical, text, video, etc…)

Questions on Paths? When you log into a system you’ll be in /home/ From there you can access things through the relative path or through the absolute path

Processes and Users A process is an action or job for the computer to do Either persistent (goes on for a while – ‘run a shell’), or immediate (‘list the files in this directory’ = ls) When the first is run, the shell is started, and stays there until we force it to exit In the second, the ls is run and it’s done The ps command shows the processes running on the system at that exact moment

Most PS instances ps –ef flags help show: UID = user who started the job/process PID = process id (this is used with other commands to specify a process to manipulate) TTY – tons o'fun here – this is the ‘space’ in the system allotted to the specific user Time – the time the command was entered Command – the command (with options) that is currently running LOT of info (will scroll off the screen)

Output of ps From liquidweb.com

We can see what's running And we can see it live! The top command shows the 'top' running processes Lots more useful info And live, not just snapshot like ps But also not to stdio (use q to quit) This means its not useful in scripts

Top Snapshot (from: wikipedia article for top)

Top Output Type in top Changes live, use the ‘q’ button to quit Shows system information at the top – procs, memory, utilization, and more Then shows live snapshot of system PID = process ID, each process gets a number, numbers reset each boot, and increment (first process gets 1, second gets 2, third gets 3, etc) Username = shows the user that started, and is running the command/utility Nice = priority Command = what was run to kick this off

Processes Review What is a limitation of the ‘top’ command? What does ‘top’ show that ‘ps’ does not? When is ‘ps’ more useful?

Service A service is a full application So far we’ve done things that have used single processes One running instance of the bash shell One running instance of ps Services are commonly used applications that usually encompass more than one process Networking: IP address, ports, communication streams, etc…

Manipulating Services Services are controlled through the service command ~]# sudo service ssh start If the SSH service is not running, it will start it If it is running, nothing will happen ~]# sudo service network stop Will stop all network services (no internet connection of any kind) ~]# sudo service apache restart Will stop and then start the Apache web server If Apache is off, it will just start it again

Question on Services Questions?

Own Study Folders review Sobell Ch 4 – The Filesystem (81-89) Paths review Sobell Ch 4 – The Filesystem (81-89) Processes Sobell Ch 8 – The Bourne Again Shell (323)