Book Image

CentOS Quick Start Guide

By : Shiwang Kalkhanda
Book Image

CentOS Quick Start Guide

By: Shiwang Kalkhanda

Overview of this book

Linux kernel development has been the worlds largest collaborative project to date. With this practical guide, you will learn Linux through one of its most popular and stable distributions. This book will introduce you to essential Linux skills using CentOS 7. It describes how a Linux system is organized, and will introduce you to key command-line concepts you can practice on your own. It will guide you in performing basic system administration tasks and day-to-day operations in a Linux environment. You will learn core system administration skills for managing a system running CentOS 7 or a similar operating system, such as RHEL 7, Scientific Linux, and Oracle Linux. You will be able to perform installation, establish network connectivity and user and process management, modify file permissions, manage text files using the command line, and implement basic security administration after covering this book. By the end of this book, you will have a solid understanding of working with Linux using the command line.
Table of Contents (11 chapters)

Introducing the Bash shell

The GNU Bash is primarily a program that interprets commands entered by the user at the prompt. As we learned in the previous Command line syntax and structure section, each command entered by the user can have three parts:

  • The command
  • The options (beginning with - or --)
  • The arguments

Each word entered in the shell is separated from the others with a space. Commands are the names of various applications installed on our system, where each command has its own options and arguments.

When you want to execute a command entered at the prompt, the Enter key is pressed. After the Enter key is pressed, output from that command is displayed on the shell, which is followed again by the prompt as shown in the following screenshot:

Each command is entered on a single line; however, if you wish you can enter multiple commands on a single line using the semicolon (;), which acts as a command separator.

The various functions performed by the shell include the following:

  • It provides an interface between the user and operating system
  • It is a way for the user to execute commands and other programs
  • It acts as an command-line interpreter for commands entered at the command prompt
  • Shell also enables the automation of tasks by reading commands from a special text file, known as a shell script
  • Shell provides an environment for users and programs running on the operating system

There are multiple types of shell installed on each Linux distribution, with slight differences in features among them. The Bourne shell (sh) is the most primitive, and the Bash shell is the most advanced. The differences between these shells are listed in the following table:

Feature

Bourne

Korn

C

Tcsh

Bash

Background processing

Yes

Yes

Yes

Yes

Yes

Command history

No

Yes

Yes

Yes

Yes

I/O redirection

Yes

Yes

Yes

Yes

Yes

Shell scripts

Yes

Yes

Yes

Yes

Yes

Command alias

No

Yes

Yes

Yes

Yes

File name completion

No

Yes

No

Yes

Yes

Command completion

No

No

No

Yes

Yes

Command line editing

No

Yes

No

Yes

Yes

Job control

No

Yes

Yes

Yes

Yes