LPI-Linux-Essential-Exams-Cram.pdf
Document Details
Uploaded by LawAbidingCommonsense
2020
LPI
Tags
Full Transcript
LINUX ESSENTIALS (010-160): A TIME COMPRESSED RESOURCE TO PASSING THE LPI® LINUX ESSENTIALS EXAM ON YOUR FIRST ATTEMPT (CO... A TIME COMPRESSED RESOURCE FOR PASSING YOUR LPI” LINUX ESSENTIALS (010-160) EXAM ON THE FIRST ATTEMPT JASON Location 1 of 3280 «© 0% DION LINUX ESSENTIALS (010-160): A TIME C...
LINUX ESSENTIALS (010-160): A TIME COMPRESSED RESOURCE TO PASSING THE LPI® LINUX ESSENTIALS EXAM ON YOUR FIRST ATTEMPT (CO... A TIME COMPRESSED RESOURCE FOR PASSING YOUR LPI” LINUX ESSENTIALS (010-160) EXAM ON THE FIRST ATTEMPT JASON Location 1 of 3280 «© 0% DION LINUX ESSENTIALS (010-160): A TIME COMPRESSED RESOURCE TO PASSING THE LPI® LINUX ESSENTIALS EXAM ON YOUR FIRST ATTEMPT (CO... Exam on Your First Attempt LINUX JASON DION ESSENTIALS (010-160) A Time Compressed Resource to Passing the LPI® Linux Essentials Page 1 of 208 « 0% LINUX ESSENTIALS (010-160): A TIME COMPRESSED RESOURCE TO PASSING THE LPI® LINUX ESSENTIALS EXAM ON YOUR FIRST ATTEMPT (CO... Copyright © 2020 including photocopying, recording, storage in an Dion Training Solutions, LLC information retrieval system, or otherwise, without www.DionTraining.com express written permission of Dion Training Solutions. All rights reserved. Except as permitted under United Manuscript edited by Mr. John Himes States Copyright Act of 1976, this publication, or any ISBN: 9798666362525 part thereof, may not be reproduced or transmitted in any form or by any means, electronic or mechanical, Page 2 of 208 « 0% LINUX ESSENTIALS (010-160): A TIME COMPRESSED RESOURCE TO PASSING THE LPI® LINUX ESSENTIALS EXAM ON YOUR FIRST ATTEMPT (CO... Please contact Dion Training Solutions if you have any concerns regarding DISCLAIMER such While Dion Training Solutions, LLC takes care to ensure the accuracy links or External Sites. Any screenshots used are for illustrative purposes are the intellectual property of the original software owner. and quality of these materials, we cannot guarantee their accuracy, and TRADEMARK NOTICES all materials are provided without any warranty whatsoever, including, but not limited to, the implied warranties of merchantability or fitness for a particular purpose. The name used in any data files provided with this course is that of a fictitious company and fictional employees. Any resemblance purely coincidental. to current If you or future believe we companies used your or employees name accidentally, please notify us and we will change the name revision of the manuscript. provider of integrated or is likeness LPI’ is a registered trademark of the Linux Professional Institute in the United States and/or other countries. All other product and service names used may be common law or registered trademarks proprietors. in the next PIRACY NOTICES Dion Training Solutions is an independent training solutions for individuals, businesses, educational institutions, and government agencies. The use of screenshots, photographs of another entity's products, or another entity's product name or service in this book is for educational purposes only. No such use should be construed to imply sponsorship or endorsement of this book by nor any affiliation of such entity with Dion Training Solutions. This book may contain links to sites on the Internet that are owned and operated by third parties (the "External Sites"). Dion Training Solutions is not responsible for of their respective This book conveys no rights in the software or other products about which it was written; all use or licensing of such software or other products is the responsibility of the user according to terms and conditions of the software owner. Do not make illegal copies of books or software. If you believe that this book, related materials, or any other Dion Training Solutions materials are being reproduced or transmitted without permission, please email us at [email protected]. the availability of, or the content located on or through, any External Site. Page 3 of 208 « 0% LINUX ESSENTIALS (010-160): A TIME COMPRESSED RESOURCE TO PASSING THE LPI® LINUX ESSENTIALS EXAM ON YOUR FIRST ATTEMPT (CO... SED To the best wife, friend, business partner, and supporter a husband could hope to have, and for her enduring patience with me as we continue our non-stop journey through life together. Page 4 of 208 «1% LINUX ESSENTIALS (010-160): A TIME COMPRESSED RESOURCE TO PASSING THE LPI® LINUX ESSENTIALS EXAM ON YOUR FIRST ATTEMPT (CO... The Linux Shell TABLE OF CONTENTS CHAPTER SIX ACKNOWLEDGEMENTS Linux File System BONUS CONTENT CHAPTER SEVEN CHAPTER ONE Searching and Extracting Data Introduction CHAPTER EIGHT CHAPTER TWO Scripting Basics Evolution of Linux CHAPTER NINE CHAPTER THREE Packages and Processes Open Source Software CHAPTER TEN CHAPTER FOUR Networking Basics The Desktop Environment CHAPTER ELEVEN CHAPTER FIVE User Accounts and Groups Page 5 of 208 «1% LINUX ESSENTIALS (010-160): A TIME COMPRESSED RESOURCE TO PASSING THE LPI® LINUX ESSENTIALS EXAM ON YOUR FIRST ATTEMPT (CO... CHAPTER TWELVE APPENDIX A Ownership and Permissions Answer Key to Practice Exam CHAPTER THIRTEEN LPI° LINUX ESSENTIALS Conclusion Exam Vouchers CHAPTER FOURTEEN ABOUT THE AUTHOR Practice Exam Page 5 of 208 «1% LINUX ESSENTIALS (010-160): A TIME COMPRESSED RESOURCE TO PASSING THE LPI® LINUX ESSENTIALS EXAM ON YOUR FIRST ATTEMPT (CO... been a small part of your success. ACKNOWLEDGEMENTS I truly hope that you all continue to love the Cram This book is written for my community of students to Pass worldwide have allowed me to continue to as you work to conquer the LPI Linux Essentials® develop my video courses and books over the years. certification exam. I wish you all the best as you Your continued hard work throughout your careers continue to accelerate your careers to new heights. continue who to lead you upwards to positions of increased responsibility, and I am thankful to have Page 7 of 208 «1% series and the method to my madness LINUX ESSENTIALS (010-160): A TIME COMPRESSED RESOURCE TO PASSING THE LPI® LINUX ESSENTIALS EXAM ON YOUR FIRST ATTEMPT (CO... BONUS CONTENT This book comes with an accompanying video for specific topics. To view these videos, please scan the QR code in the title of that section to go deeper into these topics with some video demonstrations in our lab environment. Please visit https://www.diontraining.com/ LEBook to register your book and receive access to additional online practice exams. Page 8 of 208 «1% LINUX ESSENTIALS (010-160): A TIME COMPRESSED RESOURCE TO PASSING THE LPI® LINUX ESSENTIALS EXAM ON YOUR FIRST ATTEMPT (CO... + Understand CHAPTE R ONE how the exam is designed and how to take the certification exam - Understand Introduction conquering some the tips LPI and tricks Linux for Essentials® certification exam In this book, you will receive a crash course that will introduce you to everything you need to know to pass the LPI Linux Essentials® certification exam. This book covers just the essentials with no fluff, filler, or extra material, so you can learn the material quickly and conquer the certification exam with ease. The LPI Linux certification exam Essentials” exam is the first in the Linux Professional Institute’s certification path. This certification is designed to test OBJECTIVES - Understand how this book is designed to help you quickly pass your certification exam your ability to use the basic console line editor and to demonstrate an understanding of processes, programs, and components of the Linux operating system. Page 9 of 208 « 2% LINUX ESSENTIALS (010-160): This book A TIME COMPRESSED assumes that you RESOURCE TO PASSING THE LPI® LINUX ESSENTIALS EXAM ON YOUR FIRST ATTEMPT (CO... have no previous This text singularly focuses on getting you to pass your experience with the Linux operating system and will certification exam, not to make you an expert in the teach you exactly what you need to know to take and Linux operating system, its system administration, or pass the Linux Essentials” certification exam on your Linux engineering. first attempt. Due to the design of this text, we will move at a very Now, this book will NOT teach you everything you need to know quick pace through the material. If you read this entire to be efficient or effective in utilizing book and take the practice exam at the end of the text Linux (scoring at least an 85% or higher), you should be ready Essentials” certification is designed to introduce you to to take and pass the LPI Linux Essentials” certification the Linux operating system and its various concepts. exam on your first attempt! Linux on a daily basis. If you want to become After all, the LPI an expert in Linux, then this Exam Basics book and the LPI Linux Essentials® certification are a great start but remember at the introductory recommend level. that they are both written Once you finish them, I continuing upward to the LPIC-1 (System Administration) The Linux Essentials” certification exam is an entry- certification and its associated video courses and textbooks to further enhance your skills. level certification for Information Technology personnel interested in understanding the Linux operating system, its usage, and its operation. This introductory certification Page 10 of 208 « 2% covers a general overview of the Linux LINUX ESSENTIALS (010-160): A TIME COMPRESSED RESOURCE TO PASSING THE LPI® LINUX ESSENTIALS EXAM ON YOUR FIRST ATTEMPT (CO... operating system: how to install it, how to configure exam, equating to a score of about 70% or higher. The it, and how to operate programs within it, both in the exam graphical user interface (GUI) and the command materials allowed during your examination. line The interface (CLI). The target audience for the LPI Linux Essentials” certification is for those who need: - An is a closed book understanding of the Linux and open understanding is an LPI Training Approved the time of Solutions Training (www.diontraining.com) Partner for the Linux voucher at a special discounted price available to our of networking and readers, please visit diontraining.com/vouchers. security in Linux exam consists of 40 Exam Tips and Tricks multiple- choice questions which must be completed within 60 A minimum at Essentials® certification exam. To purchase your exam - A basic knowledge of the command line minutes. exam or study online with the OnVue service. Dion Linux work certification of the no notes the exam at any PearsonVue testing center worldwide or - An understanding of the major components of The cost with publication of this book is $120 USD, and one can take source industry - A basic current exam, Before we dig into the contents of the LPI Linux score of 500 points on a scale Essentials” certification exam, it is important for you to of 200-800 points is required to pass the certification understand some exam tips and tricks. This will help Page 11 of 208 « 2% LINUX ESSENTIALS (010-160): A TIME COMPRESSED RESOURCE TO PASSING THE LPI® LINUX ESSENTIALS EXAM ON YOUR FIRST ATTEMPT (CO... you to grasp exactly how to study for the exam as you choices to try and distract you from the correct answer. read through the rest of this book, and it will help you to all uppercase letters, you should pay close attention to focus your efforts to get the most out of this material. The most important thing to remember when taking the LPI Linux Essentials® certification exam If you see part of a question with bold, italics, or is that those words because the test writers decided that those keywords are important to selecting the correct answer. It is important to remember what concepts in Linux there are no trick questions on test day. Every question is precisely worded to match the material you have and the open source environment were covered in your studied. You should read each question multiple times studies, since you will see questions on them again come to ensure that you understand exactly what its asking test day. You shouldn't see things on the exam that were and that you are answering the question being asked. not covered by the textbook or video course you used Anytime you see the words ALWAYS in an to study for the exam. We will cover all these concepts answer, think twice about selecting it. As in most things throughout this book, as these are the building blocks of in life, rarely is there a case where something ALWAYS or Linux Essentials® curriculum and the certification exam. NEVER applies to a given situation! Also, if a question asks about a particular command, or NEVER As you read the questions and answers, be on the then make sure that you don’t select an answer that lookout for distractions or red herrings. Generally, there contains is at least one of these listed in the possible answer answer the question being asked. Page 12 of 208 « 3% a concept or process. Always be careful to LINUX ESSENTIALS (010-160): A TIME COMPRESSED RESOURCE TO PASSING THE LPI® LINUX ESSENTIALS EXAM ON YOUR FIRST ATTEMPT (CO... Also remember that you must answer the questions based on your Linux knowledge and from On test day, you don’t have to memorize the terms this textbook, not your personal workplace experience. from this course on LPI Linux Essentials °® word for word, Your workplace may implement Linux and its concepts but you must be able to recognize them from the choices differently in their situation in given. During certification exams, you will choose your doubt, you should always select the book answer when answer from a multiple-choice style question instead of answering a question on the certification exam. a fill-in-the-blank or essay question. This is an essential and use studies number of situations! case. When BEST difference in certification testing and the tests you may answer. Each question may have several right answers, have taken in high school or college. In the certification but one is always the most correct answer. world, On exam day, you should also select the When in doubt, choose the answer that is correct in the greatest you just need to regurgitate, the information. Page 13 of 208 « 3% be able to recognize, not LINUX ESSENTIALS (010-160): As you A TIME COMPRESSED study this book, keep RESOURCE TO PASSING THE LPI® LINUX ESSENTIALS EXAM ON YOUR FIRST ATTEMPT (CO... these objectives in mind: - Know terms associated with Linux and open source concepts - Differentiate between a command and its arguments -Be able to utilize the command line interface to perform various functions Page 14 of 208 « 4% LINUX ESSENTIALS (010-160): A TIME COMPRESSED RESOURCE TO PASSING THE LPI® LINUX ESSENTIALS EXAM ON YOUR FIRST ATTEMPT (CO... + Understand basic hardware requirements for CHAPTER TWO Linux - Describe differences between Linux and other Evolution of Linux operating systems With the emergence of the technologies, Linux has become a household name. internet so common and new that it is Linux is a family of open source, Unix-like operating systems, typically packaged into a > aaa 6 distribution. It is the operating system of choice for many educational and commercial institutions due its robustness and extremely low cost of acquisition. Linux distributions include the Linux kernel and supporting system software and libraries to provide features that OBJECTIVES users interact with. - Understand the open source philosophy You may have heard of popular Linux distributions - Describe various Linux distributions and their such lifecycles - Understand Linux’s use in embedded systems Page 15 of 208 are «4% as Ubuntu, hundreds, Debian, if not and thousands, Fedora, currently but there in active LINUX ESSENTIALS (010-160): development. A TIME COMPRESSED RESOURCE TO PASSING THE LPI® LINUX ESSENTIALS EXAM ON YOUR FIRST ATTEMPT (CO... Linux’s popularity is mainly because it harder to use than the GUI alone. For this reason, it is important for you to learn both is open source software, which allows anyone to freely download, and even redistribute it. The open the graphical interface and the command line interface source origin of Linux is one of the main reasons for its to become proficient in Linux. If you want to become widespread adoption and success. a successful end user or Linux system administrator, it Most modify, Linux distributions include a windowing system and a desktop environment that provides the is worth your time to learn to use both environments adequately. like But why should you want to learn how to use Linux Microsoft Windows. We will cover all the major features anyway? Well, if you take a quick look at the internet, and you will find that Linux is everywhere. In fact, over 96% user with a graphical user interface (GUI), much functions of this wonderful operating system of all web servers operate on servers running one of the throughout this book. There are many Linux distributions that are solely numerous Linux distributions. Linux is considered the for servers. These distributions often omit the graphical go-to operating system in many desktop altogether. This means that it is important for advantages, like scalability and open source, over other you to also become operating systems. familiar with the Command Line Interface (CLI) or terminal. This command shell requires proper syntax to utilize, though, and is considered Page 16 of 208 « 4% industries due to its Open Source Philosophy LINUX ESSENTIALS (010-160): A TIME COMPRESSED RESOURCE TO PASSING THE LPI® LINUX ESSENTIALS EXAM ON YOUR FIRST ATTEMPT (CO... You may have encountered the term open source while browsing the internet or participating in some WordPress over 30% of the internet’s websites these days, and guess what? It is also open source. online forums. Linux is heavily influence by the open source philosophy. runs Since WordPress is open source, this means that you This mindset has had an extreme can go to WordPress.org, download the entire code base impact on development of the Linux operating system for the WordPress content management system, and you and its numerous distributions. can modify, edit, or change it as much you like. This is Open source refers to computer software or the great thing about open source software. You have full programs in which the source code is readily available access to all the code that runs these programs, and you for public use or modification from its original design. can modify it to meet your exact needs. It encourages a collaborative effort among programmers and general users in that program or software's The software or program's original designers then release the source code under the terms of a software license. The software license will dictate what users can community to improve on its design and purpose. What are some examples of open source software? modify in the original package distribution and how Well, if you just look at a simple web server, you will they can redistribute the modifications (called versions find a lot of open source software. For example, if you or forks) to the community and general public. are running an Apache web server, then you are running open-source software. How about WordPress? Well, There are many different types of software licenses used in the open-source community. These include the Page 17 of 208 « 5% LINUX ESSENTIALS (010-160): GNU General MIT License, A TIME COMPRESSED Public and RESOURCE TO PASSING THE LPI® LINUX ESSENTIALS EXAM ON YOUR FIRST ATTEMPT (CO... License, the Apache even the Unlicense. License, the These licenses want their distribution to achieve. Almost like a brandnew company, each distribution has its own goals and represent the entire spectrum of open source licenses, mission. from highly protective to unconditional. Depending on popular than others and can server larger or smaller your specific needs for your open-source project, you can audiences. choose which of these open-source licenses work best for We several A kernel functioning Linux Distributions on this, some distributions At the core of any Linux kernel. your use. Based computer’s is a distribution is a Linux low-level computer as the bridge between resources. Some are more program the user and the of its functions include already discussed that Linux is packaged into memory management and managing input and output distributions devices. contains a Linux (distros kernel, for short). supporting Each distro software and Essentially, computer program has complete core control over system, just like Microsoft Windows or Macintosh OS X. slightly different kernels, as the developers make small one another depending on who the developers are and what they the the constantly evolving, two distributions are likely to use from As is these components, Linux becomes a complete operating differ system. kernel everything distributions the that Linux libraries, as well as configuration files. By combining all Linux in the Linux kernel is changes to fix bugs or to add features and functions to their own distro’s kernel. Page 18 of 208 © 5% LINUX ESSENTIALS (010-160): A TIME COMPRESSED RESOURCE TO PASSING THE LPI® LINUX ESSENTIALS EXAM ON YOUR FIRST ATTEMPT (CO... also distributions. This is especially true when it comes to the come packaged with different software and tools such desktop environment and the ability to easily manage as the X Window or X), as well the system. For example, a specific distribution may critical to the come with the commonly used productivity software In addition to the kernel, as utilities System to manage some distributions (called X11 disks that system’s normal functioning. The are X Windows System is an example of software providing the basic framework like processing, spreadsheet, or presentation programs already installed. for the graphical user interface (GUI) environment. This One unique feature of Linux is the way the system on the manages startup processes. Different distributions use and keyboard, different scripts and utilities to launch programs that allows Linux users to draw and move windows monitor and to interact with a mouse word similar to what you are used to when you use a Windows link or Mac computer. prompt, and other common functions. This gives each Since a Linux distribution is a complete operating system, additional software networking programs, productivity tools complete to provide system. are This specific such desktop also as server environments, shipped supplemental types of daemons, as part software branding for computer distribution to a unique a network, present “personality,” which the login one can configure according to the user’s specific preferences. Typically, and of the the download Linux from their distributions developers’ are available websites. You for can helps download image files, which we then burn onto a CD some or DVD, or, with the help of a simple program, we can Page 19 of 208 « 6% LINUX ESSENTIALS (010-160): A TIME COMPRESSED RESOURCE TO PASSING THE LPI® LINUX ESSENTIALS EXAM ON YOUR FIRST ATTEMPT (CO... simply use a USB flash drive as the installation media. the newest features, but they also can contain the most Large companies and commercial users can also install bugs. So, you should never use an alpha release of a the distribution directly onto a private virtual server or product in a production environment a commercial cloud services, such as those offered by easily and often. A beta release tends to be more stable, Amazon Web Services (AWS), Google Cloud, or Microsoft but remember it still contains code that is being tested Azure. and therefore bugs developers manage their can occur. Again, in a production environment, it is better to wait until after beta testing Distribution Lifecycle Linux since it can fail is complete before installing a particular version of a distribution’s lifecycle through release schedules. Release schedules distribution. When the release version is released by a developer, it is considered to be stable. Most specify when new versions of a distribution are released release or years schedules in are advance. publicly However, announced to the public. Generally, only the final release version is months security recommended for use since it is the most stable. enhancements, debugging, and other factors may cause However, developers can also publish versions that delays. This practice is generally acceptable, if the delay are recommended only for testing and debugging, called does not take too long. If there is an excessive delay, it pre-release versions. These versions are categorized as can cause end users to question whether the developers either alpha or beta releases. An alpha release contains abandoned the project. Page 19 of 208 « 6% LINUX ESSENTIALS (010-160): A TIME COMPRESSED RESOURCE TO PASSING THE LPI® LINUX ESSENTIALS EXAM ON YOUR FIRST ATTEMPT (CO... Now, I know this sounds strange, but it is actually something that people do worry about. This is because also differentiate a major version change from a minor one. developers abandon projects all the time. Many smaller For distros are created by just one or two people, and, since convention that uses they are usually put out for free, a developer may simply pair which starts with the first letter of the animal abandon the project if they don’t have the time to work being described. The current version of Ubuntu on this writing, is 19.04, also known it anymore. After all, most of the smaller distro developers do so as a hobby, for fun, or as a labor of love. example, Ubuntu an uses a two-word alliterative naming adjective-animal as of as Disco Dingo. The previous version, 18.10, was called Cosmic Cuttlefish. If their life circumstances change, sometimes they stop After the release of a certain version, the developer developing their distro. For this reason, I’d try to stick typically supports it for specific period. This time-period with the major and well-known distros for any Linux will vary based on the distribution itself and can be systems you plan to run in a production environment. anywhere When researching different distros, you will see that from a few months to a few years. During this period, developers will regularly provide updates to for improve performance and features, as well as patches to for referring fix bugs or vulnerabilities in the system’s security. You to a specific version, especially compared to the usual can continue to use that version beyond its end of life number-point-number support date, but the developers will no longer supply the developers often come up with catchy names their different versions. This scheme. is helpful These catchy names Page 20 of 208 « 7% LINUX ESSENTIALS (010-160): A TIME COMPRESSED RESOURCE TO PASSING THE LPI® LINUX ESSENTIALS EXAM ON YOUR FIRST ATTEMPT (CO... updates and patches. This may be fine if you can patch versions. the system on your own, but this will require you to To upgrade a distribution, some require an compile it from the source code and search for a solution administrator to download an image of the new version from that version’s other users to continue to support it and past its nominal end of life. Instead, I find it is a better However, this type of upgrading is time-consuming and idea to regularly update your system and upgrade it to requires a lot of user intervention. It is also prone to the next version before reaching the end of life date. errors and data loss since it requires reformatting the Some distributions also offer different lengths of support (LTS) versions. We usually versions over short-term support versions have using more stability. By favor LTS since they a long-term support a new operating system. system. support, such as short-term support versions and longterm install it as if it were For an easier upgrade path, some distros have rolling release schedules, which in an ongoing manner. means that upgrades occur This eliminates the hassle of installing the new version from the beginning each time costs an upgrade is released. If you are coming to Linux from in a a Windows operating system environment, this is what production environment. For example, Ubuntu provides you are already familiar with since Windows relies on up to 5 years this concept of rolling releases and updates to patch its version, you can minimize associated with upgrades only provide of support 12 months disruptions and if you are using them to their LTS versions, but of support for their non-LTS Page 21 of 208 security issues and add additional features over time. © 7% LINUX ESSENTIALS (010-160): A TIME COMPRESSED RESOURCE TO PASSING THE LPI® LINUX ESSENTIALS EXAM ON YOUR FIRST ATTEMPT (CO... app store called Ubuntu Software, which allows a user Comparing Distributions to search Scan QR code to watch a video for this topic productivity A few examples of different Linux distributions are Ubuntu, OpenSUSE, Debian, and Gentoo. While they are all Linux, they look and act differently. For example, Ubuntu comes with the Unity desktop by default. Unity is a well laid-out and graphically pleasing environment. Clicking on the dots at the bottom for software left corner of the screen brings up a selection of all the programs installed in Ubuntu. On the left portion of the screen, there is a column of icons, one of which is Files. Files brings up Ubuntu's graphical desktop file system, which is very similar to Windows Explorer. Pre-installed on Ubuntu is the web-browser Firefox, which allows the user to visit any website on the internet. Ubuntu also has an and such so much audio more. and video, games, To install software, simply click on the icon of that software and follow the onscreen instructions. OpenSUSE with the KDE desktop environment looks like the traditional Windows desktop, with the start menu on the bottom left corner of the screen. Clicking on that button shows items like the power button, your computer, and the applications. Just like in Windows, right-clicking on the desktop gives the option to change the background. OpenSUSE also comes with the LibreOffice office suite, which works just like Microsoft Office. LibreOffice allows us to create documents, spreadsheets or presentations. The Gnome desktop running on Debian looks and behaves differently from Unity or KDE. Debian is known Page 22 of 208 « 8% LINUX ESSENTIALS (010-160): A TIME COMPRESSED RESOURCE TO PASSING THE LPI® LINUX ESSENTIALS EXAM ON YOUR FIRST ATTEMPT (CO... as a "flat" operating system because it is not graphically desktop will show applications as the last option on that pleasing. To access the applications, the user can click on menu and expands to show the list of applications. The Activity at the upper left corner of the Gnome desktop to second way of launching applications on the desktop open a menu that shows some applications like Firefox, environment is by clicking the Applications button at LibreOffice, or its own application installer. The point the upper left corner of the screen. The magnifying lens is that all of these are accessed differently from the two located on the launcher at the bar at the bottom of the previous distributions. screen also allows us to search for the application we Gentoo comes with XFCE. This desktop environment has a low system requirement and a low need to run. intensity desktop. It looks "flatter" than the other three desktops environments. Resembling a Macintosh system, it has an application launch bar along the bottom middle portion of the screen. distribution, Since Gentoo it can run is a lower requirement on older computers that had slower specs than the computers on today’s market. In the XFCE desktop environment, there are several ways to access and run applications. Right-clicking on the Page 23 of 208 « 9% Ubuntu with Unity Desktop OpenSuse with KDE Desktop LINUX ESSENTIALS (010-160): QO Kindle Library Debian with Gnome Desktop A TIME COMPRESSED Gentoo with XFCE Desktop using Linux is nothing to fear. This should hold true for users or are thinking who may of switching want to give over from it a try Windows or Mac because it operates similar to those two operating systems and, therefore, is something that they are already used to. Users will just have to decide which distribution and desktop environment suits their needs and preferences. Q [— An embedded system is a controller with a dedicated function within a larger mechanical or electrical system. It is embedded Embedded Systems as part as a full-featured and complete operating system, but more than just computers. In fact, Linux is at the core of many of the devices that device, often of fact, embedded systems control many of the devices you use every single day, whether you realized it or not. These devices include, but are not limited to, industrial automation, navigation equipment, medical devices, and many others. recent years, of customization, Up to this point, we have only spoken about Linux of a complete including hardware and mechanical parts. As a matter In Linux is used for so much =: embedded systems. Comparing these four distributions just shows that especially RESOURCE TO PASSING THE LPI® LINUX... due Linux to has its been low cost shipped and ease in many consumer devices such as wearable technology, home appliances, automobiles, and even thermostats. If you have a smart thermostat in your home, like a Nest® or an ecobee’, you already have Linux installed in your home! you use every day because it serves as the core of many Page 24 of 208 « 9% Aa LN LINUX ESSENTIALS (010-160): QO Kindle Library Some embedded Raspberry systems Pi, are that systems. we These systems, small can use include ultraportable computer Raspberry are Pi credit to like in Arduino sized create The the and embedded other RESOURCE TO PASSING THE LPI® LINUX... =: Q friendly, open source, and free for manufacturers to use within their devices. complete Because of this, Android has even been ported robots and for use in media players, televisions, and automobile Arduino and entertainment like systems. available the card things A TIME COMPRESSED market as systems, too. Android is highly do-it- customizable and is a truly complete operating system yourself or DIY kits. The Linux-based operating system with Linux at its core. We can also add applications into embedded in these kits has a small footprint, requires the Android environment to further enhance features. little memory and processing power to run, and is highly There are applications for media content such as photos, customizable. videos, and social media, Most smartphones and tablets also run on a Linux kernel-based Google and as mobile operating acquired a result operating system Android in July Android is system that share consisting of over known 75% a as 2005, highly now has gaming. Android. extended it, competitive a market of all smartphone and as well as productivity and In fact, since many newer televisions have Android installed within them as an embedded system, these devices are now be complete multimedia centers, and we can use them for internet video streaming, browsing, and video games. tablet users worldwide. Android is highly scalable, user Page 25 of 208 « 10% Hardware Requirements [— Aa LN LINUX ESSENTIALS (010-160): QO Kindle Library Before you can install Linux, you A TIME COMPRESSED need RESOURCE TO PASSING THE LPI® LINUX... Usually, to know developers will =: publish Q system which hardware components you need to run and use requirements it efficiently. These prerequisites are known the download page of their website. These lists typically requirements as system and are often a guide as opposed to an The defined most by common any hardware. is often accompanied (HCL). An sometimes set Linux computer list HCL A hardware by distribution. of system requirements, requirements is display the needed. physical compatibility possible hardware hardware devices define the minimum requirements. also tend to increase over time and or other removable media, peripheral devices system requirements are the lowest that your computer needs to boot Linux successfully and use it with basic functionality. As a an example, Disco Dingo, the current version of Ubuntu sets requirements These optical size, available and for two space, specifications, The minimum compatible, distros drive list tested, Most disk requirements requirements a hardware lists incompatible recommended of system distribution particular and state required processor speed, memory hard absolute rule. for a specific version of their distro on as of this writing, requires a computer with at least a Dual Core processor running at 2GHz, 2GB of RAM, system and 20GB with and laptops meet these requirements without too much a demand for higher processing power and resources in difficulty. newer versions of each distribution. Page 26 of 208 « 10% of hard disk space. Most modern desktops [— Aa LN LINUX ESSENTIALS (010-160): QO Kindle Library A TIME COMPRESSED RESOURCE TO PASSING THE LPI® LINUX... =: Q can also vary greatly play 3D games, which require higher frame rates for from one distribution to another. For example, consider smooth gameplay. When you look at the recommended the requirements, you will notice that most distributions But minimum AntiX requirements distribution. This distro only requires a computer with at least a Pentium III processor, 256Mb will now recommend RAM, and 2.7GB of hard disk space. These requirements higher are extremely lightweight, considering that the Pentium requirements. However, you still need to be careful that III processor was first manufactured in 1999. It is pretty you do not use incompatible hardware because it may amazing that a modern operating system like AntiX can be more powerful than the minimum requirements but still run on a system that is over 20 years old! So, if you may have an old Windows computer sitting in your basement if you install an unsupported collecting dust, you could breathe new life into it as a device. processing render the a video graphics card and much and whole memory system than the unstable graphics minimum or unusable card or other Linux machine using a lightweight distro like AntiX. The other recommended type of system requirements. requirements Recommended Installing Linux is Scan QR code to watch a video for this topic system requirements list the hardware that you should have to maximize the system’s potential. This allows you to use applications such as video editing software or Page 27 of 208 When it comes to using Linux on a computer, it may already come pre-installed by the device manufacturer «© 11% [— Aa LN LINUX ESSENTIALS (010-160): QO Kindle Library A TIME COMPRESSED RESOURCE TO PASSING THE LPI® LINUX... = Q ££) or you may need to manually install it. To manually simply need the downloaded Ubuntu ISO file, a blank install a Linux distribution, the installer is essential. It DVD, and access to acomputer with a DVD burner. Right- is usually a download on the distribution’s website. For clicking on the ISO file will show the context menu example, options, which includes “Burn disc image." Clicking it to install Ubuntu, open a web browser and go to ubuntu.com. The installer is under the download brings up the Windows section. Several different versions of the installer may where be present and choosing which to download will depend DVD, click the burn button, and start the process. Older on system requirements and user needs. For example, Windows versions, such as Windows XP and Vista, may there will be 32-bit and 64-bit versions that depend on need third party software, hardware capability, and there might also be long-term manage burning ISO disc image files. Mac users will also support and non-long-term versions. The file size will go through also depend on the installer’s version. Windows The installer is usually in the ISO file format. It is Disc Image Burner dialogue, we can select the disc burner, insert the blank something such as Infra Recorder, to similar, and tutorials for both and Mac image burning are on the Ubuntu website. a disk image for a CD or DVD. There are several ways Another way to manage ISO files for newer systems, of managing this type of file format, and the traditional which way is to burn the disk image onto a CD or DVD. For bootable USB stick. Optical drives are becoming a thing the Ubuntu of the ISO file, Windows 7, 8, and 10 users will Page 28 of 208 «© 11% can boot past, off USB as they are thumb prone drives, is to create to physical damage. a Aa LN LINUX ESSENTIALS (010-160): A TIME COMPRESSED RESOURCE TO PASSING THE LPI® LINUX... = Q Ba Bootable USB installers are now the preferred method for prompts. It will also download additional files, so we installing operating systems like Windows need and Linux. internet connectivity. A prompt asking for the There are also advantages to creating a Ubuntu bootable write mode will appear and selecting ISO mode at this USB stick; for instance, it allows us to test out Ubuntu point is recommended. without touching the host computer's configuration. We process to finish, and, once it is done, the USB drive is can also carry this USB stick around and use it to boot now bootable, and we can use it to install Ubuntu on a Ubuntu on other computers, such as a friend's or at an machine capable of booting though USB. internet cafe. Before Creating a Ubuntu bootable USB still requires the It may take some time for the going through an actual install by taking over an entire system or booting alongside an existing ISO file, but, instead of going through the disc burning operating process, we need a third-party software such as Rufus, machine, which is like another computer running inside an open source software for creating bootable USBs. A your sufficiently capable USB thumb drive is also necessary. is VirtualBox. Just like downloading For newer versions of Ubuntu, we need a 4GB or larger file from USB stick or flash drive. It should be empty, as it may VirtualBox from its website, virtualbox.org. Download require reformatting, which destroys existing files. The the version that matches process is straightforward, and there are easy to follow VirtualBox Page 28 of 208 « 12% system, computer. the we test A popular Ubuntu will can be Ubuntu virtual website, we machine on. virtual software the Ubuntu can the operating installed on a Going download ISO the system that through the LINUX ESSENTIALS (010-160): QO Kindle Library VirtualBox installer should be A TIME COMPRESSED straightforward, as it RESOURCE TO PASSING THE LPI® LINUX... is an actual or virtual machine. =: Q The next prompt [— in recommends installation defaults. Create a new virtual the installation is the keyboard layout selection. After machine by naming it, setting a virtual memory (RAM) that, the installation presents options for a normal or value, and creating a virtual hard drive disk (HDD). We minimal install. can then load the downloaded Ubuntu ISO image as a software, while the minimal install has less. There will virtual optical drive from which the virtual machine can also be options to download updates while installing boot. Starting this virtual machine is like turning on Ubuntu, and we can choose whether to also download a physical computer, and it will boot from the loaded some third-party software, some of which is proprietary. Ubuntu ISO file as if it were The a DVD inserted in a DVD drive. next system The Ubuntu installer starts with a language HDD step A normal install has all the preloaded presents to be used options exclusively to either allow for Ubuntu the or to set partitions so that we can boot Ubuntu side-by- install. side with other operating systems. The latter option is Selecting try loads Ubuntu as a live operating system, also called a multi-boot system. Installing a multi-boot running system selection is not and presents temporarily retained as options: if it were or installed, is more complicated, and there are a ton of online community. The next major step in the process option is supplying the system, when it computer shuts down or restarts. Selecting the install onto especially but resources online, especially from Ubuntu's website and Ubuntu system, try the installs in the two whether it Page 29 of 208 « 12% user credentials: the user’s, computer's Aa LN LINUX ESSENTIALS (010-160): QO Kindle Library name, username, and password. A TIME COMPRESSED After supplying user RESOURCE TO PASSING THE LPI® LINUX... =: Q [— today. These range from commonly used ones to those credentials and selecting whether the user is logged in that automatically or not, the system installation starts. Most readers are familiar with the two most popular The first boot screen of Ubuntu shows the "What's of the operating system’s features. The next specifically developed for unique systems. operating systems in the world: Windows and macOS. new in Ubuntu" dialogue, which is like a walkthrough of some are Microsoft operating Windows system dominates of choice, with the world nearly as the 90% of all section of the first boot shows Livepatch and is where desktop and laptop computers we can create a Ubuntu single sign-on account. The next Many home users and companies prefer Windows section asks whether the user wants to send information their everyday use, productivity needs, and gaming. This to Ubuntu to better help them in the OS’s development. is also driven by the fact that most software developers After going through the first boot screen sections, the release their products on the Windows platform due to Software Updater may run if it detects updates on some its widespread popularity, creating a self-perpetuating of the feedback system software or applications. Always keep them up to date. are hundreds that continually increases for Windows popularity. The Operating System Differences There cycle running some version. of operating systems second largest operating system is Apple’s macOS. With the increased popularity of the iMac and in use MacBook Page 30 of 208 « 13% computer lines in recent years, macOS now Aa LN LINUX ESSENTIALS (010-160): QO Kindle Library A TIME COMPRESSED makes up about 9% of all desktop and laptop operating systems. While slowly gaining still cannot take dominance since away large macOS only this is a small Q [— Windows is also the most prone to malware attacks portions of Windows’s because of its larger user base. This makes it susceptible runs on Apple’s own to attackers who circumvent security measures to steal of all desktops amount, remember and laptops. this While doesn’t mean criminal and spent the time to create a piece of malware, wouldn’t you create it for the operating nearly 90% system that of the world uses? Of course, you would— and so would they! business desktop users. When it comes to servers, Linux Unlike for Windows, malware is very unlikely to dominates Windows and other operating systems with affect Linux since the source code is openly available, over 75% of the market share. and home users, the overall user experience of when the community of users can always modify it they detect bugs or vulnerabilities. Like Linux, both very popular. macOS has its roots in a Unix-like operating system, and Linux, on the other hand, is known as the desktop OS for therefore also enjoys lesser exposure to vulnerabilities computer experts or hackers. People perceive Linux as than Windows and macOS LN data for their own financial gain. After all, if you were a Linux isn’t important. These numbers are for home and For Aa for yourself throughout this book. share, macOS In third place, the Linux operating system is found 2% =: market computer hardware. on less than RESOURCE TO PASSING THE LPI® LINUX... made them difficult to use, but that simply isn’t true, as you will see Page 31 of 208 « 13% Windows. With that said, macOS is still more Q) LINUX ESSENTIALS (010-160): QO Kindle Library A TIME COMPRESSED RESOURCE TO PASSING THE LPI® LINUX... =: Q ££ susceptible to malware than Linux due to its larger user to run on systems with limited resources, such as old base. computers or for specific purposes, such as servers and Windows is a closed source, proprietary software embedded systems. We will further discuss how to use product. Using Windows requires a valid license, which the Linux command can be purchased for a nominal fee of several hundred a good bit of time covering the different commands dollars. Linux, detail to help you become proficient at it. on the other hand, is open source and, therefore, free to download and use. The third option, line later in this book, spending in Windows and macOS run entirely on graphical user macOS$, is sort of a hybrid of these two models. The interfaces software (like command line only operating system called MS-DOS in Linux), but it is proprietary software (like Windows). the early 1980’s, with the steady development of GUI- Also, macOS can only run on systems built by Apple, as based OS starting from the mid per their licensing agreement. This means that to use the faded into merely macOS, you must purchase the hardware from the tech and it is not a complete operating system into itself. giant with higher prices. For is licensed under Unlike Windows a free to use model or macOS, though, you can run the or GUI. macOS environment Though Microsoft did develop 80’s, MS-DOS a slowly a command prompt inside Windows, system, known there is a as the terminal, command but most line users Linux as an operating system from only the command never use it and instead rely solely on the graphical user line. This is especially helpful when interface. you need an OS Page 32 of 208 « 14% Aa LN LINUX ESSENTIALS (010-160): A TIME COMPRESSED RESOURCE TO PASSING THE LPI® LINUX... Overall, each operating system has its own pros and will, however, compare = Q the various Linux concepts to cons. I will leave it up to you to decide which operating Windows from time to time in order to help you better system you prefer for your own desktop environment. relate these new concepts to things you might already However, know. since this is a Linux course, we will focus the rest of this book on its operations and usage. We Page 33 of 208 « 14% Ba Qh LINUX ESSENTIALS (010-160): A TIME COMPRESSED RESOURCE TO PASSING THE LPI® LINUX... = Q Ba Qh - List basic desktop and server applications CHAPTER THREE - List different programming languages and their tools Open Source Sofi Eware - Explain how package installation and repositories work Oeaae90onne Open source software is software released under a license in which the copyright holder grants users the rights to study, change, and distribute the software to “4 anyone and for any purpose. As such, the source code (the human readable core of the software) is available for inspection, modification, and enhancement. Open source software is usually developed in a collaborative public manner and is an example of how OBJECTIVES - Understand software open collaboration can create some exceptional products the concepts of open source. Explain the costs of open source software and services. In the early days of computing, programmers and developers shared software in order to learn from each Page 34 of 208 « 15% ©) LINUX ESSENTIALS (010-160): QO Kindle Library other and to evolve the computing A TIME COMPRESSED field. Eventually, RESOURCE TO PASSING THE LPI® LINUX... For example, many the open source notion moved to the wayside, as many have developers interoperability, opted to commercialize their software in the 1970s and 1980s. Still, many academics and some security, of this collaboration, software developers software affordability, scalability, The Open Source and Initiative corporation that promotes this day. source Q products transparency, localization support than commercial variants. developers still create software collaboratively, even to Because greater open =: software. is the usage They published the Open a public benefit of open source Source Definition may want to publish their software with an open source (OSD), a document that determines whether a software license, such as the GNU General Public License (GPL), license can be labeled with the open source certification so that anybody may also develop the same software or mark. This mark serves as a distinctive label to show understand its internal functioning. With open source that a software’s attributes meet the requirements of the software, anyone can modify it, port it to new operating OSD. systems and instruction set architectures, share it with others, or even market it in some Cost of Open Source Software cases. According to some scholars, there are several policy-based reasons for Open source software is generally freely available for the adoption of open source, including the heightened download, value proposition created by the open source movement. But like any software project, whether open source or Page 35 of 208 « 15% so the cost to acquire a copy is very low. [— Aa LN LINUX ESSENTIALS (010-160): QO Kindle Library A TIME COMPRESSED proprietary, costs can start to pile up when to technical support, training, it comes and administration or RESOURCE TO PASSING THE LPI® LINUX... In the early days of computing, almost all software They This ownership, [— they needed to, since the code would often not run on a different hardware setup or operating system without add new features, if they so desired. was produced by academics’ and corporate researchers’ domain. Q modification. This also allowed any user to fix bugs or to maintenance. collaboration. =: often meant such that shared there as copyright, software was as public- absolutely trademark, no or patent. Long after the invention of computers, industries began widespread adoption of computing power and its advancing technologies. With this widespread adoption, a need arose for new hardware and software to As such, they generally distributed software under the be developed to meet this increased demand. principles of openness and cooperation. It was simply this time, hardware manufacturers would create most not seen as a commodity that could be sold for profit. software Such communal behavior later became a central element the of the so-called hacking culture, which is a term with a manufacturers who bundled software with hardware, a positive connotation among open source programmers. brand-new software industry began to grow. To increase During this early period, the source code was as well, software’s revenues cost. and keep and To this dramatically compete up with with the During drove up hardware rising costs in software generally distributed with the software machine code. development, This allowed users to modify the software themselves if openly distributing source code, but instead making it Page 36 of 208 « 15% a general trend began of no longer Aa LN LINUX ESSENTIALS (010-160): QO Kindle Library A TIME COMPRESSED RESOURCE TO PASSING THE LPI® LINUX... =: Q [— proprietary and maintaining a legal copyright on the advertisements programs created. Now, to legally run the software, an their software. This allows their software development individual or a company would need to acquire a license, to be funded while still allowing end users to use their resulting in profit for the software developers. software freely. However, a resurgence in research and alternatives or install other software from within Still others chose to adopt a freely distributed, open to lower the cost of using and maintaining computer source systems into place by the end user. This means once again resurrected the idea of free open model that relies on support agreements put you can use source software in the late 20‘ century. Open source the software for free. but if you want support from the software to developer when you have a problem, then you must pay continue developing software while allowing people to a service fee. This model was popularized by Red Hat use it for free. Some of the developers resorted to private Enterprise Linux, which is completely free to use, but funding, crowdfunding, and even accepting donations charges for official support, training, and certifications. developers now had to look for ways from users to keep their projects alive. Since donations are voluntary, this still allows other nondonating users Scan QR code to watch a video for this topic to use the software for free. Others moved striking partnerships to a Desktop and Server Applications freemium with other model, companies often to show Page 36 of 208 « 16% Aa LN LINUX ESSENTIALS (010-160): A TIME COMPRESSED RESOURCE TO PASSING THE LPI® LINUX... Most desktop applications that come pre-installed spreadsheet program similar to MS = Q Numbers. For creating presentations such as those on MS open source alternatives to more popular commercial PowerPoint or Keynote, Impress is the program. lack are However, performance. now it In mainstream, preferred over free and open does fact, and most they commercial source not mean that of these are applications programs sometimes software. Moreover, they VLC media player is a free and open source, portable, cross-platform media player software even and streaming media server available in Ubuntu. The Many of these good function similarly platform, thing about which this program means that it is that can it is cross- run on other to their commercial counterparts with slightly subtle operating systems, such as Windows, macOS, and even differences. on mobile phones. Its main advantage over other media LibreOffice is a free and open found pre-installed Ubuntu. in most Linux It is like Microsoft LibreOffice suite is Writer. source office suite, distributions Office. Included like players is its ability to play almost any audio and video format. and it supports a wide range of codecs. in the A program to manipulate images on Ubuntu that’s like Adobe a word processing program Photoshop is GIMP. An acronym for GNU like MS Word. It allows us to write notes and documents Image Manipulation Program, GIMP is a free and open- that we can also source and use. Also included format according in this office to suite preferences is Calc, Qh Excel or macOS’s or that can be later installed on Ubuntu are free and software. Ba a and Page 37 of 208 « 16% raster editing, graphics free-form editor drawing, for image retouching converting between Q) LINUX ESSENTIALS (010-160): QO Kindle Library A TIME COMPRESSED different image formats, and more specialized imaging RESOURCE TO PASSING THE LPI® LINUX... =: Q [— communications protocol development. GParted is a graphical user interface for managing tasks. For those looking for video editing programs like disk partitions. It create, Adobe Premier or Final Cut Pro, Kdenlive is a free and partitions open source alternative. For working on audio files, the entered to do those functions. An program to use is Audacity: a powerful, cross-platform, and open source digital audio editing and recording important networks needing aspect format, to and memorize of managing is the ability to backup resize the code servers and data to retrieve or restore from it in the event of system crashes or failure. application software. The without can internet browser that comes pre-installed in An application called Timeshift can take scheduled Ubuntu is Firefox, although users can always add others snapshots of the system to give the ability to restore the such as Google Chrome, Opera, or many others. system to a previous snapshot when there are accidental For server and network administrators, it is also deletions or changes render the current system unstable. important to have applications that extend Ubuntu's capabilities server open beyond applications source network packet desktop is tasks. Wireshark. analyzer. troubleshooting, One It is Admins analysis, and of these a free use it software and To quickly create text for coding scripts rather than office documents, application. It is like for Another and administrators Page 38 of 208 « 17% helpful or Atom system is a good Notepad on Windows. tool is PuTTY. for system PuTTY and is a free network and open Aa LN LINUX ESSENTIALS (010-160): A TIME COMPRESSED RESOURCE TO PASSING THE LPI® LINUX... source terminal file transfer emulator, application. protocols, including serial console It supports SCP, SSH, Telnet, rlogin, and raw Q Ba Python is a great scripting and interpreted language. and network several network = There are two ways to write python code: in an interpreted environment or from inside a text file. For the interpreted environment, open a terminal and type socket connection. python3 (3, since it is the latest version of Python). This Development Languages and Tools will bring up a prompt that will take direct commands. Scan QR code to watch a video for this topic Inputting print("Hello, World") will return the text Hello, One it has of the embedded languages. great things support Here are some about Linux is that for different programming of those languages and the tools that we can use to write, read, and execute them. JavaScript is simply a text file with js as its extension. We can embed this within HTML, or it can be its own file. It can be as simple as a script to show "Hello World" when opened in a browser, or it can have more complex functions, such as creating a list. World right below that command line. We can achieve this by creating a text file, typing in the exact same command, and saving that file with.py extension. Back at the terminal, type python3, insert a space, and append the filename of the saved text file; it will show the same results. PHP now it originally stood for Personal Home stands for the recursive Page but initialism, PHP: Hypertext Preprocessor. As we servers heavily use it, so does Linux, as it is an operating system primarily used Page 39 of 208 « 18% Qh LINUX ESSENTIALS (010-160): QO Kindle Library A TIME COMPRESSED RESOURCE TO PASSING THE LPI® LINUX... =: Q [— for web servers. It is just like JavaScript, as it works with but is extremely powerful because we can write full- HTML files. As such, a PHP file indicated by.php, can run fledged programs using this language alone. directly in a browser. Another CSS, also called "style sheets", is used with HTML is a great pages; they describe the content and how things should lot of different be displayed within that page. A typical.css file contains operating systems, including Windows and Linux. This page attributes, such as how the body of the page should should not come smartphone look, what color the background should be, the type and OS, as all the applications size of font, page margins, etc. Modifying the style sheet language programming because language, it also works on a Java, as a surprise for most users running the Android on their phone are written in Java. Java is a compiled easily changes the look and feel of a webpage and is language. Looking at a.java file, the objects in it are just easier than going back and modifying the whole HTML text that the computer document. will not understand unless it C++ a compiled language like low-level programming language. It a little bit more is converted into an executable binary. So, the terminal first compiles the java file by executing the javac is Java and is a command followed by the filename with java extension. complicated, Once it is compiled, run the object by typing java and executing whatever is the object's name is in the java file. Java is the big-name software like Adobe applications, Google a bit more complicated than JavaScript, Python, or PHP, Page 40 of 208 « 18% it; needing but it to is compile very the powerful, binary as before most of Aa LN LINUX ESSENTIALS (010-160): A TIME COMPRESSED RESOURCE TO PASSING THE LPI® LINUX... = applications, and even MS Office and older versions of programming Windows were all written in C++. development environment such as MonoDevelop. A newer object-oriented programming Go. Like Java and C++, it also needs language It is used from within language. Ruby files are indicated by extension. language interpreted environment or from inside a text file. large, distributed systems and highly a Ruby is like Python, as it can run in an scalable network servers. Since Go is faster to compile There are many more development languages and than C++ and is much easier to maintain than Java, it programming tools available to Linux users. The ones replaced them in Google's software stack. mentioned here are just the more popular ones. Selecting Cis a low-level programming language from which C++ evolved. In fact, the “hello, world" example, which to use depends on the user’s knowledge of the language as well as the language’s fit for purpose. originally written in C, has become the model for writing Package Management and Repositories introductory programs in most programming textbooks. The program prints "hello, world" to the standard output, which is usually a terminal or screen display. In addition to C and C++, another member There are many ways to install software on a computer powered by Linux. The most common method of the family is C#. It is a general-purpose, multi-paradigm Aa a.rb filename Go is designed specifically as a systems programming for B&B Ruby is a popular web development programming is to be compiled. language. Q is to use a package manager and software repository. Since there are a wide variety of Linux distros, there Page 41 of 208 « 19% Q) LINUX ESSENTIALS (010-160): are also a wide variety of package A TIME COMPRESSED managers. RESOURCE TO PASSING THE LPI® LINUX... Each Unlike Linux distribution compiles its own software with its normally desired library versions and compilation options. Linux the applications generally don’t run on every distribution, described but usually instead need to be compiled for a particular a Windows download applications’ and its Linux because Instead, own most install websites above. hosts user, each software = Q B&B users don’t applications from of the Linux challenges distribution repositories. These distro. Even if there was a universal Linux binary, its repositories contain software packages compiled for a installation would be hindered by the various competing specific Linux distro and version. For example, if you’re package formats and their availability within a distro. using Therefore, if you locate the website of a Linux application, you will likely see a variety of download links for different 18.04, the repositories you will contain packages specially compiled for Ubuntu use 18.04 and not for another version like 16.10 or 19.04. formats based on the If the author of the the appropriate package from its configured software application you want to install doesn’t already have a repositories, install it, and automatically set it up for package the end user. This contrasts to installing software in distribution you package Ubuntu are using. created for your distribution, then you may These have to download the source code for the application Windows and manually wizards yourself. compile the binary for the application package or macOS, where automatically you must download click through or locate executable files on websites. When an update Page 42 of 208 « 19% managers releases, the package Aa manager notices its Q) LINUX ESSENTIALS (010-160): QO Kindle Library availability, downloads the appropriate A TIME COMPRESSED update, and installs it for you. On Windows RESOURCE TO PASSING THE LPI® LINUX... maintaining a record of which =: Q [— files belong to which packages. The package manager also must remain aware each application has its of their version and their latest status. These package own software update program to receive an automatic files can also contain scripts that run when the package update, is installed and removed. but and macOS, in Linux the package manager handles The updates for every piece of software installed from the software repositories. three most popular package file formats are.deb,.rpm, and.tar files. user, you are probably used -.deb is used in Debian Linux and Debian- to seeing an.exe or.msi file as the installer files for based distros like Ubuntu, Kali Linux, and applications. If you are a macOS user, then you probably Tails If you are a Windows are used to downloading a.dmg or.app file as the +.pm is used the Red installer. Linux, though, uses several package formats Manager for its installers. Fedora, openSUSE, and CentOS Packages of files. The are essentially archives containing a package manager opens the list archive and installs the files to the location specified within the package. The package manager is responsible for Page 43 of 208 « 20% and by Hat RPM-based Package distros like -.tar (also.tgz or.tar.gz) is used a universal package format like ArchLinux and and is used Slackware; in distros.tar is an Aa LN LINUX ESSENTIALS (010-160): A TIME COMPRESSED RESOURCE TO PASSING THE LPI® LINUX... uncompressed archive and -tar.gx is a compressed archive While Linux distributions ship with their own ackages from that repository and receive any additional P é P y y updates for them automatically. P y For example, Ubuntu and some other Debian-based (x) ; ; (PPAs), which contain software Q compiled Aa by individuals and teams. These PPA repositories often get repositories pre-configured, you can also add other y é P P repositories to the system. You can then install software oo, archives = distributions offer a wide variety of personal package updates and beta versions of software before the official ; Ubuntu repository. Remember, these Coa, PPAs are not. officially endorsed.. by the distribution, so they may contain bugs, security sae... vulnerabilities, and other nefarious things. For this reason, I recommend only using official repositories from your distribution for any production systems. Page 44 of 208 « 20% ©) LINUX ESSENTIALS (010-160): A TIME COMPRESSED RESOURCE TO PASSING THE LPI® LINUX... CHAPTER FOUR - List Linux alternatives + Compare and programs The Desktop Environment to common contrast various = Q Ba Qh software package managers One of the more distinct advantages of Linux over ome Windows and macOS is its ability to let users have (G0Meaade complete freedom of choice. Unfortunately, this is also one of the most confusing things about Linux, as that choice can become quite overwhelming. poe For example, let’s pretend that you choose Ubuntu “ from among the hundreds of Linux distributions in the marketplace. Ubuntu is quite popular, and it is a good choice since it has a large user community and excellent OBJECTIVES and - Compare : environments lifecycle support. Even though you chose Ubuntu, you contrast. various desktop still have some decisions to make before you can download and install it. This is because there are eight official versions that all look and behave differently, even Page 45 of 208 « 20% ©) LINUX ESSENTIALS (010-160): QO Kindle Library A TIME COMPRESSED RESOURCE TO PASSING THE LPI® LINUX... = though they are all considered Ubuntu. One of the major directly via the command differences in these eight divergent versions of Ubuntu is To do certain tasks on the command the desktop environments. to be familiar with text-based commands, To better understand what a desktop environment is, start with the core of any kernel. Linux, Windows, operating and macOS system, the commands Q B&B line using embedded tools. line, a user needs what these do, and the syntax or rules needed to run these commands. In fact, by using just the command line environment, all have a kernel, a specialized piece of software that directly controls the you hardware. This kernel translates the commands from a system, piece of higher-level software (like an application) into playing music, moving something the hardware can understand and act upon. hard drive, and much more. Unfortunately, most users The kernel is responsible for the intelligent management find the command line not very easy to use, so operating of hardware resources, including memory management, systems evolved into a more user friendly, graphical user for various software and utilities. interface (GUI) environment. can perform nearly any action including browsing the web, you wish on a checking email, around the directories on the In Windows and macOSs, The kernel is not a piece of software that requires a for example, you may never even access the command graphical interface, but instead it operates behind the line or the kernel directly, but instead you would use the scenes. the least GUI for your desired actions. This GUI then translates access your amount This specialized of resources software possible, consumes and we can it Aa Page 46 of 208 « 21% series of mouse clicks and keyboard inputs Q) LINUX ESSENTIALS (010-160): A TIME COMPRESSED RESOURCE TO PASSING THE LPI® LINUX... into the appropriate command behalf. Basically, in Windows line actions on your easily within reach. and macOS, only system While Windows and Mac = Q Ba each have an embedded administrators, programmers, and developers ever need and inseparable desktop environment as part of their to access the command line. operating system, Linux uses a more modular approach In Linux, on the other hand, it is often much quicker and easier to perform to desktop environments. In fact, there are more than a an action using the command dozen different desktop environments that are officially line. For this reason, we will spend an entire chapter supported in Linux. These environments can be mixed on properly using the command and matched according to the user’s preferences or based though, we will focus line. In this chapter, instead on Linux’s various on the specific purpose of the distribution itself. graphical user interfaces. A desktop environment Many is the place where most featuring Linux distributions several different come desktop with variants environments. As user actions occur. This graphical user interface (GUI) previously stated, Ubuntu has eight different available contains a file system manager, shortcuts to all available versions and numerous different desktop environments applications, various menus to easily perform common represented tasks, and serves as your window with the Unity into the operating among them. Desktop By default, Ubuntu Environment, which comes has an environment attractive look and intuitive workflow. In addition to this serves as your desk, where all your work and tools are default option, Ubuntu also has other “flavors” (different system and its functions. Your desktop Qh Page 47 of 208 « 21% Q) LINUX ESSENTIALS (010-160): QO Kindle Library A TIME COMPRESSED RESOURCE TO PASSING THE LPI® LINUX... versions) that are each shipped with a unique desktop If you are a Windows or =: macOS Q user, [— you variant relies on the KDE probably are familiar with the Microsoft Office suite of Plasma desktop environment, which is slick, flashy, and products for workplace productivity. This includes word highly customizable. The Xubuntu variant, on the other processing hand, uses the lightweight Xfce desktop environment, (PowerPoint), and database (Access) tools. environment. The Kubuntu 1 GB of memory and a 700 MHz processor. Programs and Software After installing a Linux variant and a desktop spreadsheet Since Microsoft which is robust and can run on older computers with as little as (Word), presentation Office isn’t available on a Linux machine, most (formerly OpenOffice) functions. LibreOffice includes word (Excel), Linux users to is rely fulfill LibreOffice these workplace a feature-rich processing (Writer), spreadsheet (Calc), presentation and to increase many others. The LibreOffice suite is fully compatible programs available. These programs cover a wide variety read and write of functions. Because Linux is open source, much of the like.doc,.docx, software Additionally, LibreOffice supports its own native format there are millions available for Linux is also open therefore, free to download and use. source and, known Page 47 of 208 « 22% as the to well, common.xls, Open as.xlsx, allowing and with and macOS, Office, tools, of available Windows Microsoft (Base) that a user can then run various programs their productivity. Just like database toolset environment, software (Impress), on workplace.ppt, Document -pptx, Format file and (ODF), it to formats more. which Aa LN LINUX ESSENTIALS (010-160): QO Kindle Library is A TIME COMPRESSED a modern and open standard for office productivity files. LibreOffice is also cross-platform compatible, with RESOURCE TO PASSING THE LPI® LINUX... =: Q [— the QuickTime player, you should head over to https:// www.videolan.org. If you versions of the software available for Linux, Windows, want to browse the internet, you will and macOS. To learn more about LibreOffice, or to try it need a web browser. Although yourself, visit https://www.libreoffice.org. proprietary web browsers like Microsoft’s Edge or Apple’s If you want to watch videos or play music on Linux doesn’t support Safari browsers, it does support several cross-platform your Linux workstation, you can install one of the best web media players available by downloading VLC. The VLC Chrome, and the Opera web browser. While all of these media player can play just about any media file you are free to use, only Mozilla’s might throw at it, including damaged, software, since the Google Chrome and Opera browser’s even unfinished files. VLC incomplete, or is a truly free multimedia browsers. This includes Mozilla Firefox, Firefox is open Google source source code is not freely distributed. solution that works on every major operating system, Linux is also well-suited for editing photos, videos, including Linux, Windows, macOS, Android, and iOS. I or audio. If you need to retouch, and edit, free-form draw, have personally used VLC as my media player of choice convert between image formats, or perform specialized on every computer I have ever owned for over 15 years, photo and image creation tasks, the GIMP (GNU Image and it hasn’t let me down yet. If you are looking for Manipulation Program) is an excellent option. Whether a great you are a graphic designer, photographer, illustrator, or alternative to the Windows Media Player or Page 48 of 208 « 22% Aa LN LINUX ESSENTIALS (010-160): QO Kindle Library A TIME COMPRESSED RESOURCE TO PASSING THE LPI® LINUX... =: Q scientist, GIMP provides you with sophisticated tools Shotcut is so powerful that it can even support editing to get your job done. GIMP is a free and open source 4K video footage. Like most Linux software, Shotcut is a raster graphics editor that operates much like Adobe free and open source application. Shotcut is also a cross- price tag. While platform tool that can be installed on Linux, FreeBSD, Photoshop, Adobe only without Photoshop macOS, GIMP Windows, 1995, and the heavy is only available for Windows is a cross-platform macOS. GIMP software has been and it has kept improving a powerful image manipulation and for Linux, around making and macOS. You can find out more about Shotcut at https://www.shotcut.org. If you are thinking of becoming a rock star one since ever since. GIMP program, Windows, is day, you may find that you need to edit some it for your demo CD. All jokes aside, though, audio Linux has a suitable replacement for Adobe Photoshop for most tools for that too. Audacity is a free and open source users. To learn more about GIMP, or to try it yourself, digital audio editor that is available for Linux, Windows, visit https://www.gimp.org. and macOS. This program allows a user to record audio If you like to edit video, Linux has an excellent from multiple sources and conduct post-processing for non-linear video editing software called Shotcut. This all types of audio formats. Whether you want to mix an program supports entire album or if you are thinking of starting a podcast, timeline view Premiere or Apple’s video of multiple and audio tracks, editing much like using a Adobe Final Cut software tools. In fact, Audacity can handle it all. Audacity is comparable to the Adobe Page 49 of 208 « 23% Audition or Apple’s Logic Pro X software [— Aa LN LINUX ESSENTIALS (010-160): QO Kindle Library A TIME COMPRESSED RESOURCE TO PASSING THE LPI® LINUX... used by many professionals in the recording industry. programs You players, and web browsers. can find out more about Audacity at https:// installed www.audacity.com. It should numerous tools be obvious available by the LPI office applications, productivity suites, [— media In addition to these pre- Linux distributions can also that there are access package repositories that contain a vast collection to perform just about any of Linux Essentials certification easily installable application. These are called packages. A package is a compressed file archive containing mentioned above are just a small sampling of the options For as Q now function you could imagine within Linux. The software available. such =: all the files that come within the a particular The such as Microsoft Office, is not available for Linux, but according to the relative installation paths there are a wide variety of open source replacements distribution. Most packages also contain distribution- available to replace them, such as LibreOffice. specific installation package instructions are application. exam, you should be aware that proprietary software, and usually stored within a list a of any other packages that are prerequisites for installation. Managing Software Packages When files with In Linux we install a Linux distribution, it normally terminology, dependencies. these prerequisites Simply put, a dependency engineering term that is a broad comes with many pre-installed applications so that a software user software that another software relies on for installation. can get to work right away. This may include Page 50 of 208 « 24% refers are called to a piece of Aa LN LINUX ESSENTIALS (010-160): QO Kindle Library For example, the of dependencies VLC media player A TIME COMPRESSED has a large list that we first need to install, such as RESOURCE TO PASSING THE LPI® LINUX... sub-directories compression and compresses software to save them =: Q [— for users various video codecs to allow playback within the media trying to download player. uncompressed, it usually ends with.tar in its filename. Linux packages utilize three common file Since Linux packages If the tarball is do not usually contain necessary to install them, dependencies package usually indicates which Linux distribution the distributions use package managers that automatically software was compiled to work with. read dependencies files and download many the types:.deb,.rpm, and.tgz. The filename extension of the Linux the necessary software packages before proceeding with the installation. Some compiled and packaged for Debian and other Debian- common package managers are APT, YUM, and Pacman. derived distros like Ubuntu, Kali Linux, and Tails. While the various Linux distributions offer roughly the For example, a.deb package contains The.rpm package format was originally developed for Red Hat Linux, but it is also used in other same types of applications, there are still many different package management systems in use today. distributions like Fedora and openSUSE. The referred is tarball or tgz to because as a the tarball package universal just format package takes For instance, Debian and Debian-based distributions is sometimes use the dpkg, apt-get, and apt tools to install software format. packages using the.deb package multiple files This and software Page 51 of 208 « 24% at the base of the format. Debian LN using the gzip bandwidth and install them. Aa Dpkg package is the system Q) LINUX ESSENTIALS (010-160): QO Kindle Library and is a low-level package manager. A TIME COMPRESSED Being a low- RESOURCE TO PASSING THE LPI® LINUX... =: Q management if all manager, and DNF is a newer replacement for YUM. In dependencies the Advanced Package are already installed. APT, Tool, is a higher-level package and other tools. Since APT is a higher-level tool. YUM is a higher-level package Because application packaging is different for each distribution family, it is important to install packages package management tool, it can find, install, upgrade, from and remove packages and their dependencies for you. distribution. Luckily, users usually do not have to worry If you are using a distro like Red Hat, Fedora, or the and use packages in manager the.pm format. use and DNF commands distros instead of dpkg repository is designed for your will choose the right packages, the required RPM, YUM, dependencies, and APT tools. they become available. the that about these details because the distribution’s package CentOS, then you will download These LN fact, DNF stands for “dandified yum”. management tool. Ubuntu created APT to include the apt-get Aa RPM is both a package format and a low-level package level package manager, dpkg can only install a package the [— Page 52 of 208 « 25% and apply the necessary updates when Q) LINUX ESSENTIALS (010-160): A TIME COMPRESSED RESOURCE TO PASSING THE LPI® LINUX... = Q Ba - Understand variables and their use in the shell CHAPTE R FIVE - Explain why quoting is used in the shell While The Linux Shell root@diontraining:~/Dekstop$ Ee Archive: ont 358854 385235 zip4.zip = —-2019-@5-05 2019-@5-05 08:50 08:50 585365 cask cine) rchive: zip4.zip inflating: silver_drum. jpg a graphical user on a text-based, 1s ESSEED OD the desktop Glee interface, command the is fully based Linux shell is based line environment. point in your Linux journey, to understand at least the basics it is important of the on At this for you shell since it performs all the commands in the background on behalf Brive Narn eine gold_shoes. environment jpg of the 2 files mp alae; desktop environment. Simply put, the Linux shell is the program that takes inflating: gold_shoes.jpg root@diontraining:~/Dekstop$ commands from the keyboard and presents them to the kernel for execution. In the old days, most operating systems were only available as a text-based, command OBJECTIVES - Contrast the desktop environment to the shell * Compare and contrast various Linux shells - List basic shell commands and their usage line interface. These days, however, the desktop environment or GUI sits on top of the command line interface (CLI) and makes the execution of commands and task much + Explain command line syntax Page 54 of 208 « 25% easier for the end user. Qh LINUX ESSENTIALS (010-160): QO Kindle Library When the user clicks on A TIME COMPRESSED a shortcut located on their desktop, that shortcut may contain a predefined RESOURCE TO PASSING THE LPI® LINUX... a program. For example, shortcut for Google Chrome Q [— into a server using a text-mode login protocol, such as Telnet or SSH. command bundled together with the correct syntax to execute =: Types of Shells if you click on the on your desktop, it may Most Linux distributions systems have the option of be configured to open the web browser and load your using several different shells, though. These include the homepage. For this to occur, you simply double clicked Bourne Again Shell (bash), Korn shell (ksh), the TENEX C the shortcut, which Shell (tcsh), and the Z shell (zsh). caused the GUI to translate that action into a series of commands within a hidden CLI. The Linux command line, or properly called, can be launched window known as a terminal shell as it is more or started in a GUI program. Some Linux distributions, such as ones designed for server use, will The most common shell is known as bash. It is based on an older shell called the Bourne Shell. Bash is a program interface that operates within the command to read and execute commands from line the command line or from a file known as a shell script. eliminate the desktop environment altogether to save The Korn shell is named after its creator, David Korn, on processing and memory resource. This allows a user and served as the basis of the POSIX.2 operating system. to directly log into the system locally via a text-mode Tesh is a shell that improved upon an earlier shell known console or to connect to a shell when they remotely log as csh (C shell) by adding command Page 55 of 208 « 25% line completion, Aa LN LINUX ESSENTIALS (010-160): QO Kindle Library command features. line The editing, csh and is the some default A TIME COMPRESSED other shell additional RESOURCE TO PASSING THE LPI® LINUX... =: Q [— If you are using a desktop environment, then you in BSD-based can access the shell by running a program known login a terminal emulator (often simply called the terminal). selected and as the command default line interpreter shell within that macOS was Catalina The terminal (10.15) and newer macOS versions as a replacement to to interact bash. environment. For any demonstrations opens with Typically, within this book, we will a a window the shell desktop and from allows within environment the the has as user desktop its own rely on bash since it is the default used by Ubuntu and terminal, is commonly used across the Linux community. Most of depend on the desktop environments you have installed. the other shells listed above are also compatible with Many Bash and provide in their names, a similar functionality, albeit with some subtle differences. the so the terminal program terminal like the Each Linux user account specifies its own default LN later chapter. operating systems like FreeBSD. The zsh is an interactive shell Aa programs such K Desktop generic XTerm include you will use may the word terminal as the gnome-terminal. Environment’s do specify be used with. Konsole which Again, and desktop shell, so individual users can change their shells if they environment like. This can be done with account management tools, provides users with numerous such as usermod, which we will describe in detail in a choose from, including rxvt, kvt, nxterm, and eterm. Page 56 of 208 « 26% they must not (KDE) Others, Linux terminal emulators to Q) LINUX ESSENTIALS (010-160): QO Kindle Library A TIME COMPRESSED While there are many different terminal emulators, RESOURCE TO PASSING THE LPI® LINUX... =: Q Most terminal programs support tabs, which are like end user with direct access to an interactive shell session the tabs you use within a web browser. It can be helpful in which they can issue commands to have multiple tabs open because it enables a user to system. The exact method run multiple programs multiple directories, or run programs both as a normal from one desktop environment to another. Normally, user and as root. On a Linux system, the root user servers an entry for the terminal can be found in the desktop as a super user or administrator. environment’s menus. Many desktop environments also Basic Commands provide a search function where you can find a full list of For example, in Ubuntu’s Unity desktop, clicking the Dash icon (the Ubuntu symbol) located at the top of the application launcher will show a search bar. If you begin to type the word “terminal,” it will show the available terminal applications within its search results. A quicker way to launch the terminal is to use the LN simultaneously, work easily in of launching a terminal differs all the different terminals installed within that system. Aa keyboard shortcut by simply pressing CTRL+ALT+T. they all do basically the same thing. They provide an to the operating [— To utilize the shell, you need to be able to use some basic commands. The first ten commands any Linux user should learn in the shell are ls, cd, mv, mkdir, touch, rmdir, rm, locate, clear, and man. The ls (list) command is used to display the files, folders, and directory information within the shell. This is the equivalent of looking at the list of files/folders within a folder in a desktop environment. Page 57 of 208 « 26% Q) LINUX ESSENTIALS (010-160): A TIME COMPRESSED RESOURCE TO PASSING THE LPI® LINUX... The cd (change directory) command allows a user to would be the equivalent = of a user dragging Q Ba a folder switch between two directories. This is the equivalent of to the recycle bin or the trash can within a desktop double clicking a folder within a desktop environment. environment. The mv (move) command allows a user to move a The rm (remove) command is use to delete a file/folder to another folder/directory using the shell. or directory within the file system. This is the equivalent of a user dragging a file/folder into command another folder within a desktop environment. rm The make mkdir a new (make empty directory) command is used to directory within the file system. This would be the equivalent of a user right-clicking and command directories. delete will remove This would an both be the empty directory, the files and non-empty equivalent of a user trash can within a desktop environment. The The touch command is used to create or make anew, system. line. This would be the only Since the rmdir dragging the contents of a folder to the recycle bin or the selecting “New -> Folder” within a desktop environment. blank file using the command will file was locate If you command don't finds remember a file within where a the file certain file saved and stored in your file system, the locate equivalent of a user right-clicking and selecting “New -> command Text Document” within a desktop environment. equivalent of using the search or spotlight feature in The rmdir (remove directory) command is used to can really be useful. other desktop environments. delete an empty directory within the file system. This Page 58 of 208 « 27% This would be the Qh LINUX ESSENTIALS (010-160): QO Kindle Library The clear (clear the screen) A TIME COMPRESSED command erases the RESOURCE TO PASSING THE LPI® LINUX... Command Line Syntax there is a lot of information and previous commands on the screen Q how acommand works. contents of the terminal display. This is useful when remaining = are cluttering the terminal When a computer is attempting to an operation (no with extraneous information. With the clear command, matter which operating system it is running on), it can the user will be brought to the top of the terminal’s be summarized in just four steps: display and returned to the shell prompt and the current 1. The computer waits for user input working 2. The user chooses a command to use directory. This closing out numerous would be the open windows equivalent of in your desktop 3. The user enters it via the keyboard or mouse environment so that you can refocus your attention on 4. The computer executes the command the one window you need to work within. The man (manual) command information about a given command. shows When a all the user is unsure of how to perform an action or how to properly input the syntax to a command, the man command is essential. This is the equivalent of a user opening the help file or a document containing all the details about In a Linux, the shell displays a prompt where commands can be entered. This prompt usually consists of a user and host (computer/server) name, the current directory, and a final character. If you are using bash, that final character is the dollar sign. For below: Page 58 of 208 « 28% example, a terminal using bash is displayed B&B Aa LINUX ESSENTIALS (010-160): A TIME COMPRESSED RESOURCE TO PASSING THE LPI® LINUX... = Q so that everyone understands what we are trying to say, Last login: Sun Sep 8 09:00:30 on console so does the command language. For example, I wouldn’t DionTraining:Documents jason$ tell a server at a bar, “Some water I want,” because it would confuse them. Instead, I would say “I want some The hostname is DionTraining, which represents the server I am logged into. The directory is the Documents water” because this is the natural order, or syntax, used in the English language. directory, and the user is Jason. Last, we see the final character, which is the $ since I am using bash. To perform operation, line, the shell first tries to divide the line into individual words. Just like in the English language, words are separated by spaces. The a sequence of first word on a command line is usually the command characters in a line which ends by pressing the enter itself, while all other words on the line are parameters key and is then evaluated by the shell. Many commands that explain are inspired by the English language and form part of a detail. is essentially must a command a A command you To interpret enter command. an dedicated command syntax language. Commands must follow certain what the command should do in more There are two main types of command parameters: rules Ba known as options and arguments. syntax for the shell to be able to interpret them properly. Just as our English language has proper grammar rules Options are parameters that start with a dash or tack symbol Page 59 of 208 « 28% (-). These are usually referred to as switches. LINUX ESSENTIALS (010-160): QO Kindle Library A TIME COMPRESSED RESOURCE TO PASSING THE LPI® LINUX... = Q ££ Each switch allows certain aspects of the command to be Arguments are the second type of parameters used turned on or off. These options can be passed separately with commands. Arguments are any words that are not to the command by using a space and a dash to separate proceeded by a leading dash. Most often, parameters them, are used or you can combine several options behind a to input the names of files or directories single dash. For example, the switches -l-a would also be against which a command should perform its intended equivalently written as -la. function. Some programs have more options than can be For example, let’s assume you want to list (ls) all conveniently mapped to single characters, since there the files located in the LinuxEssentials directory located are only 36 characters available (a-z, 0-9). To allow for under the Documents more options, these programs will often support what LinuxEssentials,” is known names: Questions.txt and StudyGuide.txt. Since I only as long with two dashes options. Long options often start and allow for better readability. For used a command directory. I would If I simply typed “ls a list with two file receive (ls) and argument (LinuxEssentials), example, it is clearer that --all indicates the command I only received the least default information displayed does something to all the files than if the switch -a was (the names of the files in the directory). instead used. You cannot combine multiple long options; for example, --all and --more cannot be combined into --allmore. DionTraining:Documents jason$ ls LinuxEssentials Questionstxt StudyGuide.txt DionTraining:Documents Jason$ Page 60 of 208 « 29% Aa W LINUX ESSENTIALS (010-160): QO Kindle Library A TIME COMPRESSED RESOURCE TO PASSING THE LPI® LINUX... Questions.txt If instead, I wanted to display the file names, the date created, user and group ownership, and the permissions on the ability for the ls command to display the long format view with this additional information. Q [— StudyGuide.txt DionTraining:Documents Jason$ for the files, I would have to turn on that option using a switch. This can be done using the -1 switch, which turns =: Unfortunately, since we only used the -a option, we no longer have all the additional details from the long format displayed. But, if we combine the -l and -a options into a single option of -la, as shown: DionTraining:Documents jason$ Is -] LinuxEssentials DionTraining:Documents jason$ Is -la LinuxEssentials total 16 total 16 -rw-r--r--@ ljason staff 4 Sep 8 10:07 Questions.txt -rw-r--r--@ 1 jason staff 4 Sep 8 10:07 StudyGuide.txt DionTraining:Documents Jason$ x 4j