Linux Introduction Part 2. Finding Files find “start directory” -name "filename“ Find the file called "filename" on the filesystem starting the search.

Slides:



Advertisements
Similar presentations
RH030 Linux Computing Essentials
Advertisements

Using tcpdump. tcpdump is a powerful tool that allows us to sniff network packets and make some statistical analysis out of those dumps. tcpdump operates.
NETW-240 Shells Last Update Copyright Kenneth M. Chipps Ph.D. 1.
FILE TRANSFER PROTOCOL Short for File Transfer Protocol, the protocol for exchanging files over the Internet. FTP works in the same way as HTTP for transferring.
ATS Programming Short Course I INTRODUCTORY CONCEPTS Tuesday, Jan. 27 th, 2009 Essential Unix Commands.
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.
Now, return to the Unix Unix shells: Subshells--- Variable---1. Local 2. Environmental.
Lesson 22 – Introduction to Linux Systems Administration.
Linux+ Guide to Linux Certification, Second Edition
Software installation Chapter 7. Software installation Numerous software options Usually free Open source Several sources Installation CD Websites sourceforge.net.
SUSE Linux Enterprise Server Administration (Course 3037) Chapter 1 Introduction to Managing the SUSE Linux Enterprise Server.
Linux+ Guide to Linux Certification, Third Edition Chapter 11 Compression, System Backup, and Software Installation.
Installing Linux softwares Sirak Kaewjamnong. 2 Software packets  When Linux developers create their software they typically bundle all the executable.
L INUX C OMMAND L INE I NTERFACE G UNAANBAN.G
Linux Installation and Administration Lesson 2 Tutor: George Papamarkos.
Chapter 11 Compression, System Backup, and Software Installation.
Operating System Program 5 I/O System DMA Device Driver.
Linux Operations and Administration
1 THE UNIX FILE SYSTEM By Chokechai Chuensukanant ID COSC 513 Operating System.
Help session: Unix basics Keith 9/9/2011. Login in Unix lab  User name: ug0xx Password: ece321 (initial)  The password will not be displayed on the.
LPIC-1 TRAINING COURSE Topic 102: Linux Installation and package management.
Agenda User Profile File (.profile) –Keyword Shell Variables Linux (Unix) filters –Purpose –Commands: grep, sort, awk cut, tr, wc, spell.
Unix Basics Chapter 4.
– Introduction to the Shell 10/1/2015 Introduction to the Shell – Session Introduction to the Shell – Session 2 · Permissions · Users.
Unix Shells Based on Glass & Abels’ Book CS240 Computer Science II.
®® Microsoft Windows 7 for Power Users Tutorial 13 Using the Command-Line Environment.
Managing Processes CSCI N321 – System and Network Administration Copyright © 2000, 2011 by Scott Orr and the Trustees of Indiana University.
A Practical Guide to Fedora and Red Hat Enterprise Linux Unit 8: Installing Software in Linux Chapter 13: Downloading and Installing Software By Fred R.
Linux+ Guide to Linux Certification, Third Edition
1 What is a Kernel The kernel of any operating system is the core of all the system’s software. The only thing more fundamental than the kernel is the.
Guide to Linux Installation and Administration, 2e1 Chapter 10 Managing System Resources.
Process Control. Module 11 Process Control ♦ Introduction ► A process is a running occurrence of a program, including all variables and other conditions.
ACCESS IC LAB Graduate Institute of Electronics Engineering, NTU Usage of Workstation Lecturer: Yu-Hao( 陳郁豪 ) Date:
Guide To UNIX Using Linux Third Edition Chapter 8: Exploring the UNIX/Linux Utilities.
Troubleshooting and Performance
Guide to Linux Installation and Administration1 Chapter 4 Running a Linux System.
Linux+ Guide to Linux Certification, Second Edition Chapter 10 Managing Linux Processes.
Guide To UNIX Using Linux Third Edition Chapter 8: Exploring the UNIX/Linux Utilities.
Installation of packages Objectives –Using software packaging tools Contents –Application delivered as –Where to get commonly used rpm’s –Autofs on! –Getting.
Linux+ Guide to Linux Certification Chapter Eleven Managing Linux Processes.
Λειτουργικά Συστήματα - Lab1 Γιάννης Πετράκης. The Operating System  Unix is a layered operating system  The innermost layer is the hardware that provides.
CHAPTER 8 Managing Software and System Resources.
Manage Directories and Files in Linux Part 2. 2 Identify File Types in the Linux System The file types in Linux referred to as normal files and directories.
Agenda Basic Unix Commands (Chapters 2 & 3) Miscellaneous Commands: which, passwd, date, ps / kill Working with Files: file, touch, cat, more, less, grep,
Lesson 3-Touring Utilities and System Features. Overview Employing fundamental utilities. Linux terminal sessions. Managing input and output. Using special.
CSE 374 Programming Concepts & Tools Hal Perkins Fall 2015 Lecture 2a – A Unix Command Sampler (Courtesy of David Notkin, CSE 303)
Linux Commands C151 Multi-User Operating Systems.
CS 245 – Part 1 Using Operating Systems and Networks for Programmers Jiang Guo Dept. of Computer Science California State University Los Angeles.
ATS Programming Short Course I INTRODUCTORY CONCEPTS Tuesday, Feb 3 rd, 2009 Essential Unix Commands …the second half.
PTA Linux Series Copyright Professional Training Academy, CSIS, University of Limerick, 2006 © Workshop VI Scheduling & Process Management Professional.
Linux+ Guide to Linux Certification, Second Edition Chapter 4 Exploring Linux Filesystems.
The Kernel At a high level, the kernel in an operating system serves as the bridge between applications and the actual data processing of the hardware.
CSC414 “Introduction to UNIX/ Linux” Lecture 3
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.
Guide to Parallel Operating Systems with Windows 7 and Linux Chapter 10 Operating System Management.
Linux Administration – Finding You Way on the Command Line The Linux File Directory or Tree.
SYSTEM ADMINISTRATION PART I by İlker Korkmaz and Kaya Oğuz
Getting started with CentOS Linux
Chapter 11 Command-Line Master Class
Linux Commands Help HANDS ON TRAINING Author: Muhammad Laique
Proc File System Sadi Evren SEKER.
C151 Multi-User Operating Systems
Agenda Basic Unix Commands (Chapters 2 & 3) Miscellaneous Commands:
Managing Software.
Ubuntu Working in Terminal
CSE 374 Programming Concepts & Tools
OPS235 PACKAGE MANAGEMENT
COP 4343 Unix System Administration
Introduction Paul Flynn
Getting started with CentOS Linux
Presentation transcript:

Linux Introduction Part 2

Finding Files find “start directory” -name "filename“ Find the file called "filename" on the filesystem starting the search from the “start directory ” locate filename Find the file name which contains the string "filename". Easier and faster. which executable_name Show me the full path to the executable that would run if I just typed its name on the command line. whereis command Print the locations for the binary, source, and manual page files of the command "command". grep -r ‘text_to_find'. |more Search all files in the current directory and all its subdirectories (the option "-r" stands for "recursive") for the example string "text_to_find ". Print the filename and the line in the file that contains the searched string.

Installing Packages: RedHat binary package (*.rpm) rpm packages located in the RPMS directory on the installation CD To read the info on uninstalled package rpm -qpi package_name-version.platform.rpm q: query (must be first), p: uninstalled package, i: display info To install the package rpm -ihv package_name-version.platform.rpm i: install (must be first), h: display "hashes" to show the unpacking progress, v: verbose

Installing Packages: RedHat binary package (*.rpm) Finding files of installed package rpm -ql package_name-version.platform.rpm Upgrading package rpm -Uvh my_new_file.rpm Installing and ignoring dependencies rpm -ivh --nodeps package_name-version.platform.rpm rmp -ivh --nodeps --force package_name-version.platform.rpm rpm -e package_name Uninstall (option "e"=erase) the package package_name. No "-version.platform.rpm" at the end of the package name rpm -qf a_file Find the name of the installed package to which the file "a_file" belongs or belonged.

