Linux System Commands and Installation

Choose a study mode

Play Quiz
Study Flashcards
Spaced Repetition
Chat to Lesson

Podcast

Play an AI-generated podcast conversation about this lesson
Download our mobile app to listen on the go
Get App

Questions and Answers

What is the primary function of the GNU info pages in Linux?

  • To manage user accounts and permissions.
  • To replace the `man` command as the primary help system. (correct)
  • To display system logs and error messages.
  • To provide a graphical user interface for system configuration.

Which command is used to cancel a scheduled shutdown in Linux?

  • `shutdown -c` (correct)
  • `shutdown -x`
  • `shutdown -k`
  • `shutdown -a`

What is the potential consequence of directly powering off a Linux computer without using the shutdown command?

  • It might result in damaged user and system files. (correct)
  • It automatically initiates a system backup.
  • It has no impact as the OS automatically saves all data.
  • It improves system performance due to immediate cessation of processes.

What is the key distinction between the halt and poweroff commands in Linux?

<p><code>halt</code> only stops the OS, whereas <code>poweroff</code> also invokes the ACPI function to physically turn off the computer. (B)</p> Signup and view all the answers

Consider a scenario where you need to schedule a system reboot for 3 minutes from now. Which command would achieve this, ensuring that all users receive a warning message?

<p><code>shutdown -r +3</code> (C)</p> Signup and view all the answers

What type of file is typically downloaded to install Linux as a virtual machine?

<p>ISO image (A)</p> Signup and view all the answers

After specifying the ISO image in virtualization software, what action does the software typically perform?

<p>Boots directly from the ISO image (D)</p> Signup and view all the answers

Which of the following represents a general stage in the installation program for Fedora 28 Linux?

<p>Configuring user accounts (C)</p> Signup and view all the answers

What is the initial prompt typically presented when booting from Fedora installation media?

<p>Start the installation or perform troubleshooting actions (C)</p> Signup and view all the answers

Which of the following filesystems is known for keeping track of information written to the hard drive?

<p>XFS (C)</p> Signup and view all the answers

If the 'troubleshooting' option is selected during Fedora installation, which of the following is NOT a typical option presented?

<p>Format the hard drive (D)</p> Signup and view all the answers

During the Fedora 28 installation process, after choosing the installation language, what is a subsequent key step involving system configuration?

<p>Configuring disk partitions and file systems (A)</p> Signup and view all the answers

During Linux installation, what choice does the installation program prompt you to choose regarding partitioning?

<p>Automatic or Custom (C)</p> Signup and view all the answers

A system administrator is preparing to deploy several virtual machines running Linux on a hypervisor. They are concerned about ensuring each VM has a consistent and verifiable installation source. Which of the strategies below provides the strongest guarantee of source integrity and consistency across all deployed VMs?

<p>Using a single, locally stored ISO image for all VM installations, verifying its SHA-256 hash against the official distribution's published checksum before the first installation. (C)</p> Signup and view all the answers

Which of the following is a benefit of using a standard partition scheme (instead of LVM) for system recovery?

<p>Easier system recovery if disk partitions are not encrypted. (C)</p> Signup and view all the answers

What is the primary function of the 'root' account in a Linux system?

<p>Full rights to the system (B)</p> Signup and view all the answers

Besides command execution and obtaining online help, what other basic task is essential for a Linux user to understand?

<p>Shutting down the Linux system (A)</p> Signup and view all the answers

Which filesystem type is known for its scalability and performance, often favored in enterprise environments?

<p>XFS (D)</p> Signup and view all the answers

Why might an administrator choose LVM (Logical Volume Manager) over standard partitions?

<p>To support more flexible disk space allocation. (B)</p> Signup and view all the answers

A user reports being unable to install a particular software package. What is the MOST likely reason, based solely on the information provided?

<p>The user is logged in as a regular user, not root. (B)</p> Signup and view all the answers

Consider a scenario where a system administrator needs full control over disk partitioning schemes while also ensuring data integrity. Which combination of partitioning and filesystem choices would provide the MOST granular control and journaling capabilities?

<p>LVM with Ext4. (B)</p> Signup and view all the answers

