Linux System Administration Paul Cobbaut Linux System Administration Paul Cobbaut Lt-1.9

Total Page:16

File Type:pdf, Size:1020Kb

Linux System Administration Paul Cobbaut Linux System Administration Paul Cobbaut Lt-1.9 Linux System Administration Paul Cobbaut Linux System Administration Paul Cobbaut lt-1.9 Publication date Mon 26 May 2014 01:00:55 AM CEST Abstract This book is meant to be used in an instructor-led training. For self-study, the intent is to read this book next to a working Linux computer so you can immediately do every subject, practicing each command. This book is aimed at novice Linux system administrators (and might be interesting and useful for home users that want to know a bit more about their Linux system). However, this book is not meant as an introduction to Linux desktop applications like text editors, browsers, mail clients, multimedia or office applications. More information and free .pdf available at http://linux-training.be . Feel free to contact the author: • Paul Cobbaut: [email protected], http://www.linkedin.com/in/cobbaut Contributors to the Linux Training project are: • Serge van Ginderachter: [email protected], build scripts and infrastructure setup • Ywein Van den Brande: [email protected], license and legal sections • Hendrik De Vloed: [email protected], buildheader.pl script We'd also like to thank our reviewers: • Wouter Verhelst: [email protected], http://grep.be • Geert Goossens: [email protected], http://www.linkedin.com/in/ geertgoossens • Elie De Brauwer: [email protected], http://www.de-brauwer.be • Christophe Vandeplas: [email protected], http://christophe.vandeplas.com • Bert Desmet: [email protected], http://blog.bdesmet.be • Rich Yonts: [email protected], Copyright 2007-2014 Paul Cobbaut Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.3 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license is included in the section entitled 'GNU Free Documentation License'. Table of Contents I. process management .............................................................................................................. 1 1. introduction to processes ............................................................................................. 3 1.1. terminology ...................................................................................................... 4 1.2. basic process management ................................................................................... 5 1.3. signalling processes ............................................................................................ 9 1.4. practice : basic process management .................................................................... 12 1.5. solution : basic process management .................................................................... 13 2. process priorities ....................................................................................................... 15 2.1. priority and nice values ..................................................................................... 16 2.2. practice : process priorities ................................................................................. 19 2.3. solution : process priorities ................................................................................. 20 3. background jobs ....................................................................................................... 22 3.1. background processes ........................................................................................ 23 3.2. practice : background processes .......................................................................... 25 3.3. solution : background processes .......................................................................... 26 II. disk management ............................................................................................................... 28 4. disk devices .............................................................................................................. 31 4.1. terminology ..................................................................................................... 32 4.2. device naming ................................................................................................. 34 4.3. discovering disk devices .................................................................................... 35 4.4. erasing a hard disk ........................................................................................... 40 4.5. advanced hard disk settings ................................................................................ 41 4.6. practice: hard disk devices ................................................................................. 42 4.7. solution: hard disk devices ................................................................................. 43 5. disk partitions ........................................................................................................... 45 5.1. about partitions ................................................................................................ 46 5.2. discovering partitions ........................................................................................ 47 5.3. partitioning new disks ....................................................................................... 49 5.4. about the partition table ..................................................................................... 51 5.5. practice: partitions ............................................................................................ 52 5.6. solution: partitions ............................................................................................ 53 6. file systems ............................................................................................................... 54 6.1. about file systems ............................................................................................ 55 6.2. common file systems ........................................................................................ 56 6.3. putting a file system on a partition ...................................................................... 59 6.4. tuning a file system .......................................................................................... 60 6.5. checking a file system ....................................................................................... 61 6.6. practice: file systems ........................................................................................ 62 6.7. solution: file systems ........................................................................................ 63 7. mounting .................................................................................................................. 64 7.1. mounting local file systems ................................................................................ 65 7.2. displaying mounted file systems .......................................................................... 66 7.3. from start to finish ........................................................................................... 68 7.4. permanent mounts ............................................................................................ 69 7.5. securing mounts ............................................................................................... 70 7.6. mounting remote file systems ............................................................................. 71 7.7. practice: mounting file systems ........................................................................... 72 7.8. solution: mounting file systems ........................................................................... 73 8. troubleshooting tools ................................................................................................. 75 8.1. lsof ................................................................................................................ 76 8.2. fuser .............................................................................................................. 77 8.3. chroot ............................................................................................................ 78 8.4. iostat .............................................................................................................. 79 8.5. iotop .............................................................................................................. 79 8.6. practice: troubleshooting tools ............................................................................ 80 iv Linux System Administration 8.7. solution: troubleshooting tools ............................................................................ 81 9. introduction to uuid's ................................................................................................ 82 9.1. about unique objects ......................................................................................... 83 9.2. tune2fs ........................................................................................................... 83 9.3. uuid ............................................................................................................... 83 9.4. uuid in /etc/fstab .............................................................................................. 84 9.5. uuid as a boot device ........................................................................................ 85 9.6. practice: uuid and filesystems ............................................................................
Recommended publications
  • MIPS32 Malta Linux
    MIPS32 Malta Linux Imperas Software Limited Imperas Buildings, North Weston, Thame, Oxfordshire, OX9 2HA, UK [email protected] Author: OVP Version: 1.4.1 Filename: OVP_MIPS_Linux_Platform_User_Guide.doc Project: MIPS32 Malta Linux Platform Last Saved: December 7, 2016 Keywords: OVP MIPS Malta Linux © 2010 Imperas Software Limited www.OVPworld.org Page 1 of 115 MIPS32 Malta Linux Platform Copyright Notice Copyright © 2016 Imperas Software Limited All rights reserved. This software and documentation contain information that is the property of Imperas Software Limited. The software and documentation are furnished under a license agreement and may be used or copied only in accordance with the terms of the license agreement. No part of the software and documentation may be reproduced, transmitted, or translated, in any form or by any means, electronic, mechanical, manual, optical, or otherwise, without prior written permission of Imperas Software Limited, or as expressly provided by the license agreement. Right to Copy Documentation The license agreement with Imperas permits licensee to make copies of the documentation for its internal use only. Each copy shall include all copyrights, trademarks, service marks, and proprietary rights notices, if any. Destination Control Statement All technical data contained in this publication is subject to the export control laws of the United States of America. Disclosure to nationals of other countries contrary to United States law is prohibited. It is the reader’s responsibility to determine the applicable regulations and to comply with them. Disclaimer IMPERAS SOFTWARE LIMITED, AND ITS LICENSORS MAKE NO WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, WITH REGARD TO THIS MATERIAL, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
    [Show full text]
  • Foxclone User Guide
    Foxclone V46 Return to contents Foxclone User Guide To navigate round the guide: • Any item in the contents can be clicked to go to that item. • At the top of every page is a link that will go to the contents list. • Any items highlighted will go to the item, e.g. this will go to the contents list. 22 August 2021 Page 1 of 58 Foxclone V46 Return to contents Contents Contents ................................................................................................................................ 2 What is it? ............................................................................................................................. 4 How should it be used? ......................................................................................................... 5 Installation ............................................................................................................................ 6 Linux ....................................................................................................................... 6 Windows .................................................................................................................... 8 Boot ................................................................................................................................... 9 The desktop ......................................................................................................................... 11 Foxclone .............................................................................................................................
    [Show full text]
  • WE866C3 Wi-Fi and Bluetooth Network Interface Card (NIC) User
    WE866Cx Wi-Fi and Bluetooth Network Interface Card (NIC) User Guide 1VV0301545 Rev. 10 – 2020-06-08 WE866Cx Wi-Fi and Bluetooth Network Interface Card (NIC) User Guide SPECIFICATIONS ARE SUBJECT TO CHANGE WITHOUT NOTICE NOTICE While reasonable efforts have been made to assure the accuracy of this document, Telit assumes no liability resulting from any inaccuracies or omissions in this document, or from use of the information obtained herein. The information in this document has been carefully checked and is believed to be reliable. However, no responsibility is assumed for inaccuracies or omissions. Telit reserves the right to make changes to any products described herein and reserves the right to revise this document and to make changes from time to time in content hereof with no obligation to notify any person of revisions or changes. Telit does not assume any liability arising out of the application or use of any product, software, or circuit described herein; neither does it convey license under its patent rights or the rights of others. It is possible that this publication may contain references to, or information about Telit products (machines and programs), programming, or services that are not announced in your country. Such references or information must not be construed to mean that Telit intends to announce such Telit products, programming, or services in your country. COPYRIGHTS This instruction manual and the Telit products described in this instruction manual may be, include or describe copyrighted Telit material, such as computer programs stored in semiconductor memories or other media. Laws in the Italy and other countries preserve for Telit and its licensors certain exclusive rights for copyrighted material, including the exclusive right to copy, reproduce in any form, distribute and make derivative works of the copyrighted material.
    [Show full text]
  • Linux Based Mobile Operating Systems
    INSTITUTO SUPERIOR DE ENGENHARIA DE LISBOA Área Departamental de Engenharia de Electrónica e Telecomunicações e de Computadores Linux Based Mobile Operating Systems DIOGO SÉRGIO ESTEVES CARDOSO Licenciado Trabalho de projecto para obtenção do Grau de Mestre em Engenharia Informática e de Computadores Orientadores : Doutor Manuel Martins Barata Mestre Pedro Miguel Fernandes Sampaio Júri: Presidente: Doutor Fernando Manuel Gomes de Sousa Vogais: Doutor José Manuel Matos Ribeiro Fonseca Doutor Manuel Martins Barata Julho, 2015 INSTITUTO SUPERIOR DE ENGENHARIA DE LISBOA Área Departamental de Engenharia de Electrónica e Telecomunicações e de Computadores Linux Based Mobile Operating Systems DIOGO SÉRGIO ESTEVES CARDOSO Licenciado Trabalho de projecto para obtenção do Grau de Mestre em Engenharia Informática e de Computadores Orientadores : Doutor Manuel Martins Barata Mestre Pedro Miguel Fernandes Sampaio Júri: Presidente: Doutor Fernando Manuel Gomes de Sousa Vogais: Doutor José Manuel Matos Ribeiro Fonseca Doutor Manuel Martins Barata Julho, 2015 For Helena and Sérgio, Tomás and Sofia Acknowledgements I would like to thank: My parents and brother for the continuous support and being the drive force to my live. Sofia for the patience and understanding throughout this challenging period. Manuel Barata for all the guidance and patience. Edmundo Azevedo, Miguel Azevedo and Ana Correia for reviewing this document. Pedro Sampaio, for being my counselor and college, helping me on each step of the way. vii Abstract In the last fifteen years the mobile industry evolved from the Nokia 3310 that could store a hopping twenty-four phone records to an iPhone that literately can save a lifetime phone history. The mobile industry grew and thrown way most of the proprietary operating systems to converge their efforts in a selected few, such as Android, iOS and Windows Phone.
    [Show full text]
  • Happy Birthday Linux
    25 Jahre Linux! Am Anfang war der Quellcode Entstehungsgeschichte und Werdegang von Linux Entwicklung und Diversifizierung der Distributionen Der Wert von Linux oder: „Wat nix kost, dat is och nix.“ Andreas Klein ORR 2016 1 Am Anfang war der Quellcode (70er) ● 1969, Ken Thompson u. Dennis Ritchie erstellen die erste Version von Unix in Assembler. ● Von 1969-1971 entwickeln sie gemeinsam die Programmiersprache B. ● Ab 1971 erweiterte in erster Linie Dennis Ritchie B, um weitere Elemente und nannte sie Anfangs NB (new B). ● 1973 waren die Erweiterungen soweit gediehen, das er die stark verbesserte Sprache C nannte (Brian W. Kernighan hat ebenfalls maßgeblich dazu beigetragen). //Unix=25 PCs ● Bis 1974 war das gesamte Betriebssystem UNIX vollständig in C implementiert und wurde mit einem C-Compiler kostenfrei an verschiedene Universitäten verteilt. ● 1978 wurden bereits über 600 Computer mit dem UNIX-Betriebssystemen betrieben. ● Das aufblühende Zeitalter der Computerisierung der 70er Jahre war geprägt vom regen und freien Austausch von Programmen und dessen zugrunde liegenden Ideen. Sinnvoller Weise tauschte man diese als Quellcode untereinander aus. ● 1979 wurde von AT&T die letzte UNIX-Version 7, mit freiem Quellcode veröffentlicht. Andreas Klein ORR 2016 2 Am Anfang war der Quellcode (80er) ● 1980 – 1983 AT&T sowie zahlreiche andere Unternehmen beginnen mit der Kommerzialisierung von UNIX, durch Koppelung an stark beschränkenden Lizenzen und Geheimhaltung des zugrunde liegenden Quelltextes. ● Richard Stallman kündigt am 27. September 1983 in den Newsgroups net.unix-wizards und net.usoft das GNU-Projekt an. ● Am 5. Januar 1984 begann Stallman offiziell mit der Arbeit am GNU-Projekt, nachdem er seine Stelle am MIT gekündigt hatte.
    [Show full text]
  • Partition.Pdf
    Linux Partition HOWTO Anthony Lissot Revision History Revision 3.5 26 Dec 2005 reorganized document page ordering. added page on setting up swap space. added page of partition labels. updated max swap size values in section 4. added instructions on making ext2/3 file systems. broken links identified by Richard Calmbach are fixed. created an XML version. Revision 3.4.4 08 March 2004 synchronized SGML version with HTML version. Updated lilo placement and swap size discussion. Revision 3.3 04 April 2003 synchronized SGML and HTML versions Revision 3.3 10 July 2001 Corrected Section 6, calculation of cylinder numbers Revision 3.2 1 September 2000 Dan Scott provides sgml conversion 2 Oct. 2000. Rewrote Introduction. Rewrote discussion on device names in Logical Devices. Reorganized Partition Types. Edited Partition Requirements. Added Recovering a deleted partition table. Revision 3.1 12 June 2000 Corrected swap size limitation in Partition Requirements, updated various links in Introduction, added submitted example in How to Partition with fdisk, added file system discussion in Partition Requirements. Revision 3.0 1 May 2000 First revision by Anthony Lissot based on Linux Partition HOWTO by Kristian Koehntopp. Revision 2.4 3 November 1997 Last revision by Kristian Koehntopp. This Linux Mini−HOWTO teaches you how to plan and create partitions on IDE and SCSI hard drives. It discusses partitioning terminology and considers size and location issues. Use of the fdisk partitioning utility for creating and recovering of partition tables is covered. The most recent version of this document is here. The Turkish translation is here. Linux Partition HOWTO Table of Contents 1.
    [Show full text]
  • The Ultimate Guide to Hard Drive Partitioning
    Home SQL Server Cloud Computing Windows Server Cisco Exchange Windows 7 Active Directory Virtualization Forums IT Job Board Get Our FREE Newsletter! Search Site Gain access to white The Ultimate Guide to Hard Drive Partitioning papers, special offers and by Daniel Petri - March 11, 2009 the most recent IT tips! Printer Friendly Version Sponsors Email Address Disk partitioning divides the data storage space of a hard disk into separate areas referred to as Sign Up Now! Windows Application 'partitions'. Partitions are usually created when the hard disk is first being prepared for usage. Once a Monitoring Made Easy disk is divided into partitions, directories and files may be stored on them. Because of later changes on Quick Links the computer and operating system, often an administrator or power user will be faced with the need to Knowledge Base resize partitions, create new partitions in the unallocated space, and sometimes even undelete Take the guesswork out of Backup & Storage partitions that were previously removed or deleted. which WMI counters to use Security for apps like Microsoft® Active Directory Active Directory™ and Cisco and Routing Hard disk partitioning tools will allow you to create additional partitions from existing ones by resizing SharePoint™. SolarWinds Windows Networking FREE WMI Monitor makes it Exchange Server the existing partitions and creating empty, un-used space on which you can create new partitions. The easy! Download this FREE Virtualization desktop tool now! Windows Server 2008 most important aspect of such tools is their ability to do this without losing your data that is currently on Windows 7 your existing partitions.
    [Show full text]
  • Embedded Linux Optimizations
    Embedded Linux optimizations Embedded Linux optimizations Size, RAM, speed, power, cost Michael Opdenacker Thomas Petazzoni Free Electrons © Copyright 2004-2009, Free Electrons. Creative Commons BY-SA 3.0 license Latest update: Dec 20, 2010, Document sources, updates and translations: http://free-electrons.com/docs/optimizations Corrections, suggestions, contributions and translations are welcome! 1 Free Electrons. Kernel, drivers and embedded Linux development, consulting, training and support. http//free-electrons.com Penguin weight watchers Make your penguin slimmer, faster, and reduce its consumption of fish! Before 2 weeks after 2 Free Electrons. Kernel, drivers and embedded Linux development, consulting, training and support. http//free-electrons.com CE Linux Forum http://celinuxforum.org/ Non profit organization, whose members are embedded Linux companies and Consumer Electronics (CE) devices makers. Mission: develop the use of Linux in CE devices Hosts many projects to improve the suitability of Linux for CE devices and embedded systems. All patches are meant to be included in the mainline Linux kernel. Most of the ideas introduced in this presentation have been gathered or even implemented by CE Linux Forum projects! 3 Free Electrons. Kernel, drivers and embedded Linux development, consulting, training and support. http//free-electrons.com Contents Ideas for optimizing the Linux kernel and executables Increasing speed Reducing size: disk footprint and RAM Reducing power consumption Global perspective: cost and combined optimization effects The ultimate optimization tool! 4 Free Electrons. Kernel, drivers and embedded Linux development, consulting, training and support. http//free-electrons.com Embedded Linux Optimizations Increasing speed Reducing kernel boot time 5 Free Electrons. Kernel, drivers and embedded Linux development, consulting, training and support.
    [Show full text]
  • Linux Professional Institute Tutorials LPI Exam 101 Prep: Hardware and Architecture Junior Level Administration (LPIC-1) Topic 101
    Linux Professional Institute Tutorials LPI exam 101 prep: Hardware and architecture Junior Level Administration (LPIC-1) topic 101 Skill Level: Introductory Ian Shields ([email protected]) Senior Programmer IBM 08 Aug 2005 In this tutorial, Ian Shields begins preparing you to take the Linux Professional Institute® Junior Level Administration (LPIC-1) Exam 101. In this first of five tutorials, Ian introduces you to configuring your system hardware with Linux™. By the end of this tutorial, you will know how Linux configures the hardware found on a modern PC and where to look if you have problems. Section 1. Before you start Learn what these tutorials can teach you and how you can get the most from them. About this series The Linux Professional Institute (LPI) certifies Linux system administrators at two levels: junior level (also called "certification level 1") and intermediate level (also called "certification level 2"). To attain certification level 1, you must pass exams 101 and 102; to attain certification level 2, you must pass exams 201 and 202. developerWorks offers tutorials to help you prepare for each of the four exams. Each exam covers several topics, and each topic has a corresponding self-study tutorial on developerWorks. For LPI exam 101, the five topics and corresponding developerWorks tutorials are: Hardware and architecture © Copyright IBM Corporation 1994, 2008. All rights reserved. Page 1 of 43 developerWorks® ibm.com/developerWorks Table 1. LPI exam 101: Tutorials and topics LPI exam 101 topic developerWorks tutorial Tutorial summary Topic 101 LPI exam 101 prep (topic (This tutorial). Learn to 101): configure your system Hardware and architecture hardware with Linux.
    [Show full text]
  • Loris/Tissino /La/Mia/Cassetta/Degli/Attrezzi/Linux
    /loris/tissino /la/mia/cassetta/degli/attrezzi/linux www.tissino.it/docs/linux Indice 1 Introduzione 17 1.1 Questa cassetta . 17 1.1.1 A chi `erivolta . 17 1.1.2 Formati e diffusione . 17 1.1.3 Errori . 17 1.1.4 Licenza . 17 1.2 Bibliografia e documentazione . 17 1.2.1 PDF . 17 1.2.2 Libri . 18 1.2.3 Siti web . 18 1.2.4 Man . 18 1.2.5 Whatis . 18 1.2.6 Apropos . 19 1.2.7 Info . 19 1.2.8 —help . 19 1.2.9 /usr/share/doc . 19 1.2.10 HOWTO e WWW . 19 1.3 Il concetto di software libero . 20 1.3.1 Il software . 20 1.3.2 Programma . 20 1.3.3 Applicazione . 20 1.3.4 Sistema operativo . 20 1.3.5 Programma sorgente ed eseguibile . 20 1.3.6 Free Software Foundation . 21 1.3.7 Copyright e Copyleft . 21 1.3.8 Licenze . 21 1.3.9 Open Source . 21 1.3.10 Altri tipi di licenza . 22 1.4 Differenze tra Windows e GNU/Linux . 22 1.4.1 Differenze tra Microsoft Windows e GNU/Linux . 22 1.4.2 Sicurezza . 22 1.4.3 Disponibilit`adi software . 22 1.4.4 i18n e l10n . 22 1.4.5 Gestione del software . 23 1.4.6 File system . 23 1.4.7 Nomi di file e directory . 23 1.4.8 Estensioni . 23 1.4.9 Permessi su file e directory . 23 1.4.10 File nascosti e attributi .
    [Show full text]
  • Disk Cloning
    DISK CLONING Mario Horvat Sentinel Data Security <[email protected]> Key fingerprint = 5B0C 0342 0370 7A81 8876 F33D 3B32 AB46 06F5 4041 Revision history Revision v1.8 15 January 2005 Revision v1.7 27 February 2004 Revision v1.6 28 November 2003 Revision v1.5 18 November 2003 Revision v1.4 25 September 2003 Revision v1.3 12 August 2003 Revision v1.2 19 November 2002 Revision v1.0 21 July 2002 Revision v0.1 3 May 2002 Mario Horvat Disk Cloning v1.8 http://sentinelsecurity.net Last updated: 15/1/2005 [email protected] 0x06F54041[pgp.mit.edu] Table of Contents Table of Contents........................................................................................................ 2 1. About this document........................................................................................... 3 2. Copyleft and License .......................................................................................... 4 3. Partition table history.......................................................................................... 5 4. LFS Debate......................................................................................................... 5 5. Tools needed....................................................................................................... 6 6. Useful links......................................................................................................... 7 7. Clone local.........................................................................................................
    [Show full text]
  • Full Circle Magazine #170 Contents ^ Full Circle Magazine Is Neither Affiliated With,1 Nor Endorsed By, Canonical Ltd
    VIE Full Circle RE W THE INDEPENDENT MAGAZINE FOR THE UBUNTU LINUX COMMUNITY ISSUE #170 - June 2021 L U 4 B .0 UNTU 21 ) m o c . r VIE k E W c R i l F ( k e t i c w r : X o t U 4 o h B .0 P UNTU 21 TTAAMMEE YYOOUURR GGRRUUBB MMEENNUU GIVE YOUR BOOT MENU A MAKE OVER full circle magazine #170 contents ^ Full Circle Magazine is neither affiliated with,1 nor endorsed by, Canonical Ltd. HowTo Full Circle THE INDEPENDENT MAGAZINE FOR THE UBUNTU LINUX COMMUNITY Python p.15 Linux News p.04 Latex p.18 Command & Conquer p.13 ... p.XX Everyday Ubuntu p.31 Tame Your GRUB Menu p.20 Ubuntu Devices p.XX The Daily Waddle p.43 Micro This Micro That p.33 p.XX My Opinion p.40 Letters p.XX Review p.45 Inkscape p.26 Q&A p.52 Review p.48 Ubuntu Games p.55 Graphics The articles contained in this magazine are released under the Creative Commons Attribution-Share Alike 3.0 Unported license. This means you can adapt, copy, distribute and transmit the articles but only under the following conditions: you must attribute the work to the original author in some way (at least a name, email or URL) and to this magazine by name ('Full Circle Magazine') and the URL www.fullcirclemagazine.org (but not attribute the article(s) in any way that suggests that they endorse you or your use of the work). If you alter, transform, or build upon this work, you must distribute the resulting work under the same, similar or a compatible license.
    [Show full text]