Running a Linux System - PowerPoint PPT Presentation

1 / 45
About This Presentation
Title:

Running a Linux System

Description:

The file manager in Red Hat Linux 7.3 is called Nautilus ... The Nautilus File Manager Window. Guide to Linux Installation and Administration. 14 ... – PowerPoint PPT presentation

Number of Views:45
Avg rating:3.0/5.0
Slides: 46
Provided by: lyudmilab
Category:

less

Transcript and Presenter's Notes

Title: Running a Linux System


1
Chapter 4
  • Running a Linux System

2
Objectives
  • In this chapter, you will
  • Manage files and directories on a Linux system
    using basic commands
  • Launch programs and manage corresponding software
    packages
  • Add and remove features from the Linux kernel
  • Review and change the initialization process that
    starts a Linux-based computer
  • Shut down a Linux system in an orderly way

3
Working with Linux Files and Directories
Valued Gateway Client
  • Information in Linux is stored in files organized
    in directories
  • Parent directory contains child directories and
    files
  • The parent directory for all directories is the
    root directory
  • All Linux configuration files are located in
    subdirectories of the root directory

4
Standard Linux Subdirectories of the Root
Directory
5
Working at a Command Line
  • Logging in to Linux at a text-mode console
    launches a command-line environment
  • Within a graphical environment, you can a
    command-line window by using the xterm program
  • The command-line window is also called a terminal
    emulator window

6
A Command-Line Window in a Graphical Environment
7
Managing Files with Command-Line Utilities
  • The command-line environment is provided by a
    shell
  • Shell program that accepts and acts on the
    commands that you enter
  • Absolute path complete description of the
    directory in absolute terms
  • Relative path partial description of the
    directory relative to another location

8
Managing Files with Command-Line Utilities
  • Linux commands
  • are case sensitive
  • can include options and parameters
  • Information about the date and time when an event
    occurred is stored in the form of a timestamp

9
Commands for Managing Files and Directories
10
Commands for Managing Files and Directories
11
Managing Files with Command-Line Utilities
  • Filenames
  • Are case-sensitive
  • Can be up to 256 characters
  • Can include file extensions

12
Managing Files with Graphical Utilities
  • Linux desktop includes a file manager
  • File manager graphical program to display the
    contents of a directory and manage files and
    directories
  • The file manager in Red Hat Linux 7.3 is called
    Nautilus
  • To perform basic file management tasks, you can
    drag and drop file icons

13
The Nautilus File Manager Window
14
File Properties
  • Each file in Linux has several basic properties
  • Type
  • Name
  • Size
  •  Location
  • Timestamp
  • Each file has the owner of the file, the group
    assigned to the file, and the permissions granted
    to access the file

15
The Properties Dialog Box
16
File Permissions
  • File permissions define the access that the owner
    has granted to others on the Linux system
  • Types of permissions
  • Read permission (r)
  • Write permission (w)
  • Execute permission (x)
  • Permissions can be assigned in three different
    ways
  • User permission
  • Group permission
  • Other permissions

17
File Permissions
  • You can alter file ownership and file permissions
    using the chown and chmod commands
  • The chmod command uses letters or numeric codes
    to define the file permissions assigned to a file
    or directory
  • The umask command determines the file permissions
    assigned when you create a new file

18
Commonly Used File Permission Settings
19
The Permissions Tab of the Properties Dialog Box
20
Running and Managing Software
  • Environment variables defined by the Linux shell
    so that all programs can access their values
  • Variable memory location used by a program to
    store a value
  • The PATH environment variable includes a list of
    all the directories where programs on the system
    are located
  • You can display values of the PATH using the echo
    command

21
Function Libraries
  • A function is a small task that a computer
    program performs
  • A function library is a file that contains
    commonly used functions
  • The ldd command lists the libraries that a
    program requires

22
Using rpm to Manage Software Packages
  • rpm command
  • Manages all of the rpm software packages
  • Maintains a database for all the software
    installed on the Linux system
  • You can use the rpm command to query the software
    package database or to install or erase software
    packages from the system
  • Hundreds of options are supported by the rpm
    command

23
Using Graphical Tools to Manage Software Packages
  • GNOME and KDE include graphical programs to
    manage software packages
  • The GnoRPM package management utility is included
    with Gnome
  • The KDE Desktop includes a package management
    tool called kPackage
  • Both GmoRPM and kPackage provide menu items