Installing Packages: Source-code Tarball Linux source code downloaded in the form of a compressed tarball (*.tar.gz or *.tgz) Installation steps are usually as follows: First, change the current working directory to /usr/local : cd /usr/local Second, I decompress the tarball that I downloaded from the net: tar -xvzf /home/the_tarball_dir/my_tarball.tar.gz The contents of the tarball are extracted into a subdirectory which tar creates under my current working directory (/usr/local) If the tarball is not compressed (e.g., *.tar), use: tar -xvf /home/the_tarball_dir/my_tarball.tar

Installing Packages: Source-code Tarball Third, go to the new directory dir cd the_new_program_subdir Fourth, most programs are compiled by executing these three commands:./configure make make install Fifth, find the new executable which were just compiled. The names of executables display in green when running this command: ls --color Run the executable, for example:./the_executable Some programs automatically install the executable to /usr/local/bin /usr/local/bin/the_executable

Some administration commands su (=substitute user id) Assume the superuser (=root) identity. Type exit to return. printtool (as root in X-terminal) Configuration tool for your printer(s). Settings go to the file /etc/printcap and /var/spool/lpd. linuxconf (as root, either in text mode or in the X terminal). You can access and change hundreds of network setting from here. kudzu (as root). Automatically determines and configures hardware. lsdev Display info about your hardware (DMA, IRQ, IO ports).

Some administration commands lsmod (= list modules). List currently loaded kernel modules. A module is like a device driver. modprobe -l |more List all the modules available for your kernel. insmod (as root) Insert modules into the kernel insmod module_name chkconfig --list | more To check the current status of services To start a service service wu-ftpd start OR /etc/init.d/wu-ftpd start

Some administration commands ps (="print status" or "process status") List the processes currently run by the current user. ps axu | more List all the processes currently running, even those without the controlling terminal, together with the name of the user that owns each process. top Keep listing the currently running processes on my computer, sorted by cpu usage (top processes first). Press c when done. PID = process identification. USER=name of the user who owns (started?) the process. PRI=priority of the process (the higher the number, the lower the priority, normal 0, highest priority is -20, lowest 20. SIZE=kilobytes of code+data+stack taken by the process in memory. RSS=kilobytes of physical (silicon) memory taken. SHARE=kilobytes of memory shared with other processes. STAT=state of the process: S-sleeping, R-running, T-stopped or traced, D-uniterruptable sleep, Z=zombie. %CPU=share of the CPU usage (since last screen update). %MEM=share of physical memory. TIME=total CPU time used by the process (since it was started). COMMAND=command line used to start the task (careful with passwords, etc., on command line, all permitted to run "top" may see them!

Some administration commands Display files (cat command) in the /proc directory to display some system info /proc/cpuinfo --information about the processor, such as its type, make, model, and performance. /proc/meminfo --how much memory Linux uses (or use the free command) /proc/devices --list of device drivers configured into the currently running kernel. /proc/dma --DMA channels being used at the moment. /proc/filesystems --filesystem types configured into the kernel. /proc/interrupts --interrupts in use, and how many of each there have been. /proc/ioports --I/O ports in use at the moment.

Process control any_command & Run any command in the background. The job_number is printed on the screen jobs List my background or stopped processes and show their job numbers. batch at>any_command d Run any command (when the system load is low. The process will keep running after logout. When the command completes, an will be sent to the user with the output at time Execute a command at a specified time (say 17:00). You will be prompted for the command(s) to run, until you press d. atq (display the queue of processes started with at) atrm (remove a process from the "at queue"). watch -n 60 any_command Execute any_command repeatedly at 60-second intervals kill PID Force a process whose Process ID is PID to shutdown.