An advanced Linux system administrator is tasked with setting up a server that requires both flexible storage allocation and the ability to create snapshots for easy rollback in case of system failures. The administrator also wants to ensure that the filesystem used supports copy-on-write functionality for efficient use of storage space when creating these snapshots. Based on the information, which combination of technologies would be MOST suitable?

<p>LVM with BTRFS (A)</p> Signup and view all the answers

What is the typical initial step after booting a Fedora Live system to install it permanently?

<p>Choosing 'Start Fedora-Workstation-Live' to initiate the live environment. (B)</p> Signup and view all the answers

Which protocol is commonly used to automatically configure the network interface during a Fedora Linux installation?

<p>DHCP (D)</p> Signup and view all the answers

Before proceeding with the installation, what crucial step must a user perform regarding the installation destination?

<p>Select a permanent storage device for the Linux OS. (A)</p> Signup and view all the answers

Which of the following storage device types is NOT typically used for installing a Linux OS?

<p>AGP (C)</p> Signup and view all the answers

In a Fedora installation with internet connectivity, how are the date and time typically configured by default?

<p>Synchronized automatically from the Internet. (D)</p> Signup and view all the answers

What is the implication of choosing 'Start Fedora-Workstation-Live' instead of directly proceeding to installation troubleshooting options?

<p>It allows testing the OS in a live environment before installation. (C)</p> Signup and view all the answers

Given a system with both an NVMe SSD and a SATA HDD, and aiming for optimal performance for the Linux OS, which storage device should be selected as the installation destination?

<p>The NVMe SSD, owing to its faster data access speeds. (B)</p> Signup and view all the answers

Consider a scenario where the DHCP configuration fails during the Fedora installation. What would be the most likely consequence?

<p>The installer will prompt for manual network configuration. (C)</p> Signup and view all the answers

During a Fedora installation on a system with multiple storage devices (SATA HDD, SATA SSD, and NVMe SSD), what considerations are most critical when deciding where to install /boot, /, and /home?

<p>Install <code>/boot</code> and <code>/</code> on the NVMe SSD for faster boot and system performance, and <code>/home</code> on the SATA HDD for capacity. (B)</p> Signup and view all the answers

What is the primary function of a shell in a Linux system?

<p>To serve as the interface between the user and the kernel. (A)</p> Signup and view all the answers

Which key combination is typically used to switch to a separate terminal from the local server in Linux?

<p>Ctrl+Alt+F2 (B)</p> Signup and view all the answers

What is the significance of the '#' prompt in the Linux command line?

<p>It signifies that the current user is the root user. (A)</p> Signup and view all the answers

In the context of shell commands, what is the purpose of an 'option'?

<p>To alter the way a command works. (B)</p> Signup and view all the answers

What distinguishes arguments from options in Linux shell commands?

<p>Arguments do not start with a dash and specify working parameters, while options start with a dash and alter command behavior. (B)</p> Signup and view all the answers

What is the default shell in Linux?

<p>Bourne Again Shell (BASH) (B)</p> Signup and view all the answers

What is a 'terminal' in the context of Linux systems?

<p>A channel allowing users to log on to the kernel, locally or across a network. (D)</p> Signup and view all the answers

Which of the following statements accurately describes the relationship between the shell, terminal, and kernel in a Linux system?

<p>The terminal provides a way to interact with the shell, which then communicates with the kernel. (C)</p> Signup and view all the answers

You are logged into a Linux system via the command line. After executing a command, you notice the prompt is '>'. What does this likely indicate?

<p>The system is waiting for additional input to complete the command. (D)</p> Signup and view all the answers

Consider a scenario where a user enters the command ls -l *.txt. Deconstruct precisely what each component signifies to the shell. What is the most accurate interpretation?

<p><code>ls</code> represents the 'list directory contents' command, <code>-l</code> is an option to display detailed information, and <code>*.txt</code> comprises an argument that filters the output to only show files with the '.txt' extension in the current directory. (A)</p> Signup and view all the answers

Flashcards

Installing Linux as a VM

Download the ISO image to the host, open virtualization software, create a new VM, and specify the ISO location.

Fedora Installation Stages

