You are on page 1of 52

1

Shikhar Verma
2

Introduction
 Red Hat System Administration I
 Installation of Red Hat Enterprise Linux 7

Accessing the Command Line


 Accessing the command line using the Local Console
 Practice: Local Console Access Terms
 Accessing the Command Line Using the Desktop
 Practice: The GNOME 3 Desktop Environment
 Executing Commands Using the Bash Shell
 Lab: Accessing the Command Line

Shikhar Verma
3

Managing Files From the Command Line

 The Linux File System Hierarchy


 Locating Files by Name
 Practice: Locating Files and Directories
 Managing Files Using Command-Line Tools
 Practice: Command-Line File Management
 Matching File Names Using Path Name Expansion
 Lab: Managing Files with Shell Expansion
Shikhar Verma
4

Managing Files From the Command Line

 Locating Files by Name

• Absolute paths and relative paths


• Practice: Locating Files and Directories

Shikhar Verma
5

What is a path?

A path is a unique location to a file or a folder in a file system of an OS. A path to a file is a combination of /
and alpha-numeric characters.

What is an absolute path?

An absolute path is defined as the specifying the location of a file or directory from the root directory(/). In
other words we can say absolute path is a complete path from start of actual filesystem from / directory.

Some examples of absolute path:

/var/ftp/pub
/etc/samba.smb.conf
/boot/grub/grub.conf

If you see all these paths started from / directory which is a root directory for every Linux/Unix machines.
Shikhar Verma
6

What is the relative path?

Relative path is defined as path related to the present working directory(pwd). Suppose I am located in
/var/log and I want to change directory to /var/log/kernel. I can use relative path concept to change directory
to kernel

changing directory to /var/log/kernel by using relative path concept.

cd kernel

Changing directory to /var/log/kernel using absolute path concept.

cd /var/log/kernel

Shikhar Verma
7

Lab Session

Practice: Locating Files and Directories

Navigating Paths

#pwd
#ls
#cd Videos
#pwd
#cd
#ls –l; ls –R; touch
Shikhar Verma
8

 Managing Files Using Command-Line Tools

 Practice: Command-Line File Management

Shikhar Verma
9

Shikhar Verma
10

 Matching File Names Using Path Name Expansion


 Lab: Managing Files with Shell Expansion

Shikhar Verma
11

Shikhar Verma
12

 Lab Session

 Practice: Command-Line File Management

Shikhar Verma
13

 Getting Help in Red Hat Enterprise Linux

 Reading Documentation Using man Command


 Practice: Using the man Command
 Reading Documentation Using pinfo Command
 Practice: Using the pinto Command
 Reading Documentation in /usr/share/doc
 Practice: Viewing Package Documentation
 Getting Help From RedHat
 Practice: Creating and Viewing an SoS Report
 Lab: Viewing and Printing Help Documentation

Shikhar Verma
14

Shikhar Verma
15

Shikhar Verma
16

Shikhar Verma
17

Shikhar Verma
18

Shikhar Verma
19
20
21
22
23
24

Creating, Viewing, and Editing Text Files

 Redirecting Output to a File or Program


 Practice: I/0 Redirection and Pipelines
 Editing Text Files from the Shell Prompt
 Practice: Editing Files with Vim
 Editing Text Files with a Graphical Editor
 Practice: Copying Text Between Windows
 Lab: Creating, Viewing, and Editing Text Files

Shikhar Verma
25

Managing Local Linux Users and Groups


 Users and Groups
 Practice: User and Group Concepts
 Gaining Super user Access
 Practice: Running Commands as root
 Managing Local User Accounts
 Practice: Creating Users Using Command-line Tools
 Managing Local Group Accounts
 Practice: Managing Groups Using Command-line Tools
 Managing User Passwords
 Practice: Managing User Password Aging
 Lab: Managing Local Linux Users and Groups

Shikhar Verma
26

Controlling Access to Files with Linux FileSystem Permissions

 Linux File System Permissions


 Practice: Interpreting File and Directory Permissions
 Managing File System Permissions from the Command Line
 Practice: Managing File Security from the Command Line
 Managing Default Permissions and File Access
 Practice: Controlling New File Permissions and Ownership
 Lab: Controlling Access to Files with Linux File System Permissions

Shikhar Verma
27

Monitoring and Managing Linux Processes


 Processes
 Practice: Processes
 Controlling Jobs
 Practice: Background and Foreground Processes
 Killing Processes
 Practice: Killing Processes
 Monitoring Process Activity
 Practice: Monitoring Process Activity
 Lab: Monitoring and Managing Linux Processes