24
The Main Window of the GnoRPM Utility
25
Using kPackage to Display Software Package
Information
26
Using tar Archive Files
  • A tar archive is a collection of many files
    stored in a single file
  • The tar command is used to create a tar archive,
    to extract its content, and to create backups of
    files on the system
  • A tar archive has a .tar extension
  • The resulting file after the tar command with the
    compression options is called a gzipped tarball

27
Compression Utilities in Linux
28
The Linux Kernel
  • Each Linux kernel has
  • Release number
  • Timestamp
  • Modules

29
Learning about Your Kernel
  • The uname command with the r option displays the
    version of your Linux kernel followed by the
    release number
  • A release number is assigned by the company that
    prepared the Linux product
  • A timestamp indicates the date and time when the
    kernel was created

30
Kernel Modules
  • Linux kernel modules are files containing
    computer code that can be loaded into the kernel
    or removed from the kernel
  • Kernel modules can be automatically loaded based
    on the configuration set during the Linux
    installation
  • The lsmod command lists the modules that are
    installed in the Linux kernel

31
Adding and Removing Modules
  • The modprobe command loads a module with any
    required supporting modules
  • The rmmod command removes a module from the
    kernel
  • Module parameters provide information needed by
    amodule to locate system resources

32
Locating Modules
  • The module files are stored in /lib/modules/versio
    n/kernel directory, where version id the version
    number of the Linux kernel on the system
  • This directory contains subdirectories for
    networking-related modules, device drivers, and
    other module types

33
The Initialization Process
  • 1. A boot manager loads and starts the Linux
    kernel
  • 2. The Linux kernel initializes hardware and then
    launches the init program
  • 3. The init program launches a script based on
    the run level in which Linux is to operate
  • 4. The script started by init typically runs many
    other scripts to launch and manage system services

34
Booting the Kernel
  • GRUB and LILO are the boot managers
  • The boot manager displays a prompt listing the
    available operating system to launch
  • Boot parameters instruct the Linux kernel how to
    operate or how to access parts of the computer
    systems hardware
  • You can add boot parameters at the boot manager
    selection prompt

35
Configuring the Boot Manager
  • You can update the configuration of a boot
    manager after the installation is completed
  • The configuration file for the LILO boot manager
    is /etc/lilo.conf.anaconda
  • The configuration file for GRUB boot manager is
    /boot/grub/grub.conf

36
Initializing System Services
  • The init program is a master control program that
    starts other programs and scripts that initialize
    the system services
  • A script is a collection of commands that are
    stored in a text file and executed without user
    intervention
  • The init program is controlled by the
    /etc/inittab configuration file

37
Reviewing Run Level Services
  • A run level is a mode of operation in which a
    preconfigured set of services is activated

38
The Linux Initialization Process
39
Starting and Stopping System Services
  • The chconfig program allows you to start and stop
    services when you boot Linux
  • RedHat Linux includes a graphical utility to
    configure system services called serviceconf
  • The KDE Desktop includes a similar graphical
    utility called ksysv

40
The Service Configuration Utility
41
The ksysv Graphical Services Configuration Utility
42
Configuring System Services
  • The initialization scripts in /etc/rc.d/init.d
    are provided when you install Linux
  • Configuration details for system services scripts
    are located in the /etc/sysconfig directory and
    its subdirectories

43
Shutting Down Linux
  • You can shut down Linux by
  • The reboot command
  • The halt command
  • The shutdown command
  • Pressing CtrlAltDel
  • The telinit 0 command

44
Summary
  • Information in Linux is stored in files organized
    in a directory structure that begins with the
    root directory
  • There are basic commands to manage files and
    directories
  • Files can be compressed using tar, zip, gzip, and
    other utilities
  • Read, Write, and Execute permissions for a file
    or directory can be assigned to the owner, to the
    assigned group, or to all other users on the
    system
  • The rpm command is used to query the software
    package database or to install or erase software
    packages from the system

45
Summary
  • The Linux kernel supports loadable modules, which
    are managed using the lsmod, insmod, rmmod, and
    modprobe commands
  • You can provide boot parameters to the Linux
    kernel at the boot manager selection prompt
  • The Linux kernel starts the init program, which
    in turn runs several scripts based on information
    stored in the run level directories
  • You can set up which services are activated at
    boot time using the chkconfig command or using
    various graphical utilities
  • To avoid data loss, you must gracefully shut down
    Linux using a command such as reboot, halt, or
    shutdown
Write a Comment
User Comments (0)
About PowerShow.com