Intro to Linux

Pataasin ang iyong marka sa homework at exams ngayon gamit ang Quizwiz!

Which of the following files contains a list of operating systems and the commands used to define the global preferences for the GRUB menu interface?

/boot/grub/grub.conf

In which directory is fstab located on Linux?

/etc

User Account Configuration

Authentication has users log in via a valid username and password. The following shows two user account configurations. Administrator account (root): full rights to system Regular user account: system administration tasks It is essential to understand Linux user interfaces and basic administrative tasks, such as executing commands, obtaining online help, and shutting down the Linux system.

You are in the process of configuring Yum package in your system. Which of the following directives will you configure to store cache and db files?

Cachedir

Fedora 28 Recommended Minimum Hardware Requirements

Central processing unit (CPU) 1GHz or faster Intel x64 CPU Random access memory (RAM) 1GB Free disk space (permanent storage) 10GB free space Additional drives DVD drive (for DVD-based installation) Peripheral devices Fedora-compliant peripheral devices (e.g., video cards, sound cards, network cards)

If you create your own custom version of Linux, this is called a

Distribution

Which of the following devices are hotplug devices?

Ethernet and USB

What will be the output of the following command: grep ABC /etc/passwd

It will search for the user named ABC in /etc/passwd

What is LVM?

Logical Volume Manager

What is represented by the second number in the Linux kernel version 2.3.4?

Minor number

You are a system Linux administrator. A user initiated process freezes. You are not able to locate the offending process as it has several other multiple child processes. How will you locate and close the offending program without searching and terminating the list of child processes individually?

You need to issue the pstree -p|less command to locate the process id of the parent process and then issue the kill command with no option.

Daniel, a Linux administrator, would like to perform the following tasks on his system: Check for outdated packages Automatically upgrade the outdated packages Install base packages Install new packages Upgrade dependencies if required Remove packages if required Which of the following commands will help Daniel to perform his tasks successfully?

apt-get dist-upgrade

Which of the following commands will count the number of lines in TechnicalForum.txt which begins with the word 'the'?

egrep -c '^the' TechnicalForum.txt

Which of the following commands sets the LD_LIBRARY_PATH variable to the trusted directory usr/lib64?

export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/lib

You wish to reset the hardware clock to the current system time. You already know that you need to first read the hardware clock and then reset it but you are not sure about which command to use. Which of the following commands can you use to get help?

man -k clock

Disk Partitions And File Systems

ow let's take a look at configuring disk partitions and file systems. Each hard disk is divided into partitions that are formatted with file systems. A file system is a structure that specifies how data should reside on the hard disk. A hard disk can be divided into maximum four major/primary partitions. One of these major/primary partitions, if labelled as an extended partition, can contain smaller partitions called logical drives. The Master Boot Record (MBR) is a table of all partition information for a certain hard disk or SSD.

You want to create a 4TB primary partition with the file system ext4 on the /dev/sda1 device Which of the following set of commands will you use to accomplish this task?

parted /dev/sda1 (parted) mklabel gpt (parted) unit TB (parted) mkpart primary 0.00TB 4.00TB (parted) quit mkfs.ext4 /dev/sda1

You have issued a delayed shutdown. However, you want to cancel the pending shutdown. Which command you need to issue in this scenario?

shutdown -c

Which of the following commands is used to determine how much swap space is being used on each swap device?

swapon-s

You want to set the following default permissions for all new files and directories: Write permission for file owner Read permission for group Write permissions for others Which command will help you to set the specified default permission?

umask u+w,g=r,o+w

Which of the following are the basic modes of the RPM command?

verify, install, delete

Which of the following headers are added by default, when the pr command prepares a text file for printing? (Choose all that apply.)

Filename Date and time Page numb

Under which licensing model is Linux made available?

GPL

Terminals, Shells, And The Kernel

Linux can have many terminals that allow you to log in to the computer locally or across a network. The BASH Shell (Bourne Again Shell) is the default Linux shell. In the graphical user interface, start the GUI environment on top of BASH shell switch to a graphical terminal You can start a graphical user interface (GUI) environment on top of your BASH shell after logging in to a command-line terminal, or you can switch to a graphical terminal that allows users to log in and immediately receive a GUI environment. From the local server, use key combinations to change to separate terminal, Ctrl+Alt+F2. The command line prompt reflects the type of user that is logged in, either root user: # or regular user: $. Here are a few terms to know. Terminal: channel allowing users to log on to the kernel locally or across a network Shell: user interface which accepts user inputs and transfers them to the kernel Kernel: The central per of an operating system that manages the operations of the computer and its hardware