Language, localization, disk partitions, file systems, and user accounts.

Boot Options (Fedora)

Start installation or troubleshoot.

Basic Graphics Mode

Starts in a simplified graphical environment for troubleshooting.

Signup and view all the flashcards

Run a Memory Test

Tests system RAM for errors.

Signup and view all the flashcards

Boot from Local Drive

Boots the system from the installed hard drive.

Signup and view all the flashcards

Return to Main Menu

Returns to the initial boot menu.

Signup and view all the flashcards

Start Fedora-Workstation-Live

Starts a live Fedora system from the installation medium.

Signup and view all the flashcards

Install to Hard Drive

Starts the Fedora installation program to install the OS on permanent storage.

Signup and view all the flashcards

Fedora Installation Program

The program that guides the user through the process of setting up the Linux operating system on the computer.

Signup and view all the flashcards

Installation Language

The language the installation process and initial system will use.

Signup and view all the flashcards

DHCP

A protocol that automatically assigns network configuration to the system.

Signup and view all the flashcards

Installation Destination

A configuration step where you choose the physical device on which to install the operating system.

Signup and view all the flashcards

Hard Disk

Permanent data storage device inside the computer.

Signup and view all the flashcards

Parallel Advanced Technology Attachment (PATA)

Older interface standard for connecting storage devices.

Signup and view all the flashcards

Serial Advanced Technology Attachment (SATA)

Modern interface standard for connecting storage devices.

Signup and view all the flashcards

GNU info pages

A command-line utility in Linux that displays documentation for commands. It was originally intended to replace the man command.

Signup and view all the flashcards

shutdown command

A Linux command that allows you to shut down or reboot your computer after a specified time interval.

Signup and view all the flashcards

shutdown -P +4

Shuts down the system after a specified delay (4 minutes in this case).

Signup and view all the flashcards

shutdown -P now

Immediately powers off the system.

Signup and view all the flashcards

halt command

Immediately halts the system, but doesn't power it off.

Signup and view all the flashcards

Terminal

A channel allowing users to log on to the kernel locally or across a network.

Signup and view all the flashcards

Shell

A user interface that accepts user inputs and transfers them to the kernel.

Signup and view all the flashcards

BASH Shell

The default Linux shell, also known as Bourne Again Shell.

Signup and view all the flashcards

GUI Environment

Starts the GUI environment on top of the BASH shell.

Signup and view all the flashcards

Ctrl+Alt+F2

A key combination used to switch to a separate terminal from the local server.

Signup and view all the flashcards

Root User Prompt

Indicates the root user prompt in the command line.

Signup and view all the flashcards

Regular User Prompt

Indicates a regular user prompt in the command line.

Signup and view all the flashcards

GNOME

The default GUI environment in Fedora Linux.

Signup and view all the flashcards

Command

Part of a command that specifies the program to execute.

Signup and view all the flashcards

Options

Specific letters starting with a dash that alter the way a command works.

Signup and view all the flashcards

Linux Filesystem Types

Examples include Ext2, Ext3, Ext4, VFAT, and XFS.

Signup and view all the flashcards

Journaling (Filesystems)

Keeps track of information written to the hard drive to prevent data loss.

Signup and view all the flashcards

Installation Partitioning

After selecting a hard drive, choose between automatic or custom partitioning.

Signup and view all the flashcards

Logical Volume Manager (LVM)

A partition scheme that creates logical volumes for increased flexibility.

Signup and view all the flashcards

B-tree Filesystem (BTRFS)

A newer filesystem offering advanced features like snapshots and checksums.

Signup and view all the flashcards

System Recovery

Ensuring that the contents of disk partitions are not encrypted allows for an easier system recovery.

Signup and view all the flashcards

Authentication

Verifying a user's identity via username and password.

Signup and view all the flashcards

Administrator Account (root)

Has full rights to the Linux system.

Signup and view all the flashcards

Regular User Account

Limited rights, used for day-to-day tasks.

Signup and view all the flashcards

Basic Linux Tasks

Executing commands, getting help, and shutting down the system.

Signup and view all the flashcards

Study Notes

