Linux Sea Sven Vermeulen Linux Sea Sven Vermeulen Copyright © 2009-2013 Sven Vermeulen

Total Page:16

File Type:pdf, Size:1020Kb

Linux Sea Sven Vermeulen Linux Sea Sven Vermeulen Copyright © 2009-2013 Sven Vermeulen Linux Sea Sven Vermeulen Linux Sea Sven Vermeulen Copyright © 2009-2013 Sven Vermeulen Abstract The book "Linux Sea" offers a gentle yet technical (from end-user perspective) introduction to the Linux operating system, using Gentoo Linux as the example Linux distribution. It does not nor will it ever talk about the history of the Linux kernel or Linux distributions or dive into details that are less interesting for Linux users. For various topics, the online Gentoo Handbook offers a very detailed approach and as such is mandatory reading for any Gentoo Linux user who wants to know the full power of this Operating System. Although there is definitely overlap between "Linux Sea" and the online Gentoo Handbook, "Linux Sea" is by no means meant to replace the online Gentoo Handbook. "Linux Sea" will attempt to focus on topics that everyday users would probably need to know to continue working with Gentoo Linux. The version you are reading currently is v1.14 and has been generated on 2013/10/06. PDF [http://swift.siphos.be/ linux_sea/linux_sea.pdf] and ePUB [http://swift.siphos.be/linux_sea/linux_sea.epub] versions are available as well. You are free to share (copy, distribute and transmit) the work as well as remix (adapt) the work under the conditions of the Creative Commons Attribution Noncommercial Share Alike 2.0 license, available at http://creativecommons.org/licenses/by-nc-sa/2.0/be/deed.en Table of Contents 1. What is Linux? ......................................................................................................... 1 Introduction ......................................................................................................... 1 The Anatomy of an Operating System ...................................................................... 1 Kernel ......................................................................................................... 2 System Libraries ........................................................................................... 2 System Tools ............................................................................................... 3 Development Tools ....................................................................................... 3 End User Tools ............................................................................................ 4 Okay, I bite, What is this GNU? ...................................................................... 4 Linux as the Kernel of the Linux Operating System .................................................... 4 Linux Operating Systems: Distributions .................................................................... 5 What is a Distribution? .................................................................................. 7 What does a Distribution Provide? ................................................................... 7 What is an Architecture? ................................................................................ 8 Myths Surrounding Linux ....................................................................................... 8 Myths ......................................................................................................... 9 Weaknesses ................................................................................................ 11 Exercises ........................................................................................................... 11 Further Resources ................................................................................................ 11 2. How does Free Software affect Linux? ........................................................................ 12 Introduction ........................................................................................................ 12 Free Software ..................................................................................................... 12 What are Software Licenses? ......................................................................... 12 What Licenses Exist? ................................................................................... 13 Free Software isn't Non-Commercial ............................................................... 14 So Linux is Free? ........................................................................................ 14 Development Model ............................................................................................ 15 Multi-Project Development ........................................................................... 15 Transparent Development ............................................................................. 15 Fast Release Cycles ..................................................................................... 16 Large Documentation Base ........................................................................... 17 Software Life Cycle ..................................................................................... 17 Open Standards ................................................................................................... 18 File system Hierarchy Standard ...................................................................... 18 Linux Standard Base .................................................................................... 18 Free Desktop Specifications .......................................................................... 19 Exercises ........................................................................................................... 19 Further Resources ................................................................................................ 19 3. The Role of the Community ...................................................................................... 20 Introduction ........................................................................................................ 20 Communities ...................................................................................................... 20 Local Communities ...................................................................................... 21 Online Communities .................................................................................... 21 Support .............................................................................................................. 22 Documentation Guides ................................................................................. 22 Internet and Usenet Forums .......................................................................... 22 Mailinglists ................................................................................................ 23 Chat .......................................................................................................... 23 Real-life Meetings ....................................................................................... 23 Conferences ........................................................................................................ 23 FOSDEM ................................................................................................... 24 FOSS.IN .................................................................................................... 24 LinuxTag ................................................................................................... 24 Exercises ........................................................................................................... 24 Resources .......................................................................................................... 24 iii Linux Sea 4. Running Linux ........................................................................................................ 25 Introduction ........................................................................................................ 25 System Architecture ............................................................................................. 25 User Accounts ............................................................................................ 26 Processes ................................................................................................... 26 Files and File Structure ................................................................................ 27 Permissions ................................................................................................ 27 Using the Command Line ..................................................................................... 28 Navigating ................................................................................................. 28 Listing Content ........................................................................................... 30 Basic File Manipulation ................................................................................ 30 Editing Text Files ........................................................................................ 32 Linking Files and Directories ........................................................................ 33 File / Command Completion .......................................................................... 33 Switching Terminals .................................................................................... 34 Logging Out ............................................................................................... 34 Shutting Down ............................................................................................ 34 Getting Help ......................................................................................................
Recommended publications
  • Administration and Reference Guide
    Oracle® Database Appliance Administration and Reference Guide Release 12.2.1.4.0 for Linux x86-64 E97563-01 June 2018 Oracle Database Appliance Administration and Reference Guide, Release 12.2.1.4.0 for Linux x86-64 E97563-01 Copyright © 2014, 2018, Oracle and/or its affiliates. All rights reserved. This software and related documentation are provided under a license agreement containing restrictions on use and disclosure and are protected by intellectual property laws. Except as expressly permitted in your license agreement or allowed by law, you may not use, copy, reproduce, translate, broadcast, modify, license, transmit, distribute, exhibit, perform, publish, or display any part, in any form, or by any means. Reverse engineering, disassembly, or decompilation of this software, unless required by law for interoperability, is prohibited. The information contained herein is subject to change without notice and is not warranted to be error-free. If you find any errors, please report them to us in writing. If this is software or related documentation that is delivered to the U.S. Government or anyone licensing it on behalf of the U.S. Government, then the following notice is applicable: U.S. GOVERNMENT END USERS: Oracle programs, including any operating system, integrated software, any programs installed on the hardware, and/or documentation, delivered to U.S. Government end users are "commercial computer software" pursuant to the applicable Federal Acquisition Regulation and agency- specific supplemental regulations. As such, use, duplication, disclosure, modification, and adaptation of the programs, including any operating system, integrated software, any programs installed on the hardware, and/or documentation, shall be subject to license terms and license restrictions applicable to the programs.
    [Show full text]
  • MLNX OFED Documentation Rev 5.0-2.1.8.0
    MLNX_OFED Documentation Rev 5.0-2.1.8.0 Exported on May/21/2020 06:13 AM https://docs.mellanox.com/x/JLV-AQ Notice This document is provided for information purposes only and shall not be regarded as a warranty of a certain functionality, condition, or quality of a product. NVIDIA Corporation (“NVIDIA”) makes no representations or warranties, expressed or implied, as to the accuracy or completeness of the information contained in this document and assumes no responsibility for any errors contained herein. NVIDIA shall have no liability for the consequences or use of such information or for any infringement of patents or other rights of third parties that may result from its use. This document is not a commitment to develop, release, or deliver any Material (defined below), code, or functionality. NVIDIA reserves the right to make corrections, modifications, enhancements, improvements, and any other changes to this document, at any time without notice. Customer should obtain the latest relevant information before placing orders and should verify that such information is current and complete. NVIDIA products are sold subject to the NVIDIA standard terms and conditions of sale supplied at the time of order acknowledgement, unless otherwise agreed in an individual sales agreement signed by authorized representatives of NVIDIA and customer (“Terms of Sale”). NVIDIA hereby expressly objects to applying any customer general terms and conditions with regards to the purchase of the NVIDIA product referenced in this document. No contractual obligations are formed either directly or indirectly by this document. NVIDIA products are not designed, authorized, or warranted to be suitable for use in medical, military, aircraft, space, or life support equipment, nor in applications where failure or malfunction of the NVIDIA product can reasonably be expected to result in personal injury, death, or property or environmental damage.
    [Show full text]
  • UG1046 Ultrafast Embedded Design Methodology Guide
    UltraFast Embedded Design Methodology Guide UG1046 (v2.3) April 20, 2018 Revision History The following table shows the revision history for this document. Date Version Revision 04/20/2018 2.3 • Added a note in the Overview section of Chapter 5. • Replaced BFM terminology with VIP across the user guide. 07/27/2017 2.2 • Vivado IDE updates and minor editorial changes. 04/22/2015 2.1 • Added Embedded Design Methodology Checklist. • Added Accessing Documentation and Training. 03/26/2015 2.0 • Added SDSoC Environment. • Added Related Design Hubs. 10/20/2014 1.1 • Removed outdated information. •In System Level Considerations, added information to the following sections: ° Performance ° Clocking and Reset 10/08/2014 1.0 Initial Release of document. UltraFast Embedded Design Methodology Guide Send Feedback 2 UG1046 (v2.3) April 20, 2018 www.xilinx.com Table of Contents Chapter 1: Introduction Embedded Design Methodology Checklist. 9 Accessing Documentation and Training . 10 Chapter 2: System Level Considerations Performance. 13 Power Consumption . 18 Clocking and Reset. 36 Interrupts . 41 Embedded Device Security . 45 Profiling and Partitioning . 51 Chapter 3: Hardware Design Considerations Configuration and Boot Devices . 63 Memory Interfaces . 69 Peripherals . 76 Designing IP Blocks . 94 Hardware Performance Considerations . 102 Dataflow . 108 PL Clocking Methodology . 112 ACP and Cache Coherency. 116 PL High-Performance Port Access. 120 System Management Hardware Assistance. 124 Managing Hardware Reconfiguration . 127 GPs and Direct PL Access from APU . 133 Chapter 4: Software Design Considerations Processor Configuration . 137 OS and RTOS Choices . 142 Libraries and Middleware . 152 Boot Loaders . 156 Software Development Tools . 162 UltraFast Embedded Design Methodology GuideSend Feedback 3 UG1046 (v2.3) April 20, 2018 www.xilinx.com Chapter 5: Hardware Design Flow Overview .
    [Show full text]
  • ECE 598 – Advanced Operating Systems Lecture 19
    ECE 598 { Advanced Operating Systems Lecture 19 Vince Weaver http://web.eece.maine.edu/~vweaver [email protected] 7 April 2016 Announcements • Homework #7 was due • Homework #8 will be posted 1 Why use FAT over ext2? • FAT simpler, easy to code • FAT supported on all major OSes • ext2 faster, more robust filename and permissions 2 btrfs • B-tree fs (similar to a binary tree, but with pages full of leaves) • overwrite filesystem (overwite on modify) vs CoW • Copy on write. When write to a file, old data not overwritten. Since old data not over-written, crash recovery better Eventually old data garbage collected • Data in extents 3 • Copy-on-write • Forest of trees: { sub-volumes { extent-allocation { checksum tree { chunk device { reloc • On-line defragmentation • On-line volume growth 4 • Built-in RAID • Transparent compression • Snapshots • Checksums on data and meta-data • De-duplication • Cloning { can make an exact snapshot of file, copy-on- write different than link, different inodles but same blocks 5 Embedded • Designed to be small, simple, read-only? • romfs { 32 byte header (magic, size, checksum,name) { Repeating files (pointer to next [0 if none]), info, size, checksum, file name, file data • cramfs 6 ZFS Advanced OS from Sun/Oracle. Similar in idea to btrfs indirect still, not extent based? 7 ReFS Resilient FS, Microsoft's answer to brtfs and zfs 8 Networked File Systems • Allow a centralized file server to export a filesystem to multiple clients. • Provide file level access, not just raw blocks (NBD) • Clustered filesystems also exist, where multiple servers work in conjunction.
    [Show full text]
  • Taxonomy of Linux Kernel Vulnerability Solutions
    Taxonomy of Linux Kernel Vulnerability Solutions Serguei A. Mokhov Marc-Andre´ Laverdiere` Djamel Benredjem Computer Security Laboratory Computer Security Laboratory Computer Security Laboratory Concordia Institute for Concordia Institute for Concordia Institute for Information Systems Engineering Information Systems Engineering Information Systems Engineering Concordia University, Concordia University, Concordia University, Montreal, Quebec, Canada Montreal, Quebec, Canada Montreal, Quebec, Canada Email: [email protected] Email: ma [email protected] Email: d [email protected] Abstract—This paper presents the results of a case study on C programs in general, as well as statistics on their relative software vulnerability solutions in the Linux kernel. Our major importance. We also introduce a new methodology to track contribution is the introduction of a classification of methods used the patch solving a security issue based only on the contents to solve vulnerabilities. Our research shows that precondition validation, error handling, and redesign are the most used of the security advisory. methods in solving vulnerabilities in the Linux kernel. This The paper is organized as follows: we examine previous contribution is accompanied with statistics on the occurrence work that was done regarding Linux and C security in of the different types of vulnerabilities and their solutions that Section II, followed by a description of the methodology we observed during our case study, combined with example used in order to obtain the solutions to the vulnerabilities in source code patches. We also combine our findings with existing programming guidelines to create the first security-oriented Section III. Afterwards, in Section IV, we show our results, coding guidelines for the Linux kernel.
    [Show full text]
  • MINCS - the Container in the Shell (Script)
    MINCS - The Container in the Shell (script) - Masami Hiramatsu <[email protected]> Tech Lead, Linaro Ltd. Open Source Summit Japan 2017 LEADING COLLABORATION IN THE ARM ECOSYSTEM Who am I... Masami Hiramatsu - Linux kernel kprobes maintainer - Working for Linaro as a Tech Lead LEADING COLLABORATION IN THE ARM ECOSYSTEM Demo # minc top # minc -r /opt/debian/x86_64 # minc -r /opt/debian/arm64 --arch arm64 LEADING COLLABORATION IN THE ARM ECOSYSTEM What Is MINCS? My Personal Fun Project to learn how linux containers work :-) LEADING COLLABORATION IN THE ARM ECOSYSTEM What Is MINCS? Mini Container Shell Scripts (pronounced ‘minks’) - Container engine implementation using POSIX shell scripts - It is small (~60KB, ~2KLOC) (~20KB in minimum) - It can run on busybox - No architecture dependency (* except for qemu/um mode) - No need for special binaries (* except for libcap, just for capsh --exec) - Main Features - Namespaces (Mount, PID, User, UTS, Net*) - Cgroups (CPU, Memory) - Capabilities - Overlay filesystem - Qemu cross-arch/system emulation - User-mode-linux - Image importing from dockerhub And all are done by CLI commands :-) LEADING COLLABORATION IN THE ARM ECOSYSTEM Why Shell Script? That is my favorite language :-) - Easy to understand for *nix administrators - Just a bunch of commands - Easy to modify - Good for prototyping - Easy to deploy - No architecture dependencies - Very small - Able to run on busybox (+ libcap is perfect) LEADING COLLABORATION IN THE ARM ECOSYSTEM MINCS Use-Cases For Learning - Understand how containers work For Development - Prepare isolated (cross-)build environment For Testing - Test new applications in isolated environment - Test new kernel features on qemu using local tools For products? - Maybe good for embedded devices which has small resources LEADING COLLABORATION IN THE ARM ECOSYSTEM What Is A Linux Container? There are many linux container engines - Docker, LXC, rkt, runc, ..
    [Show full text]
  • Ivoyeur: Inotify
    COLUMNS iVoyeur inotify DAVE JOSEPHSEN Dave Josephsen is the he last time I changed jobs, the magnitude of the change didn’t really author of Building a sink in until the morning of my first day, when I took a different com- Monitoring Infrastructure bination of freeways to work. The difference was accentuated by the with Nagios (Prentice Hall T PTR, 2007) and is Senior fact that the new commute began the same as the old one, but on this morn- Systems Engineer at DBG, Inc., where he ing, at a particular interchange, I would zig where before I zagged. maintains a gaggle of geographically dispersed It was an unexpectedly emotional and profound metaphor for the change. My old place was server farms. He won LISA ‘04’s Best Paper off to the side, and down below, while my future was straight ahead, and literally under award for his co-authored work on spam construction. mitigation, and he donates his spare time to the SourceMage GNU Linux Project. The fact that it was under construction was poetic but not surprising. Most of the roads I [email protected] travel in the Dallas/Fort Worth area are under construction and have been for as long as anyone can remember. And I don’t mean a lane closed here or there. Our roads drift and wan- der like leaves in the water—here today and tomorrow over there. The exits and entrances, neither a part of this road or that, seem unable to anticipate the movements of their brethren, and are constantly forced to react.
    [Show full text]
  • Kde-Guide-De-Developpement.Web.Pdf
    KDE Published : 2017-06-26 License : GPLv2+ 1 KDE DU POINT DE VUE D'UN DÉVELOPPEUR 1. AVEZ-VOUS BESOIN DE CE LIVRE ? 2. LA PHILOSOPHIE DE KDE 3. COMMENT OBTENIR DE L'AIDE 2 1. AVEZ-VOUS BESOIN DE CE LIVRE ? Vous devriez lire ce livre si vous voulez développer pour KDE. Nous utilisons le terme développement très largement pour couvrir tout ce qui peut conduire à un changement dans le code source, ce qui inclut : Soumettre une correction de bogue Écrire une nouvelle application optimisée par la technologie KDE Contribuer à un projet existant Ajouter de la fonctionnalité aux bibliothèques de développement de KDE Dans ce livre, nous vous livrerons les bases dont vous avez besoin pour être un développeur productif. Nous décrirons les outils que vous devrez installer, montrer comment lire la documentation (et écrire la vôtre propre, une fois que vous aurez créé la nouvelle fonctionnalité !) et comment obtenir de l'aide par d'autres moyens. Nous vous présenterons la communauté KDE, qui est essentielle pour comprendre KDE parce que nous sommes un projet « open source », libre (gratuit). Les utilisateurs finaux du logiciel n'ont PAS besoin de ce livre ! Cependant, ils pourraient le trouver intéressant pour les aider à comprendre comment les logiciels complexes et riches en fonctionnalités qu'ils utilisent ont vu le jour. 3 2. LA PHILOSOPHIE DE KDE Le succès de KDE repose sur une vue globale, que nous avons trouvée à la fois pratique et motivante. Les éléments de cette philosophie de développement comprennent : L'utilisation des outils disponibles plutôt que de ré-inventer ceux existants : beaucoup des bases dont vous avez besoin pour travailler font déjà partie de KDE, comme les bibliothèques principales ou les « Kparts », et sont tout à fait au point.
    [Show full text]
  • Linux Kernel and Driver Development Training Slides
    Linux Kernel and Driver Development Training Linux Kernel and Driver Development Training © Copyright 2004-2021, Bootlin. Creative Commons BY-SA 3.0 license. Latest update: October 9, 2021. Document updates and sources: https://bootlin.com/doc/training/linux-kernel Corrections, suggestions, contributions and translations are welcome! embedded Linux and kernel engineering Send them to [email protected] - Kernel, drivers and embedded Linux - Development, consulting, training and support - https://bootlin.com 1/470 Rights to copy © Copyright 2004-2021, Bootlin License: Creative Commons Attribution - Share Alike 3.0 https://creativecommons.org/licenses/by-sa/3.0/legalcode You are free: I to copy, distribute, display, and perform the work I to make derivative works I to make commercial use of the work Under the following conditions: I Attribution. You must give the original author credit. I Share Alike. If you alter, transform, or build upon this work, you may distribute the resulting work only under a license identical to this one. I For any reuse or distribution, you must make clear to others the license terms of this work. I Any of these conditions can be waived if you get permission from the copyright holder. Your fair use and other rights are in no way affected by the above. Document sources: https://github.com/bootlin/training-materials/ - Kernel, drivers and embedded Linux - Development, consulting, training and support - https://bootlin.com 2/470 Hyperlinks in the document There are many hyperlinks in the document I Regular hyperlinks: https://kernel.org/ I Kernel documentation links: dev-tools/kasan I Links to kernel source files and directories: drivers/input/ include/linux/fb.h I Links to the declarations, definitions and instances of kernel symbols (functions, types, data, structures): platform_get_irq() GFP_KERNEL struct file_operations - Kernel, drivers and embedded Linux - Development, consulting, training and support - https://bootlin.com 3/470 Company at a glance I Engineering company created in 2004, named ”Free Electrons” until Feb.
    [Show full text]
  • Linux Kernal II 9.1 Architecture
    Page 1 of 7 Linux Kernal II 9.1 Architecture: The Linux kernel is a Unix-like operating system kernel used by a variety of operating systems based on it, which are usually in the form of Linux distributions. The Linux kernel is a prominent example of free and open source software. Programming language The Linux kernel is written in the version of the C programming language supported by GCC (which has introduced a number of extensions and changes to standard C), together with a number of short sections of code written in the assembly language (in GCC's "AT&T-style" syntax) of the target architecture. Because of the extensions to C it supports, GCC was for a long time the only compiler capable of correctly building the Linux kernel. Compiler compatibility GCC is the default compiler for the Linux kernel source. In 2004, Intel claimed to have modified the kernel so that its C compiler also was capable of compiling it. There was another such reported success in 2009 with a modified 2.6.22 version of the kernel. Since 2010, effort has been underway to build the Linux kernel with Clang, an alternative compiler for the C language; as of 12 April 2014, the official kernel could almost be compiled by Clang. The project dedicated to this effort is named LLVMLinxu after the LLVM compiler infrastructure upon which Clang is built. LLVMLinux does not aim to fork either the Linux kernel or the LLVM, therefore it is a meta-project composed of patches that are eventually submitted to the upstream projects.
    [Show full text]
  • A High Performance Ldm Data Cluster
    55 A HIGH PERFORMANCE LDM DATA CLUSTER Robert C. Lipschutz, David Hagerty*, Paul Hamer, Peter Lannigan*, and Chris MacDermaid Cooperative Institute for Research in the Atmosphere (CIRA) Colorado State University, Fort Collins, Colorado USA, and NOAA Earth System Research Laboratory (ESRL), Boulder, Colorado USA *NOAA Earth System Research Laboratory (ESRL), Boulder, Colorado USA Contract with Riverside Technology, Inc., Fort Collins, Colorado USA 1. INTRODUCTION Data Manager (LDM) have enabled us to construct a high performance real-time data Within the NOAA Earth System Research processing environment that serves the GSD Laboratory (ESRL), the Global Systems Division community. Given the central role of LDM in the (GSD) develops weather information systems, architecture, we particularly focus on the how weather forecast models, and other applications LDM provides cluster services for data transport, in support of the National Weather Service, the and on the use of event notifications in LDM. Federal Aviation Administration, and other agencies. Well-known GSD products include the 2. LIMITATIONS OF THE HA ARCHITECTURE Rapid Update Cycle (RUC) model, the Local Analysis and Prediction System (LAPS), the While GSD's HA pairs have operated Meteorological Assimilation Data Ingest System successfully for a number of years (MADIS), and Science On a Sphere® (SOS). A (Lipschutz and MacDermaid, 2005), and provided common feature of these and other projects is robust availability through their automated fail- that they require observational and model data over mechanism, a major drawback has been the provided by acquisition systems running within need for two machines, one of which is mostly GSD’s Central Facility. These systems handle idle, to support a single processing configuration.
    [Show full text]
  • The Linux Graphics Stack Attributions
    I - Hardware : Anatomy of a GPU II - Host : The Linux graphics stack Attributions Introduction to GPUs and to the Linux Graphics Stack Martin Peres CC By-SA 3.0 Nouveau developer Ph.D. student at LaBRI November 26, 2012 1 / 36 I - Hardware : Anatomy of a GPU II - Host : The Linux graphics stack Attributions General overview Outline 1 I - Hardware : Anatomy of a GPU General overview Driving screens Host < − > GPU communication 2 II - Host : The Linux graphics stack General overview DRM and libdrm Mesa X11 Wayland X11 vs Wayland 3 Attributions Attributions 2 / 36 I - Hardware : Anatomy of a GPU II - Host : The Linux graphics stack Attributions General overview General overview of a modern GPU's functions Display content on a screen Accelerate 2D operations Accelerate 3D operations Decode videos Accelerate scientific calculations 3 / 36 I - Hardware : Anatomy of a GPU II - Host : The Linux graphics stack Attributions General overview CPU Clock Front-side Graphics Generator bus card slot Chipset Memory Slots High-speed graphics bus (AGP or PCI Northbridge Memory Express) bus (memory controller hub) Internal Bus PCI Bus Onboard Southbridge graphics PCI (I/O controller controller Bus hub) IDE SATA USB Cables and Ethernet ports leading Audio Codec CMOS Memory off-board PCI Slots LPC Bus Super I/O Serial Port Parallel Port Flash ROM Floppy Disk Keyboard (BIOS) Mouse 4 / 36 I - Hardware : Anatomy of a GPU II - Host : The Linux graphics stack Attributions General overview Hardware architecture GPU: Where all the calculations are made VRAM: Stores
    [Show full text]