Advantages Of Linux (Flexibility)

Linux offers flexibility for different hardware platforms. Here is a partial list of hardware platforms on which Linux can run. Intel x86/x64 and Itanium PA-RISC and mainframe (S/390, z/architecture) ARM and MIPS SPARC/Ultra-SPARC PowerPC/POWER Linux allows customization, including an ability to control the inner workings of the OS and where one can choose to install only the software packages needed, and programming languages, such as shell and PERL scripts, to customize or automate tasks.

Advantages Of Linux

Linux offers several advantages with common software available to meet business needs. Scientific and engineering software Software emulators Web servers, web browsers, and e-commerce suites Desktop productivity software Graphics manipulation software Database software Security software Linux also offers stability and security with it's open source approach. Customers using a closed source OS must rely on the vendor to fix any bugs; waiting for a hot fix may take weeks or months. The collaborative open source approach to testing and fixing bugs increases the stability of Linux. Bugs and security loopholes in OSS programs can be identified and fixed quickly, and code is freely available and scrutinized by many developers.

Assume you have an application that you are writing and you want to be able to send a print job through a USB port on your PC. Without a(n) _____ you would have to write the exact instructions for accessing the USB port on the hardware

Operating System

Linux

The purpose of an operating system and characteristics of various Linux distributions were discussed. Linux is an OS whose kernel and additional software are freely developed and improved upon by a large community of software developers. Linux is published under the GNU Public License. It is referred to as Open Source Software (OSS). Companies find Linux a stable, low-risk, and flexible alternative operating system.

Advantages Of Linux (Cost Savings)

The total cost of ownership (TCO) is the overall cost of using a particular OS. Linux is less expensive than other OSs as there is no cost associated with acquiring the software, and a wealth of OSs can run on a variety of different hardware platforms running Linux. The largest costs associated with Linux are costs associated with hiring people to maintain the system.

Installation Of A VM And VM Wizard

To install Linux as a virtual machine (VM), do the following. Download the standard DVD or live media DVD ISO image to a directory on your VM host. Open virtualization software and choose to create a new virtual machine. Specify the location of the appropriate ISO image. Virtualization software will boot from the ISO image directly. The general stages of the installation program for Fedora 28 Linux include the following. Starting the installation Choosing an installation language as well as localization and system options Configuring disk partitions and file systems Configuring user accounts

Preparing Linux For Use

To prepare Linux for use, all OSs require a minimum set of hardware components to function properly and are obtained from the manual or file in the OS DVD or the vendor website. For example, see Table 2-1: Fedora 28 with it's recommended minimum hardware requirements. Each hardware component should also be checked against the hardware compatibility list (HCL) found on the vendor's website.

The locate command uses the database to search for files. However the database must be updated frequently for the locate command to operate efficiently. Which of the following commands helps accomplish this task?

Updatedb

Virtualization

Virtualization software is used to run an OS within an existing OS concurrently. A few examples include the following. Microsoft Hyper-V VMWare Oracle VM VirtualBox Each OS that is run within virtualization software is a virtual machine (VM). The virtual machine host (VM host) is an underlying OS running the virtualization software.

Linux Installation And Usage

When booting your system from standard Fedora installation media, you will be prompted to start the installation or perform troubleshooting actions. If you select the troubleshooting option, you will be presented with four additional options. Start Fedora-Workstation-Live 28 in basic graphics mode. Run a memory test. Boot from local drive. Return to main menu. However, in most cases, troubleshooting options are not necessary when installing Fedora Linux. Simply choose Start Fedora-Workstation-Live 28 to start a live Fedora system. Once loaded, you will be presented with a welcome screen that prompts you to install Fedora Linux on permanent storage. If you choose Install to hard drive, the Fedora installation program will start.

Configuring Disk Partitions And Filesystems

File systems can be accessed by Linux if it is attached (mounted) to a certain directory. The Fedora installation program can automatically create partitions, but generally it is a good practice to manually partition. Linux typically requires only two partitions. A partition mounted to the root directory A partition for virtual memory (swap memory), an area on hard disk used to store information normally residing in physical memory (RAM) Different types of file systems include Ext2, Ext3, Ext4, VFAT, and XFS. Journaling keeps track of the information written to the hard drive. For the installation destination, once it is selected, the installation program will prompt you to choose automatic or custom partitioning scheme.

Collaborative Development

A hacker culture of collaborative development set the stage for Linux in the 1980s and 1990s. Richard Stallman was a notably famous hacker who encouraged free software development and formed the Free Software Foundation (FSF). Stallman worked on the GNU Project which promoted development for a free non-UNIX operating system. The GNU Project led to the publication of GNU Public License (GPL) that legalized free distribution of source code and encouraged collaborative development. Here are a few important terms to know. Hacker: a person who attempts to expand knowledge of computing through experimentation Cracker: someone who illegally uses computers for personal benefit or to cause damage Timeline of UNIX and Linux Development

You need to unmount a CD-ROM from your Linux system. However, when you issue the umount command, the system says device is busy. Which command do you need to use to find out the process that is keeping the CD-ROM busy?

Fuser

A task-specific instruction guide to performing a wide variety of tasks that is freely available from the Linux Documentation Project is known as which of the following?

HOW TO documents

Linux History

In 1991, Linus Torvalds developed Linux and published it under the GNU license. The Linux kernel was developed collaboratively and centrally managed, with the development of add-on packages and distributions. Distribution is a collection of software containing Linux kernel and libraries, combined with add-on software. Some examples include the following. Red Hat and OpenSUSE Debian and Ubuntu Gentoo, Linux Mint, and Arch

Logical Volume Manager (LVM)

Instead of standard partitions, choose a partition scheme that creates logical volumes. Use the Logical Volume Manager (LVM) and support the new B-tree file system (BTRFS). To create an easier system recovery, choose a standard partition scheme and ensure that contents of disk partitions are not encrypted.

You want to obtain information about the device drivers that are loaded on your Linux system. Which command would you recommend to use in this scenario?

Ismod

What will be the output of the following command? (Choose all that apply.) $ ls /etc | tee file1.txt | grep ^p | tee file2.txt | sort -r

It will search for the file names starting with 'p' in the file1.txt file It will store the contents of the /etc in the file1.txt file It will sort and display the files starting with 'p' in reverse order and store the output in the file2.txt file

The first component of the operating system is the _____.

Kernel

is the core of a computer's operating system.

Kernel

Linux Operating System

Linux is an operating system (OS) used to run a variety of applications on a variety of different hardware components. It is a multiuser and multitasking OS that gives the ability to manage thousands of tasks at the same time and allows multiple users to access the system simultaneously. Linux kernel is a core component of the Linux Operating System. It is written almost entirely in the C programming language. Software can be used to modify the appearance of Linux, but the kernel is common to all Linux. It is important to understand the Linux kernel version numbers to decide which version is appropriate. A good understanding of system hardware is important in deciding which kernel version to use.

Command Help

Manual (man) pages are the most common form of documentation for Linux commands. At command prompt, type the man command followed by command name. Manual pages contain different sections, where section numbers describe the category of the command in the manual page database and are searchable by keyword.

Common Storage Devices For Linux OS

Most common storage devices for storing Linux OS are hard disks and include the following. Parallel Advanced Technology Attachment (PATA) Serial Advanced Technology Attachment (SATA) Nonvolatile Memory Express (NVMe) Small Computer Systems Interface (SCSI) Serial Attached SCSI (SAS) By clicking the installation destination icon, you will be presented with a list of the different permanent storage devices. If you have multiple disk devices, select the disk that will be used to contain Linux or you can install Linux on an external iSCSI or FCoE Storage Area Network (SAN), Direct Access Storage Device (DASD), Multipath IO (MPIO), or firmware Redundant Array of Inexpensive Disks (RAID).

Advantages Of Linux (Ease Of Support)

Much support for Linux is easily available on the internet, such as the following. Linux documentation found on the InternetFrequently asked questions (FAQs)HOWTO documents: maintained by authors but centrally collected by the Linux Documentation Project (LDP) Internet news groups Linux User Groups (LUGs): open forum of Linux users who discuss Linux-related issues and problems

Software Types

Open Source Software in which the source code and software can be obtained free of charge and optionally modified to suit a particular need. Closed Source Software in which the source code is not available; although this type of software might be distributed free of charge, it is usually quite costly and commonly referred to as commercial software. Freeware This is a closed source software that is given out free of charge; it is sometimes referred to as freemium software. Shareware This is a closed source software that is initially given out free of charge but then requires payment after a certain period of use or for use of certain features.

review

Prior to installation, verify hardware requirements and compatibility. You can obtain Linux installation media by downloading an ISO image from the Internet. Typical Linux installation prompts for language, date, time zone, keyboard layout, network configuration, user account configuration, and permanent storage configuration. Users must log in to a terminal and receive a shell before they are able to interact with the Linux system and kernel. Regardless of the type of terminal, you can enter commands, options, and arguments at a shell prompt to perform system tasks, obtain command help, or shut down the Linux system. The shell is case sensitive and understands a variety of special characters called shell metacharacters, which should be protected if their special meaning is not required.

What term is used to describe a running program on Linux?

Process

Which of the following is not a mass storage device?

RAM

What is the function of the -rf option in the rm command?

Removes the directory along with its contents without prompting the user.

describes a type of closed source license which is distributed free of charge, yet after a certain number of hours of usage or to gain certain features of the program, payment is required?

Shareware

A _____ is a command interpreter that allows you to type commands at the keyboard that are then sent to the operating system kernel.

Shell

software

Software is the set of instructions or programs that allow hardware components to manipulate data.

Open And Closed Source Code

Source code is a list of instructions that a software developer writes to make up a program. The format and structure of source code follow rules defined by the programming language in which it was written. Linux is an Open Source Software (OSS) that is freely developed and continuously improved by a large community of software developers. There are also several types of closed source licenses such as freeware and shareware. Most closed source software is sold commercially and usually bears the label of the manufacturer; refer to Table 1-2 for details.

Default GUI Environment-GNOME

The default GUI environment in Fedora Linux is GNOME. The command-line terminal may be accessed through the activities menu in the upper left of the desktop. Navigate to show applications, utilities, terminal. Commands indicate the name of program to execute and are case sensitive. Options alter the way the command works. Options are specific letters that start with a dash "-" and appear after a command name. Arguments specify a command's specific working parameters, but do not start with a dash. Metacharacters are keyboard characters with a special meaning. A $ tells the shell that the following text refers to a variable. Avoid use of metacharacters when typing commands unless using their special functionality. Single quotation marks ' ' protect metacharacter from being interpreted, especially by the shell.

Media Installation

The most common source for Linux packages and installation program is DVD media. Most Linux distributions provide a website from which you can download DVD images (called ISO images). The ISO images can be written to a blank writable DVD using disc burning software. Many Linux websites also allow you to download a bootable live media DVD image. A fully functional graphical Linux OS loads into RAM and allows you to test the OS on your computer to ensure all hardware drivers were detected properly. To install from a DVD, place the Linux DVD in the DVD drive and turn on the computer. If the computer does not have a DVD drive, Linux can be installed by imaging the DVD or live media DVD image to a USB flash drive.

Hardware

The physical components of a computer. Hardware is the physical components inside a computer, which are the following. Processor (CPU) Physical memory (RAM) Hard disk and solid state drives CD and DVD drives Flash memory card readers (SD cards) Sound cards Video cards Network adapter cards Ports Mainboards (motherboards)

Two Types Of Programs Executed On A Computer

Two types of programs are executed on a computer. Applications (apps), which are programs designed for a specific use and with which a user interacts Operating system (OS) software, which is a software component used to control the computer hardware. In addition to those programs, these two components are needed for a computer to operate. A device driver is a software containing instructions that the OS uses to control and interact with a specific device. A user interface is an application program that accepts user input indicating what to do, forwards this input to the operating system (OS) for completion, and gives results back to the user. It can be a command line interface (CLI) or a graphical user interface (GUI).

Which of the following is not a Linux bootloader program?

Upstart

Installation Language

When choosing an installation language and localization and system options, you will be prompted to choose the installation language. Here are a few things to expect to happen. Keyboard model and layout are automatically detected. Network interface is set to obtain network configuration automatically using the DHCP protocol. Date and time are automatically obtained from the Internet if network has Internet connectivity. You must manually select an installation destination before installation can continue and select a permanent storage device that will contain the Linux OS.


Kaugnay na mga set ng pag-aaral

Calculation of Factory Overhead Rate (Single Plantwide)

View Set

Design of Database Systems- Test 1 T/F Questions

View Set

1. Introduction to Analysis of Risk

View Set

SCM 301 Chapter 8: Lean and Six Sigma in the Supply Chain

View Set

Case Analysis: Herman Miller's Sustainable Values

View Set