Introduction to Linux

Total Page:16

File Type:pdf, Size:1020Kb

Introduction to Linux Introduction to Linux A Hands on Guide Machtelt Garrels CoreSequence.com <[email protected]> Version 1.8 Last updated 20030916 Edition Introduction to Linux Table of Contents Introduction.........................................................................................................................................................1 1. Why this guide?...................................................................................................................................1 2. Who should read this book?.................................................................................................................1 3. New versions of this guide...................................................................................................................1 4. Revision History..................................................................................................................................1 5. Contributions.......................................................................................................................................2 6. Feedback..............................................................................................................................................2 7. Copyright information.........................................................................................................................3 8. What do you need?...............................................................................................................................3 9. Conventions used in this document.....................................................................................................3 10. Organization of this document...........................................................................................................4 Chapter 1. What is Linux?.................................................................................................................................6 1.1. History..............................................................................................................................................6 1.1.1. UNIX.......................................................................................................................................6 1.1.2. Linus and Linux.......................................................................................................................7 1.1.3. Current application of Linux systems.....................................................................................8 1.2. The user interface..............................................................................................................................8 1.2.1. Is Linux difficult?....................................................................................................................8 1.2.2. Linux for non−experienced users............................................................................................9 1.3. Does Linux have a future?................................................................................................................9 1.3.1. Open Source............................................................................................................................9 1.3.2. Ten years of experience at your service................................................................................10 1.4. Properties of Linux.........................................................................................................................11 1.4.1. Linux Pros.............................................................................................................................11 1.4.2. Linux Cons............................................................................................................................12 1.5. Linux Flavors..................................................................................................................................13 1.5.1. Linux and GNU.....................................................................................................................13 1.5.2. GNU/Linux............................................................................................................................14 1.5.3. Which distribution should I install?......................................................................................14 1.6. Summary.........................................................................................................................................15 1.7. Exercises.........................................................................................................................................15 Chapter 2. Quickstart.......................................................................................................................................17 2.1. Logging in, activating the user interface and logging out..............................................................17 2.1.1. Introduction...........................................................................................................................17 2.1.2. Graphical mode.....................................................................................................................17 2.1.3. Text mode..............................................................................................................................19 2.2. Absolute basics...............................................................................................................................19 2.2.1. The commands......................................................................................................................19 2.2.2. General remarks....................................................................................................................20 2.2.3. Using Bash features...............................................................................................................21 2.3. Getting help.....................................................................................................................................22 2.3.1. Be warned..............................................................................................................................22 2.3.2. The man pages.......................................................................................................................22 2.3.3. More info...............................................................................................................................24 2.4. Summary.........................................................................................................................................27 2.5. Exercises.........................................................................................................................................27 i Introduction to Linux Table of Contents Chapter 2. Quickstart 2.5.1. Connecting and disconnecting...............................................................................................28 2.5.2. Passwords..............................................................................................................................28 2.5.3. Directories.............................................................................................................................28 2.5.4. Files.......................................................................................................................................29 2.5.5. Getting help...........................................................................................................................29 Chapter 3. About files and the file system......................................................................................................30 3.1. General overview of the Linux file system.....................................................................................30 3.1.1. Files.......................................................................................................................................30 3.1.2. About partitioning.................................................................................................................31 3.1.3. More file system layout.........................................................................................................34 3.2. Orientation in the file system..........................................................................................................37 3.2.1. The path.................................................................................................................................37 3.2.2. Absolute and relative paths...................................................................................................39 3.2.3. The most important files and directories...............................................................................39 3.2.4. The most important configuration files.................................................................................42 3.2.5. The most common devices....................................................................................................44 3.2.6. The most common variable files...........................................................................................45 3.3. Manipulating files...........................................................................................................................46 3.3.1. Viewing file properties..........................................................................................................46
Recommended publications
  • RACF Tips Volume 3, Issue 1, January 2009
    Volume 3 Issue 1 IPS RSH RACF T January For Administrators, Auditors, and Analysts 2009 Specifying a Replacement ID used to change a file's attributes for Program Control, APF Authorized, and Shared Library. with IRRRID00 . To generate commands to delete an ID and all references to it, use RACF's IRRRID00 utility. You simply enter the ID in the SYSIN DD Temporary Access with statement of the IRRRID00 job like so: CONNECT REVOKE(date) //SYSIN DD * USERX You may occasionally need to permit a user temporary access to a resource. One way to do If USERX is the owner of a profile or connect, so is to grant a group access to the resource IRRRID00 generates commands like: and connect the user to that group with a revoke date. The command to set the connect revoke CONNECT RDSADM GROUP(RACFSTC) OWNER(?USERX) date would look something like this: In these cases, you need to change ?USERX to CONNECT USERA GROUP(TEMPACC) REVOKE(1/20/09) a valid replacement ID. This can be done manually or with ISPF EDIT CHANGE. On the date specified with the revoke, RACF will no longer allow the user to have the access Alternatively, you can tell IRRRID00 which permitted to the group. If you want to remove the replacement ID to use when it builds the revoke date but leave the connect intact, enter: commands. If, for instance, you want to replace every occurrence of USERX with USERJ, enter CONNECT USERA GROUP(TEMPACC) NOREVOKE the following in the SYSIN DD: A banking client of ours used this capability to //SYSIN DD * govern access to APF-authorized libraries.
    [Show full text]
  • LS-09EN. OS Permissions. SUID/SGID/Sticky. Extended Attributes
    Operating Systems LS-09. OS Permissions. SUID/SGID/Sticky. Extended Attributes. Operating System Concepts 1.1 ys©2019 Linux/UNIX Security Basics Agenda ! UID ! GID ! Superuser ! File Permissions ! Umask ! RUID/EUID, RGID/EGID ! SUID, SGID, Sticky bits ! File Extended Attributes ! Mount/umount ! Windows Permissions ! File Systems Restriction Operating System Concepts 1.2 ys©2019 Domain Implementation in Linux/UNIX ! Two types domain (subjects) groups ! User Domains = User ID (UID>0) or User Group ID (GID>0) ! Superuser Domains = Root ID (UID=0) or Root Group ID (root can do everything, GID=0) ! Domain switch accomplished via file system. ! Each file has associated with it a domain bit (SetUID bit = SUID bit). ! When file is executed and SUID=on, then Effective UID is set to Owner of the file being executed. When execution completes Efective UID is reset to Real UID. ! Each subject (process) and object (file, socket,etc) has a 16-bit UID. ! Each object also has a 16-bit GID and each subject has one or more GIDs. ! Objects have access control lists that specify read, write, and execute permissions for user, group, and world. Operating System Concepts 1.3 ys©2019 Subjects and Objects Subjects = processes Objects = files (regular, directory, (Effective UID, EGID) devices /dev, ram /proc) RUID (EUID) Owner permissions (UID) RGID-main (EGID) Group Owner permissions (GID) +RGID-list Others RUID, RGID Others ID permissions Operating System Concepts 1.4 ys©2019 The Superuser (root) • Almost every Unix system comes with a special user in the /etc/passwd file with a UID=0. This user is known as the superuser and is normally given the username root.
    [Show full text]
  • Embedding Redhat Linux in a Diskonchip - HOWTO
    Embedding Redhat Linux in a DiskOnChip - HOWTO Don Davies, Prosig Ltd ( [email protected]) October 2002 Describes the configuration and setup of a development environment for a Single Board Computer running Redhat Linux from a DiskOnChip device. Contents 1.0 Introduction ..........................................................................................................3 1.1 Hardware Details..................................................................................................3 1.2 System Configuration ...........................................................................................4 2.0 DOS Development Environment...........................................................................5 2.1 DiskOnChip Tools ................................................................................................5 2.2 Boot Loader..........................................................................................................6 2.3 MS-DOS System Startup......................................................................................6 3.0 Linux Development Environment ......................................................................7 3.1 Custom Kernel Configuration ............................................................................8 3.2 Building Custom Kernel ..................................................................................10 3.3 Booting Custom Kernel ...................................................................................10 3.4 Formatting DiskOnChip for Linux
    [Show full text]
  • CSE 220: Systems Programming Input and Output
    CSE 220: Systems Programming Input and Output Ethan Blanton Department of Computer Science and Engineering University at Buffalo Introduction Unix I/O Standard I/O Buffering Summary References I/O Kernel Services We have seen some text I/O using the C Standard Library. printf() fgetc() … However, all I/O is built on kernel system calls. In this lecture, we’ll look at those services vs. standard I/O. © 2020 Ethan Blanton / CSE 220: Systems Programming Introduction Unix I/O Standard I/O Buffering Summary References Everything is a File These services are particularly important on Unix systems. On Unix, “everything is a file”. Many devices and services are accessed by opening device nodes. Device nodes behave like (but are not) files. Examples: /dev/null: Always readable, contains no data. Always writable, discards anything written to it. /dev/urandom: Always readable, reads a cryptographically secure stream of random data. © 2020 Ethan Blanton / CSE 220: Systems Programming Introduction Unix I/O Standard I/O Buffering Summary References File Descriptors All access to files is through file descriptors. A file descriptor is a small integer representing an open file in a particular process. There are three “standard” file descriptors: 0: standard input 1: standard output 2: standard error …sound familiar? (stdin, stdout, stderr) © 2020 Ethan Blanton / CSE 220: Systems Programming Introduction Unix I/O Standard I/O Buffering Summary References System Call Failures Kernel I/O (and most other) system calls return -1 on failure. When this happens, the global variable errno is set to a reason. Include errno.h to define errno in your code.
    [Show full text]
  • Introduction to Unix
    Introduction to Unix Rob Funk <[email protected]> University Technology Services Workstation Support http://wks.uts.ohio-state.edu/ University Technology Services Course Objectives • basic background in Unix structure • knowledge of getting started • directory navigation and control • file maintenance and display commands • shells • Unix features • text processing University Technology Services Course Objectives Useful commands • working with files • system resources • printing • vi editor University Technology Services In the Introduction to UNIX document 3 • shell programming • Unix command summary tables • short Unix bibliography (also see web site) We will not, however, be covering these topics in the lecture. Numbers on slides indicate page number in book. University Technology Services History of Unix 7–8 1960s multics project (MIT, GE, AT&T) 1970s AT&T Bell Labs 1970s/80s UC Berkeley 1980s DOS imitated many Unix ideas Commercial Unix fragmentation GNU Project 1990s Linux now Unix is widespread and available from many sources, both free and commercial University Technology Services Unix Systems 7–8 SunOS/Solaris Sun Microsystems Digital Unix (Tru64) Digital/Compaq HP-UX Hewlett Packard Irix SGI UNICOS Cray NetBSD, FreeBSD UC Berkeley / the Net Linux Linus Torvalds / the Net University Technology Services Unix Philosophy • Multiuser / Multitasking • Toolbox approach • Flexibility / Freedom • Conciseness • Everything is a file • File system has places, processes have life • Designed by programmers for programmers University Technology Services
    [Show full text]
  • GNU Emacs Manual
    GNU Emacs Manual GNU Emacs Manual Sixteenth Edition, Updated for Emacs Version 22.1. Richard Stallman This is the Sixteenth edition of the GNU Emacs Manual, updated for Emacs version 22.1. Copyright c 1985, 1986, 1987, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation; with the Invariant Sections being \The GNU Manifesto," \Distribution" and \GNU GENERAL PUBLIC LICENSE," with the Front-Cover texts being \A GNU Manual," and with the Back-Cover Texts as in (a) below. A copy of the license is included in the section entitled \GNU Free Documentation License." (a) The FSF's Back-Cover Text is: \You have freedom to copy and modify this GNU Manual, like GNU software. Copies published by the Free Software Foundation raise funds for GNU development." Published by the Free Software Foundation 51 Franklin Street, Fifth Floor Boston, MA 02110-1301 USA ISBN 1-882114-86-8 Cover art by Etienne Suvasa. i Short Contents Preface ::::::::::::::::::::::::::::::::::::::::::::::::: 1 Distribution ::::::::::::::::::::::::::::::::::::::::::::: 2 Introduction ::::::::::::::::::::::::::::::::::::::::::::: 5 1 The Organization of the Screen :::::::::::::::::::::::::: 6 2 Characters, Keys and Commands ::::::::::::::::::::::: 11 3 Entering and Exiting Emacs ::::::::::::::::::::::::::: 15 4 Basic Editing
    [Show full text]
  • Downloads." the Open Information Security Foundation
    Performance Testing Suricata The Effect of Configuration Variables On Offline Suricata Performance A Project Completed for CS 6266 Under Jonathon T. Giffin, Assistant Professor, Georgia Institute of Technology by Winston H Messer Project Advisor: Matt Jonkman, President, Open Information Security Foundation December 2011 Messer ii Abstract The Suricata IDS/IPS engine, a viable alternative to Snort, has a multitude of potential configurations. A simplified automated testing system was devised for the purpose of performance testing Suricata in an offline environment. Of the available configuration variables, seventeen were analyzed independently by testing in fifty-six configurations. Of these, three variables were found to have a statistically significant effect on performance: Detect Engine Profile, Multi Pattern Algorithm, and CPU affinity. Acknowledgements In writing the final report on this endeavor, I would like to start by thanking four people who made this project possible: Matt Jonkman, President, Open Information Security Foundation: For allowing me the opportunity to carry out this project under his supervision. Victor Julien, Lead Programmer, Open Information Security Foundation and Anne-Fleur Koolstra, Documentation Specialist, Open Information Security Foundation: For their willingness to share their wisdom and experience of Suricata via email for the past four months. John M. Weathersby, Jr., Executive Director, Open Source Software Institute: For allowing me the use of Institute equipment for the creation of a suitable testing
    [Show full text]
  • Technical White Paper: Running Applications Under
    Technical White Paper: Running Applications Under CrossOver: An Analysis of Security Risks Running Applications Under CrossOver: An Analysis of Security Risks Wine, Viruses, and Methods of Achieving Security Overview: Wine is a Windows compatibility technology that allows a wide variety of Windows Running Windows software to run as-if-natively on Unix-based software via CrossOver operating systems like Linux and Mac OS X. From a theoretical standpoint, Wine should is, on average, much safer also enable malware and viruses to run, thereby than running them under (unfortunately) exposing Wine users to these same Windows hazards. However, CrossOver (based on Wine) also incorporates security features that bring this risk down to almost zero. This White Paper examines the reasons behind the enhanced safety that CrossOver provides. With the increasing popularity of running Windows software on Linux and Mac OS X via compatibility solutions such as Wine, VMWare, and Parallels, users have been able to enjoy a degree of computing freedom heretofore unseen. Yet with that freedom has come peril. As many VMWare and Parallels users have discovered, running applications like Outlook and IE under those PC emulation solutions also opens up their machine to the same viruses and malware they faced under Windows. Indeed, one of the first things any VMWare or Parallels customer should do upon is install a commercial anti-virus package. Failure to do so can result in a host of dire consequences for their Windows partition, just as it would if they were running a Windows PC. Not surprisingly, a question we sometimes hear is whether or not Wine exposes users to the same level of risk.
    [Show full text]
  • Free Software Foundation, Inc
    Comment Regarding a Proposed Exemption Under 17 U.S.C. 1201 Item 1. Commenter Information Donald Robertson, III Free Software Foundation, Inc. 51 Franklin Street, Fifth Floor Boston, MA 02110-1335 [email protected] This comment is filed by the Free Software Foundation, a charitable corporation founded in 1985. The Foundation is the largest single contributor to the GNU operating system (used widely today in its GNU/Linux variant). The Foundation's GNU General Public License is the most widely used free software license, covering major components of the GNU operating system and tens of thousands of other computer programs used on hundreds of millions of computers around the world. Item 2. Proposed Class Addressed Class 7: 7(a) Motion Pictures—Text and Data Mining 7(b) Literary Works—Text and Data Mining Item 3. Statement Regarding Proposed Exemption The GNU/Linux operating system has become one of the most widely used operating systems on the planet. The GNU System and the kernel Linux are called free software because users are free to study, share, and improve the software. Those who promote free software believe that controlling one’s own computing should be a universal right. Digital restrictions interfere with the ability to enjoy these freedoms. Circumventing such restrictions for any use should not come with the threat of legal sanction. The process of continually applying for exemptions under 17 U.S.C. 1201 is onerous and instead any circumvention for a non-infringing purpose should be permitted. However, where exemptions are used to safeguard the public from these laws, it must be the case that exemptions should cover the sharing and distribution of software and instructions for circumventing access control technologies.
    [Show full text]
  • Windows Legacy Application Support Under Wine
    White Paper: Windows Legacy Application Support Under Wine Windows Legacy Application Support Under Wine Windows Legacy Application Support Under Wine Overview: With the constant pressure from Microsoft to migrate to newer versions of Windows, many users are left with unpalatable options for running their older applications. Wine Wine offers a viable offers a viable, inexpensive alternative for keeping alternative for keeping these legacy applications functioning in perpetuity. legacy Windows apps It is a truism that the needs of customers and vendors are often at running in perpetuity. cross-purposes. Nowhere has this been more vividly demonstrated than in the forced upgrade cycles of the Microsoft Windows platform, which have completely reversed the leverage customers normally wield over their suppliers. In many cases, end-users have seen little utility in switching to newer versions of Windows, but have been left with essentially zero choice in the matter. Forced OS upgrades have, in turn, forced the migration of many legacy applications. These older Windows programs—which in many cases are still perfectly functional—must either be redeveloped for a newer Windows platform, or replaced. This places yet another cost on top of the cost of the OS upgrade. However, this cycle, which once appeared unbreakable, now seems to be weakening. For one thing, Windows is no longer as dominant as it once was on the desktop. The rise of both Mac OS X and Linux have begun eating into the monopolistic power of Microsoft to dictate these cycles. Second is the fact that users now have a realistic alternative The MS OS forced- for running their legacy apps.
    [Show full text]
  • Annex I Definitions
    Annex I Definitions Free and Open Source Software (FOSS): Software whose source code is published and made available to the public, enabling anyone to copy, modify and redistribute the source code without paying royalties or fees. Open source code evolves through community cooperation. These communities are composed of individual programmers and users as well as very large companies. Some examples of open source initiatives are GNU/Linux, Eclipse, Apache, Mozilla, and various projects hosted on SourceForge1 and Savannah2 Web sites. Proprietary software -- Software that is distributed under commercial licence agreements, usually for a fee. The main difference between the proprietary software licence and the open source licence is that the recipient does not normally receive the right to copy, modify, redistribute the software without fees or royalty obligations. Something proprietary is something exclusively owned by someone, often with connotations that it is exclusive and cannot be used by other parties without negotiations. It may specifically mean that the item is covered by one or more patents, as in proprietary technology. Proprietary software means that some individual or company holds the exclusive copyrights on a piece of software, at the same time denying others access to the software’s source code and the right to copy, modify and study the software. Open standards -- Software interfaces, protocols, or electronic formats that are openly documented and have been accepted in the industry through either formal or de facto processes, which are freely available for adoption by the industry. The open source community has been a leader in promoting and adopting open standards. Some of the success of open source software is due to the availability of worldwide standards for exchanging information, standards that have been implemented in browsers, email systems, file sharing applications and many other tools.
    [Show full text]
  • System Analysis and Tuning Guide System Analysis and Tuning Guide SUSE Linux Enterprise Server 15 SP1
    SUSE Linux Enterprise Server 15 SP1 System Analysis and Tuning Guide System Analysis and Tuning Guide SUSE Linux Enterprise Server 15 SP1 An administrator's guide for problem detection, resolution and optimization. Find how to inspect and optimize your system by means of monitoring tools and how to eciently manage resources. Also contains an overview of common problems and solutions and of additional help and documentation resources. Publication Date: September 24, 2021 SUSE LLC 1800 South Novell Place Provo, UT 84606 USA https://documentation.suse.com Copyright © 2006– 2021 SUSE LLC and contributors. All rights reserved. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or (at your option) version 1.3; with the Invariant Section being this copyright notice and license. A copy of the license version 1.2 is included in the section entitled “GNU Free Documentation License”. For SUSE trademarks, see https://www.suse.com/company/legal/ . All other third-party trademarks are the property of their respective owners. Trademark symbols (®, ™ etc.) denote trademarks of SUSE and its aliates. Asterisks (*) denote third-party trademarks. All information found in this book has been compiled with utmost attention to detail. However, this does not guarantee complete accuracy. Neither SUSE LLC, its aliates, the authors nor the translators shall be held liable for possible errors or the consequences thereof. Contents About This Guide xii 1 Available Documentation xiii
    [Show full text]