Shikhar Verma
28

Controlling Services and Daemons

 Controlling Services and Daemons


 Identifying Automatically Started System Processes
 Practice: Identify the Status of systemd Units
 Controlling System Services
 Practice: Using systemctl to Manage Services
 Lab: Controlling Services and Daemons
Shikhar Verma
29

Configuring and Securing OpenSSH Service

 Accessing the Remote Command Line with SSH


 Practice: Accessing the Remote Command Line
 Configuring SSH Key-based Authentication
 Practice: Using SSH Key-based Authentication
 Customizing SSH Service Configuration
 Practice: Restricting SSH Logins
 Lab: Configuring and Securing OpenSSH Service
Shikhar Verma
30

Analyzing and Storing Logs


 System Log Architecture
 Practice: System Logging Components
 Reviewing Syslog Files
 Practice: Finding Log Entries
 Reviewing systemd Journal Entries
 Practice: Finding Events With journalctl
 Preserving the systemd Journal
 Practice: Configure a Persistent systemd Journal
 Maintaining Accurate Time
 Practice: Adjusting System Time
 Lab: Analyzing and Storing Logs

Shikhar Verma
31

Managing Red Hat Enterprise Linux Networking


 Networking Concepts
 Practice: Networking Concepts
 Validating Network Configuration
 Practice: Examining Network Configuration
 Configuring Networking with nmcli
 Practice: Configuring Networking with nmcli
 Editing Network Configuration Files
 Practice: Editing Network Configuration Files
 Configuring Host Names and Name Resolution
 Practice: Configuring Host Names and Name Resolution
 Lab: Managing Red Hat Enterprise Linux Networking
Shikhar Verma
32

Archiving and Copying Files Between Systems

 Managing Compressed tar Archives


 Practice: Backing Up and Restoring Files From a tar Archive
 Copying Files Between Systems Securely
 Practice: Copying Files Over the Network With scp
 Synchronizing Files Between Systems Securely
 Practice: Synchronizing Two Directories Securely With rsync
 Lab: Archiving and Copying Files Between Systems
Shikhar Verma
33

 Managing Compressed tar Archives

Shikhar Verma
34

 Managing Compressed tar Archives

Shikhar Verma
35

 Managing Compressed tar Archives

Shikhar Verma
36

 Managing Compressed tar Archives

Shikhar Verma
37

Shikhar Verma
38

Shikhar Verma
39

Shikhar Verma
40

Shikhar Verma
41

Shikhar Verma
42

 Copying Files Between Systems Securely

Shikhar Verma
43

 Transfer files remotely with sftp

Shikhar Verma
44

 Transfer files remotely with sftp

Shikhar Verma
45

 Synchronizing Files Between Systems Securely

 Synchronize files and folders using rsync

Shikhar Verma
46

 Synchronizing Files Between Systems Securely

Shikhar Verma
47

Installing and Updating Software Packages


 Attaching Systems to Subscriptions for Software Updates
 Practice: Red Hat Subscription Management
 RPM Software Packages and Yum
 Practice: RPM Software Packages
 Managing Software Updates with yum
 Practice: Installing and Updating Software with yum
 Enabling yum Software Repositories
 Practice: Enabling Software Repositories
 Examining RPM Package Files
 Practice: Working with RPM Package Files
 Lab: Installing and Updating Software Packages
Shikhar Verma
48

Accessing Linux File Systems


 Accessing Linux File Systems
 Identifying File Systems and Devices
 Practice: Identifying File Systems and Devices
 Mounting and Unmounting File Systems
 Practice: Mounting and Unmounting File Systems
 Making Links Between Files
 Practice: Making Links Between Files
 Locating Files on the System
 Practice: Locating Files on the System
 Lab: Accessing Linux File Systems
Shikhar Verma
49

 Accessing the Command Line


 Accessing the command line using the Local Console
 Practice: Local Console Access Terms
 Accessing the Command Line Using the Desktop
 Practice: The GNOME 3 Desktop Environment
 Executing Commands Using the Bash Shell
 Lab: Accessing the Command Line

Shikhar Verma
50

 Accessing the Command Line

Executing Commands Using the Bash Shell

Shikhar Verma
51

 The GNOME desktop Environment

The desktop environment is the graphical user interface on


a Linux system. The default desktop environment in RHEL 7
is GNOME 3.

Shikhar Verma
52

END of this Course Module.

Thanks

You might also like