Book Image

Red Hat Enterprise Linux 8 Essentials

By : Neil Smyth
1 (1)
Book Image

Red Hat Enterprise Linux 8 Essentials

1 (1)
By: Neil Smyth

Overview of this book

Red Hat Enterprise Linux 8 is one of the most secure and dependable operating systems available. For this reason, the ambitious system or network engineer will find a working knowledge of Red Hat Enterprise 8 to be an invaluable advantage in their respective fields. This book, now updated for RHEL 8.1, begins with a history of Red Enterprise Linux and its installation. You will be virtually perform remote system administration tasks with cockpit web interface and write shell scripts to maintain server-based systems without desktop installation. Then, you will set up a firewall system using a secure shell and enable remote access to Gnome desktop environment with virtual network computing (VNC). You’ll share files between the Red Hat Enterprise Linux 8 (RHEL 8) and Windows System using Samba client and NFS. You will also run multiple guest operating systems using virtualization and Linux containers, and host websites using RHEL 8 by installing an Apache web server. Finally, you will create logical disks using logical volume management and implement swap space to maintain the performance of a RHEL 8 system. By the end of this book, you will be armed with the skills and knowledge to install the RHEL 8 operating system and use it expertly.
Table of Contents (32 chapters)
32
Index

1.1 Superuser Conventions

RHEL 8, in common with Linux in general, has two types of user account, one being a standard user account with restricted access to many of the administrative files and features of the operating system, and the other a superuser (root) account with elevated privileges. Typically, a user can gain root access either by logging in as the root user, or using the su - command and entering the root password. In the following example, a user is gaining root access via the su - command:

[neil@rhel8-demo ~]$ su -

Password:

[root@rhel8-demo ~]#

Note that the command prompt for a regular user ends with a $ sign while the root user has a # character. When working with the command-line, this is a useful indication as to whether or not you are currently issuing commands as the root user.

Alternatively, a single command requiring root privileges may be executed by a non-root user via the sudo command. Consider the following attempt to update the operating system with the latest patches and packages:

[neil@rhel8-demo ~]$ dnf update

Not root, Subscription Management repositories not updated

Error: This command has to be run under the root user.

Optionally, user accounts may be configured so that they have access to root level privileges. Instead of using the su - command to first gain root access, user accounts with administration privileges are able to run otherwise restricted commands using sudo.

[neil@rhel8-demo]$ sudo dnf update

 

We trust you have received the usual lecture from the local System

Administrator. It usually boils down to these three things:

 

    #1) Respect the privacy of others.

    #2) Think before you type.

    #3) With great power comes great responsibility.

 

[sudo] password for neil:

Updating Subscription Management repositories.

.

.

The reason for raising this issue so early in the book is that many of the command-line examples outlined in this book will require root privileges. Rather than repetitively preface every command-line example with directions to run the command as root, the command prompt at the start of the line will be used to indicate whether or not the command needs to be performed as root. If the command can be run as a regular user, the command will be prefixed with a $ command prompt as follows:

$ date

If, on the other hand, the command requires root privileges, the command will be preceded by a # command prompt:

# dnf install openssh