Linux Installation and Usage

  • After completing this chapter, you will be able to:
    • Prepare for and install Fedora Linux using good practices
      • Outline the structure of the Linux interface
      • Enter basic shell commands and find command documentation
      • Properly shut down the Linux operating system

Installing Linux

  • OSs require a minimum set of hardware components to function properly
    • This information can be found in the manual, a file on the OS DVD, or on the vendor's website
  • Each component should be checked against the Hardware Compatibility List (HCL) on the vendor's website

Fedora 28 Minimum Hardware Requirements:

  • CPU: 1GHz or faster Intel x64 CPU
  • RAM: 1GB
  • Free disk space: 10GB
  • Additional drive: DVD drive for DVD-based installation
  • Peripheral devices: Fedora-compliant peripherals

Installation Media

  • The most common source for Linux packages and the installation program is DVD media
    • To install from DVD, place the Linux DVD in the DVD drive and turn on the computer
  • Most Linux distributions offer downloadable DVD images (ISO images) on their websites
    • These images can be written to blank writable DVDs using disc burning software
  • Many Linux websites also allow the download of bootable live media DVD images
    • A fully functional graphical of Linux OS is loaded into RAM
    • A live image tests the OS on your computer to ensure all hardware drivers are detected properly
  • Linux can be installed by imaging the DVD or live media DVD image to a USB flash drive
  • Virtualization software is used to run an OS within an existing OS concurrently
    • Examples include Microsoft Hyper-V, VMWare, and Oracle VM VirtualBox
  • Virtual machine (VM): each OS that is run within virtualization software
  • Virtual machine host (VM host): underlying OS running the virtualization software
  • To install Linux as a VM:
    • Download the standard DVD or live media DVD ISO image to a directory on your VM host
    • Open virtualization software and select create a new virtual machine
    • Specify the location of the appropriate ISO image
    • Virtualization software will boot directly from the ISO image

Performing Installation

  • General installation stages for Fedora 28 Linux entail: starting the installation
  • Choosing an installation language in addition to localization and system options
  • Configuring disk partitions and filesystems
  • Configuring user accounts
  • Boot from Fedora installation media
    • A prompt to start the installations should appear
    • Troubleshooting actions can also be performed to fix any potential issues
    • If the troubleshooting option is selected then there will be four additional options
    • Start Fedora-Workstation-Live 28 in basic graphics mode
    • Run a memory test
    • Boot from local drive
    • Return to main menu
  • In most cases, the troubleshooting options are not necessary when installing Fedora Linux
    • Simply select Start Fedora-Workstation-Live 28 to start a live Fedora system
    • Upon loading, a welcome screen prompting to install Fedora Linux on permanent storage will show
    • Select Install to Hard Drive and the Fedora installation program starts

Choosing an Installation Language/Localization and System Options:

  • You will be prompted to choose an installation language
  • Keyboard model and layout are automatically detected
  • The network interfaces are set to obtain network configurations automatically using the DHCP protocol
  • Date and time are automatically obtained from the internet if the network has a connection
  • An installation destination must be manually selected prior to the commencement of the installation
    • A permanent storage device that will contain the Linux OS must be selected
  • Most common storage devices for storing Linux OS are hard disks such as:
    • Parallel Advanced Technology Attachment (PATA)
    • Serial Advanced Technology Attachment (SATA)
    • Non-Volatile Memory Express (NVMe)
    • Small Computer Systems Interface (SCSI)
    • Serial Attached SCSI (SAS)
  • Selecting the Installation Destination icon presents a list of different permanent storage devices
    • If there are multiple devices you can pick which one to install Linux on
    • Linux can also be installed 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)

Configuring Disk Partitions and Filesystems

  • Each hard disk is divided into partitions
    • Partitions are formatted with filesystems and filesystems specify structure on how data should reside on the hard disk
  • Maximum four primary partitions
  • Extended partition can be divided into logical drives
  • Master boot record (MBR) is the table of all partition information for a certain hard disk or SSD
  • Filesystems can be accessed by Linux if it is attached (mounted) to a certain directory
  • The Fedora installation program can automatically create partitions
    • Manually partitioning is good practice
  • Linux requires two partitions
    • A partition mounted to the root directory
    • A partition for virtual memory (swap memory): Area on hard disk used to store information normally residing in physical memory (RAM)
  • Different file systems include Ext2, Ext3, Ext4, VFAT, and XFS
  • Journaling keeps track of the information written to the hard drive
  • Selecting an installation destination means that the installation program will prompt to choose an automatic or custom partitioning
  • Instead of standard partitions, choose a partition scheme that creates logical volumes -Use the Logical Volume Manager (LVM)
    • Support the new B-tree Filesystem (BTRFS)
  • Easier system recovery can be achieved when selecting a standard partition scheme

Configuring User Accounts

  • Authentication requires:
    • Users to log in via valid user name and password
  • Two user accounts should be configured:
    • Administrator account (root): full rights to system
  • Regular user account: system administration tasks

Basic Linux Usage

  • Consists of different types of user interfaces that are essential to understand
  • Basic tasks include command Execution
  • Obtaining online help
    • Shutting down the Linux system

Shells, Terminals & Kernel

  • 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
  • BASH Shell (Bourne Again Shell): default Linux shell
  • Linux can have many terminals that allow logging in to the computer locally or across a network
  • Graphical user interface
    • Start GUI environment on top of BASH shell
    • Switch to a graphical terminal
    • From the local server, use key combinations to change to separate terminal
    • Can use Ctrl+Alt+F2
  • Command line prompt reflects the type of user; “#” reflects root and “$” reflects regular user
  • Default GUI environment in Fedora Linux is GNOME
  • The command-line terminal can be accessed through the Activities menu in the upper left of the desktop
    • Navigate to Show Applications, Utilities, Terminal

Basic Shell Commands

  • Commands indicate the name of the program to be executed and are case sensitive
  • Options are specific letters starting with a dash "-" that appear after command name
    • Options alter how a command works
  • Arguments specify the command's specific working parameters
  • Arguments do not start with a dash

Shell Metacharacters

  • Keyboard characters with special meaning:
  • A $ tells the shell that the following text refers to a variable
  • Avoid the use of metacharacters unless using their special functionality
  • Single quotation marks '' protect metacharacters from being interpreted specially by the shell

Getting command help

  • Manual (man) pages: most common documentation for Linux commands
    • At the command prompt, type man command followed by command name
  • Manual pages
    • Contain different sections
    • Section numbers describe the category of the command in the manual page database
    • Searchable by keyword
  • GNU info Pages
    • Originally intended to replace the man command in Linux
      • At the command prompt, type info command followed by command name
    • Certain commands do not have manual or info pages
    • Those that are built into the BASH shell

Shutting Down Linux

  • The OS handles writing data from computer memory to the disk drives
    • Simply turning off power to the computer is not recommended as it can cause user and system file damage
  • Shutdown command
    • Can halt or reboot your computer after a certain period of time

Useful Shutdown Commands:

  • shutdown –P +4: Powers off your system in four minutes
  • shutdown –H +4: Halts the operating system in four minutes but does not invoke the ACPI function
  • shutdown -r +4: Reboots your system in four minutes
  • shutdown -P now: Powers off your system immediately
  • shutdown -r now: Reboots your system immediately
  • shutdown -c: Cancels a scheduled shutdown
  • halt: Halts your system immediately, but does not power it off
  • poweroff: Powers off your system immediately
  • reboot: Reboots your system immediately

Summary

  • Installation requires the verification of hardware requirements and compatibility
  • Linux installation media are available as an ISO image from the Internet
  • Typical Linux installation prompts for language, Date, Time zone, keyboard layout, network, user account and permanent storage configurations
  • Users must log in to a terminal and receive a shell before they are able to interact with the Linux system and kernel
  • Use command prompts to perform system tasks, obtain help manuals, and shut down the Linux system
    • The shell understands special shell metacharacters and arguments, and is case sensitive.

Studying That Suits You

Use AI to generate personalized quizzes and flashcards to suit your learning preferences.

Quiz Team

Related Documents

More Like This

System Administration Quiz
0 questions
Linux Terminal Commands Overview
10 questions
Linux Commands and Concepts
16 questions
Use Quizgecko on...
Browser